Model training method and device, user consultation prediction method and device and electronic equipment
Through the combination of integrated learning model and stacking method, user consultation prediction is carried out, which solves the problem of poor user consultation prediction accuracy in the existing technology, improves prediction accuracy and user experience, and reduces customer service costs.
Patent Information
- Application Number
- CN202410757059.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-06
AI Technical Summary
Existing technology cannot accurately predict the appropriate customer service for user consultation, resulting in poor user consultation experience and increased customer service costs. The prediction effect of a single machine learning model is not ideal.
An integrated learning model is used to perform model fusion through stacking. Feature screening and sample data adjustment are performed in two training stages to ensure the quality of training data and learn the association between the new training set and the original training set.
It improves the accuracy of the user consultation prediction model, enhances the prediction effect of the model, reduces customer service diversion errors, improves user experience and reduces platform costs.
Smart Images

Figure CN118607673A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of intelligent customer service technology, artificial intelligence technology, and big data technology, and specifically to a model training method, a user consultation prediction method, an apparatus, a device, a medium, and a program product. Background Art
[0002] With the rapid development of e-commerce platforms, platform customer service plays an increasingly important role. They can quickly answer questions that users want to ask and solve their problems. It is crucial to divert online consulting users to a suitable customer service representative, which can not only help users solve problems quickly and improve their consulting experience, but also reduce the platform's customer service costs. If customer service is diverted to a customer service representative who cannot solve their problems, for users, it will cause problems such as wasted user consultation time and poor user consultation experience. For the platform, it will waste customer service time receiving users and increase customer service costs.
[0003] In the process of realizing the concept disclosed in the present invention, the inventors found that there are at least the following problems in the related technology. The current solution for how to divert users to appropriate customer service cannot give a relatively accurate prediction result. For example, the rule-based prediction method relies on expert experience, consumes a lot of manpower and the prediction effect is not ideal. For example, the method of using machine learning model prediction, the model is mostly based on a single machine learning method, and the model prediction effect is not ideal. Summary of the invention
[0004] In view of the above problems, the present disclosure provides a model training method, a user consultation prediction method, an apparatus, a device, a medium and a program product.
[0005] In one aspect of the present disclosure, a method for training a user consultation prediction model is provided, comprising:
[0006] Obtaining an original training set, wherein the original training set includes a plurality of original samples, each of which includes user feature sample data, object feature sample data related to an operation behavior object of the user within a specified historical time period, and an original sample label, wherein the original sample label is used to characterize an object actually consulted by the user within the specified historical time period;
[0007] In the first training stage, the original sample labels are updated using N preset integration algorithms to generate N first updated training sets corresponding to the N preset integration algorithms, where N is a positive integer;
[0008] Performing feature screening processing on original user features related to user feature sample data and original object features related to object feature sample data in N first updated training sets to obtain N second updated training sets;
[0009] Generate a target training set based on the original training set and / or the N second updated training sets;
[0010] In the second training stage, the target training set is used to train the model to be trained to obtain a trained user consultation prediction model.
[0011] According to an embodiment of the present disclosure, feature screening processing is performed on the original user features and the original object features to obtain N second updated training sets, including:
[0012] For the original user features and the original object features, N feature importance scores corresponding to the N preset integration algorithms are generated;
[0013] Based on the N feature importance scores, the comprehensive feature scores corresponding to the original user features and the original object features are calculated;
[0014] The original user features and the original object features are screened according to the comprehensive feature scores.
[0015] According to an embodiment of the present disclosure, the original user features and the original object features are screened according to the comprehensive feature scores, including:
[0016] The target original user features and target original object features whose comprehensive feature scores are less than the preset feature threshold are removed.
[0017] According to an embodiment of the present disclosure, wherein the original sample labels are updated using N preset integration algorithms, generating N first updated training sets corresponding to the N preset integration algorithms includes:
[0018] Based on N preset integration algorithms, respectively, the initial models are trained using the original training set to obtain N base models corresponding to the N preset integration algorithms;
[0019] The verification results of the original training set by the N base models are used to update the original sample labels and generate N first updated training sets corresponding to the N preset integration algorithms.
[0020] According to an embodiment of the present disclosure, generating a target training set based on an original training set and / or N second updated training sets includes:
[0021] Calculate and obtain the model effect evaluation score for the base model, where the model effect evaluation score is used to characterize the accuracy and recall rate of the base model;
[0022] In response to the model effect evaluation score being not less than a preset score threshold, generating a target training set based on the original training set and the N second updated training sets, or based on the original training set;
[0023] In response to the model effect evaluation score being less than a preset score threshold, a target training set is generated based on the N second updated training sets.
[0024] According to an embodiment of the present disclosure, the original training set is divided into M original sample subsets, the M original sample subsets include an original training subset and an original validation subset, M is a positive integer,
[0025] Generating a target training set based on the original training set and N second updated training sets includes:
[0026] In response to the model effect evaluation score being not less than a preset score threshold and less than a first reference threshold, merging the original training subset and the N second updated training sets to generate a target training set, wherein the first reference threshold is greater than the preset score threshold;
[0027] In response to the model effect evaluation score being not less than a first reference threshold and less than a second reference threshold, the original training subset, the original validation subset and N second updated training sets are merged to generate a target training set, wherein the second reference threshold is greater than the first reference threshold.
[0028] According to an embodiment of the present disclosure,
[0029] Among them, the initial model is trained using the original training set, and the N base models obtained include:
[0030] Using the cross-training method, the initial model is trained M times using the original training subset to obtain N base models;
[0031] Among them, using the verification results of the original training set by N base models, updating the original sample labels includes:
[0032] The cross-validation method is used to verify the prediction effect on the base model using the original validation subset, and the original sample labels are updated based on the obtained validation results.
[0033] According to an embodiment of the present disclosure, the object feature sample data includes one of the following: feature sample data of commodities browsed by the user within a specified historical time period, feature sample data of orders completed by the user within a specified historical time period, and sample data of a list of predefined candidate consulting questions set for the user;
[0034] Correspondingly, the original sample label includes one of the following: the products that the user actually consulted within the specified historical time period, the orders that the user actually consulted within the specified historical time period, and the questions that the user actually consulted within the specified historical time period.
[0035] According to an embodiment of the present disclosure, before the first training stage, the method further includes:
[0036] Calculating feature correlation coefficients of a plurality of original user features related to the user feature sample data and a plurality of original object features related to the object feature sample data in the original training set;
[0037] According to the feature correlation coefficient, feature pre-screening processing is performed on multiple original user features and multiple original object features.
[0038] Another aspect of the present disclosure provides a user consultation prediction method, comprising:
[0039] Acquire the feature data to be tested, wherein the feature data to be tested includes user feature data of the user to be tested, and object feature data related to the operation behavior object of the user within the reference time period, and the object feature data includes one of the following: feature data of the goods browsed by the user within the reference time period, feature data of the orders completed by the user within the reference time period, and predefined candidate consultation question list data set for the user;
[0040] Inputting the feature data to be tested into a user consultation prediction model and outputting the consultation probability of the operation behavior object, wherein the user consultation prediction model is trained using the above training method;
[0041] According to the consultation probability of the operation behavior object, the target object that the user to be tested intends to consult is determined, wherein the target object includes one of the following: target product, target order, and target problem.
[0042] Another aspect of the present disclosure provides a user consultation prediction model training device, comprising:
[0043] A first acquisition module is used to acquire an original training set, wherein the original training set includes a plurality of original samples, each of which includes user feature sample data, object feature sample data related to an operation behavior object of the user within a specified historical time period, and an original sample label, wherein the original sample label is used to characterize an object actually consulted by the user within the specified historical time period;
[0044] A first training module, used to update original sample labels using N preset integration algorithms, and generate N first updated training sets corresponding to the N preset integration algorithms, where N is a positive integer;
[0045] A feature screening module, used for performing feature screening processing on original user features related to user feature sample data and original object features related to object feature sample data in N first updated training sets, to obtain N second updated training sets;
[0046] A training set generation module, used to generate a target training set based on the original training set and / or N second updated training sets;
[0047] The second training module is used to train the model to be trained using the target training set in the second training stage to obtain a trained user consultation prediction model.
[0048] According to an embodiment of the present disclosure, the feature screening module includes:
[0049] A first generating unit is used to generate N feature importance scores corresponding to N preset integration algorithms for original user features and original object features;
[0050] A first calculation unit is used to calculate, based on the N feature importance scores, comprehensive feature scores corresponding to the original user features and the original object features respectively;
[0051] The screening unit is used to screen the original user features and the original object features according to the comprehensive feature scores.
[0052] According to an embodiment of the present disclosure, the screening unit includes:
[0053] The screening subunit is used to remove target original user features and target original object features whose comprehensive feature scores are less than a preset feature threshold.
[0054] According to an embodiment of the present disclosure, the first training module includes:
[0055] A training unit, used to train the initial model using the original training set based on the N preset integrated algorithms, to obtain N base models corresponding to the N preset integrated algorithms;
[0056] The updating unit is used to update the original sample labels by using the verification results of the original training sets by the N base models, and generate N first updated training sets corresponding to the N preset integrated algorithms.
[0057] According to an embodiment of the present disclosure, the training set generation module includes:
[0058] A second calculation unit is used to calculate a model effect evaluation score for the base model, wherein the model effect evaluation score is used to characterize the accuracy and recall rate of the base model;
[0059] A second generating unit, configured to generate a target training set based on the original training set and the N second updated training sets, or based on the original training set, in response to the model effect evaluation score being not less than a preset score threshold;
[0060] The third generating unit is used to generate a target training set based on the N second updated training sets in response to the model effect evaluation score being less than a preset score threshold.
[0061] According to an embodiment of the present disclosure, the second generating unit includes:
[0062] A first merging subunit is configured to merge the original training subset and the N second updated training sets to generate a target training set in response to the model effect evaluation score being not less than a preset score threshold and less than a first reference threshold, wherein the first reference threshold is greater than the preset score threshold;
[0063] The second merging subunit is used to merge the original training subset, the original validation subset and N second updated training sets to generate a target training set in response to the model effect evaluation score being not less than the first reference threshold and less than the second reference threshold, wherein the second reference threshold is greater than the first reference threshold.
[0064] According to an embodiment of the present disclosure,
[0065] The training unit includes a training sub-unit, which is used to train the initial model M times using the original training subset in a cross-training manner to obtain N base models;
[0066] The updating unit includes an updating subunit, which is used to verify the prediction effect on the base model using the original verification subset in a cross-validation manner, and update the original sample label based on the obtained verification result.
[0067] According to an embodiment of the present disclosure, the object feature sample data includes one of the following: feature sample data of commodities browsed by the user within a specified historical time period, feature sample data of orders completed by the user within a specified historical time period, and sample data of a list of predefined candidate consulting questions set for the user;
[0068] Correspondingly, the original sample label includes one of the following: the products that the user actually consulted within the specified historical time period, the orders that the user actually consulted within the specified historical time period, and the questions that the user actually consulted within the specified historical time period.
[0069] According to an embodiment of the present disclosure, the above device further includes:
[0070] A calculation module, used for calculating, before the first training stage, feature correlation coefficients of a plurality of original user features related to the user feature sample data and a plurality of original object features related to the object feature sample data in the original training set;
[0071] The pre-screening module is used to perform feature pre-screening processing on multiple original user features and multiple original object features according to feature correlation coefficients.
[0072] Another aspect of the present disclosure provides a user consultation prediction device, comprising:
[0073] A second acquisition module is used to acquire the feature data to be tested, wherein the feature data to be tested includes user feature data of the user to be tested, and object feature data related to the user's operation behavior object within the reference time period, and the object feature data includes one of the following: feature data of the goods browsed by the user within the reference time period, feature data of the orders completed by the user within the reference time period, and predefined candidate consulting question list data set for the user;
[0074] A prediction module, used to input the feature data to be tested into a user consultation prediction model and output the consultation probability of the operation behavior object, wherein the user consultation prediction model is trained using the above training method;
[0075] The object determination module is used to determine the target object that the user to be tested intends to consult according to the consultation probability of the operation behavior object, wherein the target object includes one of the following: target product, target order, and target problem.
[0076] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned user consultation prediction model training method and user consultation prediction method.
[0077] Another aspect of the present disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned user consultation prediction model training method and user consultation prediction method.
[0078] Another aspect of the present disclosure also provides a computer program product, including a computer program, which implements the above-mentioned user consultation prediction model training method and user consultation prediction method when executed by a processor.
[0079] According to the embodiments of the present disclosure, compared with the related art in which a single machine learning model cannot obtain a good prediction effect, the above method of the embodiments of the present disclosure adopts an integrated learning model for model training, and adopts a stacking method for model fusion. The training process is divided into two stages. In the first training stage, N preset integrated algorithms are used to update the original sample labels in the original training set to generate an updated training set. And considering that only the prediction results of the first stage are used to form the training data set of the second stage, the distribution of the original data set may be lost, and the relationship between the new training set and the original training set cannot be learned. The method of the embodiment of the present disclosure performs feature screening and / or sample data adjustment before the second training stage, considers whether to add the original sample data to prevent the loss of original data information, and also ensures the quality of the training data, and can learn the relationship between the new training set and the original training set, improve the model training effect, and enhance the model prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0081] Figure 1 A diagram schematically illustrates an application scenario of a user consultation prediction model training method, apparatus, device, medium, and program product according to an embodiment of the present disclosure;
[0082] Figure 2 A flowchart of a user consultation prediction model training method according to an embodiment of the present disclosure is schematically shown;
[0083] Figure 3 The schematic diagram shows the operation principle of the user consultation prediction model training method according to the embodiment of the present disclosure;
[0084] Figure 4 A schematic diagram showing the operation principle of performing feature screening processing on sample features in an updated training set according to an embodiment of the present disclosure;
[0085] Figure 5 A flowchart of a user consultation prediction method according to an embodiment of the present disclosure is schematically shown;
[0086] Figure 6 The operating principle diagram of the user consultation prediction method according to an embodiment of the present disclosure is schematically shown;
[0087] Figure 7 The structure block diagram of the user consultation prediction model training device according to the embodiment of the present disclosure is schematically shown;
[0088] Figure 8 The structure block diagram of the user consultation prediction device according to the embodiment of the present disclosure is schematically shown;
[0089] Fig. 9 A block diagram of an electronic device suitable for implementing a model training method and a user consultation prediction method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0090] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0091] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0092] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0093] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0094] In the embodiments of the present disclosure, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage, etc. of the data involved (for example, including but not limited to user personal information) are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security, and national security.
[0095] In the embodiments of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0096] With the rapid development of e-commerce platforms, platform customer service plays an increasingly important role. They can quickly answer questions that users want to ask and solve their problems. It is crucial to divert online consulting users to a suitable customer service representative, which can not only help users solve problems quickly and improve their consulting experience, but also reduce the platform's customer service costs. If customer service is diverted to a customer service representative who cannot solve their problems, for users, it will cause problems such as wasted user consultation time and poor user consultation experience. For the platform, it will waste customer service time receiving users and increase customer service costs.
[0097] Therefore, how to divert users to the appropriate customer service is a problem. If you know in advance what products, orders, and questions the user wants to consult before the user consults the customer service, you can help divert the user to the appropriate customer service, so as to quickly solve the user's problem. Because customer service is divided according to parameters such as order type, product type, and consultation question, if you know in advance the order, product, and question the user wants to consult, you will also know the customer service the user wants to consult. This user consultation prediction can be defined as predicting the things and problems that the user will consult online. Things are generally the products that the user wants to buy and the existing orders.
[0098] The current solution for how to divert users to appropriate customer service cannot give a relatively accurate prediction result. For example, the rule-based prediction method relies on expert experience, consumes a lot of manpower and the prediction effect is not ideal. For example, the method of using machine learning model prediction is mostly based on single machine learning methods, and the model prediction effect is not ideal.
[0099] For example, in the related art, user consultation prediction is performed by using some rules. These rules are simple and require manual configuration, which is cumbersome to configure and has poor effects. For example, if a user has just placed an order and calls customer service, it is directly predicted that the user wants to inquire about the latest order, and the user is diverted to the platform customer service corresponding to this order. However, there are some problems with this prediction rule. If the user has placed multiple orders, he may also inquire about the previous order, resulting in a wrong prediction.
[0100] With the rise of machine learning and recommendation systems, we can use the idea of recommendation sorting algorithms to recommend the most likely products, orders and questions to users. For example, some machine learning models are used to predict user inquiries, but due to the difficulty of prediction, the effect is not very good.
[0101] In short, current user consultation prediction technology mainly uses rules and single machine learning models. The generalization performance of rule models is poor, and a lot of research experience is required to formulate rules. The configuration of rules is cumbersome and wastes manpower. The effect of single machine learning model for consultation prediction is poor, because a single machine learning model is not as good as an integrated learning model that integrates multiple machine learning models.
[0102] Therefore, on this basis, the inventors considered using ensemble learning, using the idea of recommendation sorting to predict user inquiries and improve the algorithm effect.
[0103] However, the existing Stacking (a model fusion method) model integration method is unreasonable. For example, in the process of generating new training sets in the second stage of Stacking, the importance of different features and the performance differences of different base models are not taken into account, the training results of the first stage are not reasonably used, and more effective information is not extracted for model training, resulting in poor results of the entire integrated learning model and a waste of training costs.
[0104] In view of this, an embodiment of the present disclosure provides a user consultation prediction model training method, comprising:
[0105] An original training set is obtained, wherein the original training set includes a plurality of original samples, each of which includes user feature sample data, object feature sample data related to the user's operation behavior object within a specified historical time period, and an original sample label, wherein the original sample label is used to characterize the object actually consulted by the user within the specified historical time period; in a first training stage, the original sample labels in the original training set are updated using N preset integration algorithms to generate N updated training sets corresponding to the N preset integration algorithms; feature screening is performed on a plurality of original user features related to the user feature sample data in the N updated training sets, and a plurality of original object features related to the object feature sample data, and / or when it is determined to adopt the original training set, the original training set is merged with the N updated training sets to generate a third updated training set; in a second training stage, the model to be trained is trained using the third updated training set to obtain a trained user consultation prediction model.
[0106] Figure 1 The application scenario diagram of the user consultation prediction model training method, device, equipment, medium and program product according to the embodiments of the present disclosure is schematically shown.
[0107] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0108] The user may use at least one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0109] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0110] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0111] It should be noted that the user consultation prediction model training method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the user consultation prediction model training device provided in the embodiment of the present disclosure can generally be set in the server 105. The user consultation prediction model training method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the user consultation prediction model training device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0112] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0113] The following will be based on Figure 1 The scene described by Figure 2 to Figure 9 The user consultation prediction model training method of the disclosed embodiment is described in detail.
[0114] Figure 2The flowchart of the user consultation prediction model training method according to an embodiment of the present disclosure is schematically shown.
[0115] like Figure 2 As shown, the user consultation prediction model training method of this embodiment includes operations S201 to S205.
[0116] In operation S201, an original training set is obtained, wherein the original training set includes a plurality of original samples, each of which includes user feature sample data, object feature sample data related to an operation behavior object of the user within a specified historical time period, and an original sample label, wherein the original sample label is used to characterize an object actually consulted by the user within the specified historical time period;
[0117] In operation S202, original sample labels are updated using N preset integration algorithms to generate N first updated training sets corresponding to the N preset integration algorithms, where N is a positive integer;
[0118] In operation S203, feature screening is performed on the original user features related to the user feature sample data and the original object features related to the object feature sample data in the N first updated training sets to obtain N second updated training sets;
[0119] In operation S204, a target training set is generated based on the original training set and / or the N second updated training sets;
[0120] In operation S205, in the second training phase, the model to be trained is trained using the target training set to obtain a trained user consultation prediction model.
[0121] According to an embodiment of the present disclosure, each sample in the original training set obtained in operation S201 is used to characterize user features and operation behavior object features. Each original sample includes user feature sample data, object feature sample data related to the user's operation behavior object in a specified historical time period, and an original sample label.
[0122] The user characteristics may include, for example, basic information characteristics of the user, such as the user's age, gender, shopping points, etc.
[0123] The object of the user's operation behavior within the specified historical time period may be, for example, the products browsed by the user within the specified historical time period, the orders completed, the predefined candidate consulting question list set for the user, etc. Based on this, the object feature sample data includes one of the following: feature sample data of the products browsed by the user within the specified historical time period, feature sample data of the orders completed by the user within the specified historical time period, and sample data of the predefined candidate consulting question list set for the user.
[0124] Accordingly, the original sample label includes one of the following: the products that the user actually consulted within the specified historical time period, the orders that the user actually consulted within the specified historical time period, and the questions that the user actually consulted within the specified historical time period.
[0125] Furthermore, obtaining the original training set may include:
[0126] First, the characteristic data and historical operation behavior data of different users are collected as initial samples and labeled, and the original training set is constructed based on the collected initial samples.
[0127] Among them, the initial sample may include user feature data of multiple different users, a list of browsed products, a list of orders that have been placed, a list of predefined candidate consulting questions set for users, etc. Data labeling mainly marks the real products, orders and questions that the user has consulted in the past. If there are multiple consulted products, orders and questions, the one consulted first will be selected.
[0128] The initial sample format is shown in Table 1 below:
[0129] Table 1
[0130]
[0131] in, represents the nth feature of the first sample, p m Indicates that the user has m browsed products, o z indicates that the user has placed z orders, q k It represents k questions that the user may ask. The last three columns in 1 are data labels, namely the actual products, orders and questions that the user has historically consulted.
[0132] After collecting the characteristic data and historical operation behavior data of different users as initial samples and marking them, the original training set is constructed based on the collected initial samples.
[0133] For example, part of the data (order dimension) in Table 1 is constructed as samples in the original training set, and the data format is shown in the following Table 2:
[0134] Table 2
[0135]
[0136] As shown in Table 2, if a user has z orders, z training data are constructed. One order corresponds to one piece of data. There is only one order that is actually consulted for one consultation. The "Is it possible to consult" column represents whether the current order is the order that the user is going to consult. If so, it is marked as "1", otherwise it is marked as "0".
[0137] The labeling and construction of each sample is similar. For example, if a user has z browsed products, z training data are constructed, one product corresponds to one data, and there is only one product that is actually consulted in a consultation. The "Is it possible to consult" column indicates whether the current product is the product that the user is going to consult. If so, it is marked as "1", otherwise it is marked as "0".
[0138] According to the embodiments of the present disclosure, taking into account the problem in related technologies that a single machine learning model has a poor consulting and prediction effect, the model training method of the embodiments of the present disclosure adopts an integrated learning method, and uses Stacking (a model fusion method) to perform model fusion. The Stacking fusion model is divided into two stages. The first stage is to train multiple models with the original training set, and the second stage is to train a new training set based on the prediction results of multiple base models.
[0139] According to an embodiment of the present disclosure, based on the Stacking method, in operation S202, in the first training stage, N preset integrated algorithms are used to update the original sample labels in the original training set, and N updated training sets corresponding to the N preset integrated algorithms are generated. Specifically, the initial model can be trained based on the N preset integrated algorithms using the original training set to obtain N base models corresponding to the N preset integrated algorithms; then, the original sample labels in the original training set are updated using the verification results of the N base models on the original training set, and N new training sets corresponding to the N preset integrated algorithms are generated.
[0140] According to the embodiment of the present disclosure, considering that only the prediction results of the first stage are used to form the training data set of the second stage, the distribution of the original data set may be lost, and the relationship between the new training set and the original training set cannot be learned. The method of the embodiment of the present disclosure performs feature screening and / or sample data adjustment before the second training stage.
[0141] Specifically, in operation S203, feature screening processing is performed on multiple original user features related to user feature sample data and multiple original object features related to object feature sample data in N updated training sets to generate a target training set, and / or in operation S204, when it is determined to adopt the original training set, the original training set is merged with the N updated training sets to generate a target training set.
[0142] Furthermore, based on the newly generated target training set, in the second training stage, in operation S205, the model to be trained is trained using the target training set to obtain a trained user consultation prediction model.
[0143] According to the embodiments of the present disclosure, compared with the related art in which a single machine learning model cannot obtain a good prediction effect, the above method of the embodiments of the present disclosure adopts an integrated learning model for model training, and adopts a stacking method for model fusion. The training process is divided into two stages. In the first training stage, N preset integrated algorithms are used to update the original sample labels in the original training set to generate an updated training set. And considering that only the prediction results of the first stage are used to form the training data set of the second stage, the distribution of the original data set may be lost, and the relationship between the new training set and the original training set cannot be learned. The method of the embodiment of the present disclosure performs feature screening and / or sample data adjustment before the second training stage, considers whether to add the original sample data to prevent the loss of original data information, and also ensures the quality of the training data, and can learn the relationship between the new training set and the original training set, improve the model training effect, and enhance the model prediction accuracy.
[0144] According to the embodiments of the present disclosure, the sample features of the embodiments of the present disclosure are mainly structured features, including continuous features and discrete features. Before the first training stage, it also includes preprocessing operations on the features in the original training set, which may specifically include feature selection, feature construction, feature normalization, etc.
[0145] Among them, feature selection includes the following operations:
[0146] First, the feature correlation coefficients of a plurality of original user features related to the user feature sample data and a plurality of original object features related to the object feature sample data in the original training set are calculated.
[0147] Afterwards, a feature pre-screening process is performed on the plurality of original user features and the plurality of original object features according to the feature correlation coefficients. For example, a correlation coefficient threshold is set, and features with a value greater than the threshold are retained, and features with a value less than the threshold are filtered out.
[0148] Specifically, the correlation coefficient r of the feature can be calculated using an algorithm as shown in formula (1). The larger the correlation coefficient r is, the greater the correlation is.
[0149]
[0150] In the above formula 1, X i and is the feature value and feature mean of the user feature or object feature, Y i , is the value and mean of the sample label. The above methods are used to calculate the correlation coefficient and perform feature screening for user features and object features respectively.
[0151] According to the embodiments of the present disclosure, features with less relevance to the actual prediction scenario can be filtered out through feature selection, thereby improving the training effect and prediction accuracy of the model.
[0152] According to the embodiments of the present disclosure, it is also possible to construct features for the features in the original training set, and construct new features based on continuous adjacent individual features to enrich the feature dimension, for example, using the user consultation time and the order creation time to construct the time interval feature. Since the longer the time interval, the lower the possibility of consultation, in this way, constructing new features further improves the training effect and prediction accuracy of the model.
[0153] According to an embodiment of the present disclosure, feature normalization may also be performed on the features in the original training set, mainly normalizing the continuous features.
[0154] Figure 3 The operating principle diagram of the user consultation prediction model training method according to an embodiment of the present disclosure is schematically shown.
[0155] The prediction model trained by the training method of the embodiment of the present invention is used for user consultation prediction. The model recommends and sorts user consultation products, orders, and questions based on the recommendation sorting algorithm. The recommendation sorting algorithm solves the sorting problem by approximating it to a regression problem, and takes the relevance score of each query item as a real number score or an ordinal score. When predicting, for a specified input, the relevance score of the query item is given and sorted according to the size of the score. In this way, the recommendation sorting problem is converted into a machine learning classification problem.
[0156] The training method of the embodiment of the present invention adopts Stacking ensemble learning to perform model learning, and improves the problems existing in Stacking.
[0157] In the first training phase, the original sample labels are updated using N preset integration algorithms to generate N first updated training sets corresponding to the N preset integration algorithms, that is, the base model is obtained through training and the original samples are updated based on the verification results of the base model. Specifically, the operation of updating the original sample labels using N preset integration algorithms includes:
[0158] Firstly, based on N preset integration algorithms, the initial models are trained using the original training set to obtain N base models corresponding to the N preset integration algorithms.
[0159] Secondly, the verification results of the original training set by the N base models are used to update the original sample labels and generate N first updated training sets corresponding to the N preset integration algorithms.
[0160] According to the embodiments of the present disclosure, further, while constructing the original training set, a test set is constructed (the training set is used in the model training phase, and the test set is used in the model testing phase after training), and the original training set is divided into M original sample subsets, the M original sample subsets include the original training subset and the original validation subset, and M is a positive integer. In this way, the samples are divided into a training set, a validation set, and a test set, the model is trained on the training set, and then the model effect is verified on the validation set, the optimal model is selected, and finally prediction is performed on the test set.
[0161] In the first training stage, the initial model trained with the original training set and the model to be trained with the target training set in the second training stage can be the same model, for example, both use the multi-layer perceptron to be trained. They can also be different models, for example, the model to be trained in the second training stage can be one of the N base models pre-trained in the first training stage.
[0162] The method of training the initial model with the original training set to obtain N base models includes: training the initial model M times with the original training subset in a cross-training manner to obtain N base models.
[0163] Among them, using the verification results of the original training set by N base models, updating the original sample labels includes: using a cross-validation method, using the original verification subset to verify the prediction effect on the base model, and updating the original sample labels based on the obtained verification results.
[0164] For example, Figure 3 As shown in the figure, the original training set is divided into 5 original sample subsets, including 4 original training subsets (Train samples) and 1 original validation subset (Predict sample), and also includes one test sample, that is, the sample is divided into 5 training sets (4 for training and 1 for validation), and a test set.
[0165] For example, the first-stage model training can be performed based on three different integrated algorithms (Algorithm 1, Algorithm 2, and Algorithm 3), respectively. A cross-training approach can be used to train the first-stage model using four of the original training subsets. The training is repeated five times in turn to obtain three base models corresponding to the three algorithms.
[0166] Furthermore, a cross-validation method is used, for example, a 5-fold cross-validation method is used to verify the model effect, and one of the original validation subsets in the five training sets is used to verify the prediction effect on the base model. The five validations are repeated in turn, and the original sample labels of the five original sample subsets are updated based on the verification results to generate five first updated training sets corresponding to the five preset integrated algorithms.
[0167] Furthermore, the test set is used to test the model effect, and 5 test results are obtained. The 5 test results are fused, and the voting method can be used to fuse the test results. That is, the test results with a larger number are used as the new labels of the test set. In this way, the labels of the test set are also updated.
[0168] Based on each algorithm, the model training process repeats the above steps, and finally obtains 3 new training sets and 3 new test sets.
[0169] The three new training sets are further subjected to dynamic feature screening and data set dynamic updating to form the target training set, the model to be trained is trained, and the prediction effect of the model is tested using the new test set to obtain the trained user consultation prediction model. In the second stage, the MLP (Multilayer Perceptron) neural network model is used for model training.
[0170] Figure 4 The schematic diagram shows the operation principle of performing feature screening processing on sample features in an updated training set according to an embodiment of the present disclosure.
[0171] According to an embodiment of the present disclosure, performing feature screening processing on a plurality of original user features related to user feature sample data and a plurality of original object features related to object feature sample data in N updated training sets includes:
[0172] Operation 11: During the first training phase, N feature importance scores corresponding to N preset integration algorithms are generated for original user features and original object features;
[0173] like Figure 4 As shown, for each original user feature and original object feature, the feature importance score values output during the model training process are collected for three different algorithms.
[0174] Operation 12: Based on the N feature importance scores, calculate and obtain comprehensive feature scores corresponding to the original user features and the original object features respectively.
[0175] For example, the feature importance scores corresponding to multiple features may be directly summed to calculate a comprehensive feature score.
[0176] For example, the feature importance score s of each feature may be weighted and summed to obtain the comprehensive feature score S, as shown in formula (2):
[0177]
[0178] Among them, i in the formula is the i-th feature, represents the i-th feature of the first algorithm, and so on. λ1 represents the auc value (Area Under Curve) of the first model. The weighted sum of the importance scores of the three models is the new importance score S. i .
[0179] Operation 13: Filter original user features and original object features according to comprehensive feature scores.
[0180] For example, the target original user features and target original object features whose comprehensive feature scores are less than a preset feature threshold may be removed.
[0181] For example, the features may be sorted according to the size of the comprehensive feature scores, and the features with the highest rankings may be selected.
[0182] The new feature importance score can better measure the feature in training. The weight is an indicator to measure the model. The larger the value, the better the model effect. The weighting of feature importance is mainly to take into account the training effect of different models. A dynamic feature threshold c is set. If the weighted importance score of a feature is greater than c, it means that this feature is useful, and features with feature importance less than c are discarded to ensure the effectiveness of the feature. In actual training, the S of each feature is i To sort, c can be dynamically configured based on experience.
[0183] According to the embodiments of the present disclosure, dynamic stacking is performed before entering the second stage, which is a key operation of model training. Dynamic stacking includes feature dynamics and data dynamics. The dynamic implementation makes full use of the first stage training results of the model. Among them, feature dynamics is such as the feature screening operation of the above embodiment. The data dynamic method is introduced in the subsequent embodiments.
[0184] According to the embodiments of the present disclosure, feature screening is performed based on the feature importance scores of each feature for each algorithm model. The prediction effects of multiple algorithm models are integrated in the feature screening, and the screened features have better model prediction effects. The problem of unreasonable traditional Stacking model integration is solved. For example, in the second-stage model training of traditional Stacking, the features and prediction results of the base learning model are used as the features and training data for model training. This is a static Stacking integration method, because the information of the first-stage model training is not used. The method of the above embodiment adopts a dynamic Stacking integration method to fuse the prediction results, dynamically generate the second-stage training data from the dimensions of features and prediction results, ensure the validity of the features, filter out invalid features, strengthen the correlation between the features and training effects of the two training stages, and improve the training effect of the model.
[0185] According to an embodiment of the present disclosure, according to an embodiment of the present disclosure, dynamic Stacking is performed before entering the second stage, and the dynamic Stacking includes feature dynamics and data dynamics, wherein the feature dynamics is such as the feature screening operation of the above embodiment, and the data dynamics refers to dynamically determining whether it is necessary to add the original training set to the updated training set during the second stage training process.
[0186] Specifically, the methods for realizing data dynamics include:
[0187] Operation 21: Calculate and obtain a model effect evaluation score (F1 score) for the first training stage. The model effect evaluation score is used to characterize the accuracy and recall rate of the base model obtained by training in the first training stage.
[0188] The specific calculation method includes: according to the prediction results of the base model and the original sample labels of the original training set, the model effect evaluation score of the base model is calculated, and the model effect evaluation score is used to characterize the accuracy and recall rate of the base model. Refer to Formula 3:
[0189] Specifically, the F1 score of the base model = 2*(P*R) / (P+R) (3)
[0190] Among them, P refers to the precision of the base model, and R refers to the recall rate of the base model.
[0191] Operation 22: In response to the model effect evaluation score being not less than a preset score threshold s, a target training set is generated based on the original training set and the N second updated training sets, or a target training set is generated based on the original training set; for example, the original training set and the N second updated training sets are combined as the target training set, or the original training set is directly used as the target training set.
[0192] Operation 23: In response to the model effect evaluation score being less than a preset score threshold s, a target training set is generated based on the N second updated training sets. For example, only the N second updated training sets are used as the target training set.
[0193] According to the embodiment of the present disclosure, the data dynamics of the second stage are carried out through the above method, and the training data of the first stage are used to perform dynamic adjustments by setting dynamic thresholds. If the F1 score of the first stage model is less than s, the original training set is not merged into the second stage for training; otherwise, the original training set is merged into the second stage for training, which ensures that the second stage training data does not lose the original data information and prevents the model from overfitting; in order to prevent the poor model effect in the first stage.
[0194] Further, the original training set includes an original training subset and an original validation subset, and generating a target training set based on the original training set and the N second updated training sets includes:
[0195] In response to the model effect evaluation score being not less than a preset score threshold s and less than a first reference threshold p, the original training subset and N second updated training sets are merged to generate a target training set, wherein the first reference threshold p is greater than the preset score threshold s.
[0196] In response to the model effect evaluation score being not less than the first reference threshold p and less than the second reference threshold q, the original training subset, the original validation subset and the N second updated training sets are merged to generate a target training set, wherein the second reference threshold q is greater than the first reference threshold p. The method of dynamic data adjustment refers to formulas (4) and (5), and the thresholds p and q can be dynamically set according to actual conditions.
[0197] Training subset ∈ new training data set (s≤F1≤p) (4)
[0198] Training subset + validation subset ∈ new training data set (p≤F1≤q)(5)
[0199] In this way, by dynamically obtaining the model features and training data of the second stage, the model of the second stage adopts the MLP neural network model for model training, and a trained model is obtained.
[0200] According to the embodiments of the present disclosure, the merged data is screened by setting dynamic thresholds p and q. If the F1 score of the first-stage model is in the range of s≤F1≤p, the validation subset of this model is not merged into new training data, so that the quality of the second-stage training data can be guaranteed. In this way, not only the original training data is taken into account to prevent the loss of original data information, but also the quality of the training data is guaranteed to improve the training effect.
[0201] Using the model trained by the above training method, another aspect of the present disclosure provides a user consultation prediction method.
[0202] Figure 5 The flowchart of the user consultation prediction method according to the embodiment of the present disclosure is schematically shown.
[0203] like Figure 5 As shown, the method of this embodiment includes operations S501 to S503.
[0204] In operation S501, feature data to be tested is obtained, wherein the feature data to be tested includes user feature data of the user to be tested, and object feature data related to the operation behavior object of the user within a reference time period, and the object feature data includes one of the following: feature data of commodities browsed by the user within the reference time period, feature data of orders completed by the user within the reference time period, and predefined candidate consultation question list data set for the user;
[0205] In operation S502, the feature data to be tested is input into a user consultation prediction model, and the consultation probability of the operation behavior object is output, wherein the user consultation prediction model is trained using the above training method;
[0206] In operation S503, a target object that the user to be tested intends to consult is determined according to the consultation probability of the operation behavior object, wherein the target object includes one of the following: a target product, a target order, and a target problem.
[0207] Figure 6 The operating principle diagram of the user consultation prediction method according to an embodiment of the present disclosure is schematically shown.
[0208] like Figure 6 As shown, the acquired data, such as order characteristics and customer characteristics (not shown in the figure), are input into the prediction model, and a probability value is obtained for each product, order, and question of the user. This probability value corresponds to the possibility of consultation. The products, orders, and questions are sorted according to this probability value to obtain a sorted list of products, orders, and questions. The products, orders, and questions ranked first are the products, orders, and questions with the highest probability of consultation.
[0209] By prioritizing products, orders, and issues at the top of the list and routing users to appropriate customer service based on the types of products, orders, and issues, you can quickly resolve user problems.
[0210] The above user consultation prediction model uses the idea of recommendation sorting to rank and recommend user consultation products, orders and questions, and uses the top-ranked results as recommendation results and diverts them to appropriate customer service.
[0211] According to an embodiment of the present disclosure, in the scenario of customer service consultation, if the goods, orders, and questions that the user wants to consult are known in advance before the user consults the customer service, the user can be diverted to the appropriate customer service, thereby quickly solving the user's problem. Because customer service is divided according to parameters such as order type, product type, and consultation question, if the order, product, and question that the user wants to consult are known in advance, the customer service that the user wants to consult is also known. Pre-judgment of user consultations through the above model can predict user intentions in advance and divert customers to appropriate customer service, which can improve the user consultation experience and reduce the platform's customer service costs.
[0212] Based on the above user consultation prediction model training method, the present disclosure also provides a user consultation prediction model training device. Figure 7 The device is described in detail.
[0213] Figure 7 The structural block diagram of the user consultation prediction model training device according to an embodiment of the present disclosure is schematically shown.
[0214] like Figure 7 As shown, the user consultation prediction model training device 700 of this embodiment includes a first acquisition module 701, a first training module 702, a feature screening module 703, a training set generation module 704, and a second training module 705.
[0215] The first acquisition module 701 is used to acquire an original training set, wherein the original training set includes a plurality of original samples, each of which includes user feature sample data, object feature sample data related to an operation behavior object of the user within a specified historical time period, and an original sample label, wherein the original sample label is used to characterize an object actually consulted by the user within the specified historical time period;
[0216] The first training module 702 is used to update the original sample labels in the original training set using N preset integrated algorithms in the first training stage to generate N updated training sets corresponding to the N preset integrated algorithms;
[0217] The feature screening module 703 is used to perform feature screening processing on a plurality of original user features related to the user feature sample data and a plurality of original object features related to the object feature sample data in the N updated training sets, and / or
[0218] A training set generating module 704 is used to merge the original training set with the N updated training sets to generate a target training set when it is determined to use the original training set;
[0219] The second training module 705 is used to train the to-be-trained model using the target training set in the second training phase to obtain a trained user consultation prediction model.
[0220] According to an embodiment of the present disclosure, the feature screening module 703 includes a first generating unit, a first calculating unit, and a screening unit.
[0221] The first generating unit is used to generate N feature importance scores corresponding to N preset integrated algorithms for the original user features and the original object features; the first calculating unit is used to calculate the comprehensive feature scores corresponding to the original user features and the original object features respectively based on the N feature importance scores; the screening unit is used to screen the original user features and the original object features according to the comprehensive feature scores.
[0222] According to an embodiment of the present disclosure, the screening unit includes a screening subunit, which is used to remove target original user features and target original object features whose comprehensive feature scores are less than a preset feature threshold.
[0223] According to an embodiment of the present disclosure, the first training module includes a training unit and an updating unit.
[0224] Among them, the training unit is used to train the initial model using the original training set based on N preset integration algorithms, so as to obtain N base models corresponding to the N preset integration algorithms; the updating unit is used to update the original sample label using the verification results of the original training set using the N base models, so as to generate N first updated training sets corresponding to the N preset integration algorithms.
[0225] According to an embodiment of the present disclosure, the training set generation module 704 includes a second calculation unit, a second generation unit, and a third generation unit.
[0226] The second calculation unit is used to calculate a model effect evaluation score for the base model, wherein the model effect evaluation score is used to characterize the accuracy and recall of the base model; the second generation unit is used to generate a target training set based on the original training set and N second updated training sets, or based on the original training set in response to the model effect evaluation score being not less than a preset score threshold; the third generation unit is used to generate a target training set based on the N second updated training sets in response to the model effect evaluation score being less than the preset score threshold.
[0227] According to an embodiment of the present disclosure, the second generation unit includes a first merging subunit and a second merging subunit.
[0228] The first merging subunit is used to merge the original training subset and N second updated training sets to generate a target training set in response to the model effect evaluation score being not less than a preset score threshold and less than a first reference threshold, wherein the first reference threshold is greater than the preset score threshold; the second merging subunit is used to merge the original training subset, the original verification subset and N second updated training sets to generate a target training set in response to the model effect evaluation score being not less than the first reference threshold and less than the second reference threshold, wherein the second reference threshold is greater than the first reference threshold.
[0229] According to an embodiment of the present disclosure, the training unit includes a training sub-unit, which is used to adopt a cross-training method to train the initial model M times using the original training subset to obtain N base models.
[0230] The updating unit includes an updating subunit, which is used to verify the prediction effect on the base model using the original verification subset in a cross-validation manner, and update the original sample label based on the obtained verification result.
[0231] According to an embodiment of the present disclosure, the object feature sample data includes one of the following: feature sample data of goods browsed by the user within a specified historical time period, feature sample data of orders completed by the user within a specified historical time period, and sample data of a predefined candidate consulting question list set for the user; correspondingly, the original sample label includes one of the following: goods actually consulted by the user within the specified historical time period, orders actually consulted by the user within the specified historical time period, and questions actually consulted by the user within the specified historical time period.
[0232] According to an embodiment of the present disclosure, the above-mentioned device also includes a calculation module and a pre-screening module.
[0233] The calculation module is used to calculate the feature correlation coefficients of multiple original user features related to the user feature sample data and multiple original object features related to the object feature sample data in the original training set before the first training stage; the pre-screening module is used to perform feature pre-screening processing on the multiple original user features and the multiple original object features according to the feature correlation coefficients.
[0234] Based on the above user consultation prediction method, the present disclosure also provides a user consultation prediction device. Figure 8 The device is described in detail.
[0235] Figure 8 The structural block diagram of the user consultation prediction device according to an embodiment of the present disclosure is schematically shown.
[0236] like Figure 8 As shown, the user consultation prediction device 800 of this embodiment includes a second acquisition module 801 , a prediction module 802 , and an object determination module 803 .
[0237] The second acquisition module 801 is used to acquire the feature data to be tested, wherein the feature data to be tested includes user feature data of the user to be tested, and object feature data related to the operation behavior object of the user within the reference time period, and the object feature data includes one of the following: feature data of the goods browsed by the user within the reference time period, feature data of the orders completed by the user within the reference time period, and predefined candidate consultation question list data set for the user;
[0238] Prediction module 802, used to input the feature data to be tested into the user consultation prediction model, and output the consultation probability of the operation behavior object, wherein the user consultation prediction model is trained using the above training method;
[0239] The object determination module 803 is used to determine the target object that the user to be tested intends to consult according to the consultation probability of the operation behavior object, wherein the target object includes one of the following: target product, target order, and target problem.
[0240] According to an embodiment of the present disclosure, any multiple modules among the first acquisition module 701, the first training module 702, the feature screening module 703, the training set generation module 704, the second training module 705, or the second acquisition module 801, the prediction module 802, and the object determination module 803 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first acquisition module 701, the first training module 702, the feature screening module 703, the training set generation module 704, the second training module 705, or the second acquisition module 801, the prediction module 802, and the object determination module 803 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware, and firmware, or by an appropriate combination of any of them. Alternatively, at least one of the first acquisition module 701, the first training module 702, the feature screening module 703, the training set generation module 704, the second training module 705, or the second acquisition module 801, the prediction module 802, and the object determination module 803 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.
[0241] Fig. 9 A block diagram of an electronic device suitable for implementing a model training method and a user consultation prediction method according to an embodiment of the present disclosure is schematically shown.
[0242] like Fig. 9 As shown, the electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include an onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0243] In RAM 903, various programs and data required for the operation of electronic device 900 are stored. Processor 901, ROM 902 and RAM 903 are connected to each other via bus 904. Processor 901 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 902 and / or RAM 903. It should be noted that the program can also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0244] According to an embodiment of the present disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to the bus 904. The electronic device 900 may further include one or more of the following components connected to the input / output (I / O) interface 905: an input portion 906 including a keyboard, a mouse, etc.; an output portion 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 908 including a hard disk, etc.; and a communication portion 909 including a network interface card such as a LAN card, a modem, etc. The communication portion 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage portion 908 as needed.
[0245] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0246] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus, or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.
[0247] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the model training method and user consultation prediction method provided by the embodiment of the present disclosure.
[0248] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 901. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0249] In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and downloaded and installed through the communication part 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0250] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0251] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0252] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0253] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure. The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A user consultation prediction model training method, comprising: Acquire an original training set, wherein the original training set includes a plurality of original samples, each of the original samples includes user feature sample data, object feature sample data related to an operation behavior object of the user within a specified historical time period, and an original sample label, wherein the original sample label is used to characterize an object actually consulted by the user within the specified historical time period; In the first training stage, the original sample labels are updated using N preset integration algorithms to generate N first updated training sets corresponding to the N preset integration algorithms, where N is a positive integer; Performing feature screening processing on original user features related to the user feature sample data and original object features related to the object feature sample data in the N first updated training sets to obtain N second updated training sets; Generate a target training set based on the original training set and / or the N second updated training sets; In the second training stage, the target training set is used to train the model to be trained to obtain a trained user consultation prediction model.
2. The method according to claim 1, wherein: Performing feature screening processing on the original user features and the original object features to obtain the N second updated training sets includes: Generating N feature importance scores corresponding to the N preset integration algorithms for the original user features and the original object features; Based on the N feature importance scores, calculating and obtaining comprehensive feature scores corresponding to the original user feature and the original object feature respectively; The original user features and the original object features are screened according to the comprehensive feature scores.
3. The method according to claim 2, wherein: Screening the original user features and the original object features according to the comprehensive feature scores includes: The target original user features and target original object features whose comprehensive feature scores are less than a preset feature threshold are removed.
4. The method according to any one of claims 1 to 3, wherein: Using N preset integration algorithms to update the original sample labels and generate N first updated training sets corresponding to the N preset integration algorithms includes: Based on the N preset integrated algorithms, respectively, the initial models are trained using the original training set to obtain N base models corresponding to the N preset integrated algorithms; The verification results of the original training set by the N base models are used to update the original sample labels and generate N first updated training sets corresponding to the N preset integration algorithms.
5. The method according to claim 4, wherein: Generating a target training set based on the original training set and / or the N second updated training sets includes: Calculate and obtain a model effect evaluation score for the base model, wherein the model effect evaluation score is used to characterize the accuracy and recall rate of the base model; In response to the model effect evaluation score being not less than a preset score threshold, generating the target training set based on the original training set and the N second updated training sets, or generating the target training set based on the original training set; In response to the model effect evaluation score being less than the preset score threshold, generating the target training set based on the N second updated training sets.
6. The method according to claim 5, wherein: The original training set is divided into M original sample subsets, the M original sample subsets include an original training subset and an original validation subset, and M is a positive integer; Generating the target training set based on the original training set and the N second updated training sets includes: In response to the model effect evaluation score being not less than the preset score threshold and less than a first reference threshold, merging the original training subset and the N second updated training sets to generate the target training set, wherein the first reference threshold is greater than the preset score threshold; In response to the model effect evaluation score being not less than the first reference threshold and less than a second reference threshold, the original training subset, the original validation subset and the N second updated training sets are merged to generate the target training set, wherein the second reference threshold is greater than the first reference threshold.
7. The method according to claim 6, wherein: Using the original training set to train the initial model to obtain the N base models includes: using the original training subset to train the initial model M times in a cross-training manner to obtain the N base models; Using the verification results of the N base models on the original training set, updating the original sample label includes: using the cross-validation method, using the original verification subset to verify the prediction effect on the base model, and updating the original sample label based on the obtained verification results.
8. The method according to any one of claims 1 to 3, wherein: The object feature sample data includes one of the following: feature sample data of commodities browsed by the user in the specified historical time period, feature sample data of orders completed by the user in the specified historical time period, and sample data of a list of predefined candidate consulting questions set for the user; Correspondingly, the original sample label includes one of the following: the goods that the user actually consulted within the specified historical time period, the orders that the user actually consulted within the specified historical time period, and the questions that the user actually consulted within the specified historical time period.
9. The method according to any one of claims 1 to 3, before the first training stage, further comprising: Calculating feature correlation coefficients of a plurality of original user features related to the user feature sample data and a plurality of original object features related to the object feature sample data in the original training set; According to the feature correlation coefficient, feature pre-screening processing is performed on the multiple original user features and the multiple original object features.
10. A user consultation prediction method, comprising: Acquire the feature data to be tested, wherein the feature data to be tested includes user feature data of the user to be tested, and object feature data related to the operation behavior object of the user within the reference time period, and the object feature data includes one of the following: feature data of the goods browsed by the user within the reference time period, feature data of the orders completed by the user within the reference time period, and predefined candidate consultation question list data set for the user; Inputting the feature data to be tested into a user consultation prediction model, and outputting the consultation probability of the operation behavior object, wherein the user consultation prediction model is trained using the method described in any one of claims 1 to 9; According to the consultation probability of the operation behavior object, a target object that the user to be tested intends to consult is determined, wherein the target object includes one of the following: a target product, a target order, and a target problem.
11. A user consultation prediction model training device, comprising: A first acquisition module is used to acquire an original training set, wherein the original training set includes a plurality of original samples, each of which includes user feature sample data, object feature sample data related to an operation behavior object of the user within a specified historical time period, and an original sample label, wherein the original sample label is used to characterize an object actually consulted by the user within the specified historical time period; A first training module, used to update the original sample labels using N preset integration algorithms, and generate N first updated training sets corresponding to the N preset integration algorithms, wherein N is a positive integer; A feature screening module, used for performing feature screening processing on the original user features related to the user feature sample data and the original object features related to the object feature sample data in the N first updated training sets, to obtain N second updated training sets; A training set generating module, used for generating a target training set based on the original training set and / or the N second updated training sets; The second training module is used to train the model to be trained using the target training set in the second training stage to obtain a trained user consultation prediction model.
12. A user consultation prediction device, comprising: A second acquisition module is used to acquire the feature data to be tested, wherein the feature data to be tested includes user feature data of the user to be tested, and object feature data related to the user's operation behavior object within the reference time period, and the object feature data includes one of the following: feature data of the goods browsed by the user within the reference time period, feature data of the orders completed by the user within the reference time period, and predefined candidate consulting question list data set for the user; A prediction module, used for inputting the feature data to be tested into a user consultation prediction model, and outputting the consultation probability of the operation behavior object, wherein the user consultation prediction model is trained by the method according to any one of claims 1 to 9; The object determination module is used to determine the target object that the user to be tested intends to consult according to the consultation probability of the operation behavior object, wherein the target object includes one of the following: target product, target order, and target problem.
13. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method according to any one of claims 1 to 10.
14. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 10.
15. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
An online customer service allocation method and device and a storage medium
CN112784039A
Neural network model training method and device
CN114638238A
Android malicious software detection method based on stacking integration technology
CN115577357A
Generation method and device of wind power plant fault scene prediction model and computer equipment
CN116304713A
Data processing method and device
CN116595105A
