Financial product recommendation method and device, equipment and storage medium
By combining the time decay function and the XGBoost model to optimize the bond fund recommendation algorithm, the problems of timeliness and accuracy of recommendation results in traditional algorithms are solved, and more accurate user interest analysis and recommendations are achieved.
Patent Information
- Application Number
- CN202510979039.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-10-28
AI Technical Summary
Traditional collaborative filtering algorithms lack time consideration in recommending bond fund products, resulting in untimely and unbalanced recommendation results, making it difficult to accurately recommend products that meet user needs.
By acquiring user behavior data and the life cycle of financial products, fitting the time decay function, and combining the improved collaborative filtering algorithm and the pre-trained XGBoost model, we can deeply explore changes in user interests and optimize recommendation results.
It improves the accuracy and timeliness of bond fund product recommendations, meets users' multi-dimensional needs, and enhances the recommendation effect.
Smart Images

Figure CN120852013A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of financial technology, and in particular to a method, apparatus, device, and storage medium for recommending financial products. Background Technology
[0002] As the financial market becomes increasingly active and sophisticated, more and more people are participating in wealth management and investment, with a growing number focusing on bond funds. Their relatively stable returns and high risk resistance make them highly sought-after investment products. However, to select suitable bond products, investors need to examine their historical performance, bond holdings, size, risk appetite, and other professional knowledge. For most investors, however, their theoretical knowledge is weak, and they lack basic financial literacy. Faced with a plethora of bond products, it is difficult to quickly find those that meet their specific needs.
[0003] With the rapid development of intelligent recommendation algorithms, many recommendation systems have been applied to e-commerce, short videos, and social media. However, their application in bond fund products is relatively limited. Traditional collaborative filtering does not consider time factors, resulting in untimely and unbalanced recommendation results. Therefore, effectively and deeply understanding user preferences to accurately recommend bond fund products to target users is of great significance to both users and the industry. Summary of the Invention
[0004] In view of this, the present invention provides a financial product recommendation method, apparatus, device, and storage medium that can fully consider the product's own life cycle and changes in user interest, thereby enhancing recommendation accuracy and improving recommendation effectiveness.
[0005] According to one aspect of the present invention, an embodiment of the present invention provides a method for recommending financial products, the method comprising:
[0006] Obtain a user behavior table and perform data preprocessing on the historical user behavior data in the user behavior table to obtain processed target behavior data; wherein, the target behavior data includes standard data including effective user behavior and the time when the effective user behavior occurred;
[0007] Obtain the lifecycle of the financial products included in the financial products table;
[0008] Based on the target behavior data and each of the life cycles, a corresponding time decay function is obtained;
[0009] The candidate recommendation results are determined based on the time decay function and the preset improved collaborative filtering algorithm;
[0010] The target recommendation result is determined based on the candidate recommendation results and the pre-trained XGBoost model.
[0011] According to another aspect of the present invention, embodiments of the present invention also provide a financial product recommendation device, the device comprising:
[0012] The data acquisition module is used to obtain the target behavior data by preprocessing the historical user behavior data in the user behavior table; wherein, the target behavior data includes standard data including effective user behavior and the time when the effective user behavior occurred.
[0013] The cycle acquisition module is used to obtain the life cycle of the financial products included in the financial product table;
[0014] The fitting module is used to fit the corresponding time decay function based on the target behavior data and each of the life cycles;
[0015] The candidate recommendation module is used to determine candidate recommendation results based on the time decay function and the preset improved collaborative filtering algorithm;
[0016] The target recommendation module is used to determine the target recommendation result based on the candidate recommendation results and the pre-trained XGBoost model.
[0017] According to another aspect of the present invention, embodiments of the present invention also provide an electronic device, the electronic device comprising:
[0018] at least one processor; and
[0019] A memory communicatively connected to the at least one processor; wherein,
[0020] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the financial product recommendation method according to any embodiment of the present invention.
[0021] According to another aspect of the present invention, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions for causing a processor to execute and implement the financial product recommendation method described in any embodiment of the present invention.
[0022] The technical solution described in this invention preprocesses historical user behavior data to obtain processed target behavior data, acquires the lifecycle of financial products included in the financial product table, and then fits a corresponding time decay function based on the target behavior data and each lifecycle. This approach, by adding a time decay function, fully considers the product's own lifecycle and changes in user interest, laying the foundation for improving recommendation accuracy. Candidate recommendation results are determined using the time decay function and a pre-set improved collaborative filtering algorithm, and the target recommendation result is determined based on the candidate recommendation results and a pre-trained XGBoost model. This approach delves deeper into user behavior, provides a more comprehensive understanding of user preferences, better meets user needs, and more accurately predicts user click probabilities, thereby enhancing recommendation accuracy and improving recommendation effectiveness.
[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 A flowchart illustrating a financial product recommendation method according to an embodiment of the present invention;
[0026] Figure 2 This is a schematic diagram of a feature processing flow during sample training according to an embodiment of the present invention;
[0027] Figure 3 A flowchart illustrating another financial product recommendation method provided in an embodiment of the present invention;
[0028] Figure 4 This is a schematic diagram of a data preprocessing process provided in an embodiment of the present invention;
[0029] Figure 5 A basic principle diagram of an item-based collaborative filtering recommendation mechanism provided in an embodiment of the present invention;
[0030] Figure 6 This is a schematic diagram of a user behavior table provided in an embodiment of the present invention;
[0031] Figure 7This is a schematic diagram of an inverted item list provided in an embodiment of the present invention;
[0032] Figure 8 This is a schematic diagram of an item similarity matrix provided in an embodiment of the present invention;
[0033] Figure 9 This is a flowchart illustrating another financial product recommendation method provided in an embodiment of the present invention;
[0034] Figure 10 This is a flowchart illustrating another financial product recommendation method provided in an embodiment of the present invention;
[0035] Figure 11 A structural block diagram of a financial product recommendation device provided in an embodiment of the present invention.
[0036] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0037] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0038] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0039] In one embodiment, Figure 1 This is a flowchart illustrating a financial product recommendation method according to an embodiment of the present invention. This embodiment is applicable to situations involving intelligent recommendations of financial products. The method can be executed by a financial product recommendation device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1As shown, the method includes:
[0040] S110. Obtain the user behavior table and perform data preprocessing on the historical user behavior data in the user behavior table to obtain the processed target behavior data.
[0041] The historical user behavior data in the user behavior table may include, but is not limited to, user click, follow, share, and purchase behavior data; the target behavior data includes standard data including valid user behavior and the time of the valid user behavior. Valid user behavior data can be understood as the valid user behavior data of users other than inactive users and expired financial products after removing inactive users from the historical user behavior data. In this embodiment, each user's valid behavior data corresponds to a specific behavior time.
[0042] In this embodiment, user behavior data regarding clicks, follows, shares, and purchases of various financial products over historical time periods can be obtained from a relevant user behavior collection table. This data is then processed to obtain the desired target behavior data. In some embodiments, historical behavior data can be filtered according to certain rules, such as the time of each user's behavior. Valid user behaviors and their corresponding times are then extracted from this data. Each valid user behavior is assigned a weight based on its importance, and the weighted valid user behaviors and their corresponding times are used as the processed target behavior data. Of course, other data processing methods can also be used to extract valid user behaviors and their corresponding times; this embodiment does not impose specific limitations on these methods.
[0043] S120. Obtain the lifecycle of the financial products included in the financial products table.
[0044] The financial product table can include various financial products, such as a base table or a bond product table. Each financial product has a corresponding product lifecycle. The lifecycle of a financial product can be in various forms, such as one year, several months, or quarters, and can be issued by professionals in the financial industry.
[0045] In this embodiment, the lifecycle of each financial product is read from the financial product table. Within the lifecycle of a financial product, a user can perform actions on that financial product at different times. These actions can represent the user's level of preference for that financial product at a certain time.
[0046] S130. Based on the target behavior data and the fitting of each life cycle, the corresponding time decay function is obtained.
[0047] The time decay function represents the change in users' interest and preference for financial products over time, which can be reflected through user behavior data during the life cycle of the financial product.
[0048] In this embodiment, Newton's law of cooling is often used as the basic model for the time decay function. Based on this, two boundary values are added to fit a specific time decay function used in financial product applications. This law describes that an object initially with a high temperature will slowly cool down in a low-temperature environment, its own temperature decreasing, while the temperature around the object will rise until the object and its surrounding temperature reach equilibrium and no longer change. This temperature change follows a predictable pattern: the rate of temperature decrease is proportional to the difference between the current temperature of the object and its surroundings. Mathematically, this can be expressed as… Where: T(t) is the current temperature of the object, H is the ambient temperature, and k is the proportionality constant. The above formula is transformed and solved to obtain... Here, T(t) is a quantity related to time t, and T(t0) is the initial quantity, i.e., the quantity at time zero. Based on the mathematical model of Newton's law of cooling, the time decay function N(t) = N0e^(-t / t) is obtained. -αt Specifically, the time decay function characterizes the change in users' interest and preference for financial products over time, expressed as: N(t) = N0e -αt In this context, N(t) represents the user's interest preference for financial products at time t, N0 = N(0) represents the initial value of the user's interest preference for financial products at the initial time, and α is the exponential decay constant, which is greater than 0. The exponential decay constant is determined based on the application scenario. If the user's interest changes rapidly in the application scenario, the exponential decay constant takes the first constant; if the user's interest changes slowly in the application scenario, the exponential decay constant takes the second constant; where the first constant is greater than the second constant. This can be understood as needing to be determined based on the specific application scenario. If the user's interest is relatively easy to change in the scenario, that is, the interest changes rapidly, α is suitable to take a larger value; conversely, α should take a smaller value.
[0049] S140. Determine candidate recommendation results based on the time decay function and the preset improved collaborative filtering algorithm.
[0050] Among them, the candidate recommendation result refers to a recommendation set containing multiple financial products, that is, a recommendation set of all financial products that users may be interested in, which includes multiple recommendation results.
[0051] In this embodiment, the preset improved collaborative filtering algorithm combines the time decay function with the collaborative filtering algorithm. The main purpose is to perform in-depth mining based on behavioral data to obtain preferences on the basis of combining the time decay function. A better recommendation effect can be obtained through statistical machine learning algorithms.
[0052] In this embodiment, the candidate recommendation results can be obtained as follows: First, a preset improved collaborative filtering algorithm is used to determine the similarity between financial products. Then, the time decay function is combined with the calculated similarity between financial products to obtain a target similarity with time information. Based on this, the user's interest in the financial product is determined according to the target similarity with time information, and the corresponding candidate recommendation results can be determined according to the interest. In some embodiments, the candidate recommendation list can also be calculated using the target user's identity information, user profile set, and product profile set, through a collaborative filtering recommendation algorithm based on the time decay function. In other embodiments, the similarity of the target user's preferences for the target recommended product can be calculated with historical users in the historical user database. A similar user set is constructed based on the preference similarity. Based on behavioral data, the initial interest of historical users in the similar user set for the target recommended product is obtained. The candidate recommendation results for the target user for the target recommended product are obtained through the preference similarity and the initial interest. Of course, other methods can also be used to calculate the candidate recommendation results, and this embodiment does not limit this.
[0053] S150. Determine the target recommendation result based on the candidate recommendation results and the pre-trained XGBoost model.
[0054] The target recommendation result is the final recommendation result given to the user. This target recommendation result is the sorted recommendation result, with the best-ranked result at the top of the recommendation result, and so on.
[0055] In this embodiment, a user's interest in bond funds depends on many factors, spanning multiple dimensions. These factors vary in importance and may even have multiple layers of dependency. Relying solely on manually defined rules makes it difficult to achieve good results and maintainability. A machine learning method is needed, which uses a machine learning model to synthesize multiple factors and obtain a ranking value. After obtaining recommendation results through a recommendation algorithm, the candidate recommendation results are further ranked using a pre-trained XGBoost model with excellent performance.
[0056] In this embodiment, the base classifier used in the pre-trained XGBoost model can be a Classification and Regression Tree (CART), a decision tree model used for classification and regression tasks. The XGBoost model in this embodiment is a supervised ensemble learning model. It can prevent overfitting by reducing weights and using column sampling. Furthermore, it supports distributed and parallel processing, making it a high-performance ensemble learning model with excellent training efficiency and performance.
[0057] In one embodiment, the training process of the XGBoost model includes: selecting a training sample set from historical user behavior data; extracting sample features from the training sample set to form a corresponding sample feature set; the sample features include user features, financial product features, and user interaction features with the financial product; inputting each sample feature set into the XGBoost model for training, and using a grid search method to optimize the model parameters of the XGBoost model until the model parameters reach the optimal level, and outputting the trained XGBoost model.
[0058] The model parameters include at least the number of decision trees, the depth of the trees, the random sampling ratio, the minimum value of the loss function, and the minimum weight of the child nodes.
[0059] In this embodiment, when selecting samples, firstly, the popularity of each bond fund is obtained based on user behavior records. Popularity is measured by the number of users who have interacted with the product; the more users who have interacted, the more popular the financial product. Then, the existing bond funds are sorted by popularity, and the top 50 most popular bond funds are selected. Finally, based on user behavior, the 50 bond funds that users have not interacted with are used as negative samples for the model.
[0060] In this embodiment, when extracting sample features from the training sample set, in order to better discover the features of the data, Figure 2This is a flowchart illustrating feature processing during sample training according to an embodiment of the present invention. In this embodiment, it is necessary to convert data attributes into data features. Feature engineering refers to this conversion process. This application takes the prediction of user click probability as an example. Based on different entities in the dataset, the features are divided into three major feature sets: user feature set, bond fund feature set, and user-bond fund feature set. After constructing the feature sets, it is necessary to refine the features within each feature set. For the user feature set, features that reflect various aspects of user behavior are needed. For example, based on the number of bond funds a user clicks, follows, shares, and purchases, the conversion rate of user clicks, follows, and shares can be derived, reflecting the user's purchasing characteristics. Adding the user's recent click, follow, share, and purchase times reflects the user's behavioral habits. After the feature construction is completed, a feature overview is obtained, as shown in Table 1.
[0061] Table 1: Feature Overview Table
[0062]
[0063] In this embodiment, after the feature construction is completed, the dimension of the obtained feature does not need to be extracted again, because the XGBoost model can perform feature selection itself. Therefore, feature selection is not required here, and the constructed features are directly put into the model for training.
[0064] In this embodiment, the XGBoost model training process is actually the process of optimizing the model parameters to achieve better results. The base classifier used in this invention is CART. The following are the steps for XGBoost model parameter tuning: (1) Select a higher learning rate. After selecting the learning rate, select the ideal number of decision trees corresponding to this learning rate. The cv function of XGBoost can be used to automatically learn the ideal number of decision trees; (2) After determining the above two values, the specific parameters of the tree model are then tuned. This mainly includes the tree depth max_depth, random sampling ratio subsample, minimum loss function gamma, and minimum child node weight min_child_weight. The grid search method is used to divide the value of each parameter into segments, compare and analyze to select the parameters that make the model perform best; (3) Reduce the learning rate to determine the final ideal parameters.
[0065] In this embodiment, after training the XGBoost model, the candidate recommendation results can be input into the pre-trained XGBoost model to reorder the recommendation results, output the target recommendation result, and recommend the target recommendation result to the user.
[0066] The technical solution described in this invention preprocesses historical user behavior data to obtain processed target behavior data, acquires the lifecycle of financial products included in the financial product table, and then fits a corresponding time decay function based on the target behavior data and each lifecycle. This approach, by adding a time decay function, fully considers the product's own lifecycle and changes in user interest, laying the foundation for improving recommendation accuracy. Candidate recommendation results are determined using the time decay function and a pre-set improved collaborative filtering algorithm, and the target recommendation result is determined based on the candidate recommendation results and a pre-trained XGBoost model. This approach delves deeper into user behavior, provides a more comprehensive understanding of user preferences, better meets user needs, and more accurately predicts user click probabilities, thereby enhancing recommendation accuracy and improving recommendation effectiveness.
[0067] In one embodiment, Figure 3 This is a flowchart of another financial product recommendation method provided by an embodiment of the present invention. Based on the above embodiments, this embodiment preprocesses historical user behavior data to obtain processed target behavior data, determines candidate recommendation results according to a time decay function and a preset improved collaborative filtering algorithm, and further refines the target recommendation results based on the candidate recommendation results and a pre-trained XGBoost model.
[0068] like Figure 3 As shown, the financial product recommendation method in this embodiment may specifically include the following steps:
[0069] S310. Obtain the user behavior table, read the historical user behavior data corresponding to multiple users in the user behavior table, and filter the historical behavior data that meets the requirements according to time.
[0070] In this embodiment, historical user behavior data is obtained and stored in a user behavior table. The historical user behavior data corresponding to multiple users is read from the user behavior table, and then the historical behavior data that meets the requirements is filtered according to the time when the user behavior data was generated. Specifically, a time limit can be set according to the needs, and those that do not meet the time requirements are filtered.
[0071] S320. Extract effective user behaviors and the corresponding time of occurrence of effective user behaviors from the historical behavior data that meets the requirements, and assign weight ratios to each user behavior in the effective user behaviors according to the importance level of the behavior.
[0072] The importance level of a behavior refers to assigning different weights to different user behaviors. For example, the weight of each behavior can be expressed as: purchase > share > follow > click, meaning that the purchase behavior has the highest importance level and the click behavior has the lowest importance level.
[0073] In this embodiment, the historical behavioral data that meets the requirements comes from various mainstream financial management apps or banking software. Inactive and churned users (users with no clicks within the past year) are removed, as are bond funds that have exceeded their time limits. Finally, the valid user behaviors are extracted. Specifically, the historical behavioral data that meets the requirements after time filtering is further processed to remove inactive users and expired products. Then, valid user behaviors and the corresponding timestamps of these behaviors are extracted, and each valid user behavior is assigned a weight according to its importance level.
[0074] S330. The effective user behaviors after being assigned weights and the corresponding behavior generation times are used as the processed target behavior data.
[0075] In this embodiment, after assigning weights to each user behavior in the effective user behavior according to the importance level of the behavior, the effective user behavior with assigned weights and the corresponding behavior generation time are used as the processed target behavior data.
[0076] For example, to better understand the process of preprocessing historical user behavior data to obtain processed target behavior data, Figure 4 This is a schematic diagram of a data preprocessing process provided in an embodiment of the present invention, as shown below. Figure 4 As shown, the process begins by obtaining the user behavior table, followed by data reading and filtering by time. Then, inactive users and those who have purchased expired financial products are removed to extract valid user behavior and time data. The final target behavior data is then obtained. Figure 4 Standard data in the database.
[0077] S340. Obtain the lifecycle of the financial products included in the financial products table.
[0078] S350. Based on the target behavior data and the fitting of each life cycle, the corresponding time decay function is obtained.
[0079] S360. Use a preset improved collaborative filtering algorithm to determine the similarity between financial products.
[0080] In this embodiment, after fitting the time decay function, it is necessary to first determine the similarity between financial products using a preset improved collaborative filtering algorithm. Specifically, the formula for calculating this similarity is as follows: In the formula, u represents a user, N(i) represents the number of users who prefer financial product i, N(j) represents the number of users who prefer financial product j, N(i)∩N(j) represents the number of users who prefer both financial product i and financial product j, and N(u) refers to the set of all bond funds that the user prefers, where bond fund i is an element in the intersection of these two sets.
[0081] In this embodiment, to facilitate a better understanding of the combination of the time decay function and the preset improved collaborative filtering algorithm, that is, the implementation of a collaborative filtering algorithm that takes into account the time factor, Figure 5 A basic principle diagram of an item-based collaborative filtering recommendation mechanism provided in an embodiment of the present invention is shown below. Figure 5 As shown, there are users A, B, and C, and items a, b, and c. Based on the historical behavior data of the three users, user A has a preference for items a and c, user B has broad interests and has preferences for all three items (a, b, and c), and user C only has a preference for item a. Because both user A and user B like items a and c, their similarity is relatively high. Therefore, it can be inferred that users who like item a are likely also interested in item c. Thus, for user C, the system will recommend item c.
[0082] In this embodiment, the collaborative filtering algorithm is implemented in two steps: first, similarity is calculated, mainly the similarity between bond funds; then, recommendations are made based on the results and user behavior data. Specifically, the similarity of items is measured mainly by the number of preferred items. Therefore, for any two bond funds, denoted as bond fund i and bond fund j, the bond fund similarity formula is used to measure their similarity, and the calculation formula is expressed as follows: In the formula, |N(i)| refers to the number of users who prefer bond fund i, and similarly, |N(j)| refers to the number of users who prefer bond fund j. |N(i)∩N(j)| refers to the number of users who prefer both bond fund i and bond fund j. Because the denominator includes users who like both bond fund i and bond fund j, the weight of bond fund j is penalized, mitigating the problem of bond fund j having excessively high similarity to many other items due to its popularity. The formula shows that the similarity between items increases when many people like them simultaneously. To calculate the similarity between items, a user-item inverted index is first created. This involves creating an item list for each user, containing all items that the user has preferred. Then, an item co-occurrence matrix is constructed, incrementing the co-occurrence matrix by 1 for items that appear simultaneously in the item list. For example, consider users A, B, C, and D, and bond funds a, b, c, and d. By analyzing users' historical behavior, assuming user A has some preference for items a, b, and c; user B has a preference for items b and c; user C only has a preference for item a; and user D has a preference for items a and d, a user behavior table can be constructed. Figure 6 This is a schematic diagram of a user behavior table provided in one embodiment of the present invention. A user-item inverted index can be constructed based on the user behavior table, that is, to count which users each bond fund has interacted with. For example, product a has interacted with users A, C, and D. Similarly, the interacting users of other products can be identified, resulting in an item inverted index. Figure 7 This is a schematic diagram of an inverted item list according to an embodiment of the present invention. Finally, an item similarity matrix can be constructed based on the obtained inverted item list. Figure 8 This is a schematic diagram of an item similarity matrix provided in an embodiment of the present invention. Obtaining the bond fund similarity matrix is equivalent to obtaining the similarity between any two bond funds. Then, the similarity is calculated using the formula... The interest level p of user u in a bond fund j is calculated. uj It can be expressed by the formula as Among them, w ji The similarity between bond fund j and bond fund i can be obtained from the similarity matrix obtained above. ui Let S(j,k) represent the preference value of user u for item i, obtained based on the user's historical behavior. S(j,k) represents a set of bond funds, whose elements are the k bond funds with the highest similarity to bond fund j. N(u) refers to the set of all bond funds that the user has a preference for, and bond fund i is an element in the intersection of these two sets. Furthermore, the degree of influence on item similarity varies for users with different activity levels. Based on this, a parameter called IUF is proposed to reduce the influence of active users. IUF is the reciprocal of the logarithm of user activity. The more items a user likes, the higher their activity level, and the lower their corresponding IUF value, thus having a smaller impact on similarity calculation. Incorporating the IUF parameter into the calculation of bond fund similarity corrects for the influence of user activity. The formula for calculating IUF with the parameter is as follows:
[0083] S370. Combine the time decay function and similarity to obtain the target similarity with time information.
[0084] In this embodiment, the shorter the time interval between a user's action on an item, the higher the similarity of the items. By incorporating a time decay function into the item similarity calculation formula, a target similarity with time information can be obtained. Specifically, the calculation formula for the target similarity obtained after combining these parameters is expressed as follows: Among them, S ij Let represent the target similarity between financial product i and financial product j, u represent users, N(i) represent the number of users who prefer financial product i, N(j) represent the number of users who prefer financial product j, and N(i)∩N(j) represent the number of users who prefer both financial product i and financial product j. f(|t ui -t uj |) represents the decay term, indicating that the closer the user's behavior time is to that of two financial products, the greater the decay of f(|t). ui -t uj The smaller the value of |), the smaller the value of the target similarity. The attenuation term is expressed by the formula: t ui t represents the time when user u takes action on financial product i. uj This represents the time when user u takes action on financial product j.
[0085] S380. Determine the user's interest in financial products based on target similarity.
[0086] In this embodiment, time information not only affects the similarity calculation between items but also influences the user's prediction formula for the item. Generally, a user's current behavior should be more closely related to their recent behavior. After obtaining the target similarity, the user's interest in the financial product can be determined based on the target similarity. Specifically, the formula for calculating interest is as follows: Where p(u,i) represents user u's interest in financial product i, j represents financial product j, N(u) represents the set of all financial products preferred by user u, and S(i,K) represents a set of financial products, where the elements of the set are the K financial products with the highest similarity to financial product i, and financial product j is an element in the intersection of sets S(i,K) and N(u). ij Represented as target similarity; r ui Let β represent the user u's preference value for financial product i, β represent the time decay parameter, t0 represent the current time, and t... uj This represents the time when user u takes action on financial product j.
[0087] S390. Determine candidate recommendation results based on interest level; wherein, the candidate recommendation results are in the form of a recommendation result set.
[0088] In this embodiment, candidate recommendation results are determined based on interest levels. This can be understood as quantifying the user's interest in the content and filtering out the most relevant recommendation results from a massive pool of candidates, thus balancing personalization and diversity.
[0089] S3100. Input the candidate recommendation results into the pre-trained XGBoost model to reorder the recommendation results, output the target recommendation result, and recommend the target recommendation result to the user.
[0090] In this embodiment, the candidate recommendation results are input into a pre-trained XGBoost model to reorder the recommendation results, so as to output the target recommendation result and recommend the target recommendation result to the user.
[0091] The technical solution described in this embodiment extracts effective user behaviors and their corresponding generation times from historical behavior data that meets the requirements. It assigns weights to each effective user behavior according to its importance level, using the weighted effective user behaviors and their corresponding generation times as processed target behavior data. This improves data instruction and enhances feature effectiveness. By fitting a time decay function and using a pre-defined improved collaborative filtering algorithm to determine the similarity between financial products, the time decay function and similarity are combined to obtain a target similarity. Based on the target similarity, the user's interest in the financial product is determined, and candidate recommendation results are determined based on this interest. This approach incorporates a time decay function, fully considering the product's lifecycle and changes in user interest, thus enhancing recommendation accuracy. Furthermore, by pre-training an XGBoost model and inputting the candidate recommendation results into the pre-trained XGBoost model for re-ranking the recommendation results to output the target recommendation result, which is then recommended to the user, the re-ranking stage allows for deeper analysis of user behavior, a more comprehensive understanding of user preferences, better fulfillment of user needs, and more accurate prediction of user click probabilities, thereby improving recommendation effectiveness.
[0092] In one embodiment, to facilitate a better understanding of time-effect-based recommendation algorithms and financial product recommendation methods, Figure 9 This is a flowchart illustrating another financial product recommendation method provided in an embodiment of the present invention. Figure 10 This is a flowchart illustrating another financial product recommendation method provided in an embodiment of the present invention. Figure 10 The recall strategy described in this invention is the process of obtaining candidate recommendation results, and the recall result is the candidate recommendation result in this invention. User features, product features, and interaction features are the process of feature extraction from samples, which is then used for subsequent model training. Specifically, firstly, training samples are selected from user behavior, then the features required by the model are extracted from the behavioral data, mainly including user features, product features, and interaction features. The samples and features are then fed into the XGBoost model for training, and finally, the obtained recall results are input into the model to obtain the ranked results for recommendation.
[0093] In one embodiment, Figure 11 This is a structural block diagram of a financial product recommendation device according to an embodiment of the present invention. This device is suitable for intelligently recommending financial products and can be implemented in hardware or software. It can be configured in an electronic device to implement a financial product recommendation method according to an embodiment of the present invention. Figure 11As shown, the device includes: a data acquisition module 1110, a period acquisition module 1120, a fitting module 1130, a candidate recommendation module 1140, and a target recommendation module 1150.
[0094] The data acquisition module 1110 is used to acquire a user behavior table and perform data preprocessing on the historical user behavior data in the user behavior table to obtain processed target behavior data; wherein, the target behavior data includes standard data including effective user behavior and the time generated by the effective user behavior;
[0095] The cycle acquisition module 1120 is used to acquire the life cycle of the financial products included in the financial product table.
[0096] Fitting module 1130 is used to fit the corresponding time decay function based on the target behavior data and each of the life cycles;
[0097] Candidate recommendation module 1140 is used to determine candidate recommendation results based on the time decay function and the preset improved collaborative filtering algorithm;
[0098] The target recommendation module 1150 is used to determine the target recommendation result based on the candidate recommendation results and the pre-trained XGBoost model.
[0099] In this embodiment of the invention, the data acquisition module and the period acquisition module preprocess historical user behavior data to obtain processed target behavior data, and acquire the lifecycle of the financial products included in the financial product table. Based on this, the fitting module fits the target behavior data and each lifecycle to obtain the corresponding time decay function. This fully considers the product's own lifecycle and changes in user interest while adding the time decay function, laying the foundation for improving recommendation accuracy. The candidate recommendation module determines candidate recommendation results using the time decay function and a preset improved collaborative filtering algorithm. The target recommendation module determines the target recommendation result based on the candidate recommendation results and a pre-trained XGBoost model. This allows for a deeper understanding of user behavior, a more comprehensive understanding of user preferences, better satisfaction of user needs, and more accurate prediction of user click probabilities, thereby enhancing recommendation accuracy and improving recommendation effectiveness.
[0100] In one embodiment, the data acquisition module 1110 includes:
[0101] The filtering unit is used to read the historical user behavior data corresponding to multiple users in the user behavior table, and filter the historical behavior data that meets the requirements according to time.
[0102] The weighting ratio assignment unit is used to extract effective user behaviors and the time of occurrence of the corresponding behaviors from the historical behavior data that meets the requirements, and to assign weight ratios to each user behavior in the effective user behaviors according to the importance level of the behaviors.
[0103] The target behavior data determination unit is used to take the effective user behaviors after assigning weight ratios and the corresponding behavior generation time as the processed target behavior data.
[0104] In one embodiment, the time decay function characterizes the change in a user's interest in financial products over time, expressed as: N(t) = N0e -αt Where N(t) is the user's interest preference for financial products at time t, N0 = N(0) is the initial value of the user's interest preference for financial products at the initial time, and α is the exponential decay constant, which is greater than 0. The exponential decay constant is determined according to the application scenario. If the user's interest changes rapidly in the application scenario, the exponential decay constant takes the first constant; if the user's interest changes slowly in the application scenario, the exponential decay constant takes the second constant; wherein the first constant is greater than the second constant.
[0105] In one embodiment, the candidate recommendation module 1140 includes:
[0106] A similarity determination unit is used to determine the similarity between the financial products using the preset improved collaborative filtering algorithm;
[0107] A target similarity determination unit is used to combine the time decay function and the similarity to obtain a target similarity with time information;
[0108] An interest determination unit is used to determine a user's interest in the financial product based on the target similarity.
[0109] The candidate recommendation result determination unit is used to determine candidate recommendation results based on the interest level; wherein the candidate recommendation results are in the form of a recommendation result set.
[0110] In one embodiment, the formula for calculating the target similarity is expressed as: Among them, S ij Let represent the target similarity between financial product i and financial product j, u represent users, N(i) represent the number of users who prefer financial product i, N(j) represent the number of users who prefer financial product j, and N(i)∩N(j) represent the number of users who prefer both financial product i and financial product j. f(|t ui -t uj|) represents the decay term, indicating that the closer the user's behavior time is to that of two financial products, the greater the decay of f(|t). ui -t uj The smaller the value of |), the smaller the value of the target similarity. The attenuation term is expressed by the formula: t ui t represents the time when user u takes action on financial product i. uj This represents the time when user u interacts with financial product j.
[0111] The interest level is expressed as: Where p(u,i) represents user u's interest in financial product i, j represents financial product j, N(u) represents the set of all financial products preferred by user u, and S(i,K) represents a set of financial products, where the elements of the set are the K financial products with the highest similarity to financial product i, and financial product j is an element in the intersection of sets S(i,K) and N(u). ij Represented as target similarity; r ui Let β represent the user u's preference value for financial product i, β represent the time decay parameter, t0 represent the current time, and t... uj This represents the time when user u takes action on financial product j.
[0112] In one embodiment, the training process of the XGBoost model includes:
[0113] A training sample set is selected from the historical user behavior data;
[0114] Sample features are extracted from the training sample set to form a corresponding sample feature set; the sample features include user features, financial product features, and user interaction features with the financial product.
[0115] Each of the aforementioned sample feature sets is input into the XGBoost model for training, and the model parameters of the XGBoost model are optimized using a grid search method until the model parameters reach their optimal values. The trained XGBoost model is then output. The model parameters include at least the number of decision trees, the depth of the trees, the random sampling ratio, the minimum value of the loss function, and the minimum weight of the child nodes.
[0116] Correspondingly, the target recommendation module 1150 includes:
[0117] The reordering unit is used to input the candidate recommendation results into the pre-trained XGBoost model to reorder the recommendation results, so as to output the target recommendation result and recommend the target recommendation result to the user.
[0118] The financial product recommendation device provided in this embodiment of the invention can execute the financial product recommendation method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.
[0119] In one embodiment, Figure 12 This is a schematic diagram of an electronic device provided for an embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0120] like Figure 12 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0121] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0122] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as financial product recommendation methods.
[0123] In some embodiments, the financial product recommendation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the financial product recommendation method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the financial product recommendation method by any other suitable means (e.g., by means of firmware).
[0124] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0125] Computer programs used to implement the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable financial product recommendation device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0126] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0127] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0128] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0129] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0130] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0131] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for recommending financial products, characterized in that, The method includes: Obtain a user behavior table and perform data preprocessing on the historical user behavior data in the user behavior table to obtain processed target behavior data; wherein, the target behavior data includes standard data including effective user behavior and the time when the effective user behavior occurred; Obtain the lifecycle of the financial products included in the financial products table; Based on the target behavior data and each of the life cycles, a corresponding time decay function is obtained; The candidate recommendation results are determined based on the time decay function and the preset improved collaborative filtering algorithm; The target recommendation result is determined based on the candidate recommendation results and the pre-trained XGBoost model.
2. The method according to claim 1, characterized in that, The historical user behavior data in the user behavior table is preprocessed to obtain the processed target behavior data, including: Read the historical user behavior data corresponding to multiple users in the user behavior table, and filter the historical behavior data that meets the requirements by time. Extract valid user behaviors and the corresponding time of occurrence of the valid user behaviors from the historical behavior data that meets the requirements, and assign weight ratios to each user behavior in the valid user behaviors according to the importance level of the behavior. The effective user behaviors, after being assigned weights, and the corresponding times of these behaviors are used as the processed target behavior data.
3. The method according to claim 1, characterized in that, The time decay function represents the change in a user's interest and preference for financial products over time, expressed as: N(t) = N0e -αt Where N(t) is the user's interest preference for financial products at time t, N0 = N(0) is the initial value of the user's interest preference for financial products at the initial time, and α is the exponential decay constant, which is greater than 0. The exponential decay constant is determined according to the application scenario. If the user's interest changes rapidly in the application scenario, the exponential decay constant takes the first constant; if the user's interest changes slowly in the application scenario, the exponential decay constant takes the second constant; wherein the first constant is greater than the second constant.
4. The method according to claim 1, characterized in that, The step of determining candidate recommendation results based on the time decay function and the preset improved collaborative filtering algorithm includes: The similarity between the financial products is determined using the preset improved collaborative filtering algorithm. The time decay function and the similarity are combined to obtain the target similarity with time information; The user's interest in the financial product is determined based on the target similarity. Candidate recommendation results are determined based on the interest level; wherein, the candidate recommendation results are in the form of a recommendation result set.
5. The method according to claim 4, characterized in that, The formula for calculating the target similarity is expressed as: Among them, S ij Let represent the target similarity between financial product i and financial product j, u represent users, N(i) represent the number of users who prefer financial product i, N(j) represent the number of users who prefer financial product j, and N(i)∩N(j) represent the number of users who prefer both financial product i and financial product j. f(|t ui -t uj |) represents the decay term, indicating that the closer the user's behavior time is to that of two financial products, the greater the decay of f(|t). ui -t uj The smaller the value of |), the smaller the value of the target similarity. The attenuation term is expressed by the formula: t ui t represents the time when user u takes action on financial product i. uj This represents the time when user u interacts with financial product j. The interest level is expressed as: Where p(u,i) represents user u's interest in financial product i, j represents financial product j, N(u) represents the set of all financial products preferred by user u, and S(i,K) represents a set of financial products, where the elements of the set are the K financial products with the highest similarity to financial product i, and financial product j is an element in the intersection of sets S(i,K) and N(u). ij Represented as target similarity; r ui Let β represent the user u's preference value for financial product i, β represent the time decay parameter, t0 represent the current time, and t... uj This represents the time when user u takes action on financial product j.
6. The method according to claim 1, characterized in that, The training process of the XGBoost model includes: A training sample set is selected from the historical user behavior data; Sample features are extracted from the training sample set to form a corresponding sample feature set; the sample features include user features, financial product features, and user interaction features with the financial product. Each of the aforementioned sample feature sets is input into the XGBoost model for training, and the model parameters of the XGBoost model are optimized using a grid search method until the model parameters reach their optimal values, and the trained XGBoost model is output; wherein, the model parameters include at least: the number of decision trees, the depth of the trees, the random sampling ratio, the minimum value of the loss function, and the minimum weight of the child nodes; Accordingly, determining the target recommendation result based on the candidate recommendation results and the pre-trained XGBoost model includes: The candidate recommendation results are input into the pre-trained XGBoost model to reorder the recommendation results, output the target recommendation result, and recommend the target recommendation result to the user.
7. A financial product recommendation device, characterized in that, The device includes: The data acquisition module is used to acquire a user behavior table and perform data preprocessing on the historical user behavior data in the user behavior table to obtain processed target behavior data; wherein, the target behavior data includes standard data including effective user behavior and the time when the effective user behavior occurred; The cycle acquisition module is used to obtain the life cycle of the financial products included in the financial product table; The fitting module is used to fit the corresponding time decay function based on the target behavior data and each of the life cycles; The candidate recommendation module is used to determine candidate recommendation results based on the time decay function and the preset improved collaborative filtering algorithm; The target recommendation module is used to determine the target recommendation result based on the candidate recommendation results and the pre-trained XGBoost model.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the financial product recommendation method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the financial product recommendation method according to any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the financial product recommendation method according to any one of claims 1-6.