Data Processing Method, Apparatus, Electronic Device, Program Product and Medium

By integrating object information and category probability in the product prediction model, generating a product recommendation list and detecting the model, the recommendation accuracy problem when the object data is insufficient is solved, and efficient product recommendations are achieved in the case of limited data.

CN117033752BActive Publication Date: 2025-07-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211126113.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-15
Publication Date
2025-07-08
Estimated Expiration
2042-09-15

AI Technical Summary

Technical Problem

When recommending products for objects, the prior art requires a large amount of object data to ensure the accuracy of recommendations. When the object data is insufficient, the accuracy of recommendations is low.

Method used

By obtaining the test data set, calling the product prediction model to process object information, determining the first and second purchasing probability based on the object categories, fusing the two probabilities to generate a product recommendation list, and determining the test indicators based on the list to detect whether the model has passed, and then making product recommendations.

Benefits of technology

Without a large amount of object information, the accuracy of product recommendations is improved, and the effectiveness of product prediction models can be better detected to ensure the accuracy of recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117033752B_ABST
    Figure CN117033752B_ABST
Patent Text Reader

Abstract

Embodiments of this application disclose a data processing method, apparatus, electronic device, program product, and medium, which can be applied to the field of data processing technology. The method includes: calling a product prediction model to process the test object information of each test object in a test data set to obtain a first probability set corresponding to each test object; determining a second probability set corresponding to each test object according to the object category of each test object; determining a test product recommendation list for each test object according to the first probability set and the second probability set of each test object, and determining whether the test passes based on the test product recommendation list and test label of each test object, and using the product prediction model that passes the test to recommend products for the object. Using the embodiments of this application helps to improve the accuracy of product recommendations. The embodiments of this application can also be applied to various scenarios such as cloud technology, artificial intelligence, intelligent transportation, assisted driving, and smart home appliances.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, and in particular to a data processing method, apparatus, electronic device, program product, and medium. Background Art

[0002] Currently, when recommending products (such as financial products, insurance products, etc.) for an object (such as an individual or an enterprise), usually binary classification prediction can be performed for each product based on object information of the object, historical purchase data, and other data to determine the products to be recommended for the object. However, the inventor found in the practice process that when using this method for product recommendation, a large amount of object data is usually required. If the object data is insufficient, the accuracy of the recommended products determined for the object is relatively low. Summary of the Invention

[0003] Embodiments of this application provide a data processing method, apparatus, electronic device, program product, and medium, which helps to improve the accuracy of product recommendation.

[0004] On the one hand, embodiments of this application disclose a data processing method, and the method includes:

[0005] Obtain a test data set for a product prediction model, where the test data set includes test object information of at least one test object and a test label for each test object, the test label is used to indicate the products purchased by the test object, and each test object in the test data set is associated with a corresponding object category;

[0006] Call the product prediction model to process the test object information of each test object to obtain a first probability set corresponding to each test object, where the first probability set includes a first purchase probability for each product in the product library;

[0007] Determine a second probability set corresponding to each test object according to the object category of each test object, where the second probability set includes a second purchase probability of the test object for each product;

[0008] Determine a test product recommendation list for each test object according to the first probability set and the second probability set of each test object, and determine a test metric based on the test product recommendation list of each test object and the test label of each test object;

[0009] If the test metric meets the test condition, determine that the product prediction model passes the test, and use the product prediction model that passes the test to recommend products for the object.

[0010] On the one hand, embodiments of this application disclose a data processing apparatus, and the apparatus includes:

[0011] An acquisition unit, configured to acquire a test data set for a product prediction model, where the test data set includes test object information of at least one test object and a test label for each test object, the test label being used to indicate the products purchased by the test object, and each test object in the test data set is associated with a corresponding object category;

[0012] A processing unit, configured to call the product prediction model to process the test object information of each test object, to obtain a first probability set corresponding to each test object, the first probability set including a first purchase probability for each product in a product library;

[0013] The processing unit is further configured to determine a second probability set corresponding to each test object according to the object category of each test object, the second probability set including a second purchase probability of the test object for each product;

[0014] The processing unit is further configured to determine a test product recommendation list for each test object according to the first probability set and the second probability set of each test object, and determine a test metric based on the test product recommendation list of each test object and the test label of each test object;

[0015] The processing unit is further configured to, if the test metric meets a test condition, determine that the product prediction model passes the test, and use the product prediction model that has passed the test to recommend products for an object.

[0016] On the one hand, an embodiment of the present application provides an electronic device, which includes a processor and a memory. The memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to execute the following steps:

[0017] Acquire a test data set for a product prediction model, where the test data set includes test object information of at least one test object and a test label for each test object, the test label being used to indicate the products purchased by the test object, and each test object in the test data set is associated with a corresponding object category;

[0018] Call the product prediction model to process the test object information of each test object, to obtain a first probability set corresponding to each test object, the first probability set including a first purchase probability for each product in a product library;

[0019] Determine a second probability set corresponding to each test object according to the object category of each test object, the second probability set including a second purchase probability of the test object for each product;

[0020] Determine a test product recommendation list for each test object based on the first probability set and the second probability set of each test object, and determine test metrics based on the test product recommendation list of each test object and the test label of each test object;

[0021] If the test metrics meet the test conditions, determine that the product prediction model passes the test, and use the passed product prediction model to recommend products for the object.

[0022] On the one hand, an embodiment of the present application provides a computer-readable storage medium storing computer program instructions, which when executed by a processor, are used to perform the following steps:

[0023] Obtain a test data set for the product prediction model, where the test data set includes test object information of at least one test object and a test label for each test object, the test label is used to indicate the products purchased by the test object, and each test object in the test data set is associated with a corresponding object category;

[0024] Call the product prediction model to process the test object information of each test object to obtain a first probability set corresponding to each test object, where the first probability set includes a first purchase probability for each product in the product library;

[0025] Determine a second probability set corresponding to each test object according to the object category of each test object, where the second probability set includes a second purchase probability of the test object for each product;

[0026] Determine a test product recommendation list for each test object based on the first probability set and the second probability set of each test object, and determine test metrics based on the test product recommendation list of each test object and the test label of each test object;

[0027] If the test metrics meet the test conditions, determine that the product prediction model passes the test, and use the passed product prediction model to recommend products for the object.

[0028] On the one hand, an embodiment of the present application provides a computer program product or a computer program, the computer program product or the computer program includes computer instructions, and when the computer instructions are executed by a processor, the method provided in the above aspect can be implemented.

[0029] By adopting the embodiments of the present application, a test data set for a product prediction model can be obtained, and the product prediction model can be called to process the test object information of each test object in the test data set to obtain a first probability set corresponding to each test object, and a second probability set corresponding to each test object is determined according to the object category of each test object. The first probability set and the second probability set may respectively include a first purchase probability and a second purchase product probability for each product. Furthermore, a test product recommendation list is determined based on the first probability set and the second probability set to test the product prediction model based on the test product recommendation list. For example, test metrics are determined based on the test product recommendation list for testing. On the one hand, when determining the product recommendation list, in addition to determining the purchase probability (i.e., the first purchase probability) of each product based on the object information, the purchase probability (i.e., the second purchase probability) of each product can also be determined based on the object category of the object. Thus, two purchase probabilities are fused to determine the product recommendation list, and thus a large amount of object information does not need to be obtained, and the accuracy of product recommendation can also be improved to a certain extent. On the other hand, when testing the product prediction model, test metrics are determined based on the determined product recommendation list, which can better detect whether the product prediction model meets the requirements. Subsequently, product recommendation can be performed based on the product prediction model that passes the test, which helps to improve the accuracy of product recommendation. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] To more clearly illustrate the technical solutions of the embodiments of the present application, the accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0031] Figure 1 is a schematic structural diagram of a data processing system provided by an embodiment of the present application;

[0032] Figure 2 is a schematic flowchart of a data processing method provided by an embodiment of the present application;

[0033] Figure 3 is a schematic diagram of the effect of a method for determining a recommendation index provided by an embodiment of the present application;

[0034] Figure 4 is a schematic flowchart of a data processing method provided by an embodiment of the present application;

[0035] Figure 5 is a schematic diagram of a data processing process provided by an embodiment of the present application;

[0036] Figure 6It is a schematic structural diagram of a data processing device provided by an embodiment of the present application;

[0037] Figure 7 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Specific embodiments

[0038] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application.

