Banking outlet recommendation method and device, equipment, medium and program product
By combining user characteristics, environmental characteristics and candidate outlet characteristics, and using multi-head attention network and multi-layer perceptron to calculate feature similarity, the problem of insufficient accuracy of existing bank outlet recommendation methods is solved, and more accurate outlet recommendations and user satisfaction improvements are achieved.
Patent Information
- Application Number
- CN202411851839.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-03-14
AI Technical Summary
The existing bank branch recommendation methods are not accurate enough, resulting in unreasonable business allocation and inability to meet user needs.
By combining user features, environmental features and candidate point features into input vectors, multi-head attention networks and multi-layer perceptrons calculate feature similarity to generate more accurate point recommendations.
It realizes more accurate outlet recommendations, reduces the time for users to handle business, and improves user satisfaction.
Smart Images

Figure CN119622108A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence, and more specifically, to a bank branch recommendation method, device, equipment, medium and program product. Background Art
[0002] Bank branches are a key part of the financial services provided by banks. The satisfaction of users when handling business at bank branches depends largely on the efficiency of handling business. Although many mobile banking apps have branch recommendation functions, they are basically calculated and recommended to users based on simple traffic time and queue information of the current branch. This method is not accurate, and there are still cases where business distribution between branches is unreasonable and individual branches cannot meet user needs. Summary of the invention
[0003] In view of the above problems, the present disclosure provides a bank branch recommendation method, apparatus, device, medium and program product.
[0004] According to a first aspect of the present disclosure, a bank branch recommendation method is provided, comprising: in response to a bank branch recommendation request, combining user features and environmental features with N candidate branch features to obtain N input vectors, wherein the N candidate branch features correspond one-to-one to the N candidate branches, and N is an integer greater than or equal to 2; inputting each of the input vectors into a multi-head attention network to obtain multiple intermediate vectors of each attention branch, and inputting at least two intermediate vectors into a multi-layer perceptron to obtain feature similarity, wherein the feature similarity indicates the degree of correlation between the user features, environmental features and candidate branch features in the corresponding input vector; obtaining an output vector corresponding to each of the input vectors according to the feature similarities of the attention branches in the multi-head attention network and the intermediate vectors that are not input into the multi-layer perceptron; and obtaining a recommended ranking of the N candidate branches based on each of the input vectors and its corresponding output vector.
[0005] According to an embodiment of the present disclosure, in response to a bank branch recommendation request, combining user characteristics and environmental characteristics with N candidate branch characteristics to obtain N input vectors includes: obtaining the user's pending business in the bank recommendation request; assigning weight coefficients to each of the candidate branch characteristics, the user characteristics, and the environmental characteristics, when at least one of the pending business and the user characteristics contains specific information; and combining each of the candidate branch characteristics, the user characteristics, and the environmental characteristics after weighting processing based on the weight coefficients to obtain the N input vectors.
[0006] According to an embodiment of the present disclosure, any one of the user characteristics, the environment characteristics and each of the candidate network point characteristics includes multiple feature values, wherein the assigning of weight coefficients to each of the candidate network point characteristics, the user characteristics and the environment characteristics respectively includes: assigning a weight coefficient to at least one feature value among the user characteristics, the environment characteristics and each of the candidate network point characteristics according to the specific information.
[0007] According to an embodiment of the present disclosure, assigning a weight coefficient to at least one feature value among the user features, the environment features and each of the candidate network point features based on the specific information includes: matching the specific information with the attributes represented by each feature value among the user features, the environment features and each of the candidate network point features; and assigning a weight coefficient to the corresponding feature value based on the matched target attribute.
[0008] According to an embodiment of the present disclosure, the multiple intermediate vectors include a query vector, a key vector and a value vector, and inputting at least two of the intermediate vectors into a multilayer perceptron to obtain feature similarity includes: inputting the query vector and the key vector into the multilayer perceptron to obtain the feature similarity.
[0009] According to an embodiment of the present disclosure, obtaining the output vector corresponding to each input vector based on the feature similarity of each attention branch in the multi-head attention network and the intermediate vector that has not been input into the multi-layer perceptron includes: normalizing the feature similarity of each attention branch to obtain a normalized result; obtaining the attention subspace vector output by each attention branch based on the normalized result and value vector of each attention branch; and concatenating all the attention subspace vectors to obtain the output vector.
[0010] According to an embodiment of the present disclosure, obtaining the recommended ranking of the N candidate outlets based on each of the input vectors and its corresponding output vector includes: inputting each of the input vectors and its corresponding output vector into a residual neural network to obtain N interaction vectors; calculating the recommendation scores of each of the N interaction vectors to obtain the recommended ranking of the N candidate outlets.
[0011] Another aspect of the disclosed embodiment provides a bank branch recommendation device, including: an input vector module, used to respond to a bank branch recommendation request, and combine user features and environmental features with N candidate branch features to obtain N input vectors, wherein the N candidate branch features correspond one-to-one to the N candidate branches, and N is an integer greater than or equal to 2; a similarity module, used to input each of the input vectors into a multi-head attention network to obtain multiple intermediate vectors of each attention branch, and input at least two intermediate vectors into a multi-layer perceptron to obtain feature similarity, wherein the feature similarity indicates the degree of correlation between the user features, environmental features and branch features in the corresponding input vector; an output vector module, used to obtain an output vector corresponding to each of the input vectors according to the feature similarities of each attention branch in the multi-head attention network and the intermediate vectors that are not input into the multi-layer perceptron; a recommendation ranking module, used to obtain a recommendation ranking of the N candidate branches based on each of the input vectors and its corresponding output vector.
[0012] Another aspect of an embodiment of the present disclosure provides an electronic device, including: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the method described above.
[0013] Another aspect of an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the processor executes the method as described above.
[0014] Another aspect of an embodiment of the present disclosure provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0015] One or more of the above embodiments have the following beneficial effects: it can comprehensively consider user characteristics, environmental characteristics and multiple candidate network features, and allow the multi-layer perceptron to participate in the data processing process of the multi-head attention network to calculate the correlation between features, and can more effectively capture the nonlinear and complex interactions between user characteristics, environmental characteristics and candidate network features, so that the recommendation process has strong interpretability, and further provide more accurate network recommendations, which can reduce the time users spend on handling business and improve user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above contents and other purposes, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0017] Figure 1 A diagram schematically shows an application scenario of the bank branch recommendation method according to an embodiment of the present disclosure;
[0018] Figure 2 A flowchart of a bank branch recommendation method according to an embodiment of the present disclosure is schematically shown;
[0019] Figure 3 A schematic diagram of a model architecture for implementing bank branch recommendation according to an embodiment of the present disclosure is shown;
[0020] Figure 4 Schematically shows a flow chart of obtaining an input vector according to an embodiment of the present disclosure;
[0021] Figure 5 Schematically shows a flow chart of obtaining an output vector according to an embodiment of the present disclosure;
[0022] Figure 6 A flowchart of recommendation sorting according to an embodiment of the present disclosure is schematically shown;
[0023] Figure 7 A schematic diagram showing a structural block diagram of a bank branch recommendation device according to an embodiment of the present disclosure; and
[0024] Figure 8 A block diagram of an electronic device suitable for implementing a bank branch recommendation method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0025] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0026] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0027] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.
[0028] Figure 1 The following schematically shows an application scenario diagram of the bank branch recommendation method according to an embodiment of the present disclosure. It should be noted that: Figure 1 What is shown are merely examples to which the embodiments of the present disclosure can be applied, so as to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0029] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104 and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0030] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, such as initiating a bank branch recommendation request or receiving a bank branch recommendation ranking. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email client, social platform software, etc. (only for example).
[0031] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0032] The server 105 may be a server that provides various services, such as a background management server that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (for example only). The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices. For example, the server 105 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud computing, network services, and middleware services.
[0033] It should be noted that the bank branch recommendation method provided in the embodiment of the present disclosure can generally be executed by at least one of a terminal device or a server. Accordingly, the bank branch recommendation device provided in the embodiment of the present disclosure can generally be set in at least one of a terminal device or a server.
[0034] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0035] The following will be based on Figure 1 The scene described by Figure 2~Figure 6 The bank branch recommendation method of the embodiment of the present disclosure is described in detail.
[0036] Figure 2 The flowchart of the bank branch recommendation method according to the embodiment of the present disclosure is schematically shown. Figure 3 A model architecture diagram for implementing bank branch recommendation according to an embodiment of the present disclosure is schematically shown.
[0037] like Figure 2 As shown, this embodiment includes:
[0038] In operation S210, in response to a bank branch recommendation request, user features and environment features are combined with N candidate branch features to obtain N input vectors, wherein the N candidate branch features correspond one-to-one to the N candidate branches, and N is an integer greater than or equal to 2.
[0039] For example, a bank branch recommendation request can be generated in response to a user's business operation on a terminal device. User characteristics include data related to user information, including the user's age, gender, and historical behavior, where historical behavior includes previous branch selection, visit time, etc. Branch characteristics include branch location information, distance information between the branch and the user, historical traffic, current traffic, etc. Environmental characteristics include time information and weather information, where time has multiple conditions: time of day, day of the week (working day), and general payday. These time factors affect the traffic of the day. Weather includes seasonality, weather conditions of the day, and other information that affects user travel and road conditions. Candidate branches can include all branches within a certain range from the user.
[0040] The user features and environmental features are combined as a whole with the features of each candidate network point to obtain an input vector. For example, the user features include (age, occupation code), the environmental features include (latitude and longitude, weather code), and the candidate network point features include (latitude and longitude, service type code), which are combined into an input vector. The original sparse high-dimensional feature vector can be mapped to a low-dimensional space, and high-order feature interactions can be modeled at the same time.
[0041] Reference Figure 3 , the user feature symbol is denoted by u. The network point feature symbol is denoted by b. The environmental factor feature symbol is denoted by h. The sparse feature vectors u, b, e are taken as input, and then all features are projected to the embedding layer.
[0042] Use sparse vectors to represent the connection of fields.
[0043] u = [u1;u2; ...; u j ]
[0044] b = [b1;b2; ...; b k ]
[0045] h = [h1;h2; ...; h m ]
[0046] Among them, j, k, and m are all greater than or equal to 1, and the sum of the three is the total number of eigenvalues, so each input vector can be schematically represented as:
[0047] x = [u1;u2; ...; u j ;b1;u2; ...; b k ; h1;h2; ...; h m ]
[0048] Each of these terms (denoted as x i ) is a feature representation.
[0049] In an embodiment of the present disclosure, before obtaining the user's information, the user's consent or authorization may be obtained. For example, before operation S210, a request to obtain the user's information may be issued to the user. When the user agrees or authorizes that the user's information may be obtained, operation S210 is performed.
[0050] In operation S220, each input vector is input into a multi-head attention network to obtain multiple intermediate vectors of each attention branch, and at least two intermediate vectors are input into a multi-layer perceptron to obtain feature similarity, wherein the feature similarity indicates the degree of correlation between user features, environmental features, and candidate network point features in the corresponding input vector.
[0051] The Multi-Head Attention Network is based on the multi-head attention mechanism. It runs multiple independent attention branches (or "heads") in parallel to obtain the attention distribution of different subspaces of the input sequence, thereby more comprehensively capturing the potential multiple semantic associations in the sequence. The Multilayer Perceptron (MLP) consists of an input layer, one or more hidden layers, and an output layer. Each layer contains multiple neurons, each of which is a node with a nonlinear activation function.
[0052] In some embodiments, each input vector is first divided into multiple parts, each part corresponds to an attention branch. Each attention branch calculates multiple intermediate vectors of the input part. The partial intermediate vectors obtained from each attention branch are spliced or connected in series to form a new vector, which is input into the MLP and outputs feature similarity. The feature similarity is used as the basis for each attention branch to obtain the attention subspace vector.
[0053] In other embodiments, each input vector is input to each attention branch, and each attention branch calculates multiple intermediate vectors of the input vector. At least two intermediate vectors of each attention branch are input into the MLP to obtain feature similarity. The feature similarity of each attention branch is used as the basis for the attention branch to obtain the attention subspace vector.
[0054] In other embodiments, N input vectors can be constructed as graph data, and users, candidate outlets and related features are represented as nodes in the graph data. Connections (edges) between nodes can be established based on geographic location, service type, environmental information, etc. According to the information contained in each input vector, it can be mapped to a specific path in the graph data. The multi-head attention network can process graph data, and the local connection pattern between different nodes in the graph can be captured from each attention branch, so as to be processed as each input vector to obtain multiple intermediate vectors. At least two intermediate vectors of each attention branch are input into the MLP to obtain feature similarity. The feature similarity of each attention branch is used as the basis for the attention branch to obtain the attention subspace vector. Therefore, the graph data can be effectively combined with the multi-head attention mechanism and the neural network to extract and utilize complex graph structure information, more effectively capture the nonlinear and complex interactions between user features, environmental features and candidate outlet features, so that the recommendation process has strong interpretability.
[0055] In operation S230, an output vector corresponding to each input vector is obtained based on the feature similarity of each attention branch in the multi-head attention network and the intermediate vector that has not been input into the multi-layer perceptron; for example, the recommended bank branches can be dynamically adjusted according to real-time data (for example, changes in user location, changes in weather conditions) to match the current environment and user needs.
[0056] In some embodiments, the feature similarity of each branch can be weighted and fused with the intermediate vector that is not input into the multi-layer perceptron. The weight can be preset based on task-specific requirements or obtained through training. In this way, the contribution of each branch is comprehensively considered to generate the final output vector.
[0057] In other embodiments, the most relevant intermediate vectors may be selected by using, for example, variance-based screening or model-based feature importance scoring, and the selected intermediate vectors are combined with feature similarities to form an output vector.
[0058] In other embodiments, the intermediate vectors of each attention branch that are not input into the multi-layer perceptron can be aggregated, for example, by taking an average or weighted average, to reduce the dimension and extract key information. The aggregated intermediate vectors are combined with the feature similarity to generate the final output vector by weighted averaging. The weight can be dynamically adjusted based on the reliability or importance of each branch so that the output vector can accurately reflect the comprehensive similarity between the user and the candidate network point.
[0059] In operation S240 , a recommended ranking of N candidate network points is obtained based on each input vector and its corresponding output vector.
[0060] For example, a prediction layer is used to process each input vector and its corresponding output vector. For example, the prediction layer may include a function mapping or a separate sorting network, which can predict the recommendation score of each candidate network point to obtain a sorting result.
[0061] For example, a user initiates a request through a mobile banking app, hoping to find the nearest bank branch that provides a specific service. First, user characteristics (such as age, occupation) and environmental characteristics (such as current location, weather conditions) are collected, and the characteristics of candidate branches (such as location, service type) are obtained from the database. These features are combined into input vectors and input into a multi-head attention network, which can process in parallel and pay attention to the complex relationships between different features. Then, some intermediate vectors are input into a multi-layer perceptron to calculate feature similarity. Then, based on the feature similarity and the intermediate vectors that are not input into the MLP, a comprehensive score for each candidate branch is obtained, and the candidate branches are ranked based on these scores, and the most matching branch is recommended to the user.
[0062] For example, if a user needs a loan service, the nearest bank branch that provides the service will be recommended, taking into account the user's location, weather conditions, and the branch's real-time queue situation. The branch's real-time queue situation includes the queue situation of specific services (which can be obtained through branch feedback or camera capture). Because some services may have queues, while others do not, the general overall flow of people in the branch is not used as a feature to achieve a more targeted effect.
[0063] In the embodiments of the present disclosure, a corresponding operation portal may be provided for the user to choose to agree or reject the automated decision result. That is, before the user information is processed / decided for bank branch recommendation, the user's instruction to agree or reject the processing / decision input through the corresponding operation portal may be obtained. If the user agrees to process / decision, the user information is processed / decided for bank branch recommendation, that is, step S240 is executed. If the user refuses to process / decision, the expert decision process is entered.
[0064] According to the embodiments of the present disclosure, it is possible to comprehensively consider user characteristics, environmental characteristics and multiple candidate network features in real time, and enable the multi-layer perceptron to participate in the data processing process of the multi-head attention network to calculate the correlation between features. It can more effectively capture the nonlinearity and complex interactions between user characteristics, environmental characteristics and candidate network features, make the recommendation process more interpretable, and further provide more accurate network recommendations, which can reduce the time users spend on handling business and improve user satisfaction.
[0065] Figure 4 The flowchart of obtaining an input vector according to an embodiment of the present disclosure is schematically shown.
[0066] like Figure 4 As shown, this embodiment is one of the embodiments of operation S210, including:
[0067] In operation S410, the pending business of the user in the bank recommendation request is obtained.
[0068] In operation S420, when at least one of the pending service and the user feature contains specific information, a weight coefficient is assigned to each candidate network point feature, user feature, and environment feature.
[0069] The specific information may be predetermined and may include key information that affects weight allocation, such as business type, user urgency, etc. For example, the standard weight coefficient is 1. If there is relevance to the specific information, a weight coefficient greater than 1 is allocated, otherwise a weight coefficient less than 1 is allocated. For general features, the standard weight coefficient is allocated.
[0070] In operation S430, each candidate network point feature, user feature, and environment feature that have been weighted based on the weight coefficient are combined to obtain N input vectors.
[0071] For example, in most cases, environmental factors have a greater impact on branch recommendations. However, since each branch can handle different services and has different queues, the weights for users who want to handle special services and users who want to handle general services are different. For users who need to handle special services, the weight of branch features is increased and the weight of environmental features is decreased. In addition, considering some elderly customers, the weight of user characteristics and environmental factors obviously occupies a heavier proportion than the queue situation at the branch, so the weight should be increased according to the situation.
[0072] According to the embodiments of the present disclosure, the importance of each factor can be adjusted according to the business type and user characteristics to optimize the recommendation results and provide bank branch recommendations that better meet user needs.
[0073] In the input vector, categorical features and continuous features are obtained according to different processing methods.
[0074] For categorical features, there is no specific relationship between the features, so each item is a high-dimensional sparse one-hot vector. Each categorical feature is expressed by a low-dimensional vector, as shown below:
[0075] e i = V i x' i Formula 1
[0076] Among them, V i is the domain x' i The embedding matrix, x i is a one-hot vector, x'i It is the i-th categorical feature after weighted processing.
[0077] For continuous features, such as numerical variables, it is as follows:
[0078] e m =V m x' m Formula 2
[0079] Where V m is the domain x' m The embedding vector, x m is a scalar, x' m is the mth continuous feature after weighted processing. In the following, the feature e under the feature group m in the input vector is m Take this as an example to illustrate.
[0080] In some embodiments, any one of the user features, environmental features, and each candidate network point feature includes multiple feature values, wherein assigning a weight coefficient to each candidate network point feature, user feature, and environmental feature includes: assigning a weight coefficient to at least one feature value among the user features, environmental features, and each candidate network point feature based on specific information.
[0081] In some embodiments, the specific information is matched with the attributes represented by each feature value in the user feature, the environment feature, and each candidate network point feature; and a weight coefficient is assigned to the corresponding feature value according to the matched target attribute. In this embodiment, assigning a weight coefficient to a feature value means assigning a weight value greater than 1 or less than 1.
[0082] The allocation weight coefficient involved in the present disclosure refers to the process of quantifying the importance of each feature or each feature value according to specific information. Multiple feature values include specific attributes that constitute user features, environmental features, or candidate network features. For example, multiple feature values in user features may include age (30 years old), income (monthly income of 10,000 yuan), and credit score (750 points). Age, income, and credit score are different attributes.
[0083] Specific information can be matched with attributes of the same or different categories as target attributes. For example, when the specific information includes a specific business, the business attributes of the same category in the candidate branch features can be matched as target attributes. For example, if the pending business includes the specific information "loan", historical loan records and repayment capabilities of different categories may be matched as target attributes, and a weight coefficient greater than 1 may be assigned.
[0084] According to the embodiments of the present disclosure, by assigning different weights to different feature values, the importance of the attributes represented by different feature values can be adjusted, branch service resources can be allocated more effectively, and bank branches that meet user needs can be recommended, thereby improving the overall service experience.
[0085] In some embodiments, when at least one of the pending service and the user feature contains specific information, the weight coefficients assigned to each candidate network feature, user feature, and environment feature include at least one of the following:
[0086] When the to-be-processed business includes a specific category of business, determine the specific candidate outlets that provide the specific category of business, and assign a first weight coefficient to at least one characteristic value in the candidate outlet characteristics corresponding to each specific candidate outlet; for example, assign a first weight coefficient to the business characteristic value in the specific candidate outlet, such as 1.3.
[0087] In the case where the user feature includes a specific user age, a second weight coefficient is allocated to at least one feature value of the site feature and the environment feature, wherein the first weight coefficient and the second weight coefficient are greater than the standard weight coefficient.
[0088] For elderly users (for example, users who meet the retirement age), different conditions in the network information have different weights. The distance b1 between the network and the user becomes very important, and its weight can be set to 1.2 (i.e., the second weight coefficient). The weight of the flow of people b2 at the network is not particularly important, and can be set to 0.3 (i.e., the third weight coefficient, which is smaller than the standard weight coefficient). When calculating, set the weight w b =[1.2,0.3,...w bk ], after weighting, the eigenvector is b'=b w b By analogy with this calculation, we can get u', h', and finally x'.
[0089] According to the embodiments of the present disclosure, by allocating weight coefficients, the importance of each feature value can be increased or decreased in a targeted manner. Figure 3 As shown, the importance of specific feature values can be pre-adjusted before the input layer, giving prior knowledge of model reasoning to influence the recommendation results. Among them, different specific information can be screened out based on expert experience, historical data, etc., and weight coefficients of different feature values can be configured for each specific information and stored as a data table. When performing the operation of assigning weight coefficients, the table is looked up. Alternatively, a model for assigning weight coefficients can be trained using a machine learning algorithm.
[0090] In some embodiments, the multiple intermediate vectors include a query vector, a key vector and a value vector, and inputting at least two of the intermediate vectors into a multilayer perceptron to obtain feature similarity includes: inputting the query vector and the key vector into the multilayer perceptron to obtain feature similarity.
[0091] With numeric variable e m For example, at the interaction layer, the multi-head attention mechanism projects features into multiple attention subspaces, and different feature interaction patterns can be captured in different attention subspaces.
[0092] For each attention branch, the linear multiplication of the matrix is transformed into a vector representation in different attention spaces. m In a specific attention space h, there are three vector representations:
[0093] Formula 3
[0094] in , and They are all transformation matrices. represents the query vector, represents the key vector, Represents a vector of values.
[0095] First, for each Query and Key pair, they are combined through concat to form a new input vector Z QK .
[0096] Formula 5
[0097] Z QK Input into MLP to calculate their similarity score S QK
[0098] Formula 6
[0099] Among them, the last layer of MLP outputs a scalar score, which represents the similarity between a specific query and key, that is, feature similarity.
[0100] Using MLP to calculate feature similarity is at least one inventive point of the present disclosure. Compared with simply obtaining the similarity between a specific query and a key by calculating a vector inner product, etc., it can increase the model's ability to capture complex feature interactions through training.
[0101] In some embodiments, e m The corresponding query and the key of other features are input into MLP to calculate the feature similarity between the two.
[0102] Among them, when calculating the same feature e m When calculating the similarity between the query and key, the two come from the same feature space, which means that they are essentially the same type of data, such as text data or user behavior data. This method helps capture and understand the similarity or correlation within the same type of data. m When the feature similarity between the corresponding query and the key of other features is measured, the two features come from different feature spaces. The inspiration is to compare two different types of data, for example, matching the user's historical business features with environmental features. It can reveal the potential correlation and interaction effects between different features.
[0103] According to the embodiment of the present disclosure, the same feature e is calculated m When the similarity between the query and key is calculated, at least one of the dimensions and properties (such as numerical variables, i.e., continuous features) of the input data is consistent, which may make it easier to capture the interactions within the features.
[0104] Figure 5 The flowchart of obtaining the output vector according to the embodiment of the present disclosure is schematically shown.
[0105] like Figure 5 As shown, this embodiment includes:
[0106] In operation S510, the feature similarity of each attention branch is normalized to obtain a normalized result; the feature group m includes multiple e m , so multiple feature similarities can be obtained, and each feature similarity is normalized.
[0107] In operation S520, based on the normalized result and value vector of each attention branch, an attention subspace vector output by each attention branch is obtained.
[0108] The softmax function can be used to normalize the feature similarity to obtain the weighted coefficient of each Value (i.e. the normalized result), and then the weighted Value is calculated as the attention subspace vector output by the attention branch. Therefore, the new feature representation of the input vector is obtained by weighted summation:
[0109] Formula 7
[0110] in, Represents the weighted output in the attention space h, that is, the attention subspace vector. is the weighting coefficient of the mth value.
[0111] In operation S530, all attention subspace vectors are concatenated to obtain an output vector.
[0112] In a multi-head attention mechanism, the above process is performed in parallel in multiple different attention branches (heads), each with its own set of , , and MLP. Finally, the output of all heads Will be merged by splicing to get:
[0113] Formula 8
[0114] in is a concatenation operator, and the features learned by different attention branches are crossed. H refers to H feature spaces. The output vector in operation S530 is based on Come get.
[0115] Figure 6 The flowchart of recommendation sorting according to an embodiment of the present disclosure is schematically shown.
[0116] like Figure 6 As shown, this embodiment is one of the embodiments of operation S240, including:
[0117] In operation S610, each input vector and its corresponding output vector are input into a residual neural network to obtain N interaction vectors.
[0118] In operation S620, the recommendation scores of the N interaction vectors are calculated to obtain the recommendation rankings of the N candidate network points.
[0119] In order to retain some original information as the input of the next layer, a residual neural network is used to add an interaction layer:
[0120] Formula 9
[0121] Among them, ReLU represents the residual neural network, W Res Characterize the original features m The weight coefficient of .
[0122] Each feature e in feature group m m The results are spliced to calculate the final output value:
[0123] Formula 10
[0124] Among them, σ is an activation function, such as sigmoid, tanh, ReLU, etc. Tis a weight vector used to perform a linear transformation on the concatenated feature vector. b is a bias term, whose value can be determined during the training phase.
[0125] When the input vector is obtained based on feature set m, the recommendation score of its interaction vector is In the case where the input vector contains other features in addition to the feature group m, the results corresponding to the other features can be compared with e m The results of splicing are obtained .
[0126] Return to reference Figure 3 The recommendation model used in the above bank branch recommendation method includes an input layer, an embedding layer, an interaction layer, and a prediction layer (used to output branch recommendation rankings). The following describes the process of training the recommendation model.
[0127] First, data preparation is performed, such as historical data. Secondly, the data set is organized and preprocessed, including user features, network features, and environmental features. Then, all features are converted into embedding vectors, such as Formula 1 and Formula 2. Then, a multi-head attention network is defined to process these embedding vectors. The multi-head attention network can include multiple attention branches, each of which includes one or more self-attention layers. Then, a suitable loss function is selected, such as using log loss as the loss function of the model. During the training process, hyperparameters such as the size of the embedding vector, the number of self-attention layers, etc. are adjusted according to the performance of the validation set. Then, the performance of the model is evaluated on the test set, with accuracy as the evaluation indicator, and the model is further adjusted based on the evaluation results. Once the model achieves satisfactory performance, it can be used to recommend network points to users.
[0128] Based on the above bank branch recommendation method, the present disclosure also provides a bank branch recommendation device. Figure 7 The device is described in detail.
[0129] Figure 7 The structural block diagram of the bank branch recommendation device according to the embodiment of the present disclosure is schematically shown.
[0130] like Figure 7 As shown, the bank branch recommendation device 700 of this embodiment includes an input vector module 710 , a similarity module 720 , an output vector module 730 , and a recommendation ranking module 740 .
[0131] The input vector module 710 can perform operation S210, which is used to respond to a bank branch recommendation request and combine user characteristics and environmental characteristics with N candidate branch characteristics to obtain N input vectors, wherein the N candidate branch characteristics correspond one-to-one to the N candidate branches, and N is an integer greater than or equal to 2.
[0132] The similarity module 720 can perform operation S220, which is used to input each input vector into a multi-head attention network to obtain multiple intermediate vectors of each attention branch, and input at least two intermediate vectors into a multi-layer perceptron to obtain feature similarity, wherein the feature similarity indicates the degree of correlation between user features, environmental features, and network point features in the corresponding input vectors.
[0133] The output vector module 730 can perform operation S230 to obtain an output vector corresponding to each input vector based on the feature similarity of each attention branch in the multi-head attention network and the intermediate vector that has not been input into the multi-layer perceptron.
[0134] The recommendation ranking module 740 may perform operation S240 to obtain a recommendation ranking of the N candidate network points based on each input vector and its corresponding output vector.
[0135] In some embodiments, the input vector module 710 may further perform operations S410 to S420, which will not be described in detail herein.
[0136] In some embodiments, the input vector module 710 may also be used to assign a weight coefficient to at least one feature value among the user feature, the environment feature, and each candidate network point feature according to specific information.
[0137] In some embodiments, the input vector module 710 can also be used to match specific information with attributes represented by each feature value in user features, environmental features, and each candidate network point feature; and assign weight coefficients to corresponding feature values according to the matched target attributes.
[0138] In some embodiments, the similarity module 720 is further configured to input the query vector and the key vector into a multi-layer perceptron to obtain feature similarity.
[0139] In some embodiments, the output vector module 730 may further perform operations S510 to S530, which will not be described in detail herein.
[0140] In some embodiments, the recommendation ranking module 740 may further perform operations S610 to S620, which will not be described in detail herein.
[0141] For the parts not mentioned in the device part, they can be understood with reference to the various embodiments of the above method. That is, the device part includes modules for executing the various steps of any one of the method embodiments described above. In addition, the implementation methods, technical problems solved, functions implemented, and technical effects achieved of each module / unit / subunit, etc. in the device part embodiment are respectively the same or similar to the implementation methods, technical problems solved, functions implemented, and technical effects achieved of each corresponding step in the method part embodiment, and will not be repeated here.
[0142] According to an embodiment of the present disclosure, any multiple modules among the input vector module 710, the similarity module 720, the output vector module 730, and the recommendation ranking module 740 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module.
[0143] According to an embodiment of the present disclosure, at least one of the input vector module 710, the similarity module 720, the output vector module 730, and the recommendation ranking module 740 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware, and firmware, or by a suitable combination of any of them. Alternatively, at least one of the input vector module 710, the similarity module 720, the output vector module 730, and the recommendation ranking module 740 may be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function may be performed.
[0144] Figure 8 A block diagram of an electronic device suitable for implementing a bank branch recommendation method according to an embodiment of the present disclosure is schematically shown.
[0145] like Figure 8 As shown, the electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 to a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0146] In RAM 803, various programs and data required for the operation of electronic device 800 are stored. Processor 801, ROM 802 and RAM 803 are connected to each other via bus 804. Processor 801 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 802 and / or RAM 803. It should be noted that the program can also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.
[0147] According to an embodiment of the present disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the input / output (I / O) interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 808 including a hard disk, etc.; and a communication portion 809 including a network interface card such as a LAN card, a modem, etc. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that the computer program read therefrom is installed into the storage portion 808 as needed.
[0148] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0149] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 802 and / or RAM 803 described above and / or one or more memories other than ROM 802 and RAM 803.
[0150] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present disclosure.
[0151] The above functions defined in the system / device of the embodiment of the present disclosure are executed when the computer program is executed by the processor 801. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0152] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0153] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0154] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0155] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0156] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0157] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A bank branch recommendation method, comprising: In response to a bank branch recommendation request, the user feature and the environment feature are respectively combined with N candidate branch features to obtain N input vectors, wherein the N candidate branch features correspond to the N candidate branches one by one, and N is an integer greater than or equal to 2; Input each of the input vectors into a multi-head attention network to obtain multiple intermediate vectors of each attention branch, and input at least two intermediate vectors into a multi-layer perceptron to obtain feature similarity, wherein the feature similarity indicates the degree of correlation between user features, environment features, and candidate network point features in the corresponding input vector; Obtaining an output vector corresponding to each of the input vectors according to the feature similarities of each attention branch in the multi-head attention network and the intermediate vectors that are not input into the multi-layer perceptron; A recommended ranking of the N candidate network points is obtained based on each of the input vectors and its corresponding output vector.
2. The method according to claim 1, characterized in that: In response to the bank branch recommendation request, the steps of combining the user features and the environment features with the N candidate branch features to obtain N input vectors include: Obtain the pending business of the user in the bank recommendation request; In the case where at least one of the pending business and the user characteristics contains specific information, a weight coefficient is assigned to each of the candidate network point characteristics, the user characteristics and the environment characteristics; Each of the candidate network point features, the user features, and the environment features that have been weighted based on the weight coefficients are combined to obtain the N input vectors.
3. The method according to claim 2, characterized in that Any one of the user feature, the environment feature and each of the candidate network point features includes multiple feature values, The step of respectively allocating weight coefficients to each of the candidate network point features, the user features, and the environment features includes: According to the specific information, a weight coefficient is assigned to at least one feature value among the user feature, the environment feature and each of the candidate network point features.
4. The method according to claim 3, characterized in that The allocating a weight coefficient to at least one feature value among the user feature, the environment feature, and each of the candidate network point features according to the specific information comprises: Matching the specific information with the attributes represented by each feature value in the user feature, the environment feature, and each of the candidate network point features; According to the matched target attribute, a weight coefficient is assigned to the corresponding feature value.
5. The method according to claim 1, characterized in that The multiple intermediate vectors include a query vector, a key vector, and a value vector, and the step of inputting at least two intermediate vectors into a multilayer perceptron to obtain feature similarity includes: The query vector and the key vector are input into the multi-layer perceptron to obtain the feature similarity.
6. The method according to claim 5, characterized in that The step of obtaining an output vector corresponding to each input vector according to the feature similarity of each attention branch in the multi-head attention network and the intermediate vector not input into the multi-layer perceptron includes: Normalizing the feature similarity of each attention branch to obtain a normalized result; Based on the normalized result and value vector of each attention branch, obtaining the attention subspace vector output by each attention branch; All attention subspace vectors are concatenated to obtain the output vector.
7. The method according to claim 1, characterized in that The obtaining the recommended ranking of the N candidate network points based on each of the input vectors and the output vector corresponding thereto comprises: Input each of the input vectors and its corresponding output vector into the residual neural network to obtain N interaction vectors; The recommendation scores of the N interaction vectors are calculated to obtain the recommendation rankings of the N candidate network points.
8. A bank branch recommendation device, comprising: An input vector module, for responding to a bank branch recommendation request, combining user features and environment features with N candidate branch features to obtain N input vectors, wherein the N candidate branch features correspond to the N candidate branches one by one, and N is an integer greater than or equal to 2; A similarity module is used to input each of the input vectors into a multi-head attention network to obtain multiple intermediate vectors of each attention branch, and input at least two intermediate vectors into a multi-layer perceptron to obtain feature similarity, wherein the feature similarity indicates the degree of correlation between user features, environment features and network point features in the corresponding input vectors; An output vector module, used to obtain an output vector corresponding to each of the input vectors according to the feature similarity of each attention branch in the multi-head attention network and the intermediate vector that is not input into the multi-layer perceptron; The recommendation ranking module is used to obtain the recommendation ranking of the N candidate network points based on each input vector and its corresponding output vector.
9. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.