Model training method, commodity recommendation method and related equipment
By extracting and filtering the inquiry association information between users and merchants, and updating parameters using payment prediction network, the problem of low matching of product recommendation models in the prior art in medical scenarios is solved, and higher recommendation accuracy and user needs matching are achieved.
Patent Information
- Application Number
- CN202510218334.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, when recommending products in medical scenarios, the product recommendation model lacks effective understanding and sensitivity to inquiry related information, resulting in the recommendation results that are inconsistent with the actual needs of users.
Through a model training method, query association information between users and merchants is obtained, feature data is extracted and inputted to the feature analysis network for filtering, and the filtered feature vector is obtained. Then, these feature vectors are input to the payment prediction network for prediction processing, obtain the payment probability, and update the parameters of the payment prediction network based on the payment probability and payment results until converge.
The model performance of the payment prediction network is improved, thereby improving the prediction accuracy of commodity payments, and thus improving the matching degree between recommended products and user needs.
Smart Images

Figure CN120070004A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of intelligent decision-making, and particularly relates to a model training method, a commodity recommendation method, and related devices. Background Art
[0002] In Internet medical consultations, doctors need to recommend medical commodities such as drugs or medical devices to patients in combination with the actual conditions of the patients' conditions and personal needs. In the prior art, when conventional commodity recommendation models recommend commodities in such medical scenarios, they often lack effective understanding and sensitivity to inquiry-related information. These commodity recommendation models usually quickly screen out commodities for users to choose according to methods such as keyword matching search, but the screening results often do not match the actual needs of users. Summary of the Invention
[0003] The main purpose of this application is to provide a model training method, a commodity recommendation method, and related devices. Through this model training, the model performance of the payment prediction network can be improved, thereby improving the prediction accuracy of commodity payment, and further improving the matching degree between the recommended commodities and the user needs.
[0004] In a first aspect, this application provides a model training method, including:
[0005] Obtain a plurality of first combined feature vectors; wherein, the first combined feature vector includes inquiry feature data and corresponding payment results, the inquiry feature data is obtained by feature extraction based on the inquiry-related information between the user and the merchant, and the inquiry-related information includes user information, inquiry information, and commodity information;
[0006] Input the plurality of first combined feature vectors into a preset feature analysis network to screen the inquiry feature data in each of the first combined feature vectors, and obtain second combined feature vectors corresponding to each of the first combined feature vectors;
[0007] Input the plurality of second combined feature vectors into a preset payment prediction network for prediction processing to obtain payment probabilities corresponding to each of the plurality of second combined feature vectors, and the payment probability is used to represent the probability that the user pays the commodity amount after the inquiry;
[0008] Update the parameters of the payment prediction network according to the payment probabilities and payment results corresponding to each of the plurality of second combined feature vectors until the payment prediction network converges.
[0009] In a second aspect, this application further provides a commodity recommendation method, including:
[0010] Obtain the inquiry-related information between the user and the merchant, and perform feature extraction on the inquiry-related information to obtain a target combined feature vector;
[0011] Input the target combined feature vector into a product recommendation model to obtain the payment probabilities of multiple products, where the product recommendation model is obtained based on the model training method described above;
[0012] Determine at least one target product as a recommended product from the multiple products according to the payment probabilities of the multiple products.
[0013] In a third aspect, the present application further provides a data processing device, where the data processing device includes:
[0014] A data acquisition module that acquires multiple first combined feature vectors; wherein, the first combined feature vector includes inquiry feature data and corresponding payment results, and the inquiry feature data is obtained by performing feature extraction based on the inquiry association information between the user and the merchant, and the inquiry association information includes user information, inquiry information, and product information;
[0015] A data processing module for inputting the multiple first combined feature vectors into a preset feature analysis network to screen the inquiry feature data in each of the first combined feature vectors, so as to obtain a second combined feature vector corresponding to each of the first combined feature vectors;
[0016] A data prediction module for inputting the multiple second combined feature vectors into a preset payment prediction network for prediction processing to obtain the payment probabilities corresponding to the multiple second combined feature vectors respectively, where the payment probability is used to characterize the probability that the user pays the product amount after making an inquiry;
[0017] A parameter update module for updating the parameters of the payment prediction network according to the payment probabilities and payment results corresponding to the multiple second combined feature vectors respectively until the payment prediction network converges.
[0018] In a fourth aspect, the present application further provides a computer device, where the computer device includes a processor, a memory, and a computer program stored on the memory and executable by the processor. When the computer program is executed by the processor, the steps of the model training method described above are implemented, or the steps of the product recommendation method described above are implemented.
[0019] In a fifth aspect, the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps of the model training method described above are implemented, or the steps of the product recommendation method described above are implemented.
[0020] The present application provides a model training method, a commodity recommendation method and related devices. In the embodiments of the present application, a feature analysis network is first used to screen a first combined feature vector to screen out inquiry feature data as a second combined feature vector; then a payment prediction network is used to perform payment prediction on the screened second combined feature vector, and the payment prediction network is trained through the predicted payment probability and the corresponding payment result, which can improve the model performance of the payment prediction network, thereby improving the prediction accuracy of commodity payment, and further improving the matching degree between the recommended commodities and user needs. Description of the Drawings
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0022] Figure 1 It is a schematic flowchart of the steps of a model training method provided by an embodiment of the present application;
[0023] Figure 2 For Figure 1 a sub-step flowchart of the model training method in
[0024] Figure 3 It is a schematic flowchart of the steps of a commodity recommendation method provided by an embodiment of the present application;
[0025] Figure 4 It is a scenario schematic diagram for implementing the commodity recommendation method provided by an embodiment of the present application;
[0026] Figure 5 It is a schematic block diagram of a data processing device provided by an embodiment of the present application;
[0027] Figure 6 It is a schematic block diagram of the structure of a computer device provided by an embodiment of the present application.
[0028] The realization, functional features and advantages of the purpose of the present application will be further described in conjunction with the embodiments with reference to the drawings. Detailed Embodiments
[0029] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are some, rather than all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts fall within the protection scope of the present application.
[0030] The flowcharts shown in the accompanying drawings are merely illustrative examples and do not necessarily include all the content and operations / steps, nor do they have to be executed in the described order. For example, some operations / steps can be decomposed, combined, or partially merged, so the actual execution order may change according to the actual situation.
[0031] In the consultation scenario of an Internet medical platform, doctors often need to recommend suitable medical products such as drugs or medical devices to patients based on their conditions and personal needs. However, most of the common product recommendation methods in the prior art adopt general recommendation models. For example, through methods such as keyword matching and search ranking, a batch of products are quickly screened for users to choose. These methods have certain effects in general product recommendation scenarios, but when it comes to the recommendation of medical products, there are problems such as a low matching degree between the recommended products and the user's needs. This deficiency not only leads to a low product conversion rate but also further causes poor user experience. According to analysis, the recommendation of medical products needs to comprehensively consider various information such as the patient's condition, personal needs, payment ability, and the doctor's treatment suggestions. However, the existing recommendation methods are difficult to fully understand and utilize these complex consultation data, resulting in a large deviation between the recommendation results and the actual needs of patients, and a low matching degree between the recommended products and the user's needs.
[0032] To solve the problem that the screening results of the existing product recommendation model for medical products often do not conform to the actual needs of users, this application provides a model training method. Through this model training method, the model performance of the payment prediction network can be improved, thereby improving the prediction accuracy of product payment and further improving the matching degree between the recommended products and the user's needs. Among them, this model training method can be applied to a terminal device or a server. The terminal device can be an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device; the server can be a single server or a server cluster composed of multiple servers. The following takes the application of this model training method to a server as an example for explanation.
[0033] The following will describe in detail some embodiments of this application with reference to the accompanying drawings. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0034] Please refer to Figure 1 , Figure 1 , which is a schematic flowchart of the steps of a model training method provided by an embodiment of this application.
[0035] As Figure 1 shown, this model training method includes steps S101 to S104.
[0036] Step S101, obtain a plurality of first combined feature vectors.
[0037] Among them, each first combined feature vector includes inquiry feature data and the payment result corresponding to the inquiry feature data. The inquiry feature data is used to characterize the inquiry behavior pattern and can be obtained by extracting features based on the inquiry association information between the user and the merchant. For example, it can be the real information collected from multiple inquiry interactions between multiple users and the merchant within a certain time period. The inquiry association information can include various feature information, and the influence of each type of feature information on the payment result corresponding to the inquiry behavior pattern is different.
[0038] Specifically, the inquiry association information includes three types of feature information: user information, inquiry information, and commodity information. Each type of feature information can be one or in batches. It can be understood that the more the number of feature information, the more accurately it can characterize the user behavior pattern. Among them, the user information is the relevant information of the user, such as the age, gender, and number of inquiries of the patient during the consultation; the inquiry information is the relevant information in the inquiry field, such as the consultation department, the attending doctor, and the disease being consulted during the consultation; the commodity information is the relevant information of the commodity, such as the brand of the medical commodity recommended by the doctor, the category of the medical commodity, and the unit price of the medical commodity during the consultation.
[0039] Specifically, the payment result is used to describe the payment behavior or payment status of the user based on the inquiry feature data, such as paid, unpaid, and payment failed, etc. The payment result can be obtained by extracting features from the transaction information corresponding to the inquiry association information between the user and the merchant. The transaction information can be the payment amount, payment time, or payment method, etc.
[0040] In one embodiment, obtaining a plurality of first combined feature vectors includes: obtaining a plurality of inquiry association information between the user and the merchant, each inquiry association information including user information, inquiry information, commodity information, and transaction information; generating a plurality of first feature data according to the user information, inquiry information, and commodity information in each inquiry association information; and generating a payment result according to the transaction information in each inquiry association information; combining the plurality of first feature data and the corresponding payment results to generate a first combined feature vector corresponding to each inquiry association information.
[0041] Exemplarily, taking the initiation to the end of a consultation conversation by a user on a certain online consultation platform as one consultation, one consultation corresponds to a set of consultation-related information and a payment result. Information corresponding to multiple consultations in the most recent year on this online consultation platform is collected to obtain N sets of inquiry-related information and payment results. Among them, each set of inquiry-related information includes user information, inquiry information, and medical product information recommended by doctors. Specifically, user information includes: age, gender, the number of consultations in the most recent 1 year, the most recent consultation time, physical examination disease labels, etc.; inquiry information includes: consulting doctor, consulting department, inquiry source, inquiry disease, disease course, medication history, and allergy history, etc.; medical product information includes: medical product brand, medical product category, medical product name, and medical product unit price, etc.
[0042] Exemplarily, feature extraction is performed on the above N sets of consultation-related data to obtain a feature vector x corresponding to each set of consultation-related data i 。
[0043] Let the dimension of each set of consultation-related information be d, then each set of consultation-related information is represented as x i ∈R d 。The payment result is represented as y i ∈{0,1}, where 0 indicates non-payment and 1 indicates payment. Denote the first combined feature vector corresponding to the consultation feature data and the payment result as (x i ,y i ), where i = 1,2,...,N. Denote the data set formed by N first combined feature vectors as T = {(x 1 ,y 1 ),(x 2 ,y 2 ),…,(x N ,y N )}.
[0044] It should be noted that by integrating the three types of data, namely user information, inquiry information, and product information, into consultation feature data, it covers user attributes, inquiry behaviors, and product details, forming a relatively comprehensive feature representation to more accurately depict the user behavior pattern. At the same time, taking the payment feedback corresponding to the user behavior pattern, that is, the payment result, as the target variable (such as paid, unpaid, etc.), and jointly constructing the corresponding first combined feature vector by combining it with the consultation feature data, it provides higher-quality data for subsequent analysis.
[0045] It should also be noted that, to further ensure the privacy and security of the above-mentioned inquiry feature data and other relevant information, the above-mentioned inquiry feature data and other relevant information can also be stored in a node of a blockchain. The technical solution of this application can also be applied to adding other data files stored on the blockchain. The blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.
[0046] Step S102: Input multiple first combined feature vectors into a preset feature analysis network to screen the inquiry feature data in each first combined feature vector, and obtain second combined feature vectors corresponding to each first combined feature vector.
[0047] Among them, the preset feature analysis network can be a GDBT model or a random forest model, etc. The feature analysis network can be used to screen data, and the object to be screened is the inquiry feature data in the first combined feature vector. The second combined feature vectors obtained by screening the first combined feature vectors through the feature analysis network retain the inquiry feature data that has a greater impact or high correlation on the payment result.
[0048] It can be understood that in some cases, when each inquiry feature data in the first combined feature vector has a greater impact on the payment result and the difference is small, all the inquiry feature data in the first combined feature vector can be retained. At this time, the second combined feature vector is the first combined feature vector. In other cases, the impacts of the inquiry feature data in the first combined feature vector on the payment result show obvious differences. After being screened by the feature analysis network, the first combined feature vector removes noise or redundant feature data. At this time, the second combined feature vector only retains part of the inquiry feature data in the first combined feature vector.
[0049] It should be noted that by screening and retaining the effective inquiry feature data, the interference of irrelevant or low-correlation data is reduced, which can improve the efficiency and accuracy of subsequent data analysis.
[0050] In one embodiment, the preset feature analysis network includes multiple feature analysis sub-networks, and each feature analysis sub-network screens the first combined feature vector in sequence.
[0051] In one embodiment, the training process of the feature analysis network includes: inputting multiple first combined feature vectors into the feature analysis network to perform feature screening on each first combined feature vector according to the corresponding payment result, and obtaining second combined feature vectors corresponding to each of the multiple first combined feature vectors; among them, the second feature vector at least includes part of the inquiry association information in the first combined feature vector; updating the model parameters of the feature analysis network according to the multiple first combined feature vectors and the multiple second combined feature vectors until the feature analysis network converges.
[0052] Exemplarily, the feature analysis network is a GBDT model. Let the GBDT model include M classification and regression trees.
[0053] Input the data set T = {(x 1 , y 1 ), (x 2 , y 2 ), …, (x N , y N )} as the training data set into the GBDT model, and use the logarithmic likelihood loss function L(y, f(x)) = log(1 + exp(-yf(x))) for training. The training process is as follows:
[0054] 1. Initialize the weak learner
[0055] Use a simple weak learner to initialize the target variable:
[0056]
[0057] where Π(·) is the indicator function, y i is the target variable, representing the category of x i (y i ∈ {0, 1}), and f 0 (x) is the log-odds output by the initial model.
[0058] 2. Build M trees
[0059] (1) Calculate the negative gradient as the residual
[0060] For the m-th (m = 1, 2, …, M) tree, calculate the negative gradient r mi of the loss function corresponding to each sample, where i = 1, 2, …, N. This negative gradient r mi is used as the estimate of the residual:
[0061]
[0062] where p mi is the predicted probability based on the current model.
[0063] (2) Use CART regression to fit the residual r mi
[0064] Use CART regression to fit the residual r i to generate the m-th tree and determine its leaf node regions. The structure of each tree is determined by the partitioning of the data features.
[0065] (3) Calculate the fitted values of the leaf nodes
[0066] Let the leaf node region of the m-th tree be R mj (j = 1, 2,..., J), for each leaf node R mj , calculate its fitted value c mj :
[0067]
[0068] (4) Update the model
[0069] Update the m-th round model using the fitted value:
[0070]
[0071] where ν ∈ (0, 1] is the learning rate, used to control the contribution of each tree to the final model.
[0072] 3. Output the final model
[0073] Obtain the output final model f M (x):
[0074]
[0075] and according to the obtained (x i , y i ) corresponding X i .
[0076] It should be noted that by gradually reducing the loss function through the negative gradient fitting method, the training process of the feature analysis network naturally completes the importance assignment of features. Specifically, the split features and split nodes of the feature analysis sub-network can reflect the importance of features, and the finally generated tree structure can explain which features are the most important in prediction, so that the feature data with high relevance to the payment result can be screened out from the query-related data according to the importance of each feature, and the second combined feature vectors corresponding to each first combined feature vector can be obtained.
[0077] Step S103: Input multiple second combined feature vectors into a preset payment prediction network for prediction processing to obtain the payment probabilities corresponding to each of the multiple second combined feature vectors, and the payment probability is used to characterize the probability that the user pays the commodity amount after the query.
[0078] Among them, the payment prediction network is used to analyze according to multiple feature data in the second combined feature vector to predict the payment probability of the user corresponding to the user information in the second combined feature vector for the commodity in the commodity information. The payment prediction network can be an LR model, an MLP model, etc.
[0079] Exemplarily, let the second combined feature vector be X 1 , X2 ,..., X n .
[0080] Let the payment prediction network be an LR model, and the form of this LR model is:
[0081]
[0082] The output P(y = 1|X) represents the payment probability (y = 1 indicates paid, y = 0 indicates unpaid).
[0083] The output value range of P(y = 1|X) is [0, 1], representing the probability that the user pays the commodity amount after making an inquiry.
[0084] Step S104: Update the parameters of the payment prediction network according to the payment probabilities and payment results corresponding to multiple second combined feature vectors until the payment prediction network converges.
[0085] Among them, the payment probability and the payment result can be in different data forms. For example, the payment probability can be a value between 0 and 1, used to represent the possibility of payment occurring, and the payment result can be a binary label (such as 0 or 1), representing the actual payment event (such as 1 indicates paid, 0 indicates unpaid). Therefore, it is necessary to convert or match the payment probability and the payment result to correctly evaluate the prediction performance of the payment prediction network under the same judgment criterion, and update the parameters of the payment prediction network when the prediction performance does not reach the expected effect, that is, train the payment prediction network again. The basis for updating the parameters of the payment prediction network can be a piece of data calculated according to the payment probability and the payment result under one judgment criterion, or multiple pieces of data calculated according to the payment probability and the payment result under multiple judgment criteria.
[0086] In one embodiment, updating the parameters of the payment prediction network according to the payment probabilities and payment results corresponding to multiple second combined feature vectors until the payment prediction network converges includes: comparing the payment probabilities corresponding to multiple second combined feature vectors with a preset predicted payment probability threshold to obtain the predicted payment result corresponding to each second combined feature vector; comparing the predicted payment result corresponding to each second combined feature vector with the payment result to determine whether the prediction for each second combined feature vector is correct, and obtaining the correct prediction or incorrect prediction corresponding to each second combined feature vector; among them, the payment result is obtained according to the first combined feature vector corresponding to the second combined feature vector; calculating the prediction accuracy rate and prediction error rate of the payment prediction network according to the correct predictions or incorrect predictions corresponding to multiple second combined feature vectors; and updating the model parameters of the payment prediction network according to the prediction accuracy rate and prediction error rate until the payment prediction network converges.
[0087] In one embodiment, such asFigure 2 As shown, step S104 includes: sub-steps S1041 to S1043.
[0088] Sub-step S1041: Compare the payment probabilities corresponding to each of the multiple second combined feature vectors with multiple preset predicted payment probability thresholds respectively, to obtain the predicted payment results corresponding to each second combined feature vector under each predicted payment probability threshold.
[0089] It can be understood that when there are multiple predicted payment probability thresholds with different values, the same second combined feature vector may obtain completely opposite predicted results.
[0090] Sub-step S1042: Compare the multiple predicted payment results corresponding to each second combined feature vector under each predicted payment probability threshold with multiple payment results, to determine the predicted results corresponding to each second combined feature vector under each predicted payment probability threshold.
[0091] Among them, the payment result is obtained according to the first combined feature vector corresponding to the second combined feature vector, and the predicted results include correct predictions and incorrect predictions.
[0092] Exemplarily, assume that the second combined feature vector includes vector 1 and vector 2, the payment probabilities of vector 1 and vector 2 are 0.7 and 0.8 respectively, and the payment results are both paid. Assume that the multiple preset predicted payment probability thresholds include 0.6 and 0.75. By comparison, it can be seen that when the predicted payment probability threshold is 0.6, the payment probabilities of vector 1 and vector 2 are both greater than the predicted payment probability threshold. Therefore, the predicted payment results of vector 1 and vector 2 are both paid. By comparing with their corresponding payment results, it can be known that the predicted results of vector 1 and vector 2 are both correct predictions; when the predicted payment probability threshold is 0.75, the payment probability of vector 1 is less than the predicted payment probability threshold, and the payment probability of vector 2 is greater than the predicted payment probability threshold. Therefore, the predicted payment results of vector 1 and vector 2 are unpaid and paid respectively. Correspondingly, it can be known that the predicted results of vector 1 and vector 2 are incorrect prediction and correct prediction respectively.
[0093] Exemplarily, define that when the predicted payment result is paid, it is a predicted positive example, when the predicted payment result is unpaid, it is a predicted negative example, when the payment result is paid, it is a true positive example, and when the payment result is unpaid, it is a true negative example. Determine the corresponding situations of each second combined feature vector according to the above definitions, and calculate the false positive rate FPR and true positive rate TPR of the payment prediction network:
[0094]
[0095] Among them, TP is a true positive example predicted as a positive example, FN is a true positive example predicted as a negative example, FP is a true negative example predicted as a positive example, and TN is a true negative example predicted as a negative example.
[0096] Sub-step S1043: Update the model parameters of the payment prediction network based on the prediction accuracy rate and the prediction error rate until the payment prediction network converges.
[0097] Exemplarily, to determine whether to update the payment prediction network based on the prediction accuracy rate and the prediction error rate, it can be to draw an ROC curve (Receiver Operating Characteristic Curve) according to the false positive rate FPR and true positive rate TPR data respectively corresponding to multiple preset prediction payment probability thresholds, including: determining a coordinate point through the false positive rate and the true positive rate under the same prediction payment probability threshold, where the false positive rate FPR is the abscissa and the true positive rate TPR is the ordinate, and drawing a curve according to the coordinate points corresponding to multiple prediction payment probability thresholds, and this curve is the ROC curve. Calculate the area under the curve AUC of the ROC curve, and the output value range of AUC is (0, 1). Compare AUC with the preset threshold. If AUC is greater than the preset threshold (such as 0.7), it is determined that the performance of the payment prediction network reaches the expected effect, otherwise it means that the payment prediction model needs to be updated iteratively to improve the model performance of the payment prediction model.
[0098] It should be noted that there are various methods for evaluating the model performance of the payment prediction network based on the payment probability and the payment result, and it is not limited to the operations such as drawing the ROC curve adopted in this embodiment. The embodiments of the present application only provide an example, and other evaluation methods can also be adopted according to needs. It can be understood that the model parameters of the payment prediction network and the way of updating them are related to the specific model structure selected by the payment prediction network. For example, the payment prediction network may adopt different types of models (such as deep neural network, support vector machine, logistic regression, etc.), and the updated model parameters are related to the prediction performance of the model, which is not specifically limited here.
[0099] Exemplarily, let the payment prediction network be an LR model, and the function of this LR model is:
[0100]
[0101] Use the logarithmic loss function to measure the deviation J(w, b) between the prediction result of the payment prediction network and the true payment result:
[0102]
[0103] where m is the number of samples, y i is the payment result of sample X i (1 represents successful payment, 0 represents failed payment), and h(X i ) is the prediction of sample X by the payment prediction network iPayment probability.
[0104] By updating the parameters w and b of the payment prediction network, the loss function J(w, b) is minimized. For example, by calculating the gradients (partial derivatives) and using the gradient descent method to complete the update of the parameters w and b. It should be noted that by updating the parameters w and b of the payment prediction network, the payment prediction network gradually converges to the optimal parameters, and the predicted payment probability is closer to the actual payment result, thereby providing a more accurate and reliable basis for subsequent product recommendations based on various inquiry correlation information.
[0105] In one embodiment, the model training method further includes: calculating the feature weights of each inquiry feature data in each second combined feature vector according to the model parameters of the converged payment prediction network; updating the model parameters of the feature analysis network according to multiple feature weights.
[0106] Among them, each second combined feature vector contains inquiry feature data for representing the same inquiry correlation information. Therefore, the same inquiry correlation information can correspond to multiple feature weights. For multiple feature weights of the same inquiry correlation information, a central feature weight can be determined by calculation, such as the weighted average method, the direct average method, etc. The central feature weight can be used to more clearly represent the overall weight of the corresponding inquiry correlation information, so as to more accurately update the model parameters of the feature analysis network and obtain a feature analysis network with better feature expression performance.
[0107] It should be noted that the payment prediction network quantifies the importance of the inquiry correlation information corresponding to each inquiry feature data through model parameters (such as weights w and bias values b), which can further optimize the feature analysis network, make the analysis ability of the feature analysis network for the input first combined feature vector closer to the requirements of the actual task, and screen out the second combined feature vectors with accurate feature expression and higher data quality as the input of the payment prediction network, which helps to improve the prediction accuracy and generalization ability of the payment prediction network.
[0108] In one embodiment, calculating the feature weights of each inquiry feature data in each second combined feature vector according to the model parameters of the converged payment prediction network includes: calculating the weight value of the target inquiry feature data in each second combined feature vector according to the model parameters of the converged payment prediction network; determining the mean value of the weight values of the target inquiry feature data in each second combined feature vector to obtain the feature weight of the target inquiry feature data.
[0109] Among them, there are multiple methods for calculating the feature weight of the target query feature data, in addition to the average value of multiple weight values. When the differences among the multiple first feature weights corresponding to each query association information are not significant, the feature weight of the target query feature data can be determined by the average value; when the differences among the multiple first feature weights are relatively large, the feature weight of the target query feature data can also be determined by the median. The embodiments of this application only provide examples, and other calculation methods can also be adopted according to needs, which can more accurately evaluate the feature weights of each query association information, and are not limited herein.
[0110] In one embodiment, according to the model parameters of the converged payment prediction network, determining the first feature weight of each query feature data in each second combined feature vector includes: calculating the first weight value corresponding to the target query feature data according to the first model parameter and the second model parameter of the converged payment prediction network, as well as the target query feature data and the payment result in the second combined feature vector; calculating the second weight value corresponding to the target query feature data according to the first model parameter and the second model parameter of the converged payment prediction network, as well as the target query feature data in each second combined feature vector; calculating the difference between the first weight value and the second weight value to obtain the weight value of the target query feature data in the second combined feature vector.
[0111] Exemplarily, let the second combined feature vector be X i =[x i1 ,x i2 ,...,x ik , i = 1, 2,..., n, and k represents the dimension of the vector. Among them, x i1 ~x ik are query feature data respectively extracted from one of the user information, query information, and commodity information in the query association information.
[0112] According to the model parameters w and b of the converged payment prediction network, calculate the feature weight J(x) of each query feature data:
[0113]
[0114] Substitute x i ~x i1 in X ik into the above formula to obtain the respective corresponding feature weights of x i1 ~x ik .
[0115] In one embodiment, the model parameters of the feature analysis network are updated according to multiple feature weights, including: determining a target feature weight from the multiple feature weights, where the weight value of the target feature weight is less than or equal to a weight threshold; removing the model parameters associated with the target feature weight from the model parameters of the feature analysis network to update the model parameters of the feature analysis network.
[0116] Among them, when the weight threshold has been preset, the target feature weight can be one or more; when the weight threshold is determined according to the minimum value of the multiple feature weights, the target feature weight is one. It can be understood that in some other cases, the weight value of the target feature weight can also be greater than the weight threshold. In this case, the model parameters associated with the feature weights other than the target feature weight among the multiple feature weights are removed from the model parameters of the feature analysis network.
[0117] It should be noted that by screening the feature weights and removing the features that have less impact on the payment result, the model focuses more on the key features, which helps to improve the sensitivity of the overall model to the core information and the prediction accuracy.
[0118] The model training method provided in the above embodiment first uses the feature analysis network to screen the first combined feature vector to screen out the inquiry feature data as the second combined feature vector; then uses the payment prediction network to perform payment prediction on the screened second combined feature vector, and trains the payment prediction network through the predicted payment probability and the corresponding payment result, which can improve the model performance of the payment prediction network, thereby improving the prediction accuracy of commodity payment, and further improving the matching degree between the recommended commodity and the user's needs.
[0119] The embodiment of the present application also provides a commodity recommendation method. Please refer to Figure 3 , Figure 3 which is the schematic flow chart of the steps of a commodity recommendation method provided by the embodiment of the present application.
[0120] As Figure 3 shown, the commodity recommendation method includes steps S201 to S203.
[0121] Step S201: Obtain the inquiry association information between the user and the merchant, and perform feature extraction on the inquiry association information to obtain the target combined feature vector.
[0122] Exemplarily, in the consultation scenario of an Internet medical platform, after a certain patient (user) consults a doctor (merchant), the inquiry association information is obtained, and the inquiry association information includes the user information and inquiry information of the patient.
[0123] Step S202: Input the target combined feature vector into the product recommendation model to obtain the payment probabilities of multiple products, where the product recommendation model is obtained based on the model training method in any of the above embodiments.
[0124] Please refer to Figure 4 , Figure 4 FIG. 1 is a schematic diagram of a scenario for implementing the product recommendation method provided in this embodiment. Among them, the product recommendation method can be applied to a terminal device or a server. The terminal device can be an electronic device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device; the server can be a single server or a server cluster composed of multiple servers. The server can respond to a request triggered by the terminal device A and calculate the payment probabilities of multiple products according to the inquiry correlation information directly or indirectly obtained from the terminal device B.
[0125] Step S203: Determine at least one target product from the multiple products as the recommended product according to the payment probabilities of the multiple products.
[0126] Among them, the server can also screen out one or more target products according to the payment probability and then feedback the target products and their payment probabilities to the terminal device.
[0127] Exemplarily, according to multiple medical products pushed to the terminal device A and their own experience, such as the combination use of certain disease drugs + products, the characteristics of the patient's disease course in the early, middle, and late stages, etc., the doctor determines at least one of the multiple medical products as the target product and recommends it as the recommended product to the user at the terminal device B.
[0128] It should be noted that the product recommendation model used in the above product recommendation method can fully mine and utilize various data in the inquiry correlation information (such as the inquiry correlation information corresponding to online medical consultations, online financial product transactions, etc.), so as to accurately screen products according to user needs and perform precise product recommendations, thereby improving the matching degree between the recommended products and user needs and greatly enhancing the product transaction rate.
[0129] Please refer to Figure 5 , Figure 5 FIG. 2 is a schematic block diagram of a data processing device provided in an embodiment of the present application.
[0130] As Figure 5 shown, the data processing device 300 includes:
[0131] A data acquisition module 301 for acquiring a plurality of first combined feature vectors, wherein the first combined feature vectors include inquiry feature data and corresponding payment results, and the inquiry feature data is obtained by feature extraction based on the inquiry association information between the user and the merchant, and the inquiry association information includes user information, inquiry information, and commodity information;
[0132] A data processing module 302 for inputting the plurality of first combined feature vectors into a preset feature analysis network to screen the inquiry feature data in each first combined feature vector to obtain a second combined feature vector corresponding to each first combined feature vector;
[0133] A data prediction module 303 for inputting the plurality of second combined feature vectors into a preset payment prediction network for prediction processing to obtain a payment probability corresponding to each of the plurality of second combined feature vectors, and the payment probability is used to represent the probability that the user pays the commodity amount after making an inquiry;
[0134] A parameter update module 304 for updating the parameters of the payment prediction network according to the payment probabilities and payment results corresponding to the plurality of second combined feature vectors until the payment prediction network converges
[0135] In one embodiment, the data processing device 300 is further configured to:
[0136] Calculate the feature weights of the inquiry feature data in each second combined feature vector according to the model parameters of the converged payment prediction network;
[0137] Update the model parameters of the feature analysis network according to the plurality of feature weights.
[0138] In one embodiment, the data processing device 300 is further configured to:
[0139] Calculate the weight value of the target inquiry feature data in each second combined feature vector according to the first model parameter and the second model parameter of the converged payment prediction network, and the target inquiry feature data and the payment result in the second combined feature vector;
[0140] Determine the mean value of the weight values of the target inquiry feature data in each second combined feature vector to obtain the feature weight of the target inquiry feature data.
[0141] In one embodiment, the data processing device 300 is further configured to:
[0142] Calculate the first weight value corresponding to the target inquiry feature data according to the first model parameter and the second model parameter of the converged payment prediction network, and the target inquiry feature data and the payment result in the second combined feature vector;
[0143] Calculate a second weight value corresponding to the target inquiry feature data according to the first model parameter and the second model parameter of the payment prediction network after convergence, and the target inquiry feature data in each second combined feature vector;
[0144] Calculate the difference between the first weight value and the second weight value to obtain the weight value of the target inquiry feature data in the second combined feature vector.
[0145] In one embodiment, the data processing device 300 is further configured to:
[0146] Determine a target feature weight from multiple feature weights, where the weight value of the target feature weight is less than or equal to a weight threshold;
[0147] Remove the model parameters associated with the target feature weight from the model parameters of the feature analysis network to update the model parameters of the feature analysis network.
[0148] In one embodiment, the parameter update module 304 is further configured to:
[0149] Compare the payment probabilities corresponding to the multiple second combined feature vectors with multiple preset predicted payment probability thresholds respectively to obtain the predicted payment results corresponding to each second combined feature vector under each predicted payment probability threshold;
[0150] Compare the multiple predicted payment results corresponding to each second combined feature vector under each predicted payment probability threshold with multiple payment results to determine the predicted results corresponding to each second combined feature vector under each predicted payment probability threshold; wherein, the payment result is obtained according to the first combined feature vector corresponding to the second combined feature vector, and the predicted results include correct predictions and incorrect predictions;
[0151] Calculate the prediction accuracy rate and prediction error rate of the payment prediction network according to the predicted results corresponding to each second combined feature vector under each predicted payment probability threshold;
[0152] Update the model parameters of the payment prediction network according to the prediction accuracy rate and prediction error rate until the payment prediction network converges.
[0153] It should be noted that those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described device and each module and unit can refer to the corresponding processes in the foregoing model training method embodiments, and will not be described herein again.
[0154] The device provided in the above embodiment can be implemented in the form of a computer program, and the computer program can run on a computer device as shown in Figure 6 shown.
[0155] Please refer to Figure 6 ,Figure 6 A schematic block diagram of a computer device provided by an embodiment of the present application.
[0156] As Figure 6 shown, the computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the memory may include a storage medium and an internal memory, and the storage medium may be non-volatile or volatile.
[0157] The storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can be made to execute any one of the model training methods.
[0158] The processor is used to provide computing and control capabilities to support the operation of the entire computer device.
[0159] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can be made to execute any one of the model training methods.
[0160] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that Figure 3 the structure shown in is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0161] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0162] Among them, in one embodiment, the processor is used to run the computer program stored in the memory to implement the following steps:
[0163] Obtain multiple first combined feature vectors; wherein, the first combined feature vectors include inquiry feature data and corresponding payment results, and the inquiry feature data is obtained by extracting features based on the inquiry association information between the user and the merchant, and the inquiry association information includes user information, inquiry information, and commodity information;
[0164] Input the multiple first combined feature vectors into a preset feature analysis network to screen the inquiry feature data in each first combined feature vector, and obtain the second combined feature vector corresponding to each first combined feature vector;
[0165] Input the multiple second combined feature vectors into a preset payment prediction network for prediction processing to obtain the payment probability corresponding to each of the multiple second combined feature vectors, and the payment probability is used to represent the probability that the user pays the commodity amount after making an inquiry;
[0166] Update the parameters of the payment prediction network according to the payment probability and payment results corresponding to each of the multiple second combined feature vectors until the payment prediction network converges.
[0167] In one embodiment, the processor is further configured to implement:
[0168] Calculate the feature weights of the inquiry feature data in each second combined feature vector according to the model parameters of the converged payment prediction network;
[0169] Update the model parameters of the feature analysis network according to the multiple feature weights.
[0170] In one embodiment, when the processor implements calculating the feature weights of the inquiry feature data in each second combined feature vector according to the model parameters of the converged payment prediction network, it is configured to implement:
[0171] Calculate the weight value of the target inquiry feature data in each second combined feature vector according to the model parameters of the converged payment prediction network;
[0172] Determine the mean value of the weight values of the target inquiry feature data in each second combined feature vector to obtain the feature weight of the target inquiry feature data.
[0173] In one embodiment, when the processor implements calculating the weight value of the target inquiry feature data in each second combined feature vector according to the model parameters of the converged payment prediction network, it is configured to implement:
[0174] Calculate the first weight value corresponding to the target inquiry feature data according to the first model parameter and the second model parameter of the converged payment prediction network, as well as the target inquiry feature data and the payment result in the second combined feature vector;
[0175] Calculate a second weight value corresponding to the target inquiry feature data according to the first model parameter and the second model parameter of the payment prediction network after convergence, and the target inquiry feature data in each second combined feature vector;
[0176] Calculate the difference between the first weight value and the second weight value to obtain the weight value of the target inquiry feature data in the second combined feature vector.
[0177] In one embodiment, when the processor implements updating the model parameters of the feature analysis network according to multiple feature weights, it is used to implement:
[0178] Determine a target feature weight from multiple feature weights, and the weight value of the target feature weight is less than or equal to the weight threshold;
[0179] Remove the model parameters associated with the target feature weight from the model parameters of the feature analysis network to update the model parameters of the feature analysis network.
[0180] In one embodiment, when the processor implements updating the model parameters of the payment prediction network according to the payment probabilities and payment results respectively corresponding to multiple second combined feature vectors until the payment prediction network converges, it is used to implement:
[0181] Compare the payment probabilities respectively corresponding to multiple second combined feature vectors with multiple preset predicted payment probability thresholds to obtain the predicted payment results corresponding to each second combined feature vector under each predicted payment probability threshold;
[0182] Compare the multiple predicted payment results corresponding to each second combined feature vector under each predicted payment probability threshold with multiple payment results to determine the predicted results corresponding to each second combined feature vector under each predicted payment probability threshold; wherein, the payment result is obtained according to the first combined feature vector corresponding to the second combined feature vector, and the predicted results include correct predictions and incorrect predictions;
[0183] Calculate the prediction accuracy rate and prediction error rate of the payment prediction network according to the predicted results corresponding to each second combined feature vector under each predicted payment probability threshold;
[0184] Update the model parameters of the payment prediction network according to the prediction accuracy rate and prediction error rate until the payment prediction network converges.
[0185] It should be noted that those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working process of the above-described computer device can refer to the corresponding process in the foregoing model training method embodiment, and will not be elaborated herein.
[0186] This application can be used in numerous general-purpose or special-purpose computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0187] An embodiment of this application also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to various embodiments of the model training method of this application.
[0188] Among them, the computer-readable storage medium can be the internal storage unit of the computer device in the foregoing embodiment, such as the hard disk or memory of the computer device. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc.
[0189] Furthermore, the computer-usable storage medium mainly includes a storage program area and a storage data area. Among them, the storage program area can store an operating system, application programs required for at least one function, etc.; the storage data area can store data created according to the use of the blockchain node, etc. The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. Blockchain, essentially a decentralized database, is a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity (anti-counterfeiting) 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, etc.
[0190] It should be understood that the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. As used in the specification of this application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.
[0191] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations. It should be noted that in this text, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or system comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or system comprising that element.
[0192] The serial numbers of the embodiments of this application above are only for description and do not represent the superiority or inferiority of the embodiments. The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art in the technical scope disclosed by this application can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should be covered by the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.
Claims
1. A model training method, characterized in that: The method comprises: Acquire multiple first combined feature vectors; wherein the first combined feature vectors include inquiry feature data and corresponding payment results, the inquiry feature data is obtained by feature extraction based on inquiry association information between the user and the merchant, the inquiry association information includes user information, inquiry information and product information; Inputting the plurality of the first combined feature vectors into a preset feature analysis network to screen the query feature data in each of the first combined feature vectors to obtain a second combined feature vector corresponding to each of the first combined feature vectors; Inputting the plurality of the second combined feature vectors into a preset payment prediction network for prediction processing to obtain payment probabilities corresponding to the plurality of the second combined feature vectors, wherein the payment probabilities are used to characterize the probability that the user pays the commodity amount after making an inquiry; According to the payment probabilities and payment results corresponding to each of the plurality of second combined feature vectors, the parameters of the payment prediction network are updated until the payment prediction network converges.
2. The model training method according to claim 1, characterized in that: The method further comprises: Calculating the feature weight of each query feature data in each second combined feature vector according to the converged model parameters of the payment prediction network; According to the plurality of feature weights, the model parameters of the feature analysis network are updated.
3. The model training method according to claim 2, characterized in that: The step of calculating the feature weight of each query feature data in each second combined feature vector according to the converged model parameters of the payment prediction network includes: Calculating the weight value of the target query feature data in each of the second combined feature vectors according to the converged model parameters of the payment prediction network; The average of the weight values of the target query feature data in each of the second combined feature vectors is determined to obtain the feature weight of the target query feature data.
4. The model training method according to claim 3, characterized in that: The step of calculating the weight value of the target query feature data in each of the second combined feature vectors according to the converged model parameters of the payment prediction network includes: Calculate a first weight value corresponding to the target inquiry feature data according to the converged first model parameter and the second model parameter of the payment prediction network, and the target inquiry feature data and the payment result in the second combined feature vector; Calculate a second weight value corresponding to the target query feature data according to the converged first model parameter and the second model parameter of the payment prediction network and the target query feature data in each of the second combined feature vectors; The difference between the first weight value and the second weight value is calculated to obtain the weight value of the target query feature data in the second combined feature vector.
5. The model training method according to claim 2, characterized in that: The updating of the model parameters of the feature analysis network according to the plurality of feature weights comprises: Determine a target feature weight from the plurality of feature weights, wherein a weight value of the target feature weight is less than or equal to a weight threshold; The model parameters associated with the target feature weight are removed from the model parameters of the feature analysis network to update the model parameters of the feature analysis network.
6. The model training method according to claim 1, characterized in that: The updating of the model parameters of the payment prediction network according to the payment probabilities and payment results respectively corresponding to the plurality of second combined feature vectors until the payment prediction network converges includes: Compare the payment probabilities corresponding to each of the plurality of second combined feature vectors with a plurality of preset predicted payment probability thresholds respectively, to obtain predicted payment results corresponding to each of the second combined feature vectors under each of the predicted payment probability thresholds; Compare the multiple predicted payment results corresponding to each of the second combined feature vectors under each of the predicted payment probability thresholds with the multiple payment results to determine the prediction results corresponding to each of the second combined feature vectors under each of the predicted payment probability thresholds; wherein the payment result is obtained according to the first combined feature vector corresponding to the second combined feature vector, and the prediction result includes a correct prediction and an incorrect prediction; Calculating the prediction accuracy and prediction error rate of the payment prediction network according to the prediction results corresponding to each of the second combined feature vectors under each of the predicted payment probability thresholds; According to the prediction accuracy and the prediction error rate, the model parameters of the payment prediction network are updated until the payment prediction network converges.
7. A product recommendation method, characterized in that: include: Obtaining inquiry association information between the user and the merchant, and performing feature extraction on the inquiry association information to obtain a target combination feature vector; Inputting the target combination feature vector into a product recommendation model to obtain payment probabilities of multiple products, wherein the product recommendation model is obtained based on the model training method according to any one of claims 1 to 6; At least one target commodity is determined from the plurality of commodities as a recommended commodity according to the payment probabilities of the plurality of commodities.
8. A data processing device, characterized in that: The data processing device comprises: A data acquisition module, configured to acquire a plurality of first combined feature vectors; wherein the first combined feature vectors include inquiry feature data and corresponding payment results, the inquiry feature data is obtained by feature extraction based on inquiry association information between the user and the merchant, the inquiry association information includes user information, inquiry information and product information; A data processing module, used for inputting a plurality of the first combined feature vectors into a preset feature analysis network to screen the query feature data in each of the first combined feature vectors to obtain a second combined feature vector corresponding to each of the first combined feature vectors; A data prediction module, used for inputting the plurality of second combined feature vectors into a preset payment prediction network for prediction processing, and obtaining payment probabilities corresponding to the plurality of second combined feature vectors, wherein the payment probabilities are used to characterize the probability that the user will pay the commodity amount after making an inquiry; A parameter updating module is used to update the parameters of the payment prediction network according to the payment probabilities and payment results corresponding to each of the plurality of second combined feature vectors until the payment prediction network converges.
9. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the model training method as described in any one of claims 1 to 6, or implements the product recommendation method as described in claim 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the model training method as described in any one of claims 1 to 6 is implemented, or the product recommendation method as described in claim 7 is implemented.