[0039] An embodiment of the present application proposes a data processing solution, which can obtain a test data set for a product prediction model, call the product prediction model to process the test object information of each test object in the test data set, obtain a first probability set corresponding to each test object, and determine a second probability set corresponding to each test object according to the object category of each test object. The first probability set and the second probability set may respectively include a first purchase probability and a second purchase product probability for each product. Furthermore, a test product recommendation list is determined based on the first probability set and the second probability set to test the product prediction model based on the test product recommendation list, such as determining test metrics based on the test product recommendation list for testing. On the one hand, when determining the product recommendation list, in addition to determining the purchase probability of each product (i.e., the first purchase probability) based on the object information, the purchase probability of each product (i.e., the second purchase probability) can also be determined based on the object category of the object. Thus, two purchase probabilities are fused to determine the product recommendation list, so that a large amount of object information does not need to be obtained, and the accuracy of product recommendation can be improved to a certain extent; on the other hand, when testing the product prediction model, determining test metrics based on the determined product recommendation list can better detect whether the product prediction model meets the requirements. Subsequently, product recommendation can be performed based on the product prediction model that passes the test, which helps to improve the accuracy of product recommendation.

[0040] In a possible implementation manner, an embodiment of the present application can be applied to a data processing system. Please refer to Figure 1 , Figure 1 It is a schematic structural diagram of a data processing system provided by an embodiment of the present application. The product recommendation system may include a client and a server. Among them, the server can be any server for providing product recommendation and / or purchase services. The server can execute the above data processing solution, and then can test the product prediction model based on the above data processing solution, and use the product prediction model that passes the test to recommend products for the object. For example, it can receive a product recommendation request from the client to determine the products to be recommended for the object (also called recommended products), and then return the recommended products and the product resources of the recommended products to the client for the client to display the recommended products. Among them, the above products can be financial products, insurance products, etc., which are not limited here.

[0041] The client can be used to send a product recommendation instruction to the server, and the product recommendation instruction is used to indicate the product determined for recommendation to the object. In a possible implementation manner, the client can be the client in the device corresponding to the object that needs product recommendation, or can be other clients for providing recommendation services for the object, which is not limited herein. In a possible implementation manner, the client can receive the recommended product sent by the server and the product resources of the recommended product, and display the product resources of the recommended product. The product resources can be data such as preview pictures of the product, title introductions of the product, etc., which is not limited herein. After receiving the product resources of the recommended product returned by the server, the client can display them in various forms, such as displaying the product resources of the recommended product through a pop-up window, displaying the product resources of the recommended product in the information flow below the page where the products added to the electronic shopping cart are displayed, displaying a recommendation prompt in the form of a floating window on the page corresponding to the electronic shopping cart, and displaying the product resources of the recommended product on the product recommendation page.

[0042] In a possible implementation manner, this application can be applied to the field of 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 knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science. It attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence is also the study of the design principles and implementation methods of various intelligent machines, enabling the machines to have the functions of perception, reasoning and decision-making.

[0043] Artificial intelligence technology is an interdisciplinary subject, involving a wide range of fields, including both hardware-level technologies and software-level technologies. The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0044] It should be noted that before collecting relevant data of the user (such as object information of the object, object category, etc.) and during the process of collecting relevant data of the user, a prompt interface, a pop-up window or a voice prompt message can be displayed. The prompt interface, pop-up window or voice prompt message is used to prompt the user that their relevant data is being collected currently, so that this application only starts to execute the relevant steps of obtaining the user's relevant data after obtaining the confirmation operation sent by the user for the prompt interface or the pop-up window. Otherwise (that is, when the confirmation operation sent by the user for the prompt interface or the pop-up window is not obtained), the relevant steps of obtaining the user's relevant data are ended, that is, the relevant data of the user is not obtained. In other words, all user data collected by this application is collected with the consent and authorization of the user, and the collection, use and processing of relevant user data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0045] The technical solution of this application can be applied to an electronic device, such as the above-mentioned server. The electronic device can be a terminal, a server, or other devices for data processing, and this application does not make a limitation. Optionally, the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminals include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, smart speakers, smart home appliances, etc.

[0046] It can be understood that the above scenarios are only examples and do not constitute a limitation on the application scenarios of the technical solution provided by the embodiments of this application. The technical solution of this application can also be applied to other scenarios. For example, as known to those of ordinary skill in the art, with the evolution of the system architecture and the emergence of new business scenarios, the technical solution provided by the embodiments of this application is equally applicable to similar technical problems.

[0047] Based on the above description, an embodiment of this application proposes a data processing method. Please refer to Figure 2 , Figure 2 is a schematic flowchart of a data processing method provided by an embodiment of this application. This method can be executed by the above-mentioned electronic device. The data processing method can include the following steps.

[0048] S201. Obtain a test data set for the product prediction model.

[0049] Among them, the product prediction model can be a model for determining products to be recommended for an object. It can be understood that the product prediction model can be a model obtained through training and has the ability to predict the purchase probability of each product in the product library to a certain extent. The product library can include various products, and each product in the product library can be a financial product, an insurance product, etc., without limitation here.

[0050] The test data set can refer to the data set used to test the product prediction model. The test data set includes test object information of at least one test object and test labels of each test object. The test object can be the object corresponding to the data required for testing the product prediction model, and the at least one test object all belongs to the object set. The object set can include multiple objects. Here, the object can refer to a user or the user's account, or an institution or enterprise, etc., without limitation here.

[0051] The test object information can refer to the object information of the test object. In a possible implementation manner, the object information can include the basic information of the object, such as whether the object is an individual or an enterprise, the industry of the object, and the characteristic information of the industry, etc.; the object information can also include the historical information of the products held by the object, such as each product historically held by the object, the quantity corresponding to each product held, and the product information of each product held (such as the name, interest rate, threshold, etc. of the product); the object information can also include the financial information of the object, such as the assets and liabilities of the object, etc.; the object information can also include the transaction information of the object, such as the time of purchasing the product, the time interval between each purchase of the product, etc., without limitation here. It should be noted that the object information of the object is obtained under the authorization operation of the object, and the use of the object information is also legal and compliant.

[0052] The test label is used to indicate the products purchased by the test object. The test label can be marked based on the label set. The label set includes various labels, and each label corresponds to one product, that is, the number of labels in the label set can be the total number of products. Optionally, each label can be represented as a corresponding label value. For example, if the object purchases product a, the test label of the object can be represented by the label value 1. If the object purchases product b, the test label of the object can be represented by the label value 2, and so on, to determine the test label of each test object.

[0053] In one embodiment, the object information of the test object may be the object information (which may also be referred to as object data) of the test object within a period of time before the target moment. Then, the product purchased by the test object indicated by the test label may be the product purchased at the time closest to the target moment before the target moment. That is to say, if the test object has purchased multiple products, the product purchased at the time closest to the target moment before the target moment is selected to determine the corresponding test label. In one embodiment, the product purchased by the test object indicated by the test label may also be the product with the most purchase times by the test object, or may also be the product with the largest purchase quantity by the test object, and there is no limitation here.

[0054] Each test object in the test dataset is associated with a corresponding object category. It can be understood that objects under different object categories may usually have different preferences or habits when purchasing products. Therefore, the probabilities of objects in different object categories purchasing different products may be different. For example, the object category may be the industry category of the object. For example, if the object is in the retail industry, the Internet industry, the catering industry, etc., the probabilities of objects in different industry categories purchasing different products may be different. Another example is that if the object is an enterprise or a unit, the object category may also be the establishment duration of the object. Objects with different establishment durations may have different preferences and needs when purchasing products.

[0055] S202. Invoke the product prediction model to process the test object information of each test object to obtain a first probability set corresponding to each test object.

[0056] Among them, the first probability set includes the first purchase probability for each product in the product library. That is, for any test object, the first purchase probability for each product can be obtained. The first purchase probability may be the probability of purchasing a product determined based on the product prediction model.

[0057] In a possible implementation, the product prediction model can be a multi-classification model. In one embodiment, the multi-classification model can select a tree model, such as LightGBM (a machine learning library) or XGBoost (a machine learning library). XGBoost is a machine learning library focusing on the gradient boosting algorithm. Through a large number of optimizations in engineering, it can quickly and accurately solve many practical machine learning engineering problems. At the same time, a regularization term is added to effectively prevent the occurrence of overfitting. LightGBM is also a machine learning library based on the gradient boosting algorithm. It optimizes the memory occupancy problem during training, effectively reducing memory usage. At the same time, it optimizes the parallel computing process, greatly improving the training speed. For example, select the LightGBM training model as the product prediction model. The product prediction model obtained by training with the training data set can then be tested based on the test data set. The object information of each test object in the test data set can be processed to obtain the probability of each test object purchasing each product, that is, the first probability set of each test object is obtained.

