Method, device, equipment and medium for determining product recommendation words
By obtaining and mapping the investment and non-investment field data of target users and generating suitable product recommendation speech, it solves the problem that users who lack historical investment product behavior records find it difficult to obtain accurate recommendations, and improves recommendation results and user experience.
Patent Information
- Application Number
- CN202411721445.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-04-08
AI Technical Summary
In investment product recommendations, users who lack historical investment product behavior records find it difficult to obtain accurate product recommendation speech, resulting in poor recommendation results.
By obtaining the data of the target user in the investment and non-investment fields, using the pre-trained target model for data mapping, generating predictive data and predictive probability of product recommendation speech, thereby determining the most suitable product recommendation speech.
It has achieved effective product recommendations for users who lack historical investment product behavior records, improved the targetedness and user experience of recommendations, and enhanced users' desire to buy products.
Smart Images

Figure CN119784462A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence and financial technology, and in particular to a method, device, equipment and medium for determining product recommendation scripts. Background Art
[0002] Since the purchase of investment products is often a low-frequency demand, the corresponding behavior data and product behavior data are relatively sparse, and the low frequency of investment product behavior and the long interval often lead to the invalidation of the previous investment product behavior data information. The choice of product recommendation words has a certain effect on the final investment product recommendation success rate. In the case of such a serious data sparsity problem, how to recommend investment products to users who have no historical investment product behavior records is a very challenging problem.
[0003] The existing technical methods all require users to have historical investment product behavior records as the basis for determining product recommendation scripts. However, users who do not have investment product behavior records often recommend investment products through randomly obtained product recommendation scripts. This method has poor targeting and poor user experience, and often fails to arouse users' desire to purchase investment products. Summary of the invention
[0004] The present invention provides a method, device, equipment and medium for determining product recommendation words, so as to solve the problem that for users who lack historical investment product behavior records, product recommendation words are not accurate enough, have poor pertinence and poor product recommendation effect.
[0005] In a first aspect, an embodiment of the present invention provides a method for determining a product recommendation script, the method comprising:
[0006] Acquire first data of a target user in an investment field, second data of at least one non-investment field, product data corresponding to the target user in the non-investment field, and behavior data of the target user in the non-investment field;
[0007] Through the pre-trained target model, the second data of the target user, the product data corresponding to the target user, and the behavior data of the target user are mapped to the data of the investment field to obtain the predicted probability of the first data and each preset product recommendation script;
[0008] Based on the predicted first data, the first data and the predicted probability of each of the preset product recommendation lines, the target product recommendation lines for the target user are determined from each of the preset product recommendation lines, wherein the target model is trained based on a first training data set in the investment field and at least one second training data set in the non-investment field.
[0009] In a second aspect, an embodiment of the present invention further provides a device for determining product recommendation words, the device comprising:
[0010] A data acquisition module, used to acquire first data of a target user in an investment field, second data of at least one non-investment field, product data corresponding to the target user in the non-investment field, and behavior data of the target user in the non-investment field;
[0011] A data mapping module, used to perform data mapping of the investment field on the second data of the target user, the product data corresponding to the target user, and the behavior data of the target user through a pre-trained target model, to obtain a predicted probability of predicting the first data and each preset product recommendation script;
[0012] A target product recommendation script determination module is used to determine the target product recommendation script for the target user from among the preset product recommendation scripts based on the predicted first data, the first data and the predicted probability of each of the preset product recommendation scripts, wherein the target model is obtained by training based on a first training data set in the investment field and at least one second training data set in the non-investment field.
[0013] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the steps of the above method are implemented when the processor executes the computer program.
[0014] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0015] In the solution implemented by the above-mentioned method, device, equipment and medium for determining product recommendation words, the first data of the target user in the investment field, the second data of at least one non-investment field, the product data corresponding to the target user in the non-investment field, and the behavior data of the target user in the non-investment field can be obtained through the client. Through the pre-trained target model, the second data of the target user, the product data corresponding to the target user, and the behavior data of the target user are mapped to the data of the investment field to obtain the predicted probability of the first data and each preset product recommendation words; based on the predicted first data, the first data and the predicted probability of each preset product recommendation words, the target product recommendation words of the target user are obtained from each preset product recommendation words, and the target model is obtained by training based on the first training data set in the investment field and the second training data set in the non-investment field, and the target product recommendation words are fed back to the client. In the embodiment of the present invention, since the target model is trained based on the first training data set of the investment field and at least one non-investment field, the target model has the characteristic of mapping the data in the investment field according to the data in the non-investment field. This solution achieves that when there is no available product investment behavior data in the target user's investment field, the investment field can be mapped based on the target user's non-investment field data, so that the obtained target product recommendation language is more applicable and more in line with the target user's investment and purchase characteristics of the product, thereby increasing the target user's desire to purchase the target product because of the target product recommendation language. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0017] Figure 1 This is a schematic diagram of an application environment of a method for determining product recommendation words in one embodiment of the present invention;
[0018] Figure 2 It is a flowchart of a method for determining product recommendation words in one embodiment of the present invention;
[0019] Figure 3 It is a structural schematic diagram of a device for determining product recommendation words in one embodiment of the present invention;
[0020] Figure 4 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;
[0021] Figure 5It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] The method for determining product recommendation words provided in the embodiment of the present invention can be applied in the following aspects: Figure 1 In an application environment, the client communicates with the server through a network. The server can obtain the first data of the target user, the second data of at least one non-investment field, the product data corresponding to the target user in the non-investment field, and the behavior data of the target user in the non-investment field through the client, and perform data mapping of the investment field on the second data of the target user, the product data corresponding to the target user, and the behavior data of the target user through the pre-trained target model to obtain the predicted probability of the first data and each preset product recommendation script, and obtain the target product recommendation script of the target user from each preset product recommendation script based on the predicted probability of the first data, the first data, and each preset product recommendation script, the target model is obtained by training based on the first training data set in the investment field and the second training data set in the at least one non-investment field, and the target product recommendation script is fed back to the client.
[0024] At present, new users often appear in the investment field, or historical users have no historical transaction records. Therefore, when recommending investment products, product recommendation scripts are usually randomly retrieved and sent to the client. This method does not target the characteristics of users, and the user experience is poor, which often fails to arouse users' desire to purchase investment products.
[0025] In the embodiment of the present invention, since the target model is obtained by training at least one non-investment field based on the first training data set of the investment field, the target model has the characteristic of mapping the data of the investment field according to the data of the non-investment field. This solution realizes that when there is no available product investment behavior data in the investment field of the target user, the investment field can be mapped according to the data of the non-investment field of the target user, so that the obtained target product recommendation words are more applicable and more in line with the characteristics of the target user's investment purchase of the product, thereby increasing the target user's desire to purchase the target product due to the target product recommendation words.
[0026] The client may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server may be implemented by an independent server or a server cluster consisting of multiple servers. The present invention is described in detail below through specific embodiments.
[0027] See also Figure 2 As shown, Figure 2 A flowchart of a method for determining product recommendation words provided by an embodiment of the present invention includes the following steps:
[0028] S110, obtaining first data of a target user in an investment field, second data of at least one non-investment field, product data corresponding to the target user in the non-investment field, and behavior data of the target user in the non-investment field.
[0029] Among them, the investment field includes the fund investment field, the bond investment field and the stock investment field, etc. The non-investment field includes the field of using online transactions to purchase items other than the investment field, etc. The data acquisition method of the non-investment field, for example, using online shopping software for online shopping, etc., can be obtained by finding the registration information, item browsing information and transaction record information of the target user in the online shopping software. The first data in the investment field includes the personal data of the target user, such as the ID number, mobile phone number, bank card number, age and gender of the target user. The second data in the non-investment field has the same data content as the first data. The product data corresponding to the target user in the non-investment field includes the product data interacted with by the target user, and the interaction may include purchase, return, cancellation and ordering, etc. The behavior data of the target user includes the interaction behavior data between the target user and the interaction platform in the non-investment field, such as payment behavior and browsing behavior, etc.
[0030] Specifically, first obtain the first data of the target user in the investment field, the second data of at least one non-investment field, the product data corresponding to the target user in the non-investment field, and the behavior data of the target user in the non-investment field. These data can be used as input data and verification data of the target model.
[0031] S120. Through the pre-trained target model, the second data of the target user, the product data corresponding to the target user, and the behavior data of the target user are mapped to the investment field to obtain the predicted probability of the first data and each preset product recommendation script.
[0032] Specifically, through the pre-trained target model, the second data, product data and behavior data of the target user in the non-investment field are mapped to the data in the investment field, and the predicted first data in the investment field and the predicted probability of each preset product recommendation script are obtained. Through this step, the mapping of data in the non-investment field and data in the investment field is achieved, and this step prepares for the subsequent steps. Furthermore, in the processing of the subsequent steps, the first data and the first data can be predicted according to the predicted probability, and the target product recommendation script can be obtained from the predicted product recommendation script.
[0033] S130: Based on the predicted first data, the first data and the predicted probability of each of the preset product recommendation phrases, determine the target product recommendation phrase for the target user from each of the preset product recommendation phrases.
[0034] The target model is obtained by training based on a first training data set in the investment field and at least one second training data set in the non-investment field. The training process of the target model will be described in detail in the following embodiments and will not be repeated here.
[0035] Specifically, based on the comparison between the predicted first data and the first data obtained by the pre-trained model, and the predicted probability of each preset product recommendation script, the target product recommendation script for the target user is obtained from each preset product recommendation script. The method of the embodiment of the present invention realizes the mapping of the target user's non-investment field data to the investment field data, and obtains the target product recommendation script for the target user in the investment field. When the target user is a cold start user in the investment field, the appropriate target product recommendation script for the target user in the investment field can still be obtained based on the target user's non-investment field data, thereby improving the applicability of the target product recommendation script.
[0036] It should be understood that a cold start user refers to a user who has no historical behavior data or historical transaction amount data in a certain field.
[0037] The technical solution of the embodiment of the present invention can obtain the first data of the target user in the investment field, the second data of at least one non-investment field, the product data corresponding to the target user in the non-investment field, and the behavior data of the target user in the non-investment field through the client. Through the pre-trained target model, the second data of the target user, the product data corresponding to the target user, and the behavior data of the target user are mapped to the data of the investment field to obtain the predicted probability of the first data and each preset product recommendation script; based on the predicted probability of the first data, the first data, and each preset product recommendation script, the target product recommendation script of the target user is obtained from each preset product recommendation script. The target model is obtained by training based on the first training data set in the investment field and the second training data set in the non-investment field, and the target product recommendation script is fed back to the client. In the embodiment of the present invention, since the target model is trained based on the first training data set in the investment field and at least one non-investment field, the target model has the characteristic of mapping the data in the investment field according to the data in the non-investment field. This solution achieves that when there is no available product investment behavior data in the target user's investment field, the investment field can be mapped based on the target user's non-investment field data, so that the obtained target product recommendation language is more applicable and more in line with the target user's investment and purchase characteristics of the product, thereby increasing the target user's desire to purchase the target product because of the target product recommendation language.
[0038] In another embodiment of the present invention, the predicted probability includes the probability of the preset product recommendation words in each feedback type; the feedback type includes the success level of the product recommended by the preset product recommendation words; the target product recommendation words for the target user are determined from each preset product recommendation words based on the predicted first data, the first data and the predicted probability of each preset product recommendation words, including: when the error between the predicted first data and the first data is within a first preset difference range, each preset product recommendation words corresponding to the predicted first data is used as the product recommendation words to be compared; the probability of each product recommendation words to be compared in the highest success level is compared; the product recommendation words to be compared corresponding to the maximum probability are used to determine the target product recommendation words for the target user.
[0039] Among them, the feedback type may refer to the level of success of product recommendation by recommending products through preset product recommendation words. The feedback type is also preset, and multiple levels of types can be set as needed, for example, the feedback types include 1, 2 and 3, etc. 1 indicates successful recommendation, 2 indicates neutral, and 3 indicates failed recommendation, that is, the product was not successfully recommended and the user did not buy it. The feedback type can be obtained based on the feedback data of the sample user. For example, if the first product recommendation words are "recommend to buy product A", and the sample user feedback data is "good", then the feedback type is 1. Optionally, the feedback type of each sample user can be updated based on the sample user's transaction record or unsubscription record in the investment field. For example, the first product recommendation words output to the sample user, the transaction feedback by the sample user, the feedback type is 1, that is, the recommendation is successful. However, in the transaction record of the sample user, the product corresponding to the first product recommendation words is purchased, but the product is unsubscribed or not purchased, then the feedback type is updated to 3, that is, the recommendation fails.
[0040] It should be noted that the target model output predicts the first data and the probability of each preset product recommendation script for each feedback type, which can be expressed in the form of percentage or score.
[0041] Specifically, the first data is used to verify the data output by the target model. When the error between the predicted first data and the first data is within the first preset difference range, it means that the data calculated by the target model is in line with the characteristics of the target user. In this way, the target product recommendation words for the target user obtained according to the output of each preset product recommendation words are more in line with the characteristics of the target user and more accurate. Based on the probability of each preset product recommendation word in each feedback type, the maximum probability of the highest success level is obtained from these probabilities, and the corresponding preset product recommendation words are used as the target product recommendation words, so that when the target product recommendation words recommend products, the purchase desire of the target user is the highest. The scheme of the embodiment of the present invention realizes the verification of the output data of the target model and the determination of the target product recommendation words.
[0042] In another embodiment of the present invention, the first training data set includes multiple first sample data, the first sample data includes first data of a sample user, first product recommendation words corresponding to the sample user, and feedback type of the sample user, the second training data set includes multiple second sample data, the second sample data includes second data of the sample user, product data corresponding to the sample user, and behavior data corresponding to the sample user, and the data content of the first data and the second data of each sample user is the same; the training step of the target model includes: using the initial model to perform data mapping of the investment field on the second sample data of each sample user in each non-investment field, and respectively obtain prediction results corresponding to each second sample data; according to each prediction result and the first sample data corresponding to each prediction result, obtain a prediction error, and when the prediction error meets the training conditions, complete the training, and use the trained initial model as the target model.
[0043] The training conditions include that the prediction error is less than a preset error threshold, or the number of training times reaches a preset number of times, etc. The sample user has data in the non-investment field and data in the investment field. The data in the investment field is mapped through the sample user's data in the non-investment field, and the mapping effect of the initial model is verified through the data in the investment field. In the solution of the embodiment of the present invention, the sample user has data in the investment field and the non-investment field, while the target user has data in the non-investment field and lacks data in the investment field.
[0044] In an embodiment of the present invention, the second sample data of each sample user in the non-investment field is mapped to the investment field through the initial model, and the prediction results corresponding to each second sample data are obtained respectively. When the prediction error between each prediction result and the corresponding first sample data meets the training conditions, the training is completed, and the trained initial model is used as the target model. The embodiment of the present invention realizes the training of the initial model.
[0045] Optionally, the second sample data is mapped to data in the investment field, including mapping the second data in the second sample data to the first data in the investment field. The product data corresponding to the sample user is mapped to the first product recommendation words corresponding to the sample user. The behavioral data corresponding to the sample user is mapped to the feedback type of the sample user. Through such a mapping method, the corresponding data in the investment field can be obtained by mapping various data in the non-investment field. When the mapping effect is poor, that is, the prediction error does not meet the training conditions, the model parameters of the initial model are adjusted to obtain an updated initial model. Through the updated initial model, the second sample data in the non-investment field is mapped again to obtain the prediction results corresponding to each second sample data in the investment field. This operation is repeated until the training conditions are met.
[0046] In another embodiment of the present invention, the initial model includes a mapping model, and the training conditions include completing the training if the prediction error is within a second preset difference range, and adjusting the model parameters of the mapping model based on the prediction error if the prediction error is not within the second preset difference range; the training step of the mapping model includes: processing the second sample data of each of the sample users through the mapping model to obtain a prediction result corresponding to each of the second sample data; obtaining a prediction error based on each of the prediction results and the first sample data corresponding to each of the prediction results, and completing the training when the prediction error is within the second preset difference range, and using the trained mapping model as the target model.
[0047] Among them, the prediction result includes the predicted first data corresponding to each first sample data, the predicted first product recommendation words and the predicted feedback type. The second preset difference range includes multiple preset difference ranges, specifically including a first preset difference range that limits the error between the predicted first data and the first data, a second preset difference range that limits the error between the predicted first product recommendation words and the first product recommendation words, and a third preset difference range that limits the error between the predicted feedback type and the feedback type. The prediction error includes the error between the predicted first data and the first data, the error between the predicted first product recommendation words and the first product recommendation words, and the error between the predicted feedback type and the feedback type.
[0048] Specifically, the second sample data of each sample user is mapped by the mapping model to obtain the prediction result corresponding to each second sample data, and the prediction error is obtained by each prediction result and the first sample data corresponding to each prediction result. If the prediction error is within the second preset difference range, the training is completed and the trained mapping model is obtained as the target model.
[0049] During the data mapping process of a mapping model, if the prediction error obtained is not within the second preset difference range, the model parameters of the mapping model are adjusted according to the prediction error to obtain an updated mapping model, and the second sample data of each sample user is again mapped based on the updated mapping model to obtain the prediction result corresponding to each second sample data, and then the prediction error and subsequent steps are obtained, and the processing is repeated until the training is completed.
[0050] Of course, in an embodiment of the present invention, the number of times of each cycle can also be recorded, and when judging whether the prediction error is within the second preset difference range, it is judged whether the number of cycles reaches the preset number of iterations. If the prediction error is within the second preset difference range or the number of cycles reaches the preset number of iterations, that is, if any one of the judgment results is yes, the training ends.
[0051] In another embodiment of the present invention, the mapping model includes a mapping function relationship f m , when only the second training data set in the non-investment field is input, the behavioral performance tendency of sample users in the investment field can be obtained, which can be expressed as:
[0052] X s1 =f m (X s2 ), where m is the model parameter of the mapping model, X s2 =(u2,v2,e2) represents the second sample data of the s-th sample user, u2 represents the second data of the s-th sample user, v2 represents the product data corresponding to the s-th sample user, and e2 represents the behavior data of the s-th sample user. s1 =(u1,v1,e1) represents the predicted first sample data of the s-th sample user, u1 represents the predicted first data of the s-th sample user, v1 represents the predicted first product recommendation words of the s-th sample user, and e1 represents the feedback type of the s-th sample user.
[0053] Among them, m is the model parameter that needs to be learned. The number of model parameters is determined by the designed training network and is not specifically limited here. In order to improve the accuracy of mapping relationship learning, a variety of algorithms can be integrated for optimization, such as contrast learning algorithm, transfer learning algorithm, etc., so that the mapping relationship between the two domain information can be learned accurately and effectively. For example, through the transfer learning algorithm, in each training process of the mapping model, the mapping relationship between the two domain information is learned through the transfer learning algorithm.
[0054] In another embodiment of the present invention, the step of obtaining the second training data set includes: obtaining the second data of each sample user, the product data corresponding to the sample user, and the behavior data of the sample user; dividing the second data of each sample user, the product data corresponding to the sample user, and the behavior data of the sample user into numerical data and categorical data; discretizing the numerical data to obtain candidate numerical data; performing one-hot encoding on the candidate numerical data and the categorical data respectively to obtain candidate second sample data; and obtaining the second training data set from each of the candidate second sample data.
[0055] Among them, one-hot encoding is also called one-bit effective encoding. The behavior data can be represented in the form of a matrix, and the behavior data includes the interaction behavior data between the sample user and the product recommendation words in the non-investment field. The second data of each sample user, the product data corresponding to the sample user, and the behavior data of the sample user can all be structured data.
[0056] Specifically, the second data of each sample user, the product data corresponding to the sample user, and the behavior data of the sample user are obtained, and the second data of each sample user, the product data corresponding to the sample user, and the behavior data of the sample user are divided into numerical data and categorical data, and then the numerical data are discretized, and the candidate numerical data and categorical data obtained after discretization are one-hot encoded to obtain candidate second sample data, and each candidate second sample data is used as the second training data set, or part of the candidate second sample data is used as the second training data set.
[0057] Optionally, before being divided into numerical data and categorical data, operations such as data cleaning, padding, and outlier removal are performed on the structured data.
[0058] In another embodiment of the present invention, the step of obtaining the first training data set includes: obtaining the first data of each sample user, the first product recommendation words corresponding to the sample user, and the feedback type of the sample user; preprocessing the first product recommendation words of each sample user through a preprocessing model to obtain candidate first product recommendation words with context-related representations, wherein the preprocessing model includes any one of the bidirectional encoder representation models based on the bag-of-words model or the transformer; taking the candidate first product recommendation words, the feedback type and the first data of the same sample user as candidate first sample data; and obtaining the first training data set from each of the candidate first sample data.
[0059] Among them, the Bag of Words Model (BWM) and the Bidirectional Encoder Representations from Transformers (BERT) are used. In the embodiment of the present invention, the BWM or BERT model in the investment field is trained by using the dialogue text in the investment field, so that the pre-processing model after training can make the obtained words have context-related representation features when performing vector speech representation of words.
[0060] Specifically, the first data of each sample user, the first product recommendation words corresponding to the sample user, and the feedback type of the sample user are obtained, and the first product recommendation words of each sample user are preprocessed through a preprocessing model to obtain candidate first product recommendation words with context-related representations, and the candidate first product recommendation words, feedback type, and first data of the same sample user are used as candidate first sample data, and each candidate first sample data is used as a first training data set, or part of the candidate first sample data is used as a first training data set. The first training data set can be obtained through the embodiment of the present invention, and the candidate first product recommendation words in the first training data set have semantic information to assist the subsequent training of the initial model.
[0061] It should be understood that the candidate first product recommendation words, feedback type and first data can all be represented by vectors.
[0062] In another embodiment of the present invention, before the training step of the target model, the method further includes: training an initial encoder through a second training sample set to obtain a candidate encoder; adjusting encoder parameters of the candidate encoder through a first training data set to obtain a target encoder, wherein the target encoder is used to re-encode the first training data set and the second training data set to obtain a new first training data set and a new second training data set, and the new first training data set and the new second training data set are used to train the initial model.
[0063] Specifically, the second data of each sample user in the second training sample set and the product data corresponding to the sample user are used as input data of the initial encoder for processing, and the predicted behavior data of each sample user is output. A loss value is obtained according to the behavior data of each sample user and the predicted behavior data. When the loss value does not meet the first preset loss condition and the number of training times does not meet the training number condition, the model parameters of the initial encoder are adjusted based on the loss value to obtain an updated initial encoder, and a training is completed. Alternatively, the loss value converges or the number of training times meets the training number condition, and the training is completed, and the trained initial encoder is used as a candidate encoder.
[0064] By taking the first data and the first product recommendation words of each user in the first training data set as the input data of the candidate encoder, the candidate encoder outputs the predicted feedback type, and the loss value is calculated according to the predicted feedback type and feedback type of each sample user. When the loss value does not meet the second preset loss condition, the model parameters of the candidate encoder are fine-tuned according to the loss value to obtain an updated candidate encoder. A training is completed. Alternatively, the loss value converges or the number of training times meets the training number condition, and the training is completed, and the candidate encoder that has completed the training is used as the target encoder.
[0065] The embodiment of the present invention implements the training of the initial encoder before the training of the initial model to obtain the target encoder. During the training process, the target encoder learns the domain knowledge of the investment field and the non-investment field, as well as the shared common knowledge of the two fields. In this way, after each data in the first training data set and the second training data set is vectorized, the obtained new first training data set and the second training data set include the domain knowledge and the common knowledge. By training the initial model with the updated first training data set and the second training data set, the training speed of the model can be accelerated. The training process of the initial model is the same as the training process of the initial model in the aforementioned embodiment.
[0066] Optionally, in an embodiment of the present invention, only the first data of each sample user in the first training data set and the first product recommendation words corresponding to the sample user are encoded by the target encoder, and initial vectorization representation is performed respectively, that is, new first data and new first product recommendation words are obtained for each sample user respectively, and the new first data, new first product recommendation words and behavior data of each sample user are used as the new first training data set. Similarly, the second data of each sample user in the second training data set and the product data corresponding to the sample user are encoded by the target encoder, and initial vectorization representation is performed respectively, that is, new second data and new second product data of each sample user are obtained respectively, and the new second data, new second product data and behavior data of each sample user are used as the new second training data set.
[0067] Exemplarily, the vector of the first product recommendation script is spliced with the vectors of domain knowledge and general knowledge of the corresponding investment field. General knowledge includes common sense knowledge, the subordinate relationship of life products, the age level and life stage of sample users. Domain knowledge also includes credit requirements, occupation requirements, age restrictions on loan products, etc. in the investment field. This method can further optimize the initial vector expression of the second data, the product data corresponding to the sample user, the first data and the first product recommendation script corresponding to the sample user, and accelerate the learning process of the subsequent mapping relationship.
[0068] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0069] In one embodiment, a device for determining product recommendation words is provided, and the device for determining product recommendation words corresponds one-to-one to the method for determining product recommendation words in the above embodiment. Figure 3 As shown, the device for determining product recommendation words includes a data acquisition module 410, a data mapping module 420 and a target product recommendation words determination module 430. The detailed description of each functional module is as follows:
[0070] The data acquisition module 410 is used to acquire the first data of the target user in the investment field, the second data of at least one non-investment field, the product data corresponding to the target user in the non-investment field, and the behavior data of the target user in the non-investment field; the data mapping module 420 is used to perform data mapping of the investment field on the second data of the target user, the product data corresponding to the target user, and the behavior data of the target user through a pre-trained target model to obtain the predicted probability of the first data and each preset product recommendation script; the target product recommendation script determination module 430 is used to determine the target product recommendation script of the target user from each preset product recommendation script based on the predicted first data, the first data, and the predicted probability of each preset product recommendation script, wherein the target model is obtained by training based on a first training data set in the investment field and at least one second training data set in the non-investment field.
[0071] In another embodiment of the present invention, the predicted probability includes the probability of the preset product recommendation words in each feedback type; the feedback type includes the success level of the product recommended by the preset product recommendation words;
[0072] The target product recommendation script determination module 430 is also used for:
[0073] When the error between the predicted first data and the first data is within a first preset difference range, the probability of each product recommendation phrase to be compared in the highest success level is compared; the product recommendation phrase to be compared corresponding to the maximum probability is used to determine the target product recommendation phrase for the target user.
[0074] In another embodiment of the present invention, the first training data set includes a plurality of first sample data, the first sample data includes first data of a sample user, a first product recommendation phrase corresponding to the sample user, and a feedback type of the sample user, the second training data set includes a plurality of second sample data, the second sample data includes second data of a sample user, product data corresponding to the sample user, and behavior data corresponding to the sample user, and the data content in the first data and the second data of each sample user is the same;
[0075] The device also includes:
[0076] The first training module is used to map the data of the investment field to the second sample data of each sample user in each non-investment field through the initial model, and obtain the prediction results corresponding to each second sample data; according to each prediction result and the first sample data corresponding to each prediction result, the prediction error is obtained, and when the prediction error meets the training conditions, the training is completed, and the trained initial model is used as the target model.
[0077] In another embodiment of the present invention, the initial model includes a mapping model, and the training condition includes completing the training if the prediction error is within a second preset difference range, and adjusting the model parameters of the mapping model based on the prediction error if the prediction error is not within the second preset difference range;
[0078] The device also includes:
[0079] The second training module is used to: perform data mapping on the second sample data of each sample user through the mapping model to obtain prediction results corresponding to each second sample data; obtain a prediction error based on each prediction result and the first sample data corresponding to each prediction result, complete the training when the prediction error is within a second preset difference range, and use the trained mapping model as the target model.
[0080] In another embodiment of the present invention, the apparatus further comprises:
[0081] The second training data set acquisition module is used to: acquire the second data of each sample user, the product data corresponding to the sample user, and the behavior data of the sample user; divide the second data of each sample user, the product data corresponding to the sample user, and the behavior data of the sample user into numerical data and categorical data; discretize the numerical data to obtain candidate numerical data; perform one-hot encoding on the candidate numerical data and the categorical data respectively to obtain candidate second sample data; and obtain the second training data set from each of the candidate second sample data.
[0082] In another embodiment of the present invention, the apparatus further comprises:
[0083] The first training data set acquisition module is used to: acquire the first data of each sample user, the first product recommendation words corresponding to the sample user, and the feedback type of the sample user; preprocess the first product recommendation words of each sample user through a preprocessing model to obtain candidate first product recommendation words with context-related representation, wherein the preprocessing model includes any one of the bidirectional encoder representation models based on the bag-of-words model or the transformer; use the candidate first product recommendation words, the feedback type and the first data of the same sample user as candidate first sample data; and obtain the first training data set from each of the candidate first sample data.
[0084] In another embodiment of the present invention, the apparatus further comprises:
[0085] A target encoder acquisition module is used to train an initial encoder through a second training sample set to obtain a candidate encoder; adjust the encoder parameters of the candidate encoder through a first training data set to obtain a target encoder, wherein the target encoder is used to re-encode the first training data set and the second training data set to obtain a new first training data set and a new second training data set, and the new first training data set and the new second training data set are used to train the initial model.
[0086] The device for determining product recommendation words in the embodiment of the present invention can obtain the first data of the target user in the investment field, the second data of at least one non-investment field, the product data corresponding to the target user in the non-investment field, and the behavior data of the target user in the non-investment field through the client. Through the pre-trained target model, the second data of the target user, the product data corresponding to the target user, and the behavior data of the target user are mapped to the data of the investment field to obtain the predicted probability of the first data and each preset product recommendation words; based on the predicted first data, the first data, and the predicted probability of each preset product recommendation words, the target product recommendation words of the target user are obtained from each preset product recommendation words. The target model is obtained by training based on the first training data set in the investment field and the second training data set in the non-investment field, and the target product recommendation words are fed back to the client. In the embodiment of the present invention, since the target model is trained based on the first training data set in the investment field and at least one non-investment field, the target model has the characteristic of mapping the data in the investment field according to the data in the non-investment field. This solution achieves that when there is no available product investment behavior data in the target user's investment field, the investment field can be mapped based on the target user's non-investment field data, so that the obtained target product recommendation language is more applicable and more in line with the target user's investment and purchase characteristics of the product, thereby increasing the target user's desire to purchase the target product because of the target product recommendation language.
[0087] For the specific definition of the device for determining product recommendation words, please refer to the definition of the method for determining product recommendation words above, which will not be repeated here. Each module in the above-mentioned device for determining product recommendation words can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0088] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, it implements the functions or steps of a method for determining a product recommendation script on the server side.
[0089] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps on the client side of a method for determining a product recommendation script.
[0090] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0091] Acquire first data of a target user in an investment field, second data of at least one non-investment field, product data corresponding to the target user in the non-investment field, and behavior data of the target user in the non-investment field;
[0092] Through the pre-trained target model, the second data of the target user, the product data corresponding to the target user, and the behavior data of the target user are mapped to the data of the investment field to obtain the predicted probability of the first data and each preset product recommendation script;
[0093] Based on the predicted first data, the first data and the predicted probability of each of the preset product recommendation lines, the target product recommendation lines for the target user are determined from each of the preset product recommendation lines, wherein the target model is trained based on a first training data set in the investment field and at least one second training data set in the non-investment field.
[0094] The computer device of the embodiment of the present invention, when the processor executes the computer program, can achieve by obtaining the first data of the target user in the investment field, the second data of at least one non-investment field, the product data corresponding to the target user in the non-investment field, and the behavior data of the target user in the non-investment field. Through the target model, the second data of the target user, the product data corresponding to the target user, and the behavior data of the target user are mapped to the data of the investment field to obtain the predicted probability of the first data and each preset product recommendation script; based on the predicted probability of the first data, the first data, and each preset product recommendation script, the target product recommendation script of the target user is obtained from each preset product recommendation script. Since the target model is obtained by training at least one non-investment field based on the first training data set of the investment field, the target model has the characteristics of mapping the data of the investment field according to the data of the non-investment field, so that the obtained target product recommendation script is more applicable and more in line with the characteristics of the target user's investment purchase of the product, thereby increasing the target user's desire to purchase the target product due to the target product recommendation script.
[0095] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0096] Acquire first data of a target user in an investment field, second data of at least one non-investment field, product data corresponding to the target user in the non-investment field, and behavior data of the target user in the non-investment field;
[0097] Through the pre-trained target model, the second data of the target user, the product data corresponding to the target user, and the behavior data of the target user are mapped to the data of the investment field to obtain the predicted probability of the first data and each preset product recommendation script;
[0098] Based on the predicted first data, the first data and the predicted probability of each of the preset product recommendation lines, the target product recommendation lines for the target user are determined from each of the preset product recommendation lines, wherein the target model is trained based on a first training data set in the investment field and at least one second training data set in the non-investment field.
[0099] The computer-readable storage medium of the embodiment of the present invention, the computer program executed by the processor can be realized by obtaining the first data of the target user in the investment field, the second data of at least one non-investment field, the product data corresponding to the target user in the non-investment field, and the behavior data of the target user in the non-investment field. Through the target model, the second data of the target user, the product data corresponding to the target user, and the behavior data of the target user are mapped to the data of the investment field to obtain the predicted probability of the first data and each preset product recommendation script; based on the predicted probability of the first data, the first data, and each preset product recommendation script, the target product recommendation script of the target user is obtained from each preset product recommendation script. Since the target model is obtained by training at least one non-investment field based on the first training data set of the investment field, the target model has the characteristics of mapping the data of the investment field according to the data of the non-investment field, so that the obtained target product recommendation script is more applicable and more in line with the characteristics of the target user's investment purchase of the product, thereby increasing the target user's desire to purchase the target product due to the target product recommendation script.
[0100] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0101] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0102] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0103] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for determining product recommendation words, characterized in that: include: Acquire first data of a target user in an investment field, second data of at least one non-investment field, product data corresponding to the target user in the non-investment field, and behavior data of the target user in the non-investment field; Through the pre-trained target model, the second data of the target user, the product data corresponding to the target user, and the behavior data of the target user are mapped to the data of the investment field to obtain the predicted probability of the first data and each preset product recommendation script; Based on the predicted first data, the first data and the predicted probability of each of the preset product recommendation lines, the target product recommendation lines for the target user are determined from each of the preset product recommendation lines, wherein the target model is trained based on a first training data set in the investment field and at least one second training data set in the non-investment field.
2. The method for determining product recommendation words according to claim 1, characterized in that: The predicted probability includes the probability of the preset product recommendation words in each feedback type; the feedback type includes the success level of the product recommended by the preset product recommendation words; The step of determining the target product recommendation words for the target user from the preset product recommendation words based on the predicted first data, the first data and the predicted probability of each preset product recommendation wording includes: When the error between the predicted first data and the first data is within a first preset difference range, comparing the probability of each product recommendation speech to be compared in the highest success level; The recommended words for the compared products corresponding to the maximum probability are used to determine the target product recommended words for the target user.
3. The method for determining product recommendation words according to claim 1, characterized in that: The first training data set includes a plurality of first sample data, the first sample data includes first data of a sample user, a first product recommendation phrase corresponding to the sample user, and a feedback type of the sample user; the second training data set includes a plurality of second sample data, the second sample data includes second data of a sample user, product data corresponding to the sample user, and behavior data corresponding to the sample user, and the data content in the first data and the second data of each sample user is the same; The training steps of the target model include: Using the initial model, the second sample data of each sample user in each non-investment field is mapped to the investment field, and prediction results corresponding to each second sample data are obtained respectively; A prediction error is obtained according to each of the prediction results and the first sample data corresponding to each of the prediction results. When the prediction error meets the training conditions, the training is completed and the trained initial model is used as the target model.
4. The method for determining product recommendation words according to claim 3, characterized in that: The initial model includes a mapping model, and the training condition includes completing the training if the prediction error is within a second preset difference range, and adjusting the model parameters of the mapping model based on the prediction error if the prediction error is not within the second preset difference range; The training steps of the mapping model include: Performing data mapping on the second sample data of each of the sample users by using the mapping model, and obtaining prediction results corresponding to each of the second sample data; A prediction error is obtained according to each of the prediction results and the first sample data corresponding to each of the prediction results. When the prediction error is within a second preset difference range, the training is completed and the trained mapping model is used as the target model.
5. The method for determining product recommendation words according to claim 3, characterized in that: The step of acquiring the second training data set includes: Acquire the second data of each sample user, the product data corresponding to the sample user, and the behavior data of the sample user; dividing the second data of each sample user, the product data corresponding to the sample user, and the behavior data of the sample user into numerical data and categorical data; Discretizing the numerical data to obtain candidate numerical data; Performing one-hot encoding on the candidate numerical data and the categorical data respectively to obtain candidate second sample data; The second training data set is obtained from each of the candidate second sample data.
6. The method for determining product recommendation words according to claim 3, characterized in that: The step of acquiring the first training data set includes: Acquire first data of each sample user, a first product recommendation phrase corresponding to the sample user, and a feedback type of the sample user; Preprocessing the first product recommendation words of each sample user through a preprocessing model to obtain candidate first product recommendation words with context-related representations, wherein the preprocessing model includes any one of a bag-of-words model or a transformer-based bidirectional encoder representation model; The candidate first product recommendation words, the feedback type, and the first data of the same sample user are used as candidate first sample data; A first training data set is obtained from each of the candidate first sample data.
7. The method for determining product recommendation words according to any one of claims 3 to 6, characterized in that: Before the step of training the target model, the method further includes: Train the initial encoder using the second training sample set to obtain a candidate encoder; Through the first training data set, the encoder parameters of the candidate encoder are adjusted to obtain a target encoder, wherein the target encoder is used to re-encode the first training data set and the second training data set to obtain a new first training data set and a new second training data set, and the new first training data set and the new second training data set are used to train the initial model.
8. A device for determining product recommendation words, characterized in that: include: A data acquisition module, used to acquire first data of a target user in an investment field, second data of at least one non-investment field, product data corresponding to the target user in the non-investment field, and behavior data of the target user in the non-investment field; A data mapping module, used to perform data mapping of the investment field on the second data of the target user, the product data corresponding to the target user, and the behavior data of the target user through a pre-trained target model, to obtain a predicted probability of predicting the first data and each preset product recommendation script; A target product recommendation script determination module is used to determine the target product recommendation script for the target user from among the preset product recommendation scripts based on the predicted first data, the first data and the predicted probability of each of the preset product recommendation scripts, wherein the target model is obtained by training based on a first training data set in the investment field and at least one second training data set in the non-investment field.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for determining product recommendation words as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for determining product recommendation words as described in any one of claims 1 to 7 are implemented.