Product recommendation method and device, electronic device and storage medium
By building user portraits and training product prediction models, combined with genetic search and similar user screening, the problem of insufficient recommendation capabilities of neural networks was solved, and efficient and accurate recommendations of insurance products were achieved.
Patent Information
- Application Number
- CN202411764762.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-12-02
AI Technical Summary
In the existing technology, insurance product recommendations based on neural networks have weak recommendation capabilities because the data set cannot cover a variety of user situations, which in turn affects the recommendation success rate.
By obtaining sample user information and product purchase records, building user portraits and training product prediction models, and combining genetic search and similar user screening, we can accurately identify target objects for product recommendations.
It improves the success rate of insurance product recommendations, enables accurate screening of users and product predictions, and enhances the accuracy and coverage of recommendations.
Smart Images

Figure CN119624584B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent recommendation technology, applicable to the field of financial technology, and in particular to a product recommendation method and device, electronic device and storage medium. Background Art
[0002] Product recommendation refers to recommending products to users. For example, when recommending insurance products, we can filter out target products that match the target user and then push these products to them. In this scenario, insurance product recommendation is typically implemented using neural networks. However, due to the dataset not covering a wide range of user situations, the neural network's recommendation capabilities lack strong generalization, resulting in a low success rate for product recommendations. Therefore, improving the success rate of insurance product recommendations has become a pressing issue. Summary of the Invention
[0003] The main purpose of the embodiments of the present application is to propose a product recommendation method and device, electronic device and storage medium, aiming to improve the success rate of insurance product recommendations.
[0004] To achieve the above objectives, a first aspect of an embodiment of the present application provides a product recommendation method, the method comprising:
[0005] Obtaining sample user information of a sample object and a sample product purchase record of the sample object;
[0006] Construct a user profile based on the sample user information to obtain a sample user profile;
[0007] Training a preset product prediction model based on the sample user portrait and the sample product purchase record to obtain a target product prediction model;
[0008] Performing a genetic search on the sample product purchase records and the sample user profiles to obtain a selected user profile;
[0009] Obtain candidate user information of a candidate object, and perform similar user screening on the candidate object based on the selected user portrait and the candidate user information to obtain a target object;
[0010] Based on the target product prediction model, product prediction is performed on the target object to obtain a target product, and the target product is recommended to the target object.
[0011] In some embodiments, constructing a user profile based on the sample user information to obtain the sample user profile includes:
[0012] Constructing graph structure data based on the sample user information to obtain sample user graph structure data;
[0013] Filtering the preset edge weight calculation templates according to the sample user information to obtain a selected edge weight calculation template;
[0014] The edge weights of the sample user graph structure data are assigned based on the selected edge weight calculation template to obtain the sample user portrait.
[0015] In some embodiments, training a preset product prediction model based on the sample user profile and the sample product purchase records to obtain a target product prediction model includes:
[0016] Performing graph connection on the sample user portraits according to the sample product purchase records to obtain original portrait graph structure data;
[0017] Assigning weights to the portrait image structure data according to the purchase records of the sample products, and selecting a portrait image data structure;
[0018] Perform product prediction on the selected portrait image data structure according to the preset product prediction model and the sample product purchase record to obtain a predicted product purchase record;
[0019] Parameters of the preset product prediction model are optimized according to the predicted product purchase records and the sample product purchase records to obtain the target product prediction model.
[0020] In some embodiments, optimizing parameters of the preset product prediction model based on the predicted product purchase records and the sample product purchase records to obtain the target product prediction model includes:
[0021] Calculate a sparse multi-category cross entropy loss based on the predicted product purchase record and the sample product purchase record to obtain a sparse multi-category cross entropy loss value;
[0022] Calculating focus loss based on the predicted product purchase record and the sample product purchase record to obtain a focus loss value;
[0023] Parameters of the preset product prediction model are optimized according to the focal loss value and the sparse multi-category cross entropy loss value to obtain the target product prediction model.
[0024] In some embodiments, performing a genetic search on the sample product purchase records and the sample user profiles to obtain a selected user profile includes:
[0025] Calculate purchasing power based on the sample product purchase records to obtain sample user purchasing power data;
[0026] Training a preset purchasing power prediction model based on the sample user portrait and the sample user purchasing power data to obtain a target purchasing power prediction model;
[0027] A genetic search is performed on the sample user portrait according to the target purchasing power prediction model to obtain the selected user portrait.
[0028] In some embodiments, performing a genetic search on the sample user profile according to the target purchasing power prediction model to obtain the selected user profile includes:
[0029] Performing chromosome encoding on the sample user portrait to obtain an original population;
[0030] Performing crossover mutation on the original population to obtain a first population;
[0031] Performing population fitness screening on the first population based on the target purchasing power prediction model to obtain a second population;
[0032] Performing a local search on the second population based on the target purchasing power prediction model to obtain a third population;
[0033] Performing population fitness filtering on the first population based on the target purchasing power prediction model to obtain a fourth population;
[0034] The selected user portrait is obtained by merging the populations based on the fourth population, the second population, and the third population.
[0035] In some embodiments, screening the candidate objects for similar users based on the selected user portrait and the candidate user information to obtain the target object includes:
[0036] Construct a user profile based on the candidate user information to obtain a candidate user profile;
[0037] Perform cosine similarity screening on the candidate user portrait and the selected user portrait to obtain a target user portrait;
[0038] The candidate objects are screened according to the target user portrait to obtain the target object.
[0039] To achieve the above-mentioned objectives, a second aspect of an embodiment of the present application provides a product recommendation device, comprising:
[0040] A data acquisition module is used to acquire sample user information of a sample object and purchase records of sample products of the sample object;
[0041] A portrait construction module is used to construct a user portrait based on the sample user information to obtain a sample user portrait;
[0042] A model training module is used to train a preset product prediction model based on the sample user portrait and the sample product purchase record to obtain a target product prediction model;
[0043] A genetic search module, configured to perform a genetic search on the sample product purchase records and the sample user portraits to obtain a selected user portrait;
[0044] A user screening module is used to obtain candidate user information of a candidate object, and screen similar users of the candidate object according to the selected user portrait and the candidate user information to obtain a target object;
[0045] The product recommendation module is used to perform product prediction on the target object based on the target product prediction model, obtain a target product, and recommend the target product to the target object.
[0046] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.
[0047] To achieve the above-mentioned purpose, the fourth aspect of the embodiments of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method described in the first aspect.
[0048] The present application proposes a product recommendation method and device, electronic device and storage medium, which obtains sample user information of a sample object and sample product purchase records of the sample object, then constructs a user portrait based on the sample user information to obtain a sample user portrait, and then trains a preset product prediction model based on the sample user portrait and sample product purchase records to obtain a target product prediction model, thereby obtaining a model that can accurately predict users based on user portraits, thereby improving the success rate of recommending insurance products; further, a genetic search is performed on the sample product purchase records and sample user portraits to obtain selected user portraits, thereby obtaining as many data sets as possible, so that the data sets cover as many user situations as possible; further, candidate pairs are obtained. The candidate user information of the image is obtained, and similar users are screened for the candidate objects based on the selected user portrait and candidate user information to obtain the target object, so as to find the target object from the huge customer group, and accurately determine the users who need product recommendations, thereby improving the success rate of insurance product recommendations; finally, based on the target product prediction model, product prediction is performed on the target object to obtain the target product, and the target product is recommended to the target object, thereby screening and predicting from two dimensions: product recommendation and user screening, so as to accurately screen out users who need product recommendations, and at the same time accurately predict products for the screened users, and finally recommend products to users based on the predicted products, thereby improving the success rate of insurance product recommendations. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a flowchart of the product recommendation method provided in an embodiment of the present application;
[0050] Figure 2 yes Figure 1 Flowchart of step S102 in FIG.
[0051] Figure 3 yes Figure 1 Flowchart of step S103 in FIG.
[0052] Figure 4 yes Figure 3 Flowchart of step S304 in FIG.
[0053] Figure 5 yes Figure 1 Flowchart of step S104 in FIG.
[0054] Figure 6 yes Figure 5 Flowchart of step S503 in FIG.
[0055] Figure 7 yes Figure 1 Flowchart of step S105 in FIG.
[0056] Figure 8 This is a schematic diagram of the structure of the product recommendation device provided in an embodiment of the present application;
[0057] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0059] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and so on, in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0061] First, let’s analyze some of the terms used in this application:
[0062] Graph structured data: A data structure used to represent the relationships between entities and the attributes of the entities themselves. Graph structured data is an effective method in computer science for processing complex relational networks. In graph structured data, data is represented as nodes and edges. Graph data can simulate various types of networks, such as social networks, knowledge graphs, and transportation networks. The processing of graph structured data involves the theories and methods of graph theory and is an important branch of data science, machine learning, and artificial intelligence. Major applications include network analysis, recommendation systems, path optimization, and pattern recognition. Graph structured data can be used not only to analyze network structure and dynamics, but also to optimize network performance and discover potential information in the data.
[0063] Sparse multi-class cross-entropy loss is a loss function used in machine learning classification tasks. It is particularly effective in multi-class classification problems, as it measures the difference between the model's predicted probability distribution and the actual labels. Sparse multi-class cross-entropy loss is applicable when labels are in integer form rather than one-hot encoding. This loss function first converts the true class labels into class probability distributions, and then calculates the cross-entropy between the predicted and true probability distributions. Sparse multi-class cross-entropy loss is primarily used in deep learning, particularly in classification models in areas such as image recognition, natural language processing, and speech recognition. It not only helps improve computational efficiency but also effectively handles class imbalance in large datasets. By minimizing this loss, the model can better learn the mapping from input data to output labels, thereby improving classification accuracy and generalization.
[0064] Focal loss: A loss function widely used in deep learning and machine learning, especially when dealing with problems with significant class imbalance, such as in some image processing and object detection tasks. Focal loss is a variant of the cross-entropy loss function. It addresses class imbalance by adjusting the weights of misclassified samples, allowing the model to focus more on difficult-to-classify samples. In focal loss, a regulation factor is introduced to reduce the contribution of easily classified samples to the total loss, thereby causing the model to focus more on difficult-to-identify samples. This approach not only improves the model's ability to recognize minority class samples, but also enhances the model's robustness. Focal loss is mainly used in the field of computer vision, especially in tasks such as object detection and semantic segmentation, effectively improving recognition performance and the model's generalization ability.
[0065] Genetic search is a search algorithm that mimics the principles of natural selection and genetics and is a branch of evolutionary algorithms. This algorithm uses mechanisms similar to biological inheritance and natural selection to solve optimization and search problems. Genetic search typically involves processes such as selection, crossover, and mutation, using these biologically inspired operations to explore the solution space and find the optimal solution to a problem. Genetic search is widely used in fields such as computer science, engineering optimization, and artificial intelligence, and is particularly well-suited to solving problems that are too complex or have too large a solution space for traditional search methods. It simulates the evolution of a population and continuously optimizes candidate solutions, thereby improving search efficiency and solution quality. The main advantage of genetic search is its robustness and ability to find the global optimal solution to complex multi-peak problems. Furthermore, genetic search can be combined with other search and optimization techniques to form hybrid algorithms to solve even more complex problems.
[0066] Product recommendation refers to recommending products to users. For example, when recommending insurance products, we can filter out target products that match the target user and then push these products to them. In this scenario, insurance product recommendation is typically implemented using neural networks. However, due to the dataset not covering a wide range of user situations, the neural network's recommendation capabilities lack strong generalization, resulting in a low success rate for product recommendations. Therefore, improving the success rate of insurance product recommendations has become a pressing issue.
[0067] Based on this, the embodiments of the present application provide a product recommendation method and device, an electronic device and a storage medium, aiming to improve the success rate of insurance product recommendations.
[0068] The embodiments of the present application provide a product recommendation method and device, electronic device, and storage medium, which are specifically illustrated through the following embodiments. First, the product recommendation method in the embodiments of the present application is described.
[0069] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.
[0070] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0071] The product recommendation method provided in the embodiment of the present application relates to the field of intelligent recommendation technology and is applicable to the field of financial technology. The product recommendation method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers, or as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the product recommendation method, etc., but is not limited to the above forms.
[0072] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0073] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the user's identity or characteristics, such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0074] Figure 1 This is an optional flowchart of the product recommendation method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.
[0075] Step S101, obtaining sample user information of a sample object and purchase records of sample products of the sample object;
[0076] Step S102: construct a user portrait based on the sample user information to obtain a sample user portrait;
[0077] Step S103: training a preset product prediction model based on sample user portraits and sample product purchase records to obtain a target product prediction model;
[0078] Step S104, performing a genetic search on the sample product purchase records and the sample user profiles to obtain a selected user profile;
[0079] Step S105, obtaining candidate user information of the candidate object, and screening similar users of the candidate object based on the selected user portrait and the candidate user information to obtain the target object;
[0080] Step S106: perform product prediction on the target object based on the target product prediction model to obtain the target product, and recommend the target product to the target object.
[0081] In the steps S101 to S106 shown in the embodiment of the present application, sample user information of the sample object and the sample product purchase record of the sample object are obtained, and then a user portrait is constructed based on the sample user information to obtain a sample user portrait. Then, a preset product prediction model is trained based on the sample user portrait and the sample product purchase record to obtain a target product prediction model, thereby obtaining a model that can accurately predict the user based on the user portrait, thereby improving the success rate of recommending insurance products; further, a genetic search is performed on the sample product purchase record and the sample user portrait to obtain a selected user portrait, thereby obtaining as many data sets as possible, so that the data set covers as many user situations as possible; further, the candidate object is obtained. Candidate user information is collected, and similar users are screened for candidate objects based on the selected user portrait and candidate user information to obtain the target object, so as to find the target object from the huge customer base, and accurately determine the users who need product recommendations, thereby improving the success rate of insurance product recommendations; finally, product predictions are made for the target object based on the target product prediction model to obtain the target product, and the target product is recommended to the target object, thereby screening and predicting from two dimensions: product recommendation and user screening, so as to accurately screen out users who need product recommendations, and accurately predict products for the screened users, and finally recommend products to users based on the predicted products, thereby improving the success rate of insurance product recommendations.
[0082] In step S101 of some embodiments, the sample subject refers to an individual who participates in the purchase of an insurance product, including entities that purchase insurance products, such as natural persons, corporate organizations, or social groups. Sample user information refers to data related to the sample subject, such as basic personal information such as name, gender, age, date of birth, occupational information such as occupational type, industry, name of work unit, economic status information such as income level, asset status, health status information such as past medical history, current physical condition, and whether there are family genetic diseases. The sample product purchase record is a detailed record of the purchase behavior of the sample subject's insurance product, including but not limited to the details of the purchased insurance product, purchase time, purchase channel, premium payment status, etc.
[0083] See also Figure 2In some embodiments, step S102 may include but is not limited to steps S201 to S203:
[0084] Step S201: constructing graph structure data based on sample user information to obtain sample user graph structure data;
[0085] Step S202, screening the preset edge weight calculation templates according to the sample user information to obtain a selected edge weight calculation template;
[0086] Step S203: assign edge weights to the sample user graph structure data based on the selected edge weight calculation template to obtain a sample user portrait.
[0087] In steps S201 to S203 shown in the embodiment of the present application, graph structure data is constructed based on the sample user information to obtain the sample user graph structure data, and then the preset edge weight calculation template is screened based on the sample user information to obtain the selected edge weight calculation template. Finally, edge weights are assigned to the sample user graph structure data based on the selected edge weight calculation template to obtain a sample user portrait, thereby accurately presenting user characteristics and improving the subsequent recommendation success rate of insurance products.
[0088] In step S201 of some embodiments, the sample user graph structure data is a data structure constructed based on the sample user information. The sample user is abstracted as a main node, the user information of the sample user is abstracted into a sub-node connecting the node, and each sub-node is connected to the main node to obtain the sample user graph structure data.
[0089] In step S202 of some embodiments, screening refers to screening out a selected edge weight calculation template from the preset edge weight calculation templates, specifically based on the information contained in the sample user information, for example, the preset edge weight calculation template includes ((income*age), (assets-liabilities), log(income), (income>50000) AND (liabilities <20000), NOT(number of claims> 2)), if the sample user information only includes income, age, assets and liabilities, but does not include the number of claims, then the selected edge weight calculation template ((income*age), (assets-liabilities), log(income), (income>50000)AND(liabilities<20000)) can be filtered out. If the sample user information only includes age, assets, liabilities and the number of claims, then the selected edge weight calculation template ((assets-liabilities), AND(liabilities<20000)) can be filtered out.
[0090] In step S203 of some embodiments, edge weights are assigned to the sample user graph structure data based on the selected edge weight calculation template to obtain a sample user profile. For example, if the sample user information only includes age, assets, liabilities, and number of claims, and the edge weight calculation template ((assets - liabilities), AND (liabilities < 20,000)) is selected, the child nodes formed by assets and the child nodes formed by liabilities are connected, and the corresponding edge value is set to (assets - liabilities). The liability child node is self-connected once, and the corresponding edge is set to AND (liabilities < 20,000).
[0091] If the sample user information includes income, age, assets and liabilities, but does not include the number of claims, and the edge weight calculation template selected is ((income*age), (assets-liabilities), log(income), (income>50000) AND (liabilities <20000)), then connect the child node formed by age and the child node formed by income, and assign the corresponding edge value to the corresponding value of (income * age). (Assets - Liabilities), log (income), (income > 50000) AND (liability < 20000) The same reason applies and will not be repeated here.
[0092] See also Figure 3 In some embodiments, step S103 may include but is not limited to steps S301 to S304:
[0093] Step S301: Graph-connect the sample user portraits based on the sample product purchase records to obtain original portrait graph structure data;
[0094] Step S302: assign weights to the portrait image structure data based on the sample product purchase records, and select the portrait image data structure;
[0095] Step S303, performing product prediction on the selected portrait image data structure according to a preset product prediction model and sample product purchase records to obtain predicted product purchase records;
[0096] Step S304 , optimizing parameters of a preset product prediction model based on the predicted product purchase records and the sample product purchase records to obtain a target product prediction model.
[0097] In steps S301 to S304 shown in the embodiment of the present application, sample user portraits are graph-connected according to sample product purchase records to obtain original portrait graph structure data, and then weights are assigned to the portrait graph structure data according to the sample product purchase records to select the portrait graph data structure. Then, product predictions are performed on the selected portrait graph data structure according to the preset product prediction model and the sample product purchase records to obtain predicted product purchase records. Finally, parameters of the preset product prediction model are optimized according to the predicted product purchase records and the sample product purchase records to obtain a target product prediction model, thereby achieving a model that can accurately predict users based on user portraits, thereby improving the success rate of recommending insurance products.
[0098] In step S301 of some embodiments, the sample user profile is a graph data structure with a sample object as a main node and user information of the sample user as a subnode. Each subnode is connected to the main node, and the weights between the subnodes are calculated based on the selected edge weights. On this basis, the sample product purchase records are abstracted into subnodes. For the same insurance product, it is a subnode, and the subnode is then connected to the main node to obtain the original profile graph structure data. For example, if the sample product purchase record records that the sample object purchased the first product three times and the second product once, then the first product is a subnode and the second product is a subnode, respectively connected to the main node formed by the sample object.
[0099] In step S302 of some embodiments, the way to assign weights to the portrait graph structure data based on the sample product purchase record is to assign values to the corresponding edges based on the number of product purchases. For example, if the sample product purchase record records that the sample object purchased the first product three times, the edge weight between the main node formed by the sample object and the child node formed by the first product is assigned to 3.
[0100] In step S303 of some embodiments, the preset product prediction model is a model composed of a neural network. In one embodiment, the preset product prediction model is a NGCF (Neural Graph Coll aborative Filtering) model. The selected portrait graph data structure, sample product purchase records and pre-set insurance product product information are input into the NGCF to obtain predicted product purchase records.
[0101] See also Figure 4 In some embodiments, step S304 may include but is not limited to steps S401 to S403:
[0102] Step S401, performing sparse multi-class cross entropy loss calculation based on the predicted product purchase records and the sample product purchase records to obtain a sparse multi-class cross entropy loss value;
[0103] Step S402, performing focus loss calculation based on the predicted product purchase record and the sample product purchase record to obtain a focus loss value;
[0104] Step S403 , optimizing the parameters of the preset product prediction model according to the focus loss value and the sparse multi-class cross entropy loss value to obtain the target product prediction model.
[0105] In steps S401 to S403 shown in the embodiment of the present application, sparse multi-category cross entropy loss is calculated based on the predicted product purchase records and the sample product purchase records to obtain a sparse multi-category cross entropy loss value. At the same time, focus loss is calculated based on the predicted product purchase records and the sample product purchase records to obtain a focus loss value. Finally, the focus loss value and the sparse multi-category cross entropy loss value are used to optimize the parameters of the preset product prediction model to obtain a target product prediction model, thereby achieving a model that can accurately predict users based on user portraits, thereby improving the success rate of recommending insurance products.
[0106] In step S401 of some embodiments, the sparse multi-class cross entropy loss calculation is a calculation method for measuring the degree of difference between the predicted product purchase record and the sample product purchase record, as shown in formula (1):
[0107]
[0108] Where N is the total number of sample objects, i is the index of the sample object, C is the total number of pre-set insurance products, j is the index of the pre-set insurance product, and y is the total number of sample objects, i is the index of the sample object, and C is the total number of pre-set insurance products. ij For sample product purchase records, p ij Predict product purchase history.
[0109] In step S402 of some embodiments, the focus loss calculation is a calculation method for measuring the degree of difference between the predicted product purchase record and the sample product purchase record, as shown in formula (2):
[0110]
[0111] Where N is the total number of sample objects, i is the index of the sample object, C is the total number of pre-set insurance products, j is the index of the pre-set insurance product, and y is the total number of sample objects, i is the index of the sample object, and C is the total number of pre-set insurance products. ij For sample product purchase records, p ij Predict product purchase history, where γ is a pre-set focus parameter.
[0112] In step S403 of some embodiments, the direct sum of the focal loss value and the sparse multi-category cross entropy loss value is obtained, and then the preset product prediction model is optimized by stochastic gradient descent based on the direct sum of the focal loss value and the sparse multi-category cross entropy loss value to obtain the target product prediction model.
[0113] See also Figure 5 In some embodiments, step S104 includes but is not limited to steps S501 to S503:
[0114] Step S501, calculating purchasing power based on sample product purchase records to obtain sample user purchasing power data;
[0115] Step S502: training a preset purchasing power prediction model based on the sample user portrait and the sample user purchasing power data to obtain a target purchasing power prediction model;
[0116] Step S503: Perform a genetic search on the sample user portraits according to the target purchasing power prediction model to obtain the selected user portraits.
[0117] In steps S501 to S503 shown in the embodiment of the present application, purchasing power is calculated based on the sample product purchase records to obtain sample user purchasing power data, and then a preset purchasing power prediction model is trained based on the sample user portrait and the sample user purchasing power data to obtain a target purchasing power prediction model. Finally, a genetic search is performed on the sample user portrait based on the target purchasing power prediction model to obtain a selected user portrait, thereby obtaining as many data sets as possible, so that the data sets cover as various user situations as possible, and at the same time, a genetic search is performed on the sample user portrait based on the target purchasing power prediction model to obtain a selected user portrait with high purchasing power.
[0118] In step S501 of some embodiments, the purchasing power calculation based on the sample product purchase records is to calculate the total purchase value of the sample object for the pre-set insurance products. First, all the insurance products purchased by the sample object and the number of purchases are obtained, and then the total purchase value is calculated based on the number of purchases and the corresponding insurance products to obtain the sample user purchasing power data.
[0119] In step S502 of some embodiments, the sample user portrait is input into a preset purchasing power prediction model, and the preset purchasing power prediction model outputs predicted purchasing power data. Then, a loss value is calculated based on the predicted purchasing power data and the sample user purchasing power data to obtain a training loss value. Then, the preset purchasing power prediction model is trained based on the training loss value to obtain a target purchasing power prediction model. In one embodiment, the preset purchasing power prediction model is a GAT (Graph Attention Networks) neural network model. The sample user portrait is input into the GAT to obtain predicted purchasing power data. Then, a mean square error is calculated based on the predicted purchasing power data and the sample user purchasing power data to obtain a training loss value. Then, the preset purchasing power prediction model is trained based on the training loss value to obtain a target purchasing power prediction model.
[0120] See also Figure 6 In some embodiments, step S503 includes but is not limited to steps S601 to S606:
[0121] Step S601: Perform chromosome encoding on the sample user portrait to obtain the original population;
[0122] Step S602, performing crossover mutation on the original population to obtain a first population;
[0123] Step S603, screening the first population for population fitness based on the target purchasing power prediction model to obtain a second population;
[0124] Step S604: performing a local search on the second population based on the target purchasing power prediction model to obtain a third population;
[0125] Step S605: filtering the first population based on the target purchasing power prediction model to obtain a fourth population;
[0126] Step S606: Merge the populations based on the fourth population, the second population, and the third population to obtain a selected user portrait.
[0127] In steps S601 to S606 shown in the embodiment of the present application, the original population is obtained by chromosome encoding the sample user portrait, and then the original population is cross-mutated to obtain a first population. The first population is then screened for population fitness based on the target purchasing power prediction model to obtain a second population. The second population is then locally searched based on the target purchasing power prediction model to obtain a third population. At the same time, the first population is filtered for population fitness based on the target purchasing power prediction model to obtain a fourth population. Finally, the populations are merged based on the fourth population, the second population, and the third population to obtain a selected user portrait, thereby obtaining as many data sets as possible and making the data sets cover as many user situations as possible. At the same time, the user portraits remaining in the data set are screened by the target purchasing power prediction model, that is, the selected user portraits are user portraits with higher purchasing power, thereby providing a data basis for subsequent screening of target objects based on the selected user portraits.
[0128] In step S601 of some embodiments, chromosome encoding converts the sample user profile into an array. First, the subnodes in the sample user profile are extracted as an array, and the values corresponding to the nodes are used as key-value pairs in the array. For example, the subnodes of the sample user profile include age, income, occupation, and corresponding edges between the subnodes. The subnodes, namely age and income, are extracted, and the values of the subnodes are extracted to form key-value pairs, thereby forming an original population. For example, the first sample object is represented in the population as {first sample object: [(age: 18), (income: 5000)]}. The original population is a collection formed by multiple sample objects.
[0129] In step S602 of some embodiments, crossover mutation is performed on the original population by randomly selecting a node to exchange for each object in the original population. For example, if the randomly selected node to exchange is age, the ages of the first and second sample objects are correspondingly exchanged. If the randomly selected node to exchange is income, the incomes of the first and second sample objects are correspondingly exchanged. The population after crossover is then mutated, i.e., a node to mutate is randomly selected, for example, the age of the first sample object is selected, and then the age is modified according to a randomly generated value.
[0130] In some embodiments, in step S603, the population fitness screening of the first population based on the target purchasing power prediction model involves constructing a profile of the first population, then inputting the corresponding profile of the first population into the target purchasing power prediction model, which then outputs predicted purchasing power data for the first population. The first population is then screened based on a preset threshold and the predicted purchasing power data of the first population to obtain a second population. For example, the top 10% of the first population is screened to obtain the second population.
[0131] In step S604 of some embodiments, a local search of the second population based on the target purchasing power prediction model is performed with the area where the second population is located as the center, and the values near the center formed by the second population are screened according to a preset threshold. For example, the second population includes [first sample object: (age: 19), (income: 12000)], the preset age threshold is 1, and the income threshold is 1000. Then, after the local search, four populations can be obtained: [(age: 20), (income: 12000), (age: 18), (income: 12000), (age: 19), (income: 13000), (age: 19), (income: 11000)], and then a portrait of the population obtained by the local search is constructed and input into the target purchasing power prediction model to obtain the chromosomes with high purchasing power to obtain the third population.
[0132] In step S605 of some embodiments, filtering the first population based on the target purchasing power prediction model for population fitness is performed by constructing a profile of the first population, then inputting the corresponding profile of the first population into the target purchasing power prediction model, which then outputs predicted purchasing power data for the first population. The first population is then filtered based on a preset filtering process and the predicted purchasing power data of the first population to obtain a second population. For example, filtering out the bottom 10% of the first population yields a fourth population.
[0133] In step S606 of some embodiments, a population merger is performed based on the fourth population, the second population, and the third population, that is, the fourth population, the second population, and the third population are merged, and then a portrait is constructed for the merged population to obtain a portrait of the selected user.
[0134] See also Figure 7 In some embodiments, step S105 may include but is not limited to steps S701 to S703:
[0135] Step S701: construct a user profile based on the candidate user information to obtain a candidate user profile;
[0136] Step S702: Perform cosine similarity screening based on the candidate user profiles and the selected user profile to obtain the target user profile;
[0137] Step S703: Screen candidate objects according to the target user portrait to obtain the target object.
[0138] In steps S701 to S703 shown in the embodiment of the present application, a user portrait is constructed based on the candidate user information to obtain a candidate user portrait, and then cosine similarity screening is performed based on the candidate user portrait and the selected user portrait to obtain a target user portrait. Finally, the candidate objects are screened based on the target user portrait to obtain a target object, thereby screening out potential target objects with high purchasing power from the candidate user information, thereby improving the success rate of product recommendations in the future.
[0139] In step S701 of some embodiments, the principle of constructing a user portrait based on candidate user information is similar to the principle of constructing a user portrait based on sample user information, and will not be repeated here.
[0140] In step S702 of some embodiments, cosine similarity screening based on the candidate user profile and the selected user profile is performed by first converting the candidate user profile (a graph data structure) into a vector data structure, and simultaneously converting the selected user profile into a vector data structure. Then, the cosine similarity between the vector data structure of the candidate user profile and the vector data structure of the selected user profile is calculated. When the cosine similarity is less than a preset cosine threshold, the candidate user profile is used as the target user profile. In one embodiment, the user profile is converted into a vector data structure based on a pre-trained Graph2Vec model.
[0141] In step S703 of some embodiments, candidate objects are screened according to the target user portrait, that is, objects corresponding to the target user portrait are obtained, that is, the target object is obtained.
[0142] In step S106 of some embodiments, the user portrait of the target object is input into the target product prediction model to obtain the target product, and then the target product is used to recommend products to the target object, thereby achieving accurate screening of users, and then the target product prediction model is used to make accurate recommendations to the screened target users, thereby improving the success rate of product recommendations.
[0143] See also Figure 8 The present application also provides a product recommendation device that can implement the above-mentioned product recommendation method. The device includes:
[0144] The data acquisition module 801 is used to acquire the sample user information of the sample object and the sample product purchase record of the sample object;
[0145] A portrait construction module 802 is used to construct a user portrait based on the sample user information to obtain a sample user portrait;
[0146] Model training module 803, used to train a preset product prediction model based on sample user portraits and sample product purchase records to obtain a target product prediction model;
[0147] Genetic search module 804, for performing genetic search on sample product purchase records and sample user profiles to obtain a selected user profile;
[0148] The user screening module 805 is used to obtain candidate user information of the candidate object, and screen similar users of the candidate object based on the selected user portrait and the candidate user information to obtain the target object;
[0149] The product recommendation module 806 is used to perform product prediction on the target object based on the target product prediction model, obtain the target product, and recommend the target product to the target object.
[0150] The specific implementation of the product recommendation device is basically the same as the specific embodiment of the above-mentioned product recommendation method, and will not be repeated here.
[0151] The present application also provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the product recommendation method when executing the computer program. The electronic device can be any smart terminal, such as a tablet computer or an in-vehicle computer.
[0152] See also Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:
[0153] The processor 901 can be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0154] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called by the processor 901 to execute the product recommendation method of the embodiments of this application;
[0155] Input / output interface 903, used to implement information input and output;
[0156] Communication interface 904, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0157] Bus 905 , which transmits information between various components of the device (e.g., processor 901 , memory 902 , input / output interface 903 , and communication interface 904 );
[0158] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0159] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned product recommendation method is implemented.
[0160] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0161] The product recommendation method, product recommendation device, electronic device and storage medium provided in the embodiments of the present application obtain sample user information of a sample object and sample product purchase records of the sample object, then construct a user portrait based on the sample user information to obtain a sample user portrait, and then train a preset product prediction model based on the sample user portrait and sample product purchase records to obtain a target product prediction model, thereby obtaining a model that can accurately predict users based on user portraits, thereby improving the success rate of recommending insurance products; further, a genetic search is performed on the sample product purchase records and sample user portraits to obtain a selected user portrait, thereby obtaining as many data sets as possible, so that the data sets cover as many user situations as possible; further, obtaining The candidate user information of the candidate object is obtained, and similar users of the candidate object are screened according to the selected user portrait and candidate user information to obtain the target object, so as to find the target object from the huge customer group, and accurately determine the users who need product recommendations, thereby improving the success rate of insurance product recommendations; finally, the target object is predicted based on the target product prediction model to obtain the target product, and the target product is recommended to the target object, thereby screening and predicting from two dimensions: product recommendation and user screening, so as to accurately screen out users who need product recommendations, and at the same time accurately predict products for the screened users, and finally recommend products to users based on the predicted products, thereby improving the success rate of insurance product recommendations.
[0162] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0163] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0164] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0165] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0166] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0167] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0168] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0169] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0170] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0171] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0172] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A product recommendation method, characterized in that: The method comprises: Obtaining sample user information of a sample object and a sample product purchase record of the sample object; Construct a user profile based on the sample user information to obtain a sample user profile; Performing graph connection on the sample user portraits according to the sample product purchase records to obtain original portrait graph structure data; Assigning weights to the portrait image structure data according to the purchase records of the sample products, and selecting a portrait image data structure; Perform product prediction on the selected portrait image data structure according to a preset neural network model and the sample product purchase record to obtain a predicted product purchase record; Calculate a sparse multi-category cross entropy loss based on the predicted product purchase record and the sample product purchase record to obtain a sparse multi-category cross entropy loss value; Calculating focus loss based on the predicted product purchase record and the sample product purchase record to obtain a focus loss value; Optimizing the parameters of the preset neural network model according to the focal loss value and the sparse multi-class cross entropy loss value to obtain a target neural network model; Calculate purchasing power based on the sample product purchase records to obtain sample user purchasing power data; Training a preset GAT neural network model according to the sample user portrait and the sample user purchasing power data to obtain a target GAT neural network model; Performing a genetic search on the sample user profile according to the target GAT neural network model to obtain a selected user profile; Obtain candidate user information of a candidate object, and perform similar user screening on the candidate object based on the selected user portrait and the candidate user information to obtain a target object; Based on the target neural network model, product prediction is performed on the target object to obtain a target product, and the target product is recommended to the target object.
2. The method according to claim 1, characterized in that The constructing of a user profile based on the sample user information to obtain a sample user profile includes: Constructing graph structure data based on the sample user information to obtain sample user graph structure data; Filtering the preset edge weight calculation templates according to the sample user information to obtain a selected edge weight calculation template; The edge weights of the sample user graph structure data are assigned based on the selected edge weight calculation template to obtain the sample user portrait.
3. The method according to claim 1, characterized in that The performing a genetic search on the sample user portrait according to the target GAT neural network model to obtain the selected user portrait includes: Performing chromosome encoding on the sample user portrait to obtain an original population; Performing crossover mutation on the original population to obtain a first population; Performing population fitness screening on the first population based on the target GAT neural network model to obtain a second population; Performing a local search on the second population based on the target GAT neural network model to obtain a third population; Performing population fitness filtering on the first population based on the target GAT neural network model to obtain a fourth population; The selected user portrait is obtained by merging the populations based on the fourth population, the second population, and the third population.
4. The method according to claim 1, wherein The performing similar user screening on the candidate object based on the selected user portrait and the candidate user information to obtain the target object includes: Construct a user profile based on the candidate user information to obtain a candidate user profile; Perform cosine similarity screening on the candidate user portrait and the selected user portrait to obtain a target user portrait; The candidate objects are screened according to the target user portrait to obtain the target object.
5. A product recommendation device, characterized in that: The device comprises: A data acquisition module is used to acquire sample user information of a sample object and purchase records of sample products of the sample object; A portrait construction module is used to construct a user portrait based on the sample user information to obtain a sample user portrait; A model training module is used to perform graph connection on the sample user portraits according to the sample product purchase records to obtain original portrait graph structure data; Assigning weights to the portrait image structure data according to the purchase records of the sample products, and selecting a portrait image data structure; Perform product prediction on the selected portrait image data structure according to a preset neural network model and the sample product purchase record to obtain a predicted product purchase record; Calculate a sparse multi-category cross entropy loss based on the predicted product purchase record and the sample product purchase record to obtain a sparse multi-category cross entropy loss value; Calculating focus loss based on the predicted product purchase record and the sample product purchase record to obtain a focus loss value; Optimizing the parameters of the preset neural network model according to the focal loss value and the sparse multi-class cross entropy loss value to obtain a target neural network model; A genetic search module, configured to calculate purchasing power based on the sample product purchase records to obtain purchasing power data of sample users; Training a preset GAT neural network model according to the sample user portrait and the sample user purchasing power data to obtain a target GAT neural network model; Performing a genetic search on the sample user profile according to the target GAT neural network model to obtain a selected user profile; A user screening module is used to obtain candidate user information of a candidate object, and screen similar users of the candidate object according to the selected user portrait and the candidate user information to obtain a target object; The product recommendation module is used to perform product prediction on the target object based on the target neural network model, obtain a target product, and recommend the target product to the target object.
6. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the product recommendation method according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the product recommendation method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
User portrait-based product recommendation method, apparatus and device, and storage medium
CN114663198A
Recommendation method and device based on graph neural network, equipment and medium
CN116739798A