[0058] S203. Determine a second probability set corresponding to each test object according to the object category of each test object.

[0059] Among them, the second probability set includes the second purchase probability of each test object for each product. That is, for any test object, the second purchase probability for each product can be obtained. The second purchase probability can be the probability of purchasing a product determined based on the object category. It can be understood that there can be corresponding second probability sets for different object categories. That is to say, for different object categories, the probability of an object purchasing each product may be different.

[0060] In a possible implementation, step S203 can specifically include the following steps:

[0061] ① Obtain the product holding information of at least one object under each object category in the object set, and determine the purchase data for each product corresponding to each object category based on the product holding information of at least one object under each object category. Among them, the object set includes multiple objects, and each object is associated with a corresponding object category. That is to say, there can be at least one object under each object category. The above-mentioned at least one test object all belongs to the object set. The product holding information of an object can be used to indicate relevant information about the products held by the object, such as the types of products held by the object, the quantity of each product held, the number of purchases of each product, and so on. The purchase data can be used to indicate data such as the number of times a product is purchased or the quantity purchased. The purchase data for each product corresponding to any object category can be obtained by counting based on the product holding information of the objects under that object category. For example, if there are K objects under object category A, the number of purchases of each product by these K objects can be counted. For example, product a is purchased 500 times, product b is purchased 600 times, and so on, to obtain the number of purchases of each product corresponding to object category A as the corresponding purchase data.

[0062] ② Determine the second purchase probability for each product corresponding to each object category based on the purchase data for each product corresponding to each object category, and obtain the second probability set corresponding to each object category. The second probability of each product can be understood as the probability that an object in the corresponding object category purchases each product. In one possible implementation, the second purchase probability can be determined based on the ratio of the purchase data of any product corresponding to the object category to the sum of the purchase data of all products corresponding to the object category. For example, in any object category, the calculation method of the second purchase probability of any product can be calculated through the following formulas (Formula 1 and Formula 2).

[0063]

[0064] p i =m i / s Formula 2

[0065] Where s represents the sum of the purchase times of the objects under any object category for multiple products in the product library. The number of multiple products in the product library is k, i represents the i-th product in the product library, and m i represents the number of purchases of the i-th product under that any object category. Thus, the sum of the purchase times of all products corresponding to that any object category can be calculated through Formula 1. p iIt represents the second purchase probability corresponding to the i-th product. Thus, the second purchase probability of the i-th product corresponding to any one of the object categories can be obtained by dividing the number of purchases of the i-th product under any one of the object categories by the sum of the number of purchases of all products corresponding to any one of the object categories.

[0066] ③ Determine the second probability set corresponding to the object category of each test object as the second probability set corresponding to each test object. It can be understood that by determining the second probability set corresponding to each object category through the above steps, the second probability set corresponding to the test object can be determined from the second probability sets corresponding to each object category according to the object category of the test object. For example, if the object category of the test object is category 1, then the second probability set corresponding to category 1 can be determined as the second probability set corresponding to this test. It can be understood that the process of obtaining the second probability set corresponding to each object category above can be abstracted as determining the statistical result of a statistical model, that is, determining the second probability set corresponding to the test object from the statistical result of the statistical model.

[0067] S204. Determine the test product recommendation list for each test object according to the first probability set and the second probability set of each test object, and determine the test index based on the test product recommendation list of each test object and the test label of each test object.

[0068] Among them, the test product recommendation list can be a list of products predicted for recommending to the test object, and the test product recommendation list can include multiple products. The number of products in the test product recommendation list can be a preset number, such as presetting the number of products in the test product recommendation list to 5. In one embodiment, each product in the test product recommendation list has a corresponding arrangement order, and the product with a higher ranking indicates that the product should be recommended more.

[0069] In a possible implementation manner, the test product recommendation list of any test object is determined according to the recommendation index obtained by fusing the first purchase probability and the second purchase probability of the test object for each product. Here, any one of the multiple test objects is represented as the target test object. Then, determining the test product recommendation list for each test object according to the first probability set and the second probability set of each test object can specifically include the following steps:

[0070] ①In the first probability set and the second probability set of the target test object, the first purchase probability and the second purchase probability of each product are fused to obtain the recommendation index of the target test object for each product. Among them, the recommendation index can be the basis for determining the product recommendation list. The recommendation index fuses the first purchase probability and the second purchase probability of the product, so that it can have multi-dimensional considerations, making the products recommended based on the recommendation index more accurate. In one embodiment, fusing the first purchase probability and the second purchase probability of each product can be multiplying the first purchase probability and the second purchase probability of each product to obtain the recommendation index of each product.

[0071] For example, please refer to Figure 3 , Figure 3 which is a schematic diagram of the effect of a method for determining a recommendation index provided by an embodiment of the present application. As Figure 3 shown in 301 in Figure 3 is the first probability set, which includes the first purchase probabilities for four products a, b, c, and d. The purchase probability corresponding to any product is recorded as: product (purchase probability). For example, Figure 3 "product a (0.1)" in the first probability set shown in 303 in Figure 3 means that the first purchase probability of product a is 0.1. As shown in 302 in

[0072] is the second probability set, which includes the second purchase probabilities for four products a, b, c, and d. Then, the first purchase probability and the second purchase probability corresponding to the same product in the first probability set and the second probability set can be fused. As shown in 301 in

[0073] Figure 3 is the result of fusing the first purchase probability and the second purchase probability of each product, that is, the recommendation index of each product is obtained. For example, the first purchase probability 0.1 of product a is multiplied by the corresponding second purchase probability 0.3 to obtain the recommendation index 0.03 corresponding to product a, and so on, to obtain the recommendation index of each product.

[0072] In one embodiment, fusing the first purchase probability and the second purchase probability of each product can also be adding the first purchase probability and the second purchase probability of each product with weights to obtain the recommendation index of each product. It can be understood that different or the same weights can be set for the first purchase probability and the second purchase probability. If it is necessary that the first purchase probability determined based on the object information has a greater impact when making product recommendations, a greater weight can be set for the first purchase probability. If it is necessary that the second purchase probability has a greater impact when making product recommendations, a greater weight can be set for the second purchase probability. Thus, a recommendation index that fuses the first purchase probability and the second purchase probability according to different proportions can be obtained.

[0073] ② Sort multiple products in descending order according to the recommendation index of each product for the target test object. For example, if the recommendation index of the target test object for product a is 0.03, for product b is 0.05, for product c is 0.07, and for product d is 0.02, then sorting according to the recommendation index from largest to smallest gives: product c, product b, product a, product d.

[0074] ③ Determine the test product recommendation list for the target test object based on the top K products in the sorting. K is a positive integer. It can be understood that the higher the recommendation index of a product, the more it should be recommended. Then, the K products with the largest recommendation index can be determined as the products in the test product recommendation list, and the K products in the determined test product recommendation list are arranged in descending order according to the recommendation index.

[0075] This test metric is used to measure the effectiveness of product recommendation by the product prediction model. It can be understood that this test metric is determined based on the deviation between the test product recommendation list determined in the above steps and the product indicated by the test label of the object. The most ideal situation for product recommendation can be that the test product recommendation list includes the product indicated by the test label of the object, and the product indicated by the test label ranks first in the test product recommendation list. The product indicated by the test label can be understood as the product actually purchased by the test object. That is, the most ideal situation for the product prediction model is to predict that the product ranked first in the test product recommendation list is the same as the product actually purchased by the test object.

[0076] In a possible implementation, this test metric may include coverage accuracy. Then, determining the test metric based on the test product recommendation list of each test object and the test label of each test object may include the following steps:

