User behavior prediction method, device, equipment and storage medium
By filtering target labels and training information, and combining them with model metrics generated by the behavior prediction model, target models are selected for user behavior prediction. This solves the problem of inaccurate user behavior prediction in existing technologies and improves the accuracy and efficiency of prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2023-05-24
- Publication Date
- 2026-06-02
AI Technical Summary
Existing user behavior prediction solutions cannot accurately predict how users will respond to inquiries, leading to customer churn and wasted resources.
By filtering target labels, training information, and text input from multiple behavior prediction models, model metrics are generated and target models are selected for user behavior prediction.
It improves the accuracy and efficiency of user behavior prediction, reduces feature label analysis, and enhances the accuracy and efficiency of behavior prediction identification.
Smart Images

Figure CN116629423B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and financial technology, and in particular to a user behavior prediction method, apparatus, device and storage medium. Background Technology
[0002] Currently, in business scenarios where users inquire about customers' purchase intentions, users typically send mass text messages or emails to all customers randomly. The response rate for this method is only around 1%, resulting in a significant waste of resources and causing SMS harassment to non-intent customers, thus negatively impacting the user experience.
[0003] To improve user experience, the field of artificial intelligence typically predicts user responses to mass SMS and email messages, then decides whether to send an SMS to that user based on the prediction. However, existing user response prediction solutions often directly use arbitrary predictive network models to predict user response requests. Because these models are not adapted to specific business needs, they fail to accurately predict user responses, leading to customer churn. With the development of fintech, user response prediction solutions can support functions such as shopping, social networking, interactive games, and resource transfer. Summary of the Invention
[0004] In view of the above, it is necessary to provide a user behavior prediction method, apparatus, device and storage medium that can solve the technical problem of how to accurately predict a user's response to an inquiry.
[0005] On one hand, the present invention proposes a user behavior prediction method, the user behavior prediction method comprising:
[0006] Filter out the target label from the multiple feature labels obtained;
[0007] Obtain training information and user behavior results from multiple training users on the target label, and obtain the training text;
[0008] The training information and the training text are input into multiple pre-trained behavior prediction models to obtain the predicted behavior results of each behavior prediction model for the multiple trained users.
[0009] Based on the user behavior results and the predicted behavior results, model metrics are generated for each behavior prediction model;
[0010] Based on multiple model metrics, a target model is selected from the multiple behavior prediction models;
[0011] In response to a user behavior prediction request, the user information of the test user and the test text in the user behavior prediction request are predicted based on the target model to obtain the target behavior result of the test user on the test text.
[0012] According to a preferred embodiment of the present invention, the step of filtering the target label from the acquired multiple feature labels includes:
[0013] Obtain the feature information of each feature label and the feature result corresponding to the feature information;
[0014] Based on the aforementioned feature information, calculate the label variance for each feature label;
[0015] The number of feature results with different outcomes corresponding to feature information with the same value is counted, and the total number of features in each feature label is counted.
[0016] Calculate the target proportion of each feature label based on the amount of information and the total number of features;
[0017] Identify the label type corresponding to each feature label;
[0018] The target label is selected from the plurality of feature labels based on the label variance, the target proportion, and the label type.
[0019] According to a preferred embodiment of the present invention, the step of selecting the target label from the plurality of feature labels based on the label variance, the target proportion, and the label type includes:
[0020] Compare the label variance with a first preset threshold, and compare the target ratio with a second preset threshold;
[0021] If the label variances of all feature labels of the same label type are less than the first preset threshold, and the target proportions of all feature labels of the same label type are greater than the second preset threshold, then the feature label with the largest label variance and / or the smallest target proportion is selected from the feature labels of that label type as the target label; or
[0022] If the variance of the labels corresponding to the feature labels of the same label type is not all less than the first preset threshold, then the feature labels whose variance is greater than or equal to the first preset threshold are selected from the feature labels of that feature label as the target label; or
[0023] If the target proportions corresponding to feature tags of the same tag type are not all greater than the second preset threshold, then feature tags whose target proportions are less than or equal to the second preset threshold are selected from the feature tags of that feature tag as the target tags.
[0024] According to a preferred embodiment of the present invention, the step of inputting the training information and the training text into multiple pre-trained behavior prediction models to obtain the prediction behavior result of each behavior prediction model for the multiple trained users includes:
[0025] Identify the information type of the training information;
[0026] The training information of character type is encoded based on a preset encoding table to obtain a first encoding, and the training text is encoded to obtain a second encoding.
[0027] The numerical training information is converted to numerical values to obtain numerical distribution information.
[0028] The numerical distribution information is standardized to obtain a third code;
[0029] By concatenating the first code, the second code, and the third code, the target code is obtained.
[0030] The target code is processed according to the multiple behavior prediction models to obtain the predicted behavior result.
[0031] According to a preferred embodiment of the present invention, the plurality of model metrics include a first metric, a second metric, a third metric, and a fourth metric, and the model metrics for generating each behavior prediction model based on the user behavior results and the predicted behavior results include:
[0032] For each behavior prediction model, the number of training users whose predicted behavior result and user behavior result are both the first configuration result is counted as the first number, and the number of training users whose predicted behavior result and user behavior result are both the second configuration result is counted as the second number.
[0033] The number of training users whose predicted behavior result is the first configuration result and whose user behavior result is the second configuration result is counted as the third number, and the number of training users whose predicted behavior result is the second configuration result and whose user behavior result is the first configuration result is counted as the fourth number;
[0034] The first indicator is generated based on the first quantity and the fourth quantity, and the second indicator is generated based on the first quantity and the third quantity.
[0035] A third indicator is generated based on the first quantity, the second quantity, the third quantity, and the fourth quantity, and the fourth indicator is generated based on the first indicator and the second indicator.
[0036] According to a preferred embodiment of the present invention, the step of performing prediction processing on the user information and test text of the test user in the user behavior prediction request based on the target model to obtain the target behavior result of the test user on the test text includes:
[0037] Parse the request message of the user behavior prediction request to obtain the data information carried by the request message;
[0038] Extract the user identifier of the test user from the data information;
[0039] Generate a query statement based on the user identifier and the target tag;
[0040] Based on the configuration information database, the query statement is executed to obtain the user information;
[0041] The test text is located from the path address in the data information;
[0042] The user information and the test text are encoded to obtain an input vector;
[0043] The target behavior result is obtained by predicting and analyzing the input vector based on the target model.
[0044] According to a preferred embodiment of the present invention, the target model includes a forward network layer, a backward network layer, and multiple prediction analysis trees. The step of performing prediction analysis on the input vector based on the target model to obtain the target behavior result includes:
[0045] Based on the forward network layer, feature extraction is performed on the input vector to obtain the first feature, and based on the reverse network layer, feature extraction is performed on the input vector to obtain the second feature;
[0046] Generate the target features of the input vector based on the first feature and the second feature;
[0047] Obtain the matching results that match the target feature from each predictive analysis tree;
[0048] The number of results for each matching result is counted, and the matching result with the largest number of results is determined as the target behavior result.
[0049] On the other hand, the present invention also proposes a user behavior prediction device, the user behavior prediction device comprising:
[0050] The filtering unit is used to filter out the target label from multiple acquired feature labels;
[0051] The acquisition unit is used to acquire training information and user behavior results of multiple training users on the target label, and to acquire training text;
[0052] The input unit is used to input the training information and the training text into multiple pre-trained behavior prediction models to obtain the prediction behavior results of each behavior prediction model for the multiple trained users.
[0053] The generation unit is used to generate model metrics for each behavior prediction model based on the user behavior results and the predicted behavior results.
[0054] The filtering unit is also used to filter out a target model from the plurality of behavior prediction models based on a plurality of model indicators;
[0055] The prediction unit is used to respond to a user behavior prediction request, and perform prediction processing on the user information of the test user and the test text in the user behavior prediction request based on the target model, so as to obtain the target behavior result of the test user on the test text.
[0056] On the other hand, the present invention also proposes an electronic device, the electronic device comprising:
[0057] Memory, which stores computer-readable instructions; and
[0058] The processor executes computer-readable instructions stored in the memory to implement the user behavior prediction method.
[0059] On the other hand, the present invention also proposes a computer-readable storage medium storing computer-readable instructions, which are executed by a processor in an electronic device to implement the user behavior prediction method.
[0060] As can be seen from the above technical solutions, this application can reasonably filter out the target label by performing feature analysis on the multiple feature labels. Since the analysis of the multiple feature labels is reduced, the efficiency of behavior prediction analysis can be improved. By inputting the training information into the multiple behavior prediction models for analysis, and combining the user behavior results and the predicted behavior results to generate model indicators for each behavior prediction model, the target model can be accurately filtered out from the multiple behavior prediction models based on the multiple model indicators, thereby improving the accuracy of the target model in behavior prediction. Therefore, this application can improve the recognition accuracy and recognition efficiency of the target behavior results. Attached Figure Description
[0061] Figure 1 This is a flowchart of a preferred embodiment of the user behavior prediction method of the present invention.
[0062] Figure 2 This is a model structure diagram of the target model in the user behavior prediction method of this invention.
[0063] Figure 3 This is a functional block diagram of a preferred embodiment of the user behavior prediction device of the present invention.
[0064] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the user behavior prediction method of the present invention. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0066] like Figure 1 The diagram shown is a flowchart of a preferred embodiment of the user behavior prediction method of the present invention. The order of the steps in this flowchart can be changed, and some steps can be omitted, depending on different requirements.
[0067] The user behavior prediction method described above can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0068] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0069] The user behavior prediction method is applied to one or more electronic devices. The electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored computer-readable instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0070] The electronic device can be any electronic product that can interact with the user, such as a personal computer, tablet computer, smartphone, personal digital assistant (PDA), game console, interactive network television (IPTV), smart wearable device, etc.
[0071] The electronic devices may include network devices and / or user devices. The network devices include, but are not limited to, single network electronic devices, groups of multiple network electronic devices, or cloud computing-based systems consisting of a large number of hosts or network electronic devices.
[0072] The network in which the electronic device is located includes, but is not limited to: the Internet, wide area network, metropolitan area network, local area network, virtual private network (VPN), etc.
[0073] 101. Select the target label from the multiple feature labels obtained.
[0074] In at least one embodiment of the present invention, the plurality of feature tags may include, but are not limited to: user interest tags, user transaction tags, etc.
[0075] The target label refers to the feature label with a large variance in the feature information and a small amount of conflict between the feature information and the feature result.
[0076] In at least one embodiment of the present invention, the electronic device filters out target tags from a plurality of acquired feature tags, including:
[0077] Obtain the feature information of each feature label and the feature result corresponding to the feature information;
[0078] Based on the aforementioned feature information, calculate the label variance for each feature label;
[0079] The number of feature results with different outcomes corresponding to feature information with the same value is counted, and the total number of features in each feature label is counted.
[0080] Calculate the target proportion of each feature label based on the amount of information and the total number of features;
[0081] Identify the label type corresponding to each feature label;
[0082] The target label is selected from the plurality of feature labels based on the label variance, the target proportion, and the label type.
[0083] The feature information refers to the information corresponding to the feature tag. For example, the feature tag is a user interest tag, and the feature information may be related to internet access.
[0084] The feature result refers to the result that corresponds to the feature information of the multiple feature labels simultaneously. For example, the feature result may be a user response or feedback received.
[0085] The target ratio refers to the ratio of the amount of information to the total amount of features.
[0086] The label types include, but are not limited to: prediction type, statistical type, and fact type.
[0087] By calculating the label variance, it is possible to avoid the inability to accurately distinguish the feature results due to small differences in the feature information. By calculating the target ratio, it is possible to avoid the existence of a large number of feature information with the same value in the target label corresponding to different feature results. Furthermore, combined with the label type, the rationality of the determination of the target label is improved. By filtering the multiple feature labels, the number of multiple feature labels can be reduced, thereby improving the efficiency of behavior analysis.
[0088] Specifically, the electronic device selects the target label from the plurality of feature labels based on the label variance, the target proportion, and the label type, including:
[0089] Compare the label variance with a first preset threshold, and compare the target ratio with a second preset threshold;
[0090] If the label variances of all feature labels of the same label type are less than the first preset threshold, and the target proportions of all feature labels of the same label type are greater than the second preset threshold, then the feature label with the largest label variance and / or the smallest target proportion is selected from the feature labels of that label type as the target label; or
[0091] If the variance of the labels corresponding to the feature labels of the same label type is not all less than the first preset threshold, then the feature labels whose variance is greater than or equal to the first preset threshold are selected from the feature labels of that feature label as the target label; or
[0092] If the target proportions corresponding to feature tags of the same tag type are not all greater than the second preset threshold, then feature tags whose target proportions are less than or equal to the second preset threshold are selected from the feature tags of that feature tag as the target tags.
[0093] The first preset threshold and the second preset threshold can be set according to actual needs, and this application does not limit them further.
[0094] Through the above implementation method, it is possible to avoid the removal of feature tags corresponding to any tag type due to unreasonable setting of the first preset threshold and the second preset threshold, thereby improving the rationality of the determination of the target tag.
[0095] 102. Obtain training information and user behavior results of multiple training users on the target label, and obtain training text.
[0096] In at least one embodiment of the present invention, the plurality of training users can be any user whose response feedback is known.
[0097] The training information refers to the specific information corresponding to the target label for the multiple training users.
[0098] The user behavior results include, but are not limited to: receiving user feedback or not receiving user feedback.
[0099] The training text can be the content of a text message about the redemption service.
[0100] 103. Input the training information and the training text into multiple pre-trained behavior prediction models to obtain the prediction behavior results of each behavior prediction model for the multiple trained users.
[0101] In at least one embodiment of the present invention, the plurality of behavior prediction models include a combination of at least one of the following models:
[0102] Behavior prediction models based on random forest algorithm, behavior prediction models based on gradient boosting decision tree, behavior prediction models based on logistic regression algorithm, and behavior prediction models based on extreme gradient boosting.
[0103] In at least one embodiment of the present invention, the predicted behavior result includes, but is not limited to: receiving user feedback or not receiving user feedback.
[0104] In at least one embodiment of the present invention, the electronic device inputs the training information and the training text into multiple pre-trained behavior prediction models to obtain the prediction behavior results of each behavior prediction model for the multiple trained users, including:
[0105] Identify the information type of the training information;
[0106] The training information of character type is encoded based on a preset encoding table to obtain a first encoding, and the training text is encoded to obtain a second encoding.
[0107] The numerical training information is converted to numerical values to obtain numerical distribution information.
[0108] The numerical distribution information is standardized to obtain a third code;
[0109] By concatenating the first code, the second code, and the third code, the target code is obtained.
[0110] The target code is processed according to the multiple behavior prediction models to obtain the predicted behavior result.
[0111] The information types include: the character type and the numeric type.
[0112] The preset encoding table stores multiple mapping relationships between characters and element vectors.
[0113] The numerical distribution information refers to the information generated after numerical conversion of the training information, which is of numerical type.
[0114] By identifying the information type and then encoding the character-type training information using the preset encoding table, the problem of sparse matrices in the first encoding can be avoided. By performing numerical conversion on the numerical training information, the numerical distribution information can present a certain distribution pattern, improving the encoding accuracy of the third encoding. Thus, by combining the first encoding, the second encoding, and the third encoding, the training information and the training text can be accurately represented. Furthermore, by processing the target encoding using the multiple behavior prediction models, the problem of prediction errors caused by representation errors can be avoided.
[0115] Specifically, the formula for generating the numerical distribution information is:
[0116] y = log(n+1), where y represents the numerical distribution information and n represents the numerical training information.
[0117] The logarithmic function can make the numerical distribution information show a certain distribution pattern, and by introducing the value 1, the numerical distribution information can be avoided from being meaningless.
[0118] 104. Generate model metrics for each behavior prediction model based on the user behavior results and the predicted behavior results.
[0119] In at least one embodiment of the present invention, the plurality of model indicators include a first indicator, a second indicator, a third indicator, and a fourth indicator.
[0120] In at least one embodiment of the present invention, the electronic device generates model metrics for each behavior prediction model based on the user behavior results and the predicted behavior results, including:
[0121] For each behavior prediction model, the number of training users whose predicted behavior result and user behavior result are both the first configuration result is counted as the first number, and the number of training users whose predicted behavior result and user behavior result are both the second configuration result is counted as the second number.
[0122] The number of training users whose predicted behavior result is the first configuration result and whose user behavior result is the second configuration result is counted as the third number, and the number of training users whose predicted behavior result is the second configuration result and whose user behavior result is the first configuration result is counted as the fourth number;
[0123] The first indicator is generated based on the first quantity and the fourth quantity, and the second indicator is generated based on the first quantity and the third quantity.
[0124] A third indicator is generated based on the first quantity, the second quantity, the third quantity, and the fourth quantity, and the fourth indicator is generated based on the first indicator and the second indicator.
[0125] The first configuration result is usually set to receive user feedback, while the second configuration result is usually set to not receive user feedback.
[0126] By comparing the predicted behavior results and the user behavior results with the first configuration result and the second configuration result respectively, the first quantity, the second quantity, the third quantity and the fourth quantity can be accurately quantified, thereby improving the generation accuracy of model indicators for each behavior prediction model.
[0127] Specifically, the formula for generating the first indicator is:
[0128] The formula for generating the second indicator is:
[0129] The formula for generating the third indicator is:
[0130] The formula for generating the fourth indicator is:
[0131] Wherein, k1 represents the first indicator, k2 represents the second indicator, k3 represents the third indicator, k4 represents the fourth indicator, a represents the first quantity, b represents the second quantity, c represents the third quantity, d represents the fourth quantity, and z represents a preset constant.
[0132] 105. Based on multiple model indicators, select a target model from the multiple behavior prediction models.
[0133] In at least one embodiment of the present invention, the target model refers to the behavior prediction model with the largest of the plurality of model indicators.
[0134] like Figure 2 The diagram shown is a model structure diagram of the target model in the user behavior prediction method of this invention. Figure 2 The target model may include a forward network layer, a backward network layer, and multiple prediction analysis trees. The target model may also have other representations.
[0135] In at least one embodiment of the present invention, the electronic device selects a target model from the plurality of behavior prediction models based on a plurality of model metrics, including:
[0136] The target indicator is obtained by performing a weighted sum operation on the multiple model indicators;
[0137] The behavioral prediction model corresponding to the target indicator with the largest value is determined as the target model.
[0138] The target model can be quickly determined through the above implementation method.
[0139] 106. In response to a user behavior prediction request, the user information of the test user and the test text in the user behavior prediction request are predicted based on the target model to obtain the target behavior result of the test user on the test text.
[0140] It should be emphasized that, in order to further ensure the privacy and security of the results of the aforementioned target behaviors, the results of the aforementioned target behaviors can also be stored in a node of a blockchain.
[0141] In at least one embodiment of the present invention, the user behavior prediction request may be a request triggered when it is necessary to detect whether a user will reply to SMS content or email content. The information carried in the user behavior prediction request includes, but is not limited to, the user identifier of the test user, the path address of the test text, etc. Wherein, the test user refers to the user for whom behavior prediction is required based on the test text, the test text refers to the text for which user behavior prediction is required, and the test text may be SMS content.
[0142] The user information refers to the data information corresponding to the test user on the target tag.
[0143] The target behavior outcome may include, but is not limited to: receiving user feedback or not receiving user feedback.
[0144] In at least one embodiment of the present invention, the electronic device
[0145] Based on the target model, the user information and test text of the test user in the user behavior prediction request are predicted to obtain the target behavior result of the test user on the test text, including:
[0146] Parse the request message of the user behavior prediction request to obtain the data information carried by the request message;
[0147] Extract the user identifier of the test user from the data information;
[0148] Generate a query statement based on the user identifier and the target tag;
[0149] Based on the configuration information database, the query statement is executed to obtain the user information;
[0150] The test text is located from the path address in the data information;
[0151] The user information and the test text are encoded to obtain an input vector;
[0152] The target behavior result is obtained by predicting and analyzing the input vector based on the target model.
[0153] The user identifier is used to uniquely identify the test user.
[0154] The query statement can be a structured query statement.
[0155] The configuration information database stores multiple pieces of basic personal information authorized by the user.
[0156] By parsing the request message, the data information can be quickly obtained. Then, through the user identifier and the target tag, the user information can be directly obtained from the configuration information database, which improves the efficiency of obtaining the user information and thus improves the efficiency of generating the target behavior result.
[0157] Specifically, the method for generating the input vector is similar to the method for generating the target code, and will not be described in detail here.
[0158] Specifically, when the target model includes a forward network layer, a backward network layer, and multiple prediction analysis trees, the electronic device performs prediction analysis on the input vector based on the target model to obtain the target behavior result, including:
[0159] Based on the forward network layer, feature extraction is performed on the input vector to obtain the first feature, and based on the reverse network layer, feature extraction is performed on the input vector to obtain the second feature;
[0160] Generate the target features of the input vector based on the first feature and the second feature;
[0161] Obtain the matching results that match the target feature from each predictive analysis tree;
[0162] The number of results for each matching result is counted, and the matching result with the largest number of results is determined as the target behavior result.
[0163] The forward network layer and the reverse network layer can be network layers in a bidirectional memory neural network.
[0164] The target feature refers to the average sum of the feature elements in the first feature and the feature elements in the second feature.
[0165] By extracting features from the input vector through the forward and reverse network layers, the target features can be represented by combining the positive and reverse features of the input vector, thereby improving the representation ability of the target features. Furthermore, the matching results can be reasonably filtered out through the multiple prediction analysis trees, and the target behavior result can be accurately identified through the multiple matching results.
[0166] As can be seen from the above technical solutions, this application can reasonably filter out the target label by performing feature analysis on the multiple feature labels. Since the analysis of the multiple feature labels is reduced, the efficiency of behavior prediction analysis can be improved. By inputting the training information into the multiple behavior prediction models for analysis, and combining the user behavior results and the predicted behavior results to generate model indicators for each behavior prediction model, the target model can be accurately filtered out from the multiple behavior prediction models based on the multiple model indicators, thereby improving the accuracy of the target model in behavior prediction. Therefore, this application can improve the recognition accuracy and recognition efficiency of the target behavior results.
[0167] like Figure 3The diagram shown is a functional block diagram of a preferred embodiment of the user behavior prediction device of the present invention. The user behavior prediction device 11 includes a filtering unit 110, an acquisition unit 111, an input unit 112, a generation unit 113, and a prediction unit 114. The module / unit referred to in this invention is a series of computer-readable instruction segments that can be acquired by the processor 13 and perform a fixed function, stored in the memory 12. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.
[0168] The filtering unit 110 is used to filter out the target label from the multiple feature labels obtained;
[0169] The acquisition unit 111 is used to acquire training information and user behavior results of multiple training users on the target label, and to acquire training text;
[0170] The input unit 112 is used to input the training information and the training text into multiple pre-trained behavior prediction models to obtain the prediction behavior results of each behavior prediction model for the multiple trained users.
[0171] The generation unit 113 is used to generate model metrics for each behavior prediction model based on the user behavior results and the predicted behavior results.
[0172] The filtering unit 110 is further configured to filter out a target model from the plurality of behavior prediction models based on the plurality of model indicators;
[0173] The prediction unit 114 is used to respond to a user behavior prediction request, and perform prediction processing on the user information of the test user and the test text in the user behavior prediction request based on the target model, so as to obtain the target behavior result of the test user on the test text.
[0174] In at least one embodiment of the present invention, the filtering unit 110 is further configured to obtain feature information of each feature tag and feature results corresponding to the feature information;
[0175] Based on the aforementioned feature information, calculate the label variance for each feature label;
[0176] The number of feature results with different outcomes corresponding to feature information with the same value is counted, and the total number of features in each feature label is counted.
[0177] Calculate the target proportion of each feature label based on the amount of information and the total number of features;
[0178] Identify the label type corresponding to each feature label;
[0179] The target label is selected from the plurality of feature labels based on the label variance, the target proportion, and the label type.
[0180] In at least one embodiment of the present invention, the screening unit 110 is further configured to compare the label variance with a first preset threshold and compare the target ratio with a second preset threshold.
[0181] If the label variances of all feature labels of the same label type are less than the first preset threshold, and the target proportions of all feature labels of the same label type are greater than the second preset threshold, then the feature label with the largest label variance and / or the smallest target proportion is selected from the feature labels of that label type as the target label; or
[0182] If the variance of the labels corresponding to the feature labels of the same label type is not all less than the first preset threshold, then the feature labels whose variance is greater than or equal to the first preset threshold are selected from the feature labels of that feature label as the target label; or
[0183] If the target proportions corresponding to feature tags of the same tag type are not all greater than the second preset threshold, then feature tags whose target proportions are less than or equal to the second preset threshold are selected from the feature tags of that feature tag as the target tags.
[0184] In at least one embodiment of the present invention, the input unit 112 is further configured to identify the information type of the training information;
[0185] The training information of character type is encoded based on a preset encoding table to obtain a first encoding, and the training text is encoded to obtain a second encoding.
[0186] The numerical training information is converted to numerical values to obtain numerical distribution information.
[0187] The numerical distribution information is standardized to obtain a third code;
[0188] By concatenating the first code, the second code, and the third code, the target code is obtained.
[0189] The target code is processed according to the multiple behavior prediction models to obtain the predicted behavior result.
[0190] In at least one embodiment of the present invention, the plurality of behavior prediction models include a combination of at least one of the following models:
[0191] Behavior prediction models based on random forest algorithm, behavior prediction models based on gradient boosting decision tree, behavior prediction models based on logistic regression algorithm, and behavior prediction models based on extreme gradient boosting.
[0192] In at least one embodiment of the present invention, the plurality of model indicators include a first indicator, a second indicator, a third indicator and a fourth indicator. The generation unit 113 is further configured to, for each behavior prediction model, count the number of training users whose predicted behavior result and the user behavior result are both the first configuration result as a first quantity, and count the number of training users whose predicted behavior result and the user behavior result are both the second configuration result as a second quantity.
[0193] The number of training users whose predicted behavior result is the first configuration result and whose user behavior result is the second configuration result is counted as the third number, and the number of training users whose predicted behavior result is the second configuration result and whose user behavior result is the first configuration result is counted as the fourth number;
[0194] The first indicator is generated based on the first quantity and the fourth quantity, and the second indicator is generated based on the first quantity and the third quantity.
[0195] A third indicator is generated based on the first quantity, the second quantity, the third quantity, and the fourth quantity, and the fourth indicator is generated based on the first indicator and the second indicator.
[0196] In at least one embodiment of the present invention, the formula for generating the first index is:
[0197] The formula for generating the second indicator is:
[0198] The formula for generating the third indicator is:
[0199] The formula for generating the fourth indicator is:
[0200] Wherein, k1 represents the first indicator, k2 represents the second indicator, k3 represents the third indicator, k4 represents the fourth indicator, a represents the first quantity, b represents the second quantity, c represents the third quantity, d represents the fourth quantity, and z represents a preset constant.
[0201] In at least one embodiment of the present invention, the step of performing prediction processing on the user information and test text of the test user in the user behavior prediction request based on the target model to obtain the target behavior result of the test user on the test text includes:
[0202] Parse the request message of the user behavior prediction request to obtain the data information carried by the request message;
[0203] Extract the user identifier of the test user from the data information;
[0204] Generate a query statement based on the user identifier and the target tag;
[0205] Based on the configuration information database, the query statement is executed to obtain the user information;
[0206] The test text is located from the path address in the data information;
[0207] The user information and the test text are encoded to obtain an input vector;
[0208] The target behavior result is obtained by predicting and analyzing the input vector based on the target model.
[0209] In at least one embodiment of the present invention, the target model includes a forward network layer, a backward network layer, and multiple prediction analysis trees, and the step of performing prediction analysis on the input vector based on the target model to obtain the target behavior result includes:
[0210] Based on the forward network layer, feature extraction is performed on the input vector to obtain the first feature, and based on the reverse network layer, feature extraction is performed on the input vector to obtain the second feature;
[0211] Generate the target features of the input vector based on the first feature and the second feature;
[0212] Obtain the matching results that match the target feature from each predictive analysis tree;
[0213] The number of results for each matching result is counted, and the matching result with the largest number of results is determined as the target behavior result.
[0214] As can be seen from the above technical solutions, this application can reasonably filter out the target label by performing feature analysis on the multiple feature labels. Since the analysis of the multiple feature labels is reduced, the efficiency of behavior prediction analysis can be improved. By inputting the training information into the multiple behavior prediction models for analysis, and combining the user behavior results and the predicted behavior results to generate model indicators for each behavior prediction model, the target model can be accurately filtered out from the multiple behavior prediction models based on the multiple model indicators, thereby improving the accuracy of the target model in behavior prediction. Therefore, this application can improve the recognition accuracy and recognition efficiency of the target behavior results.
[0215] like Figure 4 The diagram shown is a schematic representation of the structure of an electronic device that implements the user behavior prediction method of the present invention.
[0216] In one embodiment of the present invention, the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and computer-readable instructions, such as a user behavior prediction program, stored in the memory 12 and executable on the processor 13.
[0217] Those skilled in the art will understand that the schematic diagram is merely an example of electronic device 1 and does not constitute a limitation on electronic device 1. It may include more or fewer components than shown in the diagram, or combine certain components, or different components. For example, electronic device 1 may also include input / output devices, network access devices, buses, etc.
[0218] The processor 13 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor 13 is the computing core and control center of the electronic device 1, connecting various parts of the electronic device 1 through various interfaces and lines, and executing the operating system of the electronic device 1, as well as various installed application programs and program code.
[0219] For example, the computer-readable instructions can be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules / units can be a series of computer-readable instruction segments capable of performing a specific function, which describe the execution process of the computer-readable instructions in the electronic device 1. For example, the computer-readable instructions can be divided into a filtering unit 110, an acquisition unit 111, an input unit 112, a generation unit 113, and a prediction unit 114.
[0220] The memory 12 can be used to store the computer-readable instructions and / or modules. The processor 13 implements various functions of the electronic device 1 by running or executing the computer-readable instructions and / or modules stored in the memory 12 and calling the data stored in the memory 12. The memory 12 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. The memory 12 may include non-volatile and volatile memory, such as: hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other storage devices.
[0221] The memory 12 can be the external memory and / or internal memory of the electronic device 1. Furthermore, the memory 12 can be a physical memory, such as a memory module, a TF card (Trans-flash Card), etc.
[0222] If the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by instructing related hardware through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium, and when executed by a processor, the computer-readable instructions can implement the steps of the various method embodiments described above.
[0223] The computer-readable instructions include computer-readable instruction code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer-readable instruction code, recording medium, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), and random access memory (RAM).
[0224] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed user behavior prediction, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0225] Combination Figure 1 The memory 12 in the electronic device 1 stores computer-readable instructions to implement a user behavior prediction method, and the processor 13 can execute the computer-readable instructions to achieve the following:
[0226] Filter out the target label from the multiple feature labels obtained;
[0227] Obtain training information and user behavior results from multiple training users on the target label, and obtain the training text;
[0228] The training information and the training text are input into multiple pre-trained behavior prediction models to obtain the predicted behavior results of each behavior prediction model for the multiple trained users.
[0229] Based on the user behavior results and the predicted behavior results, model metrics are generated for each behavior prediction model;
[0230] Based on multiple model metrics, a target model is selected from the multiple behavior prediction models;
[0231] In response to a user behavior prediction request, the user information of the test user and the test text in the user behavior prediction request are predicted based on the target model to obtain the target behavior result of the test user on the test text.
[0232] Specifically, the specific implementation method of the processor 13 for the above-mentioned computer-readable instructions can be found in [reference needed]. Figure 1 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.
[0233] In the several embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0234] The computer-readable storage medium stores computer-readable instructions, which, when executed by the processor 13, are used to perform the following steps:
[0235] Filter out the target label from the multiple feature labels obtained;
[0236] Obtain training information and user behavior results from multiple training users on the target label, and obtain the training text;
[0237] The training information and the training text are input into multiple pre-trained behavior prediction models to obtain the predicted behavior results of each behavior prediction model for the multiple trained users.
[0238] Based on the user behavior results and the predicted behavior results, model metrics are generated for each behavior prediction model;
[0239] Based on multiple model metrics, a target model is selected from the multiple behavior prediction models;
[0240] In response to a user behavior prediction request, the user information of the test user and the test text in the user behavior prediction request are predicted based on the target model to obtain the target behavior result of the test user on the test text.
[0241] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0242] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0243] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0244] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices described may also be implemented by a single unit or device through software or hardware. Terms such as "first," "second," etc., are used to indicate names and do not indicate any specific order.
[0245] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A user behavior prediction method, characterized in that, The user behavior prediction method includes: Filtering target labels from multiple acquired feature labels includes: acquiring feature information of each feature label and the feature result corresponding to the feature information; calculating the label variance of each feature label based on the feature information; counting the number of feature results with different results corresponding to feature information with the same value, and counting the total number of features of the feature information in each feature label; calculating the target proportion of each feature label based on the number of information and the total number of features; identifying the label type corresponding to each feature label; and filtering the target label from the multiple feature labels based on the label variance, the target proportion, and the label type. Obtain training information and user behavior results from multiple training users on the target label, and obtain the training text; The training information and training text are input into multiple pre-trained behavior prediction models to obtain the predicted behavior results of each behavior prediction model for the multiple training users. This includes: identifying the information type of the training information; encoding the character-type training information based on a preset encoding table to obtain a first encoding, and encoding the training text to obtain a second encoding; performing numerical conversion on the numerical-type training information to obtain numerical distribution information; standardizing the numerical distribution information to obtain a third encoding; concatenating the first encoding, the second encoding, and the third encoding to obtain a target encoding; and processing the target encoding according to the multiple behavior prediction models to obtain the predicted behavior results. Based on the user behavior results and the predicted behavior results, model metrics are generated for each behavior prediction model; Based on multiple model metrics, a target model is selected from the multiple behavior prediction models; In response to a user behavior prediction request, the user information of the test user and the test text in the user behavior prediction request are predicted based on the target model to obtain the target behavior result of the test user on the test text.
2. The user behavior prediction method as described in claim 1, characterized in that, The step of selecting the target label from the plurality of feature labels based on the label variance, the target proportion, and the label type includes: Compare the label variance with a first preset threshold, and compare the target ratio with a second preset threshold; If the label variances of all feature labels of the same label type are less than the first preset threshold, and the target proportions of all feature labels of the same label type are greater than the second preset threshold, then the feature label with the largest label variance and / or the smallest target proportion is selected from the feature labels of that label type as the target label; or If the variance of the labels corresponding to the feature labels of the same label type is not all less than the first preset threshold, then the feature labels whose variance is greater than or equal to the first preset threshold are selected from the feature labels of that feature label as the target label; or If the target proportions corresponding to feature tags of the same tag type are not all greater than the second preset threshold, then feature tags whose target proportions are less than or equal to the second preset threshold are selected from the feature tags of that feature tag as the target tags.
3. The user behavior prediction method as described in claim 1, characterized in that, The multiple model metrics include a first metric, a second metric, a third metric, and a fourth metric. The model metrics used to generate each behavior prediction model based on the user behavior results and the predicted behavior results include: For each behavior prediction model, the number of training users whose predicted behavior result and user behavior result are both the first configuration result is counted as the first number, and the number of training users whose predicted behavior result and user behavior result are both the second configuration result is counted as the second number. The first configuration result is set to receive user feedback, and the second configuration result is set to not receive user feedback. The number of training users whose predicted behavior result is the first configuration result and whose user behavior result is the second configuration result is counted as the third number, and the number of training users whose predicted behavior result is the second configuration result and whose user behavior result is the first configuration result is counted as the fourth number. The first indicator is generated based on the first quantity and the fourth quantity, and the second indicator is generated based on the first quantity and the third quantity. A third indicator is generated based on the first quantity, the second quantity, the third quantity, and the fourth quantity, and the fourth indicator is generated based on the first indicator and the second indicator.
4. The user behavior prediction method as described in claim 1, characterized in that, The step of predicting the user information and test text of the test user in the user behavior prediction request based on the target model to obtain the target behavior result of the test user on the test text includes: Parse the request message of the user behavior prediction request to obtain the data information carried by the request message; Extract the user identifier of the test user from the data information; Generate a query statement based on the user identifier and the target tag; Based on the configuration information database, the query statement is executed to obtain the user information; The test text is located from the path address in the data information; The user information and the test text are encoded to obtain an input vector; The target behavior result is obtained by predicting and analyzing the input vector based on the target model.
5. The user behavior prediction method as described in claim 4, characterized in that, The target model includes a forward network layer, a backward network layer, and multiple prediction analysis trees. The step of performing prediction analysis on the input vector based on the target model to obtain the target behavior result includes: Based on the forward network layer, feature extraction is performed on the input vector to obtain the first feature, and based on the reverse network layer, feature extraction is performed on the input vector to obtain the second feature; Generate the target features of the input vector based on the first feature and the second feature; Obtain the matching results that match the target feature from each predictive analysis tree; The number of results for each matching result is counted, and the matching result with the largest number of results is determined as the target behavior result.
6. A user behavior prediction device, characterized in that, The user behavior prediction device includes: A filtering unit is used to filter target labels from multiple acquired feature labels, including: acquiring feature information of each feature label and the feature result corresponding to the feature information; calculating the label variance of each feature label based on the feature information; counting the number of feature results with different results corresponding to feature information with the same value, and counting the total number of features of the feature information in each feature label; calculating the target proportion of each feature label based on the number of information and the total number of features; identifying the label type corresponding to each feature label; and filtering the target label from the multiple feature labels based on the label variance, the target proportion, and the label type. The acquisition unit is used to acquire training information and user behavior results of multiple training users on the target label, and to acquire training text; An input unit is configured to input the training information and the training text into multiple pre-trained behavior prediction models to obtain the predicted behavior results of each behavior prediction model for the multiple training users, including: identifying the information type of the training information; encoding the character-type training information based on a preset encoding table to obtain a first encoding, and encoding the training text to obtain a second encoding; performing numerical conversion on the numerical-type training information to obtain numerical distribution information; standardizing the numerical distribution information to obtain a third encoding; concatenating the first encoding, the second encoding, and the third encoding to obtain a target encoding; and processing the target encoding according to the multiple behavior prediction models to obtain the predicted behavior results. The generation unit is used to generate model metrics for each behavior prediction model based on the user behavior results and the predicted behavior results. The filtering unit is also used to filter out a target model from the plurality of behavior prediction models based on a plurality of model indicators; The prediction unit is used to respond to a user behavior prediction request, and perform prediction processing on the user information of the test user and the test text in the user behavior prediction request based on the target model, so as to obtain the target behavior result of the test user on the test text.
7. An electronic device, characterized in that, The electronic device includes: Memory, which stores computer-readable instructions; and The processor executes computer-readable instructions stored in the memory to implement the user behavior prediction method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions that are executed by a processor in an electronic device to implement the user behavior prediction method as described in any one of claims 1 to 5.