Product recommendation method and apparatus, computer device, and storage medium
By training an initial model and fine-tuning it with historical new customer data using transfer learning, the problem of insufficient new customer data was solved, enabling accurate product recommendations for new customers.
Patent Information
- Application Number
- CN202211145608.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-20
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2042-09-20
AI Technical Summary
AI-based product recommendation systems often suffer from low accuracy when facing new customers due to a lack of data.
An initial recommendation model is trained by acquiring training data from stable customers, and the model is fine-tuned using transfer learning. This is then combined with data from historical new customers to form a second recommendation model suitable for new customers, which is then used to evaluate and recommend products to current new customers.
It improved the accuracy of product recommendations for new customers and enhanced the model's adaptability to new customers with limited data.
Smart Images

Figure CN115545823B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and particularly relates to a product recommendation method and device, computer equipment and a storage medium. BACKGROUND
[0002] With the development of computer technology, various product recommendations through artificial intelligence are becoming increasingly common. Product recommendations based on artificial intelligence can determine suitable products for customers through a model, and then recommend the products to the customers. For example, in the field of financial insurance, a model is used to evaluate customers and insurance products to determine whether to recommend insurance products to customers.
[0003] However, product recommendations based on artificial intelligence often face the problem of cold start. When a customer is a new customer, the model cannot accurately predict due to the lack of new customer data, resulting in low accuracy of product recommendations for new customers. SUMMARY
[0004] The embodiments of the present application aim to provide a product recommendation method, device, computer equipment and storage medium to solve the problem of low product recommendation accuracy.
[0005] To solve the above technical problems, the embodiments of the present application provide a product recommendation method, which adopts the technical scheme as follows:
[0006] Obtain first training data of stable customers; the first training data includes first customer data, first product data and first product evaluation value of the stable customers;
[0007] Train an initial recommendation model according to the first training data to obtain a first recommendation model;
[0008] Obtain second training data of historical new customers; the second training data includes second customer data, second product data and second product evaluation value of the historical new customers;
[0009] Fine-tune the first recommendation model according to the second training data to obtain a second recommendation model;
[0010] Obtain current customer data of a current new customer and current product data of a candidate product, and input the current customer data and the current product data into the second recommendation model to obtain a current product evaluation value;
[0011] When the current product evaluation value meets a preset evaluation value condition, recommend a product to the current new customer according to the candidate product.
[0012] To solve the above technical problems, the embodiment of the present application further provides a product recommendation device, which adopts the technical scheme as follows:
[0013] The first acquisition module is configured to acquire first training data of stable customers, wherein the first training data comprises first customer data, first product data and first product evaluation values of the stable customers;
[0014] The initial training module is configured to train an initial recommendation model according to the first training data, and obtain a first recommendation model;
[0015] The second acquisition module is configured to acquire second training data of historical new customers, wherein the second training data comprises second customer data, second product data and second product evaluation values of the historical new customers;
[0016] The first fine-tuning module is configured to fine-tune the first recommendation model according to the second training data, and obtain a second recommendation model;
[0017] The current acquisition module is configured to acquire current customer data of a current new customer and current product data of a candidate product, and input the current customer data and the current product data into the second recommendation model, and obtain a current product evaluation value;
[0018] The product recommendation module is configured to recommend a product to the current new customer according to the candidate product when the current product evaluation value meets a preset evaluation value condition.
[0019] To solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the technical scheme as follows:
[0020] Acquire first training data of stable customers, wherein the first training data comprises first customer data, first product data and first product evaluation values of the stable customers;
[0021] Train an initial recommendation model according to the first training data, and obtain a first recommendation model;
[0022] Acquire second training data of historical new customers, wherein the second training data comprises second customer data, second product data and second product evaluation values of the historical new customers;
[0023] Fine-tune the first recommendation model according to the second training data, and obtain a second recommendation model;
[0024] Acquire current customer data of a current new customer and current product data of a candidate product, and input the current customer data and the current product data into the second recommendation model, and obtain a current product evaluation value;
[0025] When the current product evaluation value meets a preset evaluation value condition, a product is recommended to the current new customer according to the candidate product.
[0026] To solve the above technical problems, the embodiment of the application further provides a computer readable storage medium, which adopts the technical scheme as follows:
[0027] First training data of stable customers are acquired, and the first training data include first customer data, first product data and first product evaluation value of the stable customers;
[0028] An initial recommendation model is trained according to the first training data, and a first recommendation model is obtained;
[0029] Second training data of historical new customers are acquired, and the second training data include second customer data, second product data and second product evaluation value of the historical new customers;
[0030] The first recommendation model is fine-tuned according to the second training data, and a second recommendation model is obtained;
[0031] Current customer data of a current new customer and current product data of a candidate product are acquired, and the current customer data and the current product data are input into the second recommendation model, and a current product evaluation value is obtained;
[0032] When the current product evaluation value meets a preset evaluation value condition, a product is recommended to the current new customer according to the candidate product.
[0033] Compared with the prior art, the embodiment of the application has the following beneficial effects: first training data of stable customers are acquired, the data amount of the first training data is large, an initial recommendation model is trained according to the first training data, and a first recommendation model which can accurately recommend products to stable customers is obtained; second training data of historical new customers are acquired, and the first recommendation model is fine-tuned, and a second recommendation model suitable for new customers is obtained through transfer learning; current customer data of a current new customer and current product data of a candidate product are acquired, and the current customer data and the current product data are input into the second recommendation model, and a current product evaluation value is obtained, and if the current product evaluation value meets a preset evaluation value condition, a product is recommended to the current new customer according to the candidate product; through transfer learning, the embodiment of the application makes the model learn the similarities and differences between stable customers and historical new customers, so that the second recommendation model also has strong adaptability to new customers with a small amount of data, and can accurately recommend products to new customers. BRIEF DESCRIPTION OF DRAWINGS
[0034] In order to more clearly illustrate the solutions in the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.
[0035] Figure 1 is an exemplary system architecture diagram to which the present application can be applied;
[0036] Figure 2 is a flow chart of one embodiment of a product recommendation method according to the present application;
[0037] Figure 3 is a structural schematic diagram of one embodiment of a product recommendation device according to the present application;
[0038] Figure 4 is a structural schematic diagram of one embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application; the description and the claims of the present application and the above-mentioned drawings in the specification illustrate the present application by way of example; the terms "comprise", "comprising", "include", "including", "have" and "having" and any variations thereof in the specification are intended to cover a non-exclusive inclusion; the terms "first", "second" and the like in the specification and the claims of the present application and the above-mentioned drawings are used to distinguish different objects, not to describe a particular order.
[0040] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. The appearances of the phrase that invarious places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily mutually exclusive of one another. It is expressly understood that the embodiments described herein are merely examples from a
[0041] In order to make the technical personnel in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings.
[0042] As Figure 1As shown, the system architecture 100 can include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0043] The users can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0044] The terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers and desktop computers, etc.
[0045] The server 105 can be a server providing various services, such as a background server supporting the pages displayed on the terminal devices 101, 102, 103.
[0046] It should be noted that the product recommendation method provided by the embodiments of the present application is generally executed by a server, and accordingly, the product recommendation apparatus is generally arranged in a server.
[0047] It should be understood that Figure 1 The number of terminal devices, networks and servers in
[0048] With reference to Figure 2 , a flow chart of one embodiment of the product recommendation method according to the present application is shown. The product recommendation method includes the following steps:
[0049] In step S201, first training data of stable customers is obtained; the first training data includes first customer data, first product data and first product evaluation values of the stable customers.
[0050] In the present embodiment, the product recommendation method is run on an electronic device (for example Figure 1The server shown can communicate with the terminal via wired or wireless connection. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra wideband) connections, and other currently known or future wireless connection methods.
[0051] Specifically, the first step is to acquire initial training data from stable customers. If a customer makes product purchases within at least two pre-defined time periods, that customer is considered a stable customer. For example, if customer A purchased insurance product C from company B in 2020 and renewed their policy with insurance product D in 2021, then customer A is a renewal customer, and renewal customers can be considered stable customers.
[0052] The first training data includes first-customer data for stable customers, first-product data for products purchased by stable customers, and first-product evaluation values after stable customers have purchased products. The customer characteristics in the first-customer data include, but are not limited to, customer age, customer type, customer gender, customer region, whether they refer others, whether they are WeChat customers, whether they follow relevant WeChat public accounts, whether they own multiple vehicles, whether they have downloaded a specific app, the number of active days on the specific app in the past month, and the number of active days on the specific app in the past two months; vehicle registration type, license plate type, vehicle color, vehicle model, model launch date, number of seats, engine displacement, whether it is a modified vehicle, whether it is a new energy vehicle, vehicle value, vehicle series, and production resource type; whether they are customers of other subsidiaries, whether they have added the customer on WeChat, whether they are followers of a preset account, the total number of insurance policies held by the company, vehicle insurance order fees, whether they have commercial insurance coverage, and customer driving habits, etc.
[0053] First-product data contains the product characteristics of the products purchased by customers. First-product ratings are used to quantitatively assess customer purchasing behavior; they can measure the degree of fit between the customer and the product, or be used to calculate the benefit the product brings to the customer, or the benefit the product brings to the company.
[0054] In one embodiment, the product may be an insurance product, the first product data may include information related to the insurance product's premium, and the first product valuation may include information related to the insurance product's claims.
[0055] It is understandable that the first training data of multiple customers can be obtained at once, and the first customer data, first product data, and first product evaluation value in each training data are all corresponding to each other.
[0056] A stable customer is a customer who purchases products in at least two preset time periods, which can be continuous or discontinuous. In the first preset time period, the customer is a new customer, so the data of the customer in the first preset time period is not taken as the first customer data, but the data starting from the second preset time period is taken as the first customer data. From the second preset time period, the data in each preset time period can be taken as a piece of first customer data. For example, customer A first purchases insurance product C of insurance company B in 2020, and continues to purchase the insurance product in 2021 and 2022. The customer data when the customer first purchases the insurance product in 2020 will not be taken as the first customer data, but the customer data in 2021 will be taken as the first customer data, the product data in 2021 corresponding to the first customer data will be taken as the first product data, and the product evaluation value in 2021 corresponding to the first product data will be taken as the first product evaluation value. The customer data in 2022 can also be taken as a piece of first customer data.
[0057] In step S202, an initial recommendation model is trained according to the first training data to obtain a first recommendation model.
[0058] Specifically, the first training data is related to stable customers, has a large amount of data, and has less missing data. The first customer data and the first product data in the first training data are taken as model inputs of the initial recommendation model, the first product evaluation value is taken as a label, the initial recommendation model is trained, and a first recommendation model is obtained. The initial recommendation model can be a deep learning model.
[0059] The first product evaluation value can be in a numerical form, so in the training, the loss function of the initial recommendation model is mean square error (MSE).
[0060] In step S203, second training data of historical new customers is obtained; the second training data includes second customer data, second product data, and second product evaluation value of the historical new customers.
[0061] Specifically, the second training data of the historical new customers is obtained. At a certain time point T in the past, customer A first purchases a product and becomes a customer of a certain company, so at the time point T, customer A is a historical new customer.
[0062] The second training data includes second customer data of the historical new customers, second product data of the products purchased by the historical new customers, and second product evaluation value of the products purchased by the historical new customers. The second customer data has the same connotation as the first customer data, and is limited to the second customer data being data of the historical new customers, the customer features recorded by the second customer data can be less. The second product data has the same connotation as the first product data. The second product evaluation value has the same connotation as the first product evaluation value.
[0063] It can be understood that, when the historical new customer A purchases the product in the past a preset time period, if the customer continues to purchase the product of the company, the historical new customer A becomes a stable customer. The second training data is limited to the data of the historical new customer A in the first time period.
[0064] It can be understood that, the second training data of multiple customers can be obtained at one time, and the second customer data, the second product data and the second product evaluation value in each training data are corresponding to each other.
[0065] In step S204, the first recommendation model is fine-tuned according to the second training data to obtain a second recommendation model.
[0066] Specifically, the second training data is the data of a new customer at a certain time point in the past. In order to solve the technical problem that the recommendation model has low recommendation accuracy for new customers, the present application adopts transfer learning. After the first recommendation model is trained according to the first training data of stable customers, the first recommendation model is fine-tuned and trained according to the second training data to obtain the second recommendation model. The first recommendation model can learn the similarities and differences between stable customers and historical new customers in the fine-tuning training, and the stable customers are taken as the source domain in the transfer learning task, and the historical new customers are taken as the target domain.
[0067] When training the first recommendation model, the second customer data and the second product data are taken as model inputs, and the second product evaluation value is taken as a label.
[0068] In step S205, current customer data of a current new customer and current product data of a candidate product are obtained, and the current customer data and the current product data are input into the second recommendation model to obtain a current product evaluation value.
[0069] Specifically, after the fine-tuning of the first recommendation model, the second recommendation model is obtained. When the second recommendation model is applied, current customer data of a current new customer and current product data of a candidate product are obtained. The current new customer is a new customer at present, and needs to be predicted to purchase the candidate product according to the second recommendation model. The current customer data has the same connotation as the first customer data and the second customer data, and the current product data has the same connotation as the first product data and the second product data.
[0070] The current customer data and the current product data are input into the second recommendation model to obtain a current product evaluation value. The current product evaluation value has the same connotation as the first product evaluation value and the second product evaluation value.
[0071] In step S206, when the current product evaluation value meets a preset evaluation value condition, a product is recommended to the current new customer according to the candidate product.
[0072] Specifically, a preset evaluation value condition is obtained, and it is determined whether the current product evaluation value meets the preset evaluation value condition. For example, when the candidate product is an insurance product, the current product evaluation value can be a predicted claim value, and the evaluation value condition can be whether the current product evaluation value is less than a preset claim value threshold.
[0073] When the current product evaluation value meets the preset evaluation value condition, it indicates that the candidate product can be recommended to the current new customer. At this time, the candidate product can be recommended to the current new customer, and product recommendation is achieved.
[0074] In this embodiment, the first training data of stable customers is obtained, the data amount of the first training data is large, the initial recommendation model is trained according to the first training data, and the first recommendation model that can accurately recommend products to stable customers is obtained; the second training data of historical new customers is obtained, and the first recommendation model is fine-tuned to obtain the second recommendation model suitable for new customers through transfer learning; the current customer data of the current new customer and the current product data of the candidate product are obtained, and the second recommendation model is input to obtain the current product evaluation value, and if it meets the preset evaluation value condition, the product recommendation is performed on the current new customer according to the candidate product; the present application makes the model learn the similarities and differences between stable customers and historical new customers through transfer learning, so that the second recommendation model also has strong adaptability to new customers with less data amount, and can accurately recommend products to new customers.
[0075] Further, before the step S201, the method can further include: obtaining historical inventory data of historical customers; selecting historical inventory data with product evaluation values to obtain first historical data; determining customer stability information of the first historical data according to product purchase time information in the first historical data, wherein the customer stability information records the time when the historical customer is a new customer or a stable customer; and dividing the first historical data into first training data of stable customers and second training data of historical new customers according to the customer stability information.
[0076] Specifically, the historical inventory data of the historical customers is obtained from the database, and the historical inventory data contains customer data of all customers and product data of products purchased by the customers.
[0077] The product evaluation value can be generated after a customer purchases a product. Historical inventory data with product evaluation values are selected to obtain first historical data. The first historical data can include product purchase time, which is the time when the customer purchases the product. Customer stability information can be generated according to the product purchase time, and the customer stability information is used to record the time when a historical customer is a new customer or a stable customer. According to the product purchase time, if the customer purchases the product for the first time and the product is valid within a preset time period, the customer is a new customer within the first time period; after the first time period, if the customer still has the behavior of purchasing the product, the customer becomes a stable customer.
[0078] According to the customer stability information, the first historical data can be divided into first training data of stable customers and second training data of historical new customers. It can be understood that for the same customer, the customer data when the customer purchases the product for the first time, the product data of the purchased product, and the product evaluation value can be used as the first training data; when the customer purchases the product for the first time, the customer data when the customer purchases the product for the first time, the product data of the purchased product, and the product evaluation value can be used as the second training data.
[0079] In this embodiment, the historical inventory data with product evaluation values is selected as the first historical data, the customer stability information is generated according to the product purchase time in the first historical data, and the first historical data is divided into first training data of stable customers and second training data of historical new customers according to the customer stability information, thereby completing the preparation of the training data.
[0080] Further, the above step S204 can include: obtaining a full customer feature number corresponding to the second customer data and an existing customer feature number of the second customer data; calculating the feature richness of the second customer data according to the full customer feature number and the existing customer feature number; adjusting the second customer data according to the feature richness to obtain adjusted data; and fine-tuning the first recommendation model according to the adjusted data, the corresponding second product data, and the second product evaluation value to obtain a second recommendation model.
[0081] Specifically, the second customer data records customer features, and there are multiple customer features. The number of all customer features is the full customer feature number. In each piece of second training data, the number of existing customer features that are not empty in the second customer data is the existing customer feature number.
[0082] The full customer feature number and the existing customer feature number of the second customer data are obtained, and the ratio of the existing customer feature number to the full customer feature number is taken as the feature richness of the second customer data. It can be understood that the greater the feature richness value, the fewer the missing customer features in the second customer data. Generally, the higher the feature richness, the more beneficial it is to the model for predicting the product evaluation value.
[0083] This application adjusts the second customer data in different ways based on the feature richness to obtain adjusted data. Regardless of the method, the sample size of the second customer data is increased. The increased sample size is then associated with the corresponding second product data and second product evaluation value from the previous second customer data. The first recommendation model is then fine-tuned based on the adjusted data, the second product data, and the second product evaluation value to obtain a second recommendation model. By increasing the sample size, the robustness of the recommendation model to new customers is improved.
[0084] In this embodiment, the feature richness of the second customer data is calculated, and the second customer data is adjusted in different ways according to the feature richness to obtain adjusted data, thereby increasing the number of samples and improving the robustness of the recommendation model to new customers.
[0085] Furthermore, the above-mentioned step of adjusting the second customer data based on feature richness to obtain adjusted data may include: when the feature richness is greater than a preset richness threshold, randomly removing customer features from the second customer data to obtain adjusted data; when the feature richness is less than or equal to the preset richness threshold, performing data augmentation on the second customer data to obtain adjusted data.
[0086] Specifically, a preset feature richness threshold is obtained, and the feature richness is compared with the richness threshold. When the feature richness is greater than the richness threshold, it indicates that the second customer data contains a large number of customer features. At this time, customer features in the second customer data can be randomly removed. Each removal can randomly delete a different number of customer features from the original second customer data, resulting in multiple adjusted data sets. It is understandable that when removing customer features, it is necessary to control the number of customer features removed to avoid the feature richness of the resulting adjusted data being less than the richness threshold.
[0087] When the feature richness is less than or equal to the richness threshold, it indicates that the second customer data contains relatively few customer features. In this case, data augmentation can be performed on the second customer data to obtain multiple adjusted data sets. In one embodiment, the Euclidean distance between the sample data is calculated, two sets of second customer data with an Euclidean distance less than a preset threshold are selected, and linear interpolation is performed on the two sets of second customer data to obtain the adjusted data.
[0088] In this embodiment, when the feature richness is greater than the richness threshold, customer features in the second customer data are randomly removed; when the feature richness is less than or equal to the richness threshold, data augmentation is performed on the second customer data, thereby achieving sample expansion in different ways based on feature richness.
[0089] Further, the step S205 can include: obtaining, by the flink, the current customer data of the current new customer and the current product data of the candidate product from the Kafka; mapping, by the second recommendation model, the current customer data into a customer feature vector and the current product data into a product feature vector; generating a joint feature vector according to the customer feature vector and the product feature vector; and obtaining, by the second recommendation model, the current product evaluation value based on the joint feature vector.
[0090] The Kafka is an open source stream processing platform written by Scala and Java. The Kafka is a high-throughput distributed publish-subscribe message system, which can be used as an information transmission pipeline to efficiently transmit information. The flink is a real-time open source stream processing framework, and the core thereof is a distributed stream data flow engine written by Java and Scala. The flink executes any stream data program in a data parallel and pipeline manner, and the pipeline runtime of the flink can execute batch processing and stream processing programs.
[0091] Specifically, the current customer data and the current product data of the current new customer are obtained by the flink from the Kafka, and the efficiency of data acquisition is improved.
[0092] The current customer data and the current product data are input into the second recommendation model. The second recommendation model maps the current customer data into a customer feature vector and the current product data into a product feature vector. The customer feature vector and the product feature vector are spliced to obtain a joint feature vector. Then, the joint feature vector is processed by a neural network inside the second recommendation model, and a current product evaluation value is output by a full connection layer.
[0093] In the embodiment, the flink and the Kafka are used to improve the efficiency of obtaining the current customer data and the current product data. The second recommendation model is used to map the current customer data and the current product data into vector features and generate a joint feature vector, so as to process the joint feature vector and obtain a current product evaluation value.
[0094] Further, the step S206 can include: obtaining a recommendation gain value of the candidate product; calculating a gain evaluation value of the candidate product according to the current product evaluation value and the recommendation gain value; and when the gain evaluation value is greater than or equal to a preset gain threshold, determining that the current product evaluation value meets a preset evaluation value condition, and performing product recommendation on the current new customer according to the candidate product.
[0095] Specifically, when the candidate product is an insurance product, the candidate product has a recommendation gain value. The recommendation gain value can be a gain value obtained by a sales organization of the insurance product after a customer purchases the insurance product, for example, the recommendation gain value can be specifically a premium of the insurance product. At this time, the current product evaluation value can be a claim value generated by the insurance product predicted by the second recommendation model.
[0096] According to the recommendation gain value and the current product evaluation value, a gain evaluation value of the candidate product can be calculated, and the gain evaluation value can be obtained by subtracting the current product evaluation value from the recommendation gain value, which measures the net gain of the product sales organization.
[0097] A preset gain threshold value is obtained, and if the gain evaluation value is greater than or equal to the gain threshold value, it is determined that the current product evaluation value meets the preset evaluation value condition, and the candidate product can be recommended to the current new customer.
[0098] In the embodiment, the recommendation gain value of the candidate product is obtained, the gain evaluation value is calculated according to the recommendation gain value and the current product evaluation value, and when the gain evaluation value is greater than or equal to the preset gain threshold value, the product recommendation is performed according to the candidate product to the current new customer, thereby realizing accurate product recommendation.
[0099] Further, after the step of calculating the gain evaluation value of the candidate product according to the current product evaluation value and the recommendation gain value, the step can further include: when the gain evaluation value is less than the preset gain threshold value, generating a product data adjustment instruction according to the current customer data, the current product data, the current product evaluation value and the gain evaluation value; and sending the product data adjustment instruction to a terminal logged in by a preset account.
[0100] Specifically, when the gain evaluation value is less than the preset gain threshold value, it indicates that the net gain of the sales organization after recommending the candidate product to the current new customer is low. At this time, the product data adjustment instruction can be generated according to the current customer data, the current product data, the current product evaluation value and the gain evaluation value, and the product data adjustment instruction can be sent to the terminal logged in by the preset account. The preset account can be an account of a product salesperson. After the product salesperson views the product data adjustment instruction through the terminal, the current product data is adjusted, and the current product evaluation value is predicted by the second recommendation model again until the gain evaluation value obtained is greater than or equal to the preset gain threshold value.
[0101] In the embodiment, when the gain evaluation value is less than the preset gain threshold value, the product data adjustment instruction is generated to remind the adjustment of the current product data, thereby ensuring the normal progress of product recommendation.
[0102] It should be emphasized that, in order to further ensure the privacy and security of the first training data and the second training data, the first training data and the second training data can also be stored in a node of a block chain.
[0103] The blockchain referred to in the present application is a new application mode of distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm and other computer technologies. The blockchain is essentially a decentralized database, which is a series of data blocks associated using cryptographic methods, each data block containing information of a batch of network transactions, used to verify the validity (anti-fake) of the information and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer.
[0104] Embodiments of the present application can acquire and process related data based on artificial intelligence technology. Artificial intelligence (AI) is the use of digital computers or computer-controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0105] Artificial intelligence basic technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, robot technology, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.
[0106] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by computer readable instructions instructing related hardware, and the computer readable instructions can be stored in a computer readable storage medium. The program can include the processes of the above-mentioned embodiments when executed, wherein the storage medium can be a non-volatile storage medium such as a magnetic disc, an optical disc, a read-only memory (ROM), or a random access memory (RAM).
[0107] It should be understood that although each step in the flowchart of the accompanying drawings is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in sequence according to the direction of the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and they can be executed in other orders. Moreover, at least part of the steps in the flowchart of the accompanying drawings can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or sub-steps or stages of other steps.
[0108] Further reference Figure 3 , as the above Figure 2 The method shown in the implementation, the present application provides a product recommendation device 300, one embodiment of the device embodiment and Figure 2 The method embodiment corresponds to, the device specifically can be applied to various electronic equipment.
[0109] As Figure 3 The product recommendation device 300 described in the embodiment includes: a first acquisition module 301, an initial training module 302, a second acquisition module 303, a first fine-tuning module 304, a current acquisition module 305 and a product recommendation module 306, wherein:
[0110] The first acquisition module 301 is configured to acquire first training data of stable customers; the first training data includes first customer data, first product data and first product evaluation values of the stable customers.
[0111] The initial training module 302 is configured to train an initial recommendation model according to the first training data to obtain a first recommendation model.
[0112] The second acquisition module 303 is configured to acquire second training data of historical new customers; the second training data includes second customer data, second product data and second product evaluation values of the historical new customers.
[0113] The first fine-tuning module 304 is configured to fine-tune the first recommendation model according to the second training data to obtain a second recommendation model.
[0114] The current acquisition module 305 is configured to acquire current customer data of a current new customer and current product data of a candidate product, and input the current customer data and the current product data into the second recommendation model to obtain a current product evaluation value.
[0115] The product recommendation module 306 is configured to recommend a product to the current new customer according to the candidate product when the current product evaluation value meets a preset evaluation value condition.
[0116] In the embodiment, the first training data of stable customers is obtained, the data quantity of the first training data is large, the initial recommendation model is trained according to the first training data, and the first recommendation model that can accurately recommend products to stable customers is obtained; the second training data of historical new customers is obtained, and the first recommendation model is fine-tuned to obtain the second recommendation model suitable for new customers through transfer learning; the current customer data of the current new customer and the current product data of the candidate product are obtained, and the current product evaluation value is obtained by inputting the second recommendation model, if it meets the preset evaluation value condition, the product recommendation is performed on the current new customer according to the candidate product; the model learns the similarities and differences between stable customers and historical new customers through transfer learning, so that the second recommendation model also has strong adaptability to new customers with less data quantity, and can accurately recommend products to new customers.
[0117] In some optional implementation manners of the embodiment, the product recommendation device 300 can further include an inventory obtaining module, an inventory selecting module, an information determining module, and a data dividing module, wherein:
[0118] The inventory obtaining module is configured to obtain historical inventory data of historical customers.
[0119] The inventory selecting module is configured to select historical inventory data with product evaluation values to obtain first historical data.
[0120] The information determining module is configured to determine customer stability information of the first historical data according to product purchase time information in the first historical data, wherein the customer stability information records time when the historical customer is a new customer or a stable customer.
[0121] The data dividing module is configured to divide the first historical data into first training data of stable customers and second training data of historical new customers according to the customer stability information.
[0122] In the embodiment, the historical inventory data with product evaluation values is selected as the first historical data, the customer stability information is generated according to the product purchase time in the first historical data, and the first historical data is divided into the first training data of stable customers and the second training data of historical new customers according to the customer stability information, so that the preparation of training data is completed.
[0123] In some optional implementation manners of the embodiment, the first fine-tuning module 304 can include a feature number obtaining submodule, a richness calculation submodule, a data adjusting submodule, and a model fine-tuning submodule, wherein:
[0124] The feature number obtaining submodule is configured to obtain a full-customer feature number corresponding to the second customer data and an existing customer feature number of the second customer data.
[0125] The richness calculation submodule is configured to calculate the feature richness of the second customer data according to the full customer feature number and the existing customer feature number.
[0126] The data adjustment submodule is configured to perform data adjustment on the second customer data according to the feature richness to obtain adjusted data.
[0127] The model fine-tuning submodule is configured to fine-tune the first recommendation model according to the adjusted data, the corresponding second product data, and the second product evaluation value to obtain a second recommendation model.
[0128] In this embodiment, the feature richness of the second customer data is calculated, and the second customer data is adjusted in different ways according to the feature richness to obtain adjusted data, thereby increasing the sample quantity and improving the robustness of the recommendation model for new customers.
[0129] In some optional implementations of this embodiment, the data adjustment submodule can include a feature elimination unit and a data enhancement unit, wherein:
[0130] The feature elimination unit is configured to randomly eliminate customer features in the second customer data when the feature richness is greater than a preset richness threshold to obtain the adjusted data.
[0131] The data enhancement unit is configured to perform data enhancement on the second customer data when the feature richness is less than or equal to the preset richness threshold to obtain the adjusted data.
[0132] In this embodiment, when the feature richness is greater than the richness threshold, customer features in the second customer data are randomly eliminated; and when the feature richness is less than or equal to the richness threshold, data enhancement is performed on the second customer data, so that sample expansion in different ways is realized according to the feature richness.
[0133] In some optional implementations of this embodiment, the current acquisition module 305 can include a current acquisition submodule, a data mapping submodule, a joint generation submodule, and an evaluation value acquisition submodule, wherein:
[0134] The current acquisition submodule is configured to acquire, by flink, current customer data of a current new customer and current product data of a candidate product from Kafka.
[0135] The data mapping submodule is configured to map the current customer data into a customer representation vector and map the current product data into a product representation vector by using the second recommendation model.
[0136] The joint generation submodule is configured to generate a joint representation vector according to the customer representation vector and the product representation vector.
[0137] The evaluation value obtaining submodule is configured to obtain a current product evaluation value based on the joint representation vector by using a second recommendation model.
[0138] In this embodiment, the flink and the kafka are used to improve the efficiency of obtaining the current customer data and the current product data; the second recommendation model is used to map the current customer data and the current product data into a vector representation and generate a joint representation vector, so as to process the joint representation vector and obtain the current product evaluation value.
[0139] In some optional implementation of this embodiment, the product recommendation module 306 can include a cost obtaining submodule, a gain calculation submodule and a product recommendation submodule, wherein:
[0140] The cost obtaining submodule is configured to obtain a recommendation gain value of a candidate product.
[0141] The gain calculation submodule is configured to calculate a gain evaluation value of the candidate product according to the current product evaluation value and the recommendation gain value.
[0142] The product recommendation submodule is configured to determine that the current product evaluation value meets a preset evaluation value condition when the gain evaluation value is greater than or equal to a preset gain threshold, and perform product recommendation on the current new customer according to the candidate product.
[0143] In this embodiment, the recommendation gain value of the candidate product is obtained, the gain evaluation value is calculated according to the recommendation gain value and the current product evaluation value, and the product recommendation is performed on the current new customer according to the candidate product when the gain evaluation value is greater than or equal to the preset gain threshold, so as to realize accurate product recommendation.
[0144] In some optional implementation of this embodiment, the product recommendation module 306 can further include an instruction generation submodule and an instruction sending submodule, wherein:
[0145] The instruction generation submodule is configured to generate a product data adjustment instruction according to the current customer data, the current product data, the current product evaluation value and the gain evaluation value when the gain evaluation value is less than the preset gain threshold.
[0146] The instruction sending submodule is configured to send the product data adjustment instruction to a terminal logged in by a preset account.
[0147] In this embodiment, the product data adjustment instruction is generated when the gain evaluation value is less than the preset gain threshold, so as to remind to adjust the current product data and ensure the normal performance of the product recommendation.
[0148] To solve the above technical problems, the embodiment of the present application further provides a computer device. For details, please refer to Figure 4 , Figure 4 The figure is a basic structure block diagram of the computer device of this embodiment.
[0149] The computer device 4 comprises a memory 41, a processor 42, and a network interface 43, which are communicatively connected by a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure, but it should be understood that all the shown components are not required to be implemented, and more or fewer components can be alternatively implemented. Among them, those skilled in the art can understand that the computer device herein is a device capable of automatically performing numerical calculation and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0150] The computer device can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The computer device can interact with a user through a keyboard, a mouse, a remote controller, a touchpad, a voice control device, and the like.
[0151] The memory 41 comprises at least one type of readable storage medium, including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like. Of course, the memory 41 can also include both the internal storage unit and the external storage device of the computer device 4. In the present embodiment, the memory 41 is generally used to store an operating system and various application software installed in the computer device 4, such as computer readable instructions of the product recommendation method, and the like. In addition, the memory 41 can also be used to temporarily store various data that have been output or will be output.
[0152] The processor 42 may, in some embodiments, be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is generally used to control the overall operation of the computer device 4. In the present embodiment, the processor 42 is configured to execute computer-readable instructions stored in the memory 41 or to process data, such as computer-readable instructions for implementing the product recommendation method.
[0153] The network interface 43 may include a wireless network interface or a wired network interface, and is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0154] The computer device provided in the present embodiment can execute the product recommendation method described above. The product recommendation method herein can be the product recommendation method of any of the embodiments described above.
[0155] In the present embodiment, first training data of stable customers is obtained, the data amount of the first training data is large, an initial recommendation model is trained according to the first training data, and a first recommendation model that can accurately recommend products to stable customers is obtained; second training data of historical new customers is obtained, and the first recommendation model is fine-tuned to obtain a second recommendation model suitable for new customers through transfer learning; current customer data of a current new customer and current product data of a candidate product are obtained, and the second recommendation model is input to obtain a current product evaluation value, and if the current product evaluation value meets a preset evaluation value condition, the current new customer is recommended the candidate product; the present application makes the model learn the similarities and differences between stable customers and historical new customers through transfer learning, so that the second recommendation model has strong adaptability to new customers with a small amount of data, and can accurately recommend products to new customers.
[0156] The present application also provides another implementation, i.e., a computer readable storage medium storing computer readable instructions, the computer readable instructions being executable by at least one processor to cause the at least one processor to perform the steps of the product recommendation method as described above.
[0157] In the embodiment, the first training data of stable customers is acquired, the data quantity of the first training data is large, the initial recommendation model is trained according to the first training data, and the first recommendation model that can accurately recommend products to stable customers is obtained; the second training data of historical new customers is acquired, and the first recommendation model is fine-tuned, and the second recommendation model suitable for new customers is obtained through transfer learning; the current customer data of the current new customer and the current product data of the candidate product are acquired, and the current product evaluation value is obtained by inputting the second recommendation model, if it meets the preset evaluation value condition, the product recommendation is performed on the current new customer according to the candidate product; the present application makes the model learn the similarities and differences between stable customers and historical new customers through transfer learning, so that the second recommendation model also has strong adaptability to new customers with less data quantity, and can accurately recommend products to new customers.
[0158] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the methods described in various embodiments of the present application.
[0159] Obviously, the above-described embodiments are only some embodiments of the present application, not all embodiments, and the preferred embodiments of the present application are given in the drawings, but do not limit the patent scope of the present application. The present application can be realized in many different forms, and conversely, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions recorded in the foregoing specific embodiments, or make equivalent replacements to some technical features. Any equivalent structure made by using the contents of the specification and drawings, directly or indirectly applied to other related technical fields, is also within the scope of the patent protection of the present application.
Claims
1. A product recommendation method characterized by, The method comprises the following steps: obtaining first training data of stable customers; the first training data comprises first customer data, first product data and first product evaluation values of the stable customers, wherein the first product evaluation values are product compensation information of the first product data; training an initial recommendation model according to the first training data to obtain a first recommendation model; obtaining second training data of historical new customers; the second training data comprises second customer data, second product data and second product evaluation values of the historical new customers, wherein the second product evaluation values are product compensation information of the second product data; fine-tuning the first recommendation model according to the second training data to obtain a second recommendation model; obtaining current customer data of a current new customer and current product data of a candidate product, and inputting the current customer data and the current product data into the second recommendation model to obtain a current product evaluation value, wherein the current product evaluation value is product compensation information of the current product data; when the current product evaluation value meets a preset evaluation value condition, recommending a product to the current new customer according to the candidate product; the step of fine-tuning the first recommendation model according to the second training data to obtain a second recommendation model comprises: obtaining a full customer feature number corresponding to the second customer data and an existing customer feature number of the second customer data; calculating a feature richness of the second customer data according to the full customer feature number and the existing customer feature number, wherein the feature richness refers to a ratio of the existing customer feature number to the full customer feature number; adjusting the second customer data according to the feature richness to obtain adjusted data; fine-tuning the first recommendation model according to the adjusted data, the corresponding second product data and the second product evaluation values to obtain a second recommendation model; the step of adjusting the second customer data according to the feature richness to obtain adjusted data comprises: when the feature richness is greater than a preset richness threshold, randomly removing customer features in the second customer data to obtain adjusted data; when the feature richness is less than or equal to the preset richness threshold, performing data enhancement on the second customer data to obtain adjusted data.
2. The product recommendation method according to claim 1, characterized by, Before the step of obtaining first training data of stable customers, the method further comprises: obtaining historical inventory data of historical customers; selecting historical inventory data with product evaluation values to obtain first historical data; determining customer stability information of the first historical data according to product purchase time information in the first historical data, wherein the customer stability information records time when a historical customer is a new customer or a stable customer; dividing the first historical data into first training data of stable customers and second training data of historical new customers according to the customer stability information.
3. The product recommendation method according to claim 1, characterized by, The step of obtaining the current customer data of the current new customer and the current product data of the candidate products, and inputting the current customer data and the current product data into the second recommendation model to obtain the current product evaluation value includes: Flink is used to retrieve current customer data for new customers and current product data for candidate products from Kafka. The second recommendation model maps the current customer data to a customer representation vector and the current product data to a product representation vector. A joint representation vector is generated based on the customer representation vector and the product representation vector; Based on the joint representation vector, the current product evaluation value is obtained through the second recommendation model.
4. The product recommendation method according to claim 1, characterized in that, The step of recommending products to the current new customer based on the candidate products when the current product evaluation value meets the preset evaluation value conditions includes: Obtain the recommended gain value of the candidate product, wherein the recommended gain value refers to the gain value obtained by the sales agency of the insurance product after the customer purchases the insurance product; Based on the current product evaluation value and the recommended gain value, the gain evaluation value of the candidate product is calculated, wherein the gain evaluation value is obtained by subtracting the current product evaluation value from the recommended gain value, and measures the net gain of the product sales organization; When the gain evaluation value is greater than or equal to a preset gain threshold, it is determined that the current product evaluation value meets the preset evaluation value condition, and a product recommendation is made to the current new customer based on the candidate products.
5. The product recommendation method according to claim 4, characterized in that, After the step of calculating the gain evaluation value of the candidate product based on the current product evaluation value and the recommended gain value, the method further includes: When the gain evaluation value is less than the preset gain threshold, a product data adjustment instruction is generated based on the current customer data, the current product data, the current product evaluation value, and the gain evaluation value. The product data adjustment command is sent to the terminal logged in by the preset account.
6. A product recommendation device characterized by comprising: include: The first acquisition module is used to acquire the first training data from stable customers; The first training data includes the first customer data of the stable customers, the first product data, and the first product evaluation value, wherein the first product evaluation value is the product compensation information of the first product data; The initial training module is used to train an initial recommendation model based on the first training data to obtain the first recommendation model. The second acquisition module is used to acquire the second training data of historical new customers; the second training data includes the second customer data, second product data and second product evaluation value of the historical new customers, wherein the second product evaluation value is the product compensation information of the second product data; The first fine-tuning module is used to fine-tune the first recommendation model based on the second training data to obtain the second recommendation model; The current acquisition module is used to acquire the current customer data of the current new customer and the current product data of the candidate products, and input the current customer data and the current product data into the second recommendation model to obtain the current product evaluation value, wherein the current product evaluation value is the product compensation information of the current product data; The product recommendation module is configured to recommend a product to the current new customer according to the candidate product when the current product evaluation value meets a preset evaluation value condition. The first fine-tuning module comprises a feature number acquisition submodule, a richness calculation submodule, a data adjustment submodule, and a model fine-tuning submodule. The feature number acquisition submodule is configured to acquire a full-amount customer feature number corresponding to the second customer data and an existing customer feature number of the second customer data. The richness calculation submodule is configured to calculate a feature richness of the second customer data according to the full-amount customer feature number and the existing customer feature number, wherein the feature richness refers to a ratio of the existing customer feature number to the full-amount customer feature number. The data adjustment submodule is configured to perform data adjustment on the second customer data according to the feature richness to obtain adjusted data. The model fine-tuning submodule is configured to fine-tune the first recommendation model according to the adjusted data, the corresponding second product data, and the second product evaluation value to obtain a second recommendation model. The data adjustment submodule comprises a feature elimination unit and a data enhancement unit. The feature elimination unit is configured to randomly eliminate customer features in the second customer data to obtain adjusted data when the feature richness is greater than a preset richness threshold. The data enhancement unit is configured to perform data enhancement on the second customer data to obtain adjusted data when the feature richness is less than or equal to the preset richness threshold.
7. A computer device comprising a memory and a processor, wherein the memory stores computer readable instructions, and the processor executes the computer readable instructions to implement the steps of the product recommendation method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by the processor to implement the steps of the product recommendation method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Recommendation method and device based on artificial intelligence, and electronic equipment
CN112380430A
Video recommendation method and device, electronic equipment and storage medium
CN113656637A