[0077] ① Obtain the number of verification test objects among at least one test object, where the test product recommendation list corresponding to the verification test object contains the product indicated by the test label. ② Determine the coverage accuracy rate based on the number of verification test objects and the number of test objects in the test object set. The coverage accuracy rate (abbreviated as CAR) is used to indicate the ratio of the products indicated by the test label included in the test product recommendation list, that is, among the test objects, the ratio of verification test objects to the test object set. The more the number of verification test objects and the higher the proportion in the test object set, the higher the coverage accuracy rate. The determination method of the coverage accuracy rate can be: divide the number of verification test objects by the number of test objects in the test object set, that is, it can be expressed as: CAR = the number of test objects whose truly purchased products are included in the test product recommendation list / the number of test objects × 100%. The coverage accuracy rate reflects the classification accuracy of the product prediction model. Since the final output is a product recommendation list for each object, an evaluation index is needed to measure whether the product recommendation list can cover the correct test label. If each product recommendation list can cover the correct product label, then CAR = 100%.

[0078] In one embodiment, the coverage accuracy rate can also be calculated by the following formula (Formula 3).

[0079]

[0080] where j i 's value can be used to indicate whether the product indicated by the test label of the i-th test object exists in the test product recommendation list. For example, if the product indicated by the test label of the i-th test object exists in the test product recommendation list, then j i is 1, and if the product indicated by the test label of the i-th test object does not exist in the test product recommendation list, then j i is 0. n is the number of test objects in the test dataset. Thus, the sum of j i with a value of 1 can represent the number of the above verification test objects, and thus the coverage accuracy rate can be obtained.

[0081] In a possible implementation manner, the test metric may further include the ranking accuracy rate. Then, based on the test product recommendation list of each test object and the test label of each test object, the test metric is determined, which may specifically include the following steps:

[0082] ① Determine the sorting index for each test subject based on the position order of the product indicated by the test label in the test product recommendation list. This position order is used to indicate the position of the product indicated by the test label in the test product recommendation list. For example, if the test product recommendation list is {Product b, Product a, Product d, Product c, Product e}, and the product actually purchased by a test subject is Product d, then the position order corresponding to the test label of this test subject can be obtained as 3. If the actually purchased product is Product c, then the position order corresponding to the test label of this test subject can be obtained as 4. It can be understood that the earlier the position order corresponding to the test label, the higher the corresponding sorting index; the later the position order corresponding to the test label, the lower the corresponding sorting index. Optionally, if the product indicated by the test label does not exist in the test product recommendation list, the sorting index of the test subject can be 0.

[0083] ② Determine the sorting accuracy rate based on the average value of the sorting indexes of at least one test subject. This sorting accuracy rate (Rank Average Rate, abbreviated as RAR), also known as the ranking accuracy rate, is used to indicate the accuracy of the sorting of the product indicated by the test label in the test product recommendation list. The determination method of this sorting accuracy rate can be expressed as: RAR = sorting index of the actually purchased product in the test product recommendation list / number of test subjects × 100%. The sorting accuracy rate reflects the accuracy of the product sorting in the finally output product recommendation list. Since the finally output is the product recommendation list for each object, an evaluation index is needed to measure whether the sorting of the products in the product recommendation list is reliable. If the product recommendation list of each test subject can accurately rank the product indicated by the sample label first in the test product recommendation list, then RAR = 100%.

[0084] In one embodiment, this sorting accuracy rate can also be calculated through the following formula (Formula 4).

[0085]

[0086] Where n is the number of test subjects in the test dataset, k is the number of product types in the test product recommendation list, h i represents the position order of the product indicated by the test label of the i-th test subject in the test product recommendation list, 1 ≤ h i ≤ (k + 1), then can represent the sorting index of the product indicated by the test label of the i-th test subject in the test product recommendation list. Then add up the sorting indexes corresponding to each test subject and divide by n to obtain the sorting accuracy rate.

[0087] S205. If the test metrics meet the test conditions, it is determined that the product prediction model passes the test, and the product prediction model that has passed the test is used to recommend products for the target.

[0088] Among them, the test conditions can be used to indicate the conditions that need to be met for the product prediction model to pass the test.

[0089] In one embodiment, the test conditions can be that the coverage accuracy rate is greater than or equal to the coverage threshold, or the ranking accuracy rate is greater than or equal to the ranking threshold, or the coverage accuracy rate is greater than or equal to the coverage threshold and the ranking accuracy rate is greater than or equal to the ranking threshold. For example, if the preset coverage threshold is 0.8 and the ranking threshold is 0.7, then when the coverage accuracy rate is greater than or equal to 0.8 and the ranking accuracy rate is greater than or equal to 0.7, it is determined that the test metrics meet the test conditions.

[0090] It can be understood that if the product prediction model passes the test, it means that the determined product prediction model has the ability to accurately predict the products to be recommended. Therefore, the product prediction model that has passed the test can be used for product recommendation subsequently.

[0091] In a possible implementation manner, using the product prediction model that has passed the test to recommend products for the target can be to determine the products to be recommended for the target based on the product prediction model that has passed the test and the target category of the target for which product recommendation is required.

[0092] In a possible implementation manner, if the test metrics do not meet the test conditions, it is determined that the product prediction model fails the test, and then the product prediction model is trained again until the test of the trained product prediction model passes.

[0093] By adopting the embodiments of the present application, a test data set for a product prediction model can be obtained, and the product prediction model can be called to process the test object information of each test object in the test data set to obtain a first probability set corresponding to each test object, and a second probability set corresponding to each test object can be determined according to the object category of each test object. The first probability set and the second probability set can respectively include a first purchase probability and a second purchase product probability for each product. Furthermore, a test product recommendation list can be determined based on the first probability set and the second probability set to test the product prediction model based on the test product recommendation list. For example, test metrics can be determined based on the test product recommendation list for testing. On the one hand, when determining the product recommendation list, in addition to being able to determine the purchase probability of each product (i.e., the first purchase probability) based on the object information, the purchase probability of each product (i.e., the second purchase probability) can also be determined based on the object category of the object. Thus, two purchase probabilities are fused to determine the product recommendation list, so that it is not necessary to obtain a large amount of object information, and the accuracy of product recommendation can be improved to a certain extent. On the other hand, when testing the product prediction model, test metrics are determined based on the determined product recommendation list, which can better detect whether the product prediction model meets the requirements. Subsequently, product recommendation can be performed based on the product prediction model that passes the test, which helps to improve the accuracy of product recommendation.

[0094] Please refer to Figure 4 , Figure 4 which is a schematic flowchart of a data processing method provided by the embodiments of the present application. This method can be executed by the above-mentioned electronic device. The data processing method can include the following steps.

[0095] S401. Obtain a test data set for a product prediction model.

[0096] In a possible implementation manner, as described above, the product prediction model can be a model that has been trained to a certain extent. The product prediction model can be trained through a training data set, and the acquisition method of the training data set can be the same as that of the test data set.

[0097] In one embodiment, the present application further includes the following steps: ① Obtain the original object data of multiple original objects, and determine the feature values of each original object for multiple feature dimensions according to the original object data of each original object, so as to obtain the object feature sequence of each original object. Among them, the source of the original object data can be the object information stored in any type of database, such as the historical data of the products held by the object. The original object data can be the data before the target moment, and the target moment can be a suitable fixed time point selected according to needs. For example, obtain the object data before December 31, 2021 as the original object data to obtain the data set for model training and testing. The feature dimension is used to indicate the dimension required for product recommendation. For the specific determination of which feature dimensions, reference can be made to the relevant description of the object information of the above test object, which will not be elaborated here. It can be understood that the information of each feature dimension can be expressed as the corresponding feature value, so as to represent the features of each dimension with a unified standard.

[0098] ② Determine the label corresponding to each original object according to the products purchased by each original object. For the relevant description of determining the label of each original object, reference can be made to the relevant description of the test label of the above test object, which will not be elaborated here.

[0099] It can be understood that the above two steps can also be understood as performing data processing based on the original object data to obtain a processed data set, and then the processed data set can be divided subsequently to obtain a training data set and a test data set. The processed data set includes multiple object sequence features and corresponding labels. Data processing mainly involves the determination of feature dimensions (also known as field selection), data preprocessing (that is, converting the information of each feature dimension into a unified standard feature value), and feature engineering, etc., to obtain the corresponding object feature sequence. The selection of data fields can be based on the specific situation of the data, the data preprocessing method is selected according to the data quality, and the feature engineering is designed according to the specific application scenario of product recommendation.

[0100] For example, the following is a data processing method: 1. Feature dimension selection. As mentioned above, the selected feature dimensions can be the basic information of the object, the historical information of the held products, the financial information, the transaction information, etc.

[0101] 2. Data preprocessing. Among them, the data prediction processing can be used to fill in the missing values or abnormal values in the data. For example, the missing values of the data can be filled with fixed values, and the abnormal values can be filled with the mean, median, etc. Character-type data can be converted into numerical types by target encoding, one-hot encoding, etc.

[0102] 3. Feature Engineering: The features can use the original feature data plus the derived features to increase the feature dimension and explore the potential feature patterns during product recommendation, which helps improve the accuracy of feature-based product recommendation. The derived features generally select different time windows according to historical data and calculate the mean, variance, etc. of the numerical type features within the time window. After the data processing steps are completed, ensure that all the data in the obtained data set are numerical data.

[0103] 4. Label Annotation. As described above, the corresponding labels can be determined according to the products purchased by the object, and the total number of label categories is equal to the total number of products. It can be understood that the above is only an example of the data processing process, and the data processing method of this application includes but is not limited to this scope.

[0104] For example, the data format of the processed data set can be seen in the following table.

[0105] Table 1

[0106]

[0107] Among them, each object has corresponding data, including the feature values of multiple feature dimensions. The feature values of each feature dimension can be represented by numerical data. For example, features 1-6 in the above table can form an object feature sequence, and each object's object sequence feature has a corresponding label.

[0108] ③ Determine at least one training object from multiple original objects, and determine the training data set according to the object feature sequence of at least one training object and the label corresponding to each training object. That is, it is equivalent to determining part of the data from the above-mentioned processed data set as the training data set. Among them, determining at least one training object from multiple original objects can be divided according to the target ratio. The target ratio is used to indicate the ratio of the training object to the test object to be determined. In one embodiment, when determining at least one training object, the training object can be determined according to the target ratio respectively under the original objects corresponding to each type of label. For example, if the target ratio is used to indicate that the ratio of the training object to the test object is 8:2, then 80% of the original objects can be determined as training objects respectively from the multiple original objects corresponding to each type of label, and 20% of the original objects can be determined as test objects respectively from the multiple original objects corresponding to each type of label.

[0109] ④Train the initial product prediction model according to the training data set to obtain a product prediction model. The initial product prediction model can be a product prediction model that needs to be trained. The initial product prediction model can be an untrained model or the product prediction model that fails the above test. In one embodiment, call the initial product prediction model to determine the first probability set corresponding to each training object according to the information of each training object in the training data set, and train the initial product prediction model according to the first probability set corresponding to each training object and the training label of each training object to obtain a product prediction model. The method for determining the first probability set of the training object by the initial product prediction model can refer to the relevant description of determining the first probability set of the test object based on the product prediction model above, which will not be elaborated here. It can be understood that training the initial product prediction model can continuously correct the model parameters of the model, so that the product corresponding to the maximum probability in the first probability set corresponding to each training object approaches the product indicated by the training label with a greater confidence, so that the product prediction model has the ability to predict the first purchase probability of each product that the object purchases from multiple products.

[0110] In one embodiment, the test data set can be a part of the data determined from the processed data set above. The object information of each object in the test data set can be characterized as the corresponding object feature sequence. Then, obtaining the test data set for the product prediction model can include the following steps: determining at least one test object from multiple original objects, and determining the training data set according to the object feature sequence of at least one test object and the label corresponding to each test object. The method for determining at least one test object can refer to the relevant description of determining at least one training object above, that is, the test object can be determined according to the target ratio respectively under the original objects corresponding to each type of label, which will not be elaborated here.

[0111] In a possible implementation manner, after data partitioning, the obtained test data set and training data set can be stored in a certain data format. For example, save the partitioned test data set and training data set in the form of csv files (a file format) on the computer hard disk respectively, so as to obtain the training data set from the computer hard disk to train the product prediction model and obtain the test data set for model testing.

[0112] S402. Call the product prediction model to process the test object information of each test object to obtain the first probability set corresponding to each test object.

[0113] S403. Determine the second probability set corresponding to each test object according to the object category of each test object.

[0114] S404. Determine the test product recommendation list for each test object based on the first probability set and the second probability set of each test object, and determine the test metrics based on the test product recommendation list of each test object and the test labels of each test object.

[0115] Steps S402 - S404 can refer to the relevant descriptions of steps S202 - S204 and will not be elaborated here.

[0116] S405. If the test metrics meet the test conditions, determine that the product prediction model passes the test.

[0117] In a possible implementation manner, after determining that the product prediction model passes the test, the second probability set corresponding to each object category obtained (that is, the statistical result of the statistical model) and the product prediction model that passes the test can be saved for subsequent application when actually used for product recommendation for objects. For example, the statistical result of the statistical model can be saved in a file in the.npy format (a file format) of the numpy library (a database) in Python (a computer programming language) in the computer hard disk for convenient use in subsequent predictions. After the product prediction model is trained, use this database model saving function to save the trained model in the computer hard disk, and use the model loading function to call the model during actual prediction.

[0118] S406. Obtain the object information of the target object that needs to be recommended for products and the object category of the target object.

[0119] Among them, the target object can be the object that needs to be recommended for products. The target object belongs to the above object set. The relevant descriptions of the object information and object category of the product object can refer to the above descriptions and will not be elaborated here.

[0120] In a possible implementation manner, the object information of the target object can be the object data after the above target time, such as selecting the object data after the time point of December 31, 2021. This is because the object data used when training and testing the model is the data before the target time, so selecting the object data after the target time for determining the recommended products in actual application can be more accurate and the timeliness of product recommendation for objects is higher.

[0121] S407. Call the product prediction model that passes the test to process the object information of the target object to obtain the first probability set corresponding to the target object, and determine the second probability set corresponding to the target object according to the object category of the target object.

[0122] Among them, the first probability set corresponding to the target object may include the first purchase probability of the target object for each product. The second probability set corresponding to the target object may include the second purchase probability of the target object for each product. The determination methods of the first probability set and the second probability set of the target object set may refer to the above description and will not be elaborated here.

[0123] S408. For each product, fuse the first purchase probability and the second purchase probability in the first probability set and the second probability set of the target object to obtain the recommendation index of the target object for each product.

[0124] It can be understood that the method for determining the recommendation index of the target object for each product may refer to the relevant description of determining the recommendation index of the target test object for each product above and will not be elaborated here. In this application, based on the first probability set determined based on object information, the second probability set determined based on object categories is fused to determine the recommendation index. Even when the features of object information are few, it can still have good accuracy in product recommendation. For example, different from e-commerce enterprises and social enterprises that have a large amount of complete customer behavior closed-loop data, for bank customers, especially small and medium-sized banks, the object information of customers, such as behavioral feature information, is scarce. Through this application, the accuracy of product recommendation can be guaranteed under the background that object data is insufficient to support the construction of a conventional recommendation model.

[0125] S409. Determine the products recommended for the target object from multiple products based on the recommendation index of the target object for each product.

[0126] In a possible implementation manner, determining the products recommended for the target object from multiple products based on the recommendation index of the target object for each product may specifically be: sort the multiple products in descending order according to the recommendation index of the target object for each product; determine the product recommendation list of the target object according to the top K products in the sorting. The products in this product recommendation list are the products recommended for the target object, where K is a positive integer. It can be understood that the steps for determining the product recommendation list of the target object may refer to the relevant description of determining the test product recommendation list above and will not be elaborated here. Optionally, after determining the product recommendation list of the target object, the products in the product recommendation list can be further refined to obtain the final products recommended for the target object. Thus, a personalized product recommendation list can be generated for each customer, helping to implement precision marketing, enhancing the marketing effect of products (such as financial products), and increasing the overall sales volume of products.

[0127] In a possible implementation, as described above, after determining the product recommendation list for the target object, the products in the product recommendation list can be further refined to obtain the products finally recommended for the target object. Then, determining the products recommended for the target object from multiple products based on the recommendation index of the target object for each product can specifically include the following steps: ① Determine the product recommendation list of the target object according to the recommendation index of the target object for each product. The method for determining the product recommendation list of the target object can refer to the above relevant description and will not be elaborated here.

[0128] ② Determine the behavior feature value corresponding to each product according to the behavior information of multiple objects in the object set for each product within the target time range. Wherein, the target time range can be a time period before the product recommendation for the target object. In one embodiment, the behavior information of the object within the interval period can be obtained every once in a while (such as every 1 hour), then the target time range can be the behavior information obtained most recently before the product recommendation for the target object. In one embodiment, a fixed time period (such as one day) can be determined, and each time period is divided into multiple time slots. According to the time slot (such as the Sth time slot) in the current time period when the product recommendation for the target object is made, the target time range can be determined. For example, the time slot in the current time period and the corresponding time slot in the previous time period can be determined as the target time range, such as determining the Sth time slot in the previous time period as the target time range.

[0129] The behavior information can include the number of times the object clicks to view the product details, and can also include the quantity of products purchased by the object, etc., which is not limited here. The behavior feature value of each product is used to reflect the response of the object set to each product within the target time range. For example, the behavior feature value can be the click volume (or click-through rate) of each product within the target time range, and the behavior feature value can also be the purchase volume (or conversion volume) of each product within the target time range, etc., which is not limited here. It can be understood that the larger the behavior feature value of the product, the better the response of the objects in the object set to the product, and the smaller the behavior feature value of the product, the worse the response of the objects in the object set to the product.

[0130] ③ Delete the products with behavior feature values less than or equal to the behavior threshold from the product recommendation list of the target object to obtain the products recommended for the target object. The behavior threshold can be the minimum value of the behavior feature value required to recommend the products in the product recommendation list to the target object, that is, when the behavior feature value is less than the behavior threshold, the product with a behavior feature value less than the behavior threshold will not be recommended. That is to say, the products with behavior feature values greater than the behavior threshold in the product recommendation list can be determined as the products recommended for the target object.

[0131] It can be understood that, generally, an object may be interested in different products at different times. For example, each object generally has different preferences during holidays and working days. Therefore, this application can determine the preference of each object for each product within the target time range based on the behavior information of each object, so as to reduce the recommendation of products that generally receive a poor response from each object, thereby enhancing the flexibility of product recommendation and improving the conversion rate of recommended products.

[0132] Optionally, this application can also determine the behavior characteristic value corresponding to each product according to the behavior information of multiple objects in the object category of the target object within the target time range. Thus, the products recommended for the target object can be determined through the behavior feedback of objects in the same category as the target object for each product, so as to more accurately recommend products that the target object is interested in.

[0133] In a possible implementation manner, when determining the products recommended for the target object according to the recommendation index for each product, corresponding weights can also be determined for the recommendation indexes corresponding to different products, so as to facilitate the determination of a more appropriate product recommendation list. In one embodiment, determining the products recommended for the target object from the multiple products based on the recommendation index of the target object for each product may include the following steps:

[0134] ① Obtain the social relationship graph of the target object, and determine multiple associated objects of the target object according to the social relationship graph of the target object. This social relationship graph can be used to represent the social relationship of the target object. The social relationship graph may include multiple nodes and at least one edge. Each node represents an object, and each edge is used to connect two nodes, indicating that there is an association relationship between the objects corresponding to the two connected nodes. In one embodiment, the association relationship between objects can be determined through the contacts in the social software of the object. For example, if object A and object B establish a friendship relationship in the social software, it means that there is an association relationship between the two objects, which can be represented in the social relationship graph as an edge existing between the nodes corresponding to object A and object B.

[0135] In one embodiment, the associated objects are some objects that are closely associated with the target object. Specifically, it can be reflected by the number of connecting edges between the nodes of the target object in the social relationship graph. Then, determining multiple associated objects of the target object according to the social relationship graph of the target object can be: determining the nodes with the number of connecting edges between the nodes corresponding to the target object in the social relationship graph of the target object less than or equal to the edge threshold as associated nodes; and determining the objects corresponding to the associated nodes as the associated objects of the target object. Among them, the edge threshold is used to indicate the maximum number of connecting edges required to determine a node as an associated node, and this associated node is a node that is relatively closely associated with the target object. It can be understood that the smaller the number of connecting edges between a node and the target object (greater than 0), the closer the association with the target object, that is, the higher the degree of association; the larger the number of connecting edges between a node and the target object or even no connecting edges, the less close the association with the target object, that is, the lower the degree of association. For example, in the social relationship graph, there is a connecting edge between node A and node B, there is a connecting edge between node B and node C, and there is no connecting edge between node A and node C. Then the number of connecting edges between node A and node C is 2. If the edge threshold is 3, then both node B and node C can be determined as the associated nodes of node A, and the degree of association between node A and node B is greater than the degree of association between node A and node C.

[0136] ② Based on the holding characteristics of each associated object for each product and the degree of association between each associated object and the target object, determine the index weight of the target object for each product. Among them, the holding characteristics for each product can be expressed as the number of purchases, the quantity purchased, etc. of multiple associated objects for each product, and there is no limitation here. As described above, the degree of association between each associated object and the target object can be reflected by the number of connecting edges between the corresponding nodes, which will not be elaborated here. This index weight can be the weight determined for the recommendation index of each product when recommending products based on the recommendation index. In one embodiment, different degrees of association can be represented by different degree values. The higher the degree of association, the larger the corresponding degree value; the lower the degree of association, the smaller the corresponding degree value. Furthermore, for any product, the holding characteristics of each associated object can be weighted and averaged with the corresponding degree value to obtain the index weight corresponding to this any product.

[0137] ③Based on the recommendation index and index weight of each product for the target object, determine the products recommended for the target object from multiple products. In one embodiment, the recommendation index of each product can be weighted respectively using the index weight of each product, such as performing a multiplication operation, and then determine the product recommendation list for the target object according to the top K products sorted by the weighted recommendation index, so as to determine the products recommended for the target object according to the product recommendation list of the target object. It can be understood that generally, each object may be influenced to a certain extent in the selection of products due to reasons such as "being planted grass" by friend recommendations and sharing of product purchase experiences. Therefore, when determining the products to be recommended, the consideration of the social relationship of the target object in product recommendation can be introduced, and specifically, this can be achieved by introducing index weights, which helps to recommend products that the user is more interested in.

[0138] The entire data processing process is described below in conjunction with the drawings. Please refer to Figure 5 , Figure 5 which is a schematic diagram of a data processing process provided by an embodiment of the present application. S501: Data input. This data can be the original data used for model training and testing. S502: Data processing. It can be understood that for the data to be used for training and testing, the data needs to be converted into numerical data, and then the data can be processed through the above data processing method. S503: Data partitioning. Data partitioning is used to indicate that the data is divided into a training data set (as shown in S503-1 in Figure 5 ) and a test data set (as shown in S503-2 in Figure 5 ). The training data set and the test data set adopt the same data processing method and label annotation method. S504: Calculate the results of the statistical model. Calculating the results of the statistical model is also the second probability set corresponding to each object category. S505: Product prediction model training. This product prediction model training can be based on the training data set shown in S503-1 in Figure 5 to train the initial product prediction model to obtain the trained product prediction model. S506: Test metric calculation. In this step, the test metrics, that is, the above-mentioned coverage accuracy and ranking accuracy, can be determined using the results of the statistical model and the first probability set of each test object determined by the product prediction model. If the test fails, it can return to step S502 to process the obtained original object data and then train the product prediction model again. If the test passes, S507: Save the product prediction model and statistical results can be executed. Then, when it is necessary to determine the recommended products for the object, S508: Determine the recommended products for the target object is executed. Specifically, the saved product prediction model can be called to determine the first probability set, and the second probability set corresponding to the object category can be obtained from the statistical results, so as to determine the products to be recommended based on the first probability set and the second probability set.

[0139] By adopting the embodiment of the present application, a test data set for a product prediction model can be obtained, and the product prediction model can be called to process the test object information of each test object in the test data set, so as to obtain a first probability set corresponding to each test object. Moreover, a second probability set corresponding to each test object is determined according to the object category of each test object. The first probability set and the second probability set may respectively include a first purchase probability for each product and a second purchase probability for the product. Furthermore, a test product recommendation list is determined based on the first probability set and the second probability set, so as to test the product prediction model based on the test product recommendation list. For example, test metrics are determined based on the test product recommendation list for testing. On the one hand, when determining the product recommendation list, in addition to determining the purchase probability of each product (i.e., the first purchase probability) based on the object information, the purchase probability of each product (i.e., the second purchase probability) can also be determined based on the object category of the object. Thus, two purchase probabilities are fused to determine the product recommendation list. Therefore, it is not necessary to obtain a large amount of object information, and the accuracy of product recommendation can be improved to a certain extent. On the other hand, when testing the product prediction model, test metrics are determined based on the determined product recommendation list, which can better detect whether the product prediction model meets the requirements. Subsequently, product recommendation can be performed based on the product prediction model that passes the test, which helps to improve the accuracy of product recommendation.

[0140] Please refer to Figure 6 , Figure 6 which is a schematic structural diagram of a data processing device provided by an embodiment of the present application. Optionally, the data processing device may be disposed in the above-mentioned electronic device. As Figure 6 shown, the data processing device described in this embodiment may include:

[0141] An acquisition unit 601, configured to acquire a test data set for a product prediction model. The test data set includes test object information of at least one test object and a test label for each test object. The test label is used to indicate the products purchased by the test object, and each test object in the test data set is associated with a corresponding object category;

[0142] A processing unit 602, configured to call the product prediction model to process the test object information of each test object, so as to obtain a first probability set corresponding to each test object. The first probability set includes a first purchase probability for each product in the product library;

[0143] The processing unit 602 is further configured to determine a second probability set corresponding to each test object according to the object category of each test object. The second probability set includes a second purchase probability for the product by the test object for each product;

[0144] The processing unit 602 is further configured to determine a test product recommendation list for each test object according to the first probability set and the second probability set of each test object, and determine test metrics based on the test product recommendation list of each test object and the test label of each test object;

[0145] If the test metrics meet the test conditions, the processing unit 602 is further configured to determine that the product prediction model passes the test, and use the product prediction model that has passed the test to recommend products for the object.

[0146] In one implementation, the processing unit 602 is specifically configured to:

[0147] Obtain the product holding information of at least one object in each object category in the object set, and determine the purchase data for each product corresponding to each object category according to the product holding information of at least one object in each object category; the object set includes a plurality of objects, each object is associated with a corresponding object category, and all of the at least one test object belong to the object set;

[0148] According to the purchase data of each product corresponding to each object category, determine the second purchase probability of each product corresponding to each object category, and obtain the second probability set corresponding to each object category;

[0149] Respectively determine the second probability set corresponding to each object category of each test object as the second probability set corresponding to each test object.

[0150] In one implementation, the processing unit 602 is further configured to:

[0151] Obtain the original object data of a plurality of original objects, and determine the feature values of each original object for a plurality of feature dimensions according to the original object data of each original object, so as to obtain the object feature sequence of each original object; the feature dimension is used to indicate the dimension required for product recommendation;

[0152] Determine the label corresponding to each original object according to the products purchased by each original object;

[0153] Determine at least one training object from the plurality of original objects, and determine a training data set according to the object feature sequence of the at least one training object and the label corresponding to each training object;

[0154] Train an initial product prediction model according to the training data set to obtain the product prediction model;

[0155] The processing unit 602 is specifically configured to:

[0156] Determine the at least one test object from the multiple original objects, and determine a training data set according to the object feature sequence of the at least one test object and the label corresponding to each test object.

[0157] In one implementation, the test metric includes coverage accuracy; the processing unit 602 is specifically configured to:

[0158] Obtain the number of verification test objects in the at least one test object, where the test product recommendation list corresponding to the verification test object has the product indicated by the test label;

[0159] Determine the coverage accuracy according to the number of verification test objects and the number of test objects in the test object set.

[0160] In one implementation, the test metric includes ranking accuracy; the processing unit 602 is specifically configured to:

[0161] Determine the ranking index of each test object according to the position order of the product indicated by the test label of each test object in the test product recommendation list;

[0162] Determine the ranking accuracy according to the average value of the ranking indexes of the at least one test object.

[0163] In one implementation, the test product recommendation list of any test object is determined according to the recommendation index obtained by fusing the first purchase probability and the second purchase probability of the test object for each product. The processing unit 602 is specifically configured to:

[0164] Obtain the object information of the target object that needs product recommendation and the object category of the target object;

[0165] Call the product prediction model that has passed the test to process the object information of the target object to obtain the first probability set corresponding to the target object, and determine the second probability set corresponding to the target object according to the object category of the target object;

[0166] Fuse the first purchase probability and the second purchase probability of each product in the first probability set and the second probability set of the target object to obtain the recommendation index of the target object for each product;

[0167] Determine the products recommended for the target object from the multiple products based on the recommendation index of the target object for each product.

[0168] In one implementation, the processing unit 602 is specifically configured to:

[0169] Obtain the social relationship graph of the target object, and determine multiple associated objects of the target object according to the social relationship graph of the target object;

[0170] Based on the holding characteristics of each associated object for each type of product and the degree of association between each associated object and the target object, determine the index weight of the target object for each type of product;

[0171] According to the recommendation index and index weight of the target object for each type of product, determine the products recommended for the target object from the multiple types of products.

[0172] In one implementation, the processing unit 602 is specifically configured to:

[0173] Determine the product recommendation list of the target object according to the recommendation index of the target object for each type of product;

[0174] According to the behavior information of multiple objects in the object set for each type of product within the target time range, determine the behavior characteristic value corresponding to each product;

[0175] Delete the products whose behavior characteristic values are less than or equal to the behavior threshold from the product recommendation list of the target object, and obtain the products recommended for the target object.

[0176] Please refer to Figure 7 , Figure 7 FIG. is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device described in this embodiment includes: a processor 701 and a memory 702. Optionally, the electronic device may further include structures such as a network interface or a power supply module. Data can be exchanged between the above-mentioned processor 701 and memory 702.

[0177] The above-mentioned processor 701 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0178] The above network interface may include an input device and / or an output device. For example, the input device may be a control panel, a microphone, a receiver, etc., and the output device may be a display screen, a transmitter, etc. This is not listed one by one here.

[0179] The above memory 702 may include a read-only memory and a random access memory, and provide program instructions and data to the processor 701. A part of the memory 702 may also include a non-volatile random access memory. Among them, when the processor 701 calls the program instructions, it is used to execute:

[0180] Obtain a test data set for the product prediction model. The test data set includes test object information of at least one test object and a test label for each test object. The test label is used to indicate the products purchased by the test object. Each test object in the test data set is associated with a corresponding object category;

[0181] Call the product prediction model to process the test object information of each test object to obtain a first probability set corresponding to each test object. The first probability set includes a first purchase probability for each product in the product library;

[0182] Determine a second probability set corresponding to each test object according to the object category of each test object. The second probability set includes a second purchase probability of the test object for each product;

[0183] Determine a test product recommendation list for each test object according to the first probability set and the second probability set of each test object, and determine a test index based on the test product recommendation list of each test object and the test label of each test object;

[0184] If the test index meets the test conditions, it is determined that the product prediction model passes the test, and the product prediction model that passes the test is used to recommend products for the object.

[0185] In one implementation, the processor 701 is specifically used for:

[0186] Obtain the product holding information of at least one object under each object category in the object set, and determine the purchase data corresponding to each object category for each product according to the product holding information of at least one object under each object category; the object set includes multiple objects, each object is associated with a corresponding object category, and all of the at least one test object belong to the object set;

[0187] Determine the second purchase probability of each object category for each product based on the purchase data of each product for each object category, and obtain the second probability set corresponding to each object category;

[0188] Respectively determine the second probability set corresponding to each test object as the second probability set corresponding to each test object according to the second probability set corresponding to the object category of each test object.

[0189] In one implementation, the processor 701 is further configured to:

[0190] Obtain the original object data of multiple original objects, and determine the feature values of each original object for multiple feature dimensions according to the original object data of each original object, so as to obtain the object feature sequence of each original object; the feature dimensions are used to indicate the dimensions required for product recommendation reference;

[0191] Determine the label corresponding to each original object according to the products purchased by each original object;

[0192] Determine at least one training object from the multiple original objects, and determine the training data set according to the object feature sequence of the at least one training object and the label corresponding to each training object;

[0193] Train the initial product prediction model according to the training data set to obtain the product prediction model;

[0194] The processor 701 is specifically configured to:

[0195] Determine the at least one test object from the multiple original objects, and determine the training data set according to the object feature sequence of the at least one test object and the label corresponding to each test object.

[0196] In one implementation, the test metric includes coverage accuracy; the processor 701 is specifically configured to:

[0197] Obtain the number of verification test objects in the at least one test object, and there is a product indicated by the test label in the test product recommendation list corresponding to the verification test object;

[0198] Determine the coverage accuracy according to the number of verification test objects and the number of test objects in the test object set.

[0199] In one implementation, the test metric includes ranking accuracy; the processor 701 is specifically configured to:

[0200] Determine the sorting index of each test object according to the position order of the products indicated by the test tags of each test object in the test product recommendation list;

[0201] Determine the sorting accuracy rate according to the average value of the sorting indexes of the at least one test object.

[0202] In one implementation, the test product recommendation list of any test object is determined according to the recommendation index obtained by fusing the first purchase probability and the second purchase probability of the test object for each product. The processor 701 is specifically configured to:

[0203] Obtain the object information of the target object for which product recommendation is required and the object category of the target object;

[0204] Call the product prediction model that has passed the test to process the object information of the target object to obtain the first probability set corresponding to the target object, and determine the second probability set corresponding to the target object according to the object category of the target object;

[0205] Fuse the first purchase probability and the second purchase probability of each product in the first probability set and the second probability set of the target object to obtain the recommendation index of the target object for each product;

[0206] Determine the products recommended for the target object from the multiple products based on the recommendation index of the target object for each product.

[0207] In one implementation, the processor 701 is specifically configured to:

[0208] Obtain the social relationship graph of the target object, and determine multiple associated objects of the target object according to the social relationship graph of the target object;

[0209] Determine the index weight of the target object for each product based on the holding characteristics of each associated object for each product and the degree of association between each associated object and the target object;

[0210] Determine the products recommended for the target object from the multiple products according to the recommendation index and index weight of the target object for each product.

[0211] In one implementation, the processor 701 is specifically configured to:

[0212] Determine the product recommendation list of the target object according to the recommendation index of the target object for each product;

[0213] Determine the behavior characteristic value corresponding to each product according to the behavior information of multiple objects in the object set within the target time range for each product;

[0214] Delete the products whose behavior characteristic values are less than or equal to the behavior threshold from the product recommendation list of the target object to obtain the products recommended for the target object.

[0215] Optionally, when the program instruction is executed by the processor, other steps of the method in the foregoing embodiments may also be implemented, which will not be elaborated here.

[0216] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. The computer program includes program instructions. When the program instructions are executed by the processor, the processor executes the foregoing method, such as the method executed by the foregoing electronic device, which will not be elaborated here.

[0217] Optionally, the storage medium involved in this application, such as a computer-readable storage medium, may be non-volatile or volatile.

[0218] Optionally, the computer-readable storage medium may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system, application programs required for at least one function, etc.; the data storage area may store data created according to the use of blockchain nodes, etc. Among them, the blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. Blockchain, essentially a decentralized database, is a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity (anti-counterfeiting) of the information and generate the next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, etc.

[0219] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, some steps may be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0220] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium, and the storage medium can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, etc.

[0221] The embodiments of the present application also provide a computer program product or a computer program. The computer program product or the computer program includes computer instructions. When the computer instructions are executed by a processor, some or all of the steps in the above methods can be implemented. For example, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device (i.e., the above-mentioned electronic device) reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps performed in the embodiments of the above various methods. For example, the computer device can be a terminal or a server.

[0222] The above has introduced in detail a data processing method, device, electronic device, program product and medium provided by the embodiments of the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. A data processing method, characterized in that, The method includes: Obtain a test data set for a product prediction model, where the test data set includes test object information of at least one test object and test labels for each test object, the test labels are used to indicate the products purchased by the test object, and each test object in the test data set is associated with a corresponding object category; Call the product prediction model to process the test object information of each test object, and obtain a first probability set corresponding to each test object, where the first probability set includes a first purchase probability for each product in the product library; Determine a second probability set corresponding to each test object according to the object category of each test object, where the second probability set includes a second purchase probability for each test object for each product; Determine a test product recommendation list for each test object according to the first probability set and the second probability set of each test object, and determine a test metric based on the test product recommendation list of each test object and the test labels of each test object; If the test metric meets the test condition, determine that the product prediction model passes the test, and use the product prediction model that has passed the test to recommend products for the object.

2. The method according to claim 1, wherein The determining the second probability set corresponding to each test object according to the object category of each test object includes: Obtain the product holding information of at least one object under each object category in the object set, and determine the purchase data for each product corresponding to each object category according to the product holding information of at least one object under each object category; the object set includes a plurality of objects, each object is associated with a corresponding object category, and all of the at least one test object belong to the object set; Determine the second purchase probability for each product corresponding to each object category according to the purchase data of each object category for each product, and obtain the second probability set corresponding to each object category; Respectively determine the second probability set corresponding to the object category of each test object as the second probability set corresponding to each test object.

3. The method according to claim 1, wherein The method further includes: Obtain the original object data of a plurality of original objects, and determine the feature values of each original object for a plurality of feature dimensions according to the original object data of each original object, so as to obtain the object feature sequence of each original object; the feature dimensions are used to indicate the dimensions required for product recommendation; Determine the label corresponding to each original object according to the products purchased by each original object; Determine at least one training object from the plurality of original objects, and determine a training data set according to the object feature sequence of the at least one training object and the label corresponding to each training object; Train an initial product prediction model according to the training data set to obtain the product prediction model; The obtaining the test data set for the product prediction model includes: Determine the at least one test object from the plurality of original objects, and determine a training data set according to the object feature sequence of the at least one test object and the label corresponding to each test object.

4. The method according to claim 1, wherein The test metrics include coverage accuracy rate; determining the test metrics based on the test product recommendation list of each test object and the test label of each test object includes: Obtaining the number of verification test objects among the at least one test object, where the product indicated by the test label exists in the test product recommendation list corresponding to the verification test object; Determining the coverage accuracy rate according to the number of verification test objects and the number of test objects in the test object set.

5. The method according to claim 1, wherein The test metrics include sorting accuracy rate; determining the test metrics based on the test product recommendation list of each test object and the test label of each test object includes: Determining the sorting index of each test object according to the position order of the product indicated by the test label of each test object in the test product recommendation list; Determining the sorting accuracy rate according to the average value of the sorting indexes of the at least one test object.

6. The method according to any one of claims 1-5, characterized in that, The test product recommendation list of any test object is determined according to the recommendation index obtained by fusing the first purchase probability and the second purchase probability of the test object for each product; using the product prediction model that has passed the test to recommend products for an object includes: Obtaining the object information of the target object that needs to be recommended for products and the object category of the target object; Invoking the product prediction model that has passed the test to process the object information of the target object to obtain the first probability set corresponding to the target object, and determining the second probability set corresponding to the target object according to the object category of the target object; Fusing the first purchase probability and the second purchase probability of each product in the first probability set and the second probability set of the target object to obtain the recommendation index of the target object for each product; Determining the products recommended for the target object from the multiple products based on the recommendation index of the target object for each product.

7. The method according to claim 6, wherein Determining the products recommended for the target object from the multiple products based on the recommendation index of the target object for each product includes: Obtaining the social relationship graph of the target object, and determining multiple associated objects of the target object according to the social relationship graph of the target object; Determining the index weight of the target object for each product based on the holding characteristics of each associated object for each product and the degree of association between each associated object and the target object; Determining the products recommended for the target object from the multiple products according to the recommendation index and index weight of the target object for each product.

8. The method according to claim 6, wherein Determining the products recommended for the target object from the multiple products based on the recommendation index of the target object for each product includes: Determining the product recommendation list of the target object according to the recommendation index of the target object for each product; Determining the behavior feature value corresponding to each product according to the behavior information of multiple objects in the object set within the target time range for each product; Delete the products with behavior feature values less than or equal to the behavior threshold from the product recommendation list of the target object, and obtain the products recommended for the target object.

9. A data processing device, characterized in that, The device includes: An acquisition unit, configured to acquire a test data set for a product prediction model, where the test data set includes test object information of at least one test object and test labels of each test object, the test labels are used to indicate the products purchased by the test object, and each test object in the test data set is associated with a corresponding object category; A processing unit, configured to call the product prediction model to process the test object information of each test object, and obtain a first probability set corresponding to each test object, where the first probability set includes a first purchase probability for each product in the product library; The processing unit is further configured to determine a second probability set corresponding to each test object according to the object category of each test object, where the second probability set includes a second purchase probability of the test object for each product; The processing unit is further configured to determine a test product recommendation list for each test object according to the first probability set and the second probability set of each test object, and determine a test index based on the test product recommendation list of each test object and the test label of each test object; The processing unit is further configured to, if the test index meets the test condition, determine that the product prediction model passes the test, and use the product prediction model that passes the test to recommend products for the object.

10. An electronic device, characterized in that, It includes a processor and a memory. The memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1-8.

11. A computer program product, characterized in that, It includes computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1-8 is implemented.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to execute the method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Insurance product recommendation method, device and equipment based on probability prediction model

    CN113657495A

  • Data recommendation method, electronic equipment and storage medium

    CN115033777A