A method and system for building a recommendation service
By pre-building material libraries, behavior libraries, and algorithm libraries, data and algorithms for the target scenario can be directly obtained, solving the problem of low efficiency in building recommendation systems and enabling rapid construction and performance improvement of recommendation services.
Patent Information
- Application Number
- CN202110457587.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-26
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2041-04-26
AI Technical Summary
The existing recommendation system is inefficient to build, mainly because the collection of sample data and the selection of algorithms are time-consuming, resulting in an excessively long time to build the recommendation service.
Pre-build a material library, behavior library, and algorithm library. Based on the target scenario, directly obtain material data, behavior data, and algorithms from the library to build a target recommendation slot, enabling rapid construction of recommendation services.
By reducing data collection and algorithm selection time, the efficiency of building recommendation services has been significantly improved, the building time has been reduced, and the performance of recommendation services has been enhanced.
Smart Images

Figure CN112948702B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of recommendation, in particular, to a method and system for building a recommendation service. BACKGROUND
[0002] With the rapid development of the Internet, the amount of network information is gradually increasing, and users are difficult to obtain the information they really care about from a large amount of information. Therefore, with the increase of network information, the information acquisition efficiency is lower, and the recommendation system can help people quickly locate the information they care about. Therefore, in recent years, the research and development of the recommendation system have attracted more and more attention of relevant personnel.
[0003] The existing recommendation task, for different scenes, prepares a large amount of sample data in advance, the collection of the sample data needs to consume a lot of time, then selects a training algorithm, and finally trains the algorithm based on the sample data. Preparing data, selecting an algorithm, and training an algorithm need to consume a lot of time, especially preparing data, which makes the building efficiency of the recommendation system low. SUMMARY
[0004] The purpose of the embodiment of the present application is to provide a method and system for building a recommendation service, to solve the technical problem of low building efficiency of the recommendation system in the prior art.
[0005] In a first aspect, a method for building a recommendation service is provided, comprising:
[0006] According to the target scene, target material data corresponding to the target scene is obtained from a material library, and target behavior data corresponding to the target scene is obtained from a behavior library;
[0007] A target algorithm is obtained from an algorithm library;
[0008] Based on the target material data, the target behavior data, and the target algorithm, a target recommendation slot is obtained, so that the recommendation service corresponding to the target scene is built based on the material data, the behavior data, and the algorithm stored in the target recommendation slot.
[0009] The above method for building a recommendation service, since the material library, the behavior library, and the algorithm library are constructed in advance, when it is necessary to build a recommendation service for a certain application scene, material data, behavior data, and an algorithm can be directly obtained from the material library, the behavior library, and the algorithm library, so that a target recommendation slot is obtained based on the material data, the behavior data, and the algorithm, and the building of the recommendation service is realized. Since it is not necessary to spend time to collect material data, behavior data, and select an algorithm for the application scene, the building time of the recommendation service is greatly reduced, and the building efficiency of the recommendation service is improved.
[0010] In one embodiment, the material library includes at least one material table, and the behavior library includes at least one behavior table; the target material data corresponding to the target scene is obtained from the material library and the target behavior data corresponding to the target scene is obtained from the behavior library according to the target scene, including: obtaining the target material table corresponding to the target scene from the at least one material table according to the target scene; obtaining the target material data from the target material table; obtaining the target behavior table corresponding to the target material table from the at least one behavior table according to the target material table; and obtaining the target behavior data from the target behavior table.
[0011] The above embodiment considers that although the material library stores material data and behavior data of various application scenes, if these data are randomly stored, it will take some time to find the material data and behavior data of a certain scene when the material data and behavior data of the scene are needed. Therefore, a method for querying material data and behavior data corresponding to a target scene is provided, which establishes a correspondence between a scene and a material table, realizes fast querying of the material table according to the correspondence, and improves the efficiency of obtaining material data.
[0012] In one embodiment, the algorithm library includes a plurality of algorithms; the target algorithm is obtained from the algorithm library, including: obtaining the target algorithm corresponding to the target scene from the plurality of algorithms according to the target scene.
[0013] The above embodiment considers that different algorithms can be suitable for different application scenes, so that a more suitable algorithm is selected for different application scenes to improve the performance of the recommended service.
[0014] In one embodiment, the target algorithm includes a plurality of algorithms; the target recommendation slot is obtained based on the target material data, the target behavior data and the target algorithm, including: building a preliminary recommendation slot based on the target material data, the target behavior data and each algorithm in the target algorithm; calculating a recommendation performance score of each preliminary recommendation slot; and taking the preliminary recommendation slot with the highest recommendation performance score as the target recommendation slot.
[0015] The above embodiment constructs a plurality of recommendation slots for a certain application scene, and then selects one recommendation slot as a target recommendation slot, so as to obtain a recommended service with better performance in a certain scene.
[0016] In an embodiment, the target material data includes a plurality of material training data and a plurality of material test data, and the target behavior data includes a plurality of behavior training data and a plurality of behavior test data; the calculation of the recommendation performance score of each of the preliminary recommendation slots includes: training the algorithm in the preliminary recommendation slot based on the plurality of material training data and the plurality of behavior training data in the preliminary recommendation slot to obtain a preliminary algorithm; inputting the plurality of material test data and the plurality of behavior test data in the preliminary recommendation slot into the preliminary algorithm in the preliminary recommendation slot to obtain a test behavior material table; obtaining a real behavior material table, the real behavior material table recording a real correspondence between each of the behavior test data and each of the material test data; and determining the recommendation performance score of the preliminary recommendation slot according to the correspondence recorded in the real behavior material table and the test behavior material table.
[0017] The above embodiment divides the target material data and the target behavior data into training data and test data, then trains the algorithm in the preliminary recommendation slot according to the training data, and determines the performance of the algorithm according to the test data, thereby realizing the training and testing of the algorithm.
[0018] In an embodiment, the correspondence includes positive correspondence and negative correspondence, the positive correspondence indicates that the predicted result corresponding to the behavior test data is the material test data, and the negative correspondence indicates that the predicted result corresponding to the behavior test data is not the material test data; and the determining of the recommended performance score of the preliminary recommended slot according to the correspondence recorded in the real behavior material table and the test behavior material table includes: if the correspondence between the current behavior test data and the current material test data recorded in the real behavior material table is positive correspondence, and the correspondence between the current behavior test data and the current material test data recorded in the test behavior material table is positive correspondence, then the correspondence between the current behavior test data and the current material test data recorded in the test behavior material table is marked as correct relationship; if the correspondence between the current behavior test data and the current material test data recorded in the real behavior material table is positive correspondence, and the correspondence between the current behavior test data and the current material test data recorded in the test behavior material table is negative correspondence, then the correspondence between the current behavior test data and the current material test data recorded in the test behavior material table is marked as correct error relationship; if the correspondence between the current behavior test data and the current material test data recorded in the real behavior material table is negative correspondence, and the correspondence between the current behavior test data and the current material test data recorded in the test behavior material table is positive correspondence, then the correspondence between the current behavior test data and the current material test data recorded in the test behavior material table is marked as error correct relationship; and the recommended performance score of the preliminary recommended slot is obtained based on the number of correct relationship, correct error relationship and error correct relationship marked in the test behavior material table.
[0019] The above embodiment provides a high-precision recommended performance score method, which comprehensively considers the number of correct relationship, correct error relationship and error correct relationship in the test behavior material table, and has better accuracy than the method of simply considering correct relationship.
[0020] In a second aspect, a system for building a recommendation service is provided, which includes:
[0021] a data management unit and a recommended slot configuration unit;
[0022] The data management unit is provided with a material library, a behavior library and an algorithm library;
[0023] The recommendation slot configuration unit is configured to configure a recommendation slot, the recommendation slot including a material slot, a behavior slot and an algorithm slot, the material slot being configured to store material data obtained from the material library, the behavior slot being configured to store behavior data obtained from the behavior library, and the algorithm slot being configured to store algorithm data obtained from the algorithm library.
[0024] The recommendation slot configuration unit is configured to obtain target material data corresponding to a target scenario from the material library and target behavior data corresponding to the target scenario from the behavior library according to the target scenario.
[0025] The recommendation slot configuration unit is further configured to obtain a target algorithm from the algorithm library, and obtain a target recommendation slot based on the target material data, the target behavior data and the target algorithm, so as to build a recommendation service corresponding to the target scenario based on material data, behavior data and algorithms stored in the target recommendation slot.
[0026] In an embodiment, the target algorithm includes a plurality of algorithms, the recommendation slot configuration unit is further configured to store the target material data, the target behavior data and each of the algorithms in the target algorithm into the material slot, the behavior slot and the algorithm slot of the recommendation slot to obtain a preliminary recommendation slot, and the recommendation slot configuration unit is further configured to calculate a recommendation performance score of each of the preliminary recommendation slots, and to select a preliminary recommendation slot with the highest recommendation performance score as the target recommendation slot.
[0027] In an embodiment, the system further includes a visualization unit, the visualization unit being provided with a material operation unit, a behavior operation unit and an algorithm operation unit, the material operation unit being configured to determine an operation type of a material operation when the material operation is detected, and to perform a corresponding material operation according to the operation type of the material operation, the behavior operation unit being configured to determine an operation type of a behavior operation when the behavior operation is detected, and to perform a corresponding behavior operation according to the operation type of the behavior operation, and the algorithm operation unit being configured to determine an operation type of an algorithm operation when the algorithm operation is detected, and to perform a corresponding algorithm operation according to the operation type of the algorithm operation.
[0028] In an embodiment, the system further includes a communication unit, the communication unit being configured to obtain online behavior data corresponding to the target scenario, and to input the online behavior data into the target recommendation slot, the target recommendation slot being further configured to input the online behavior data and material data in the target recommendation slot as an input of an algorithm in the target recommendation slot, to obtain recommended material data output by the algorithm in the target recommendation slot, and to send the recommended material data to the communication unit, and the communication unit being further configured to feed back the recommended material data. BRIEF DESCRIPTION OF DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly introduced as follows. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0030] Figure 1 The implementation flowchart of the method for building a recommendation service provided by the embodiments of the present application is shown in the figure.
[0031] Figure 2 The schematic diagram of the correspondence between the target behavior data and the target material data provided by the embodiments of the present application is shown in the figure.
[0032] Figure 3 The schematic diagram of the test behavior material table and the real behavior material table provided by the embodiments of the present application is shown in the figure.
[0033] Figure 4 The schematic diagram of the composition structure of the system 400 for building a recommendation service provided by the embodiments of the present application is shown in the figure.
[0034] Figure 5 The schematic diagram of the visual interface provided by the embodiments of the present application is shown in the figure. DETAILED DESCRIPTION
[0035] The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.
[0036] The execution subject of the method for building a recommendation service described in the embodiments of the present application is a device capable of implementing the method for building a recommendation service described in the embodiments of the present application. The device can include but is not limited to a terminal and a server. The terminal includes a desktop terminal and a mobile terminal. The desktop terminal includes but is not limited to a desktop computer and a vehicle-mounted computer. The mobile terminal includes but is not limited to a mobile phone, a tablet computer, a notebook computer and a smart watch. The server includes a high-performance computer and a high-performance computer cluster.
[0037] Figure 1 The method for building a recommendation service provided by the embodiments of the present application includes:
[0038] In step 100, according to a target scene, target material data corresponding to the target scene is obtained from a material library, and target behavior data corresponding to the target scene is obtained from a behavior library.
[0039] The target scenario is a scenario that needs to be applied for the recommendation service. For example, the target scenario is a scenario corresponding to a funny video APP; for another example, the target scenario is a shopping APP scenario.
[0040] The material library stores a large amount of material data under multiple scenarios; the behavior library stores a large amount of behavior data under multiple scenarios. The behavior data indicates user behavior; the material data is the output of the recommendation service based on user behavior, that is, the material data is information recommended by the recommendation service to the user based on user behavior, which can be commodity information, video information, article information, etc.
[0041] The target material data specifically includes multiple material data, and the target behavior data specifically includes multiple behavior data. One material data or behavior data can include multiple data items. For example, in a video scenario, Tables 1 (material data under a video scenario) and 2 (behavior data under a video scenario) provide an example of material data and behavior data, and one material data or behavior data includes 5 data items.
[0042] Table 1
[0043]
[0044] Table 2
[0045]
[0046]
[0047] For different application scenarios, material data and behavior data are collected, for example, multiple network interfaces are provided, and material data and behavior data are collected through these network interfaces.
[0048] Since the material library and the behavior library pre-store material data and behavior data under multiple scenarios, when a recommendation service needs to be built, relevant data corresponding to the application scenario can be directly obtained from the material library and the behavior library according to the application scenario, greatly saving the time of collecting data and improving the efficiency of building the service.
[0049] Step 200, obtaining a target algorithm from an algorithm library.
[0050] The target algorithm is a recommendation algorithm needed for building a recommendation service corresponding to the target scenario. The algorithm library stores multiple recommendation algorithms, and when building the recommendation service, the target algorithm is directly obtained from the algorithm library for training, reducing the time spent on algorithm selection. The target algorithm can be one algorithm or multiple algorithms.
[0051] At step 300, a target recommendation slot is obtained based on the target material data, the target behavior data and the target algorithm, so as to build the recommendation service corresponding to the target scene based on the material data, the behavior data and the algorithm stored in the target recommendation slot.
[0052] The target recommendation slot is a recommendation slot needed for building the recommendation service corresponding to the target scene. The recommendation slot is used for storing material data, behavior data and algorithm. The building of the recommendation service needs three basic units: material, behavior and algorithm. Therefore, the material, the behavior and the algorithm are integrated in a recommendation slot, so as to build the recommendation service through the recommendation slot.
[0053] It can be understood that, since the target recommendation slot stores the material data, the behavior data and the algorithm, after the three basic units of the recommendation service are obtained, that is, after the recommendation slot is obtained, the algorithm in the target recommendation slot can be trained based on the material data and the behavior data, to obtain a trained algorithm. Since the algorithm in the target recommendation slot has been trained, the recommendation service is also built accordingly. Thereafter, when a recommendation task needs to be performed, online behavior data is obtained, the online behavior data is input into the target recommendation slot, material data output by the algorithm in the target recommendation slot is obtained, and the material data is fed back to a user, so as to complete the recommendation task.
[0054] The above method of building the recommendation service, since the material library, the behavior library and the algorithm library are constructed in advance, when the recommendation service needs to be built for a certain application scene, the material data, the behavior data and the algorithm can be directly obtained from the material library, the behavior library and the algorithm library, so as to obtain the target recommendation slot based on the material data, the behavior data and the algorithm, and to build the recommendation service. Since it is not necessary to spend time to collect the material data, the behavior data and the algorithm of the application scene, the building time of the recommendation service is greatly reduced, and the building efficiency of the recommendation service is improved.
[0055] In one embodiment, considering that although material data and behavior data of various application scenarios are stored in the material library, if the data is randomly stored, it will take some time to find the material data and behavior data of a certain scenario when the material data and behavior data of the scenario are needed, therefore, a method for querying material data and behavior data corresponding to a target scenario is provided, the method establishes a correspondence between the scenario and the material table, and realizes fast querying of the material table according to the correspondence, and the target material data is obtained from the material table, thereby improving the efficiency of obtaining material data. Specifically, the material library includes at least one material table, and the behavior library includes at least one behavior table; step 100 comprises:
[0056] Step 101, according to the target scenario, the target material table corresponding to the target scenario is obtained from the at least one material table.
[0057] The material table is used to store a plurality of material data under a certain application scenario, wherein the plurality refers to two or more. The target material table is a material table for storing material data under a target scenario.
[0058] Exemplarily, a correspondence between the scenario and the material table is established in advance, specifically, a scenario-material table comparison table is set, as shown in Table 3, the scenario-material table comparison table records the correspondence between the scenario and the material table, and it can be seen that the target material table corresponding to the target scenario can be quickly found through the correspondence, and the material table stores a plurality of material data, so the target material data can be quickly obtained.
[0059] Table 3
[0060]
[0061] Exemplarily, the material table is named according to the target scenario, for example, the naming method of the material table is: scenario-material table, therefore, for a video scenario, the material table is named: video-material table; for a shopping scenario, the material table is named: shopping-material table. It can be seen that according to the naming, the target material table corresponding to the target scenario can be quickly found from the plurality of material tables in the material library.
[0062] Step 102, the target material data is obtained from the target material table.
[0063] According to actual needs, all material data in the target material table can be used as target material data, or part of the material data in the target material table can be used as target material data.
[0064] Step 103, obtaining a target behavior table corresponding to the target material table from the at least one behavior table according to the target material table.
[0065] Since the material table in different scenarios may have different behaviors, for example, the behavior corresponding to the material table in the video scenario may be to pause the video, and the behavior corresponding to the material table in the shopping scenario may be to click to purchase, therefore, the correspondence between the material table and the behavior table is established, so that the behavior table can be quickly obtained according to the material table. For example, a material behavior comparison table is set, which is used to record the correspondence between the material table and the behavior table; for another example, the behavior table is named according to the material table, specifically, the material table is: scene-material table, and the behavior table is named as: scene-material behavior table, for example, in the video scene, the material table is named as: video-material table, and the behavior table is named as: video-material behavior table.
[0066] Step 104, obtaining the target behavior data from the target behavior table.
[0067] According to actual needs, all behavior data in the target behavior table can be used as target behavior data, or part of the behavior data in the target behavior table can be used as target behavior data.
[0068] In one embodiment, different algorithms can be suitable for different application scenarios, therefore, for different application scenarios, an algorithm more suitable for the scenario is selected to improve the performance of the recommendation service. Specifically, the algorithm library includes a plurality of algorithms; step 200 includes:
[0069] According to the target scene, a target algorithm corresponding to the target scene is obtained from the plurality of algorithms.
[0070] The correspondence between the scene and the algorithm is established in advance, so that according to the correspondence, the target algorithm corresponding to the target scene can be quickly obtained from the plurality of algorithms. For example, a scene algorithm comparison table is established, which records the correspondence between the application scene and the algorithm.
[0071] In one embodiment, a plurality of recommendation slots are constructed for a certain application scenario, and then one of the recommendation slots is selected as a target recommendation slot, so that a recommendation service with better performance in a certain scene is obtained. Specifically, the target algorithm includes a plurality of algorithms; step 300 includes:
[0072] Step 301, based on the target material data, the target behavior data, and each algorithm in the target algorithm, a preliminary recommendation slot is built.
[0073] For the target scenario, multiple algorithms are obtained. The target material data, target behavior data, and one of the multiple algorithms are then stored in the material slot, behavior slot, and algorithm slot in the preliminary recommendation slots, thus obtaining the constructed preliminary recommendation slots. Therefore, the number of preliminary recommendation slots is equal to the number of algorithms included in the target algorithm.
[0074] Step 302: Calculate the recommendation performance score of each of the preliminary recommendation slots.
[0075] The recommendation performance score indicates the performance of the recommendation service obtained through the preliminary recommendation slot. The higher the recommendation performance score, the better the recommendation performance of the recommendation service. The lower the recommendation performance score, the worse the recommendation performance of the recommendation service.
[0076] For each preliminary recommendation slot, the target material data and target behavior data are used as the input of the recommendation algorithm in the preliminary recommendation slot to obtain the output of the recommendation algorithm. The output of the recommendation algorithm is the correspondence between the target behavior data and the target material data. The correspondence includes positive correspondence and negative correspondence. A positive correspondence indicates that the prediction result corresponding to a certain behavior data is a certain material data, and a negative correspondence indicates that the prediction result corresponding to a certain behavior data is not a certain material data. Figure 2 As shown, a row indicates the correspondence between a certain target behavior data and 9 target material data, a positive correspondence is represented by 1, and a negative correspondence is represented by 0.
[0077] For example, the number of predicted correct correspondences (including predicted correct positive correspondences and predicted correct negative correspondences) is divided by the sum of correspondences (the sum of correspondences is the sum of positive correspondences and negative correspondences) to obtain the recommendation performance score of the preliminary recommendation slot. Figure 2 As shown, assuming that the checked ones are incorrectly predicted correspondences, the number is 7, and the sum of positive correspondences and negative correspondences is 9×9=81. Therefore, there are 74 correctly predicted correspondences, and the recommendation performance score is: 74 / 81.
[0078] Step 303: The preliminary recommendation slot with the highest recommendation performance score is used as the target recommendation slot.
[0079] The highest recommendation performance score indicates that the recommendation service built by this preliminary recommendation slot is the best. Therefore, this preliminary recommendation slot is used as the target recommendation slot.
[0080] In one embodiment, the plurality of data in the target material data and the target behavior data are divided into training data and test data, and then the algorithm in the preliminary recommendation slot is trained according to the training data, and the performance of the algorithm is determined according to the test data, so as to realize the training and test of the algorithm. Specifically, the target material data includes a plurality of material training data and a plurality of material test data, and the target behavior data includes a plurality of behavior training data and a plurality of behavior test data; step 302 calculates the recommendation performance score of each preliminary recommendation slot, including:
[0081] Step 302A, based on the plurality of material training data and the plurality of behavior training data in the preliminary recommendation slot, the algorithm in the preliminary recommendation slot is trained to obtain a preliminary algorithm.
[0082] The plurality of material training data and the plurality of behavior training data in the preliminary recommendation slot are used as the input of the recommendation algorithm in the preliminary recommendation slot, and the recommendation algorithm is trained, and the trained recommendation algorithm is used as the preliminary algorithm.
[0083] Step 302B, input the plurality of material test data and the plurality of behavior test data in the preliminary recommendation slot into the preliminary algorithm in the preliminary recommendation slot to obtain a test behavior material table.
[0084] The test behavior material table is output by the preliminary algorithm according to the material test data and the behavior test data, and reflects the corresponding relationship between each behavior test data and each material test data in the preliminary recommendation slot. Since the corresponding relationship is output by the preliminary algorithm, the corresponding relationship is not a real corresponding relationship, but a prediction of the corresponding relationship.
[0085] Step 302C, obtain a real behavior material table, which records the real corresponding relationship between each behavior test data and each material test data.
[0086] For example, manually annotate the corresponding relationship between each behavior test data and each material test data to obtain a real behavior material table.
[0087] Step 302D, according to the corresponding relationship recorded in the real behavior material table and the test behavior material table, determine the recommendation performance score of the preliminary recommendation slot.
[0088] Since the real behavior material table records the real corresponding relationship between each behavior test data and each material test data, the calculation of the recommendation performance score of the preliminary recommendation slot can be realized based on the real behavior material table.
[0089] In one embodiment, a method for providing a high-precision recommended performance score is provided, which comprehensively considers the number of correct relationships, correct error relationships and error correct relationships in the test behavior material table, and the recommended performance score obtained by simply considering the correct relationships has better accuracy.
[0090] Specifically, the correspondence relationship includes positive correspondence relationship and negative correspondence relationship, the positive correspondence relationship indicates that the prediction result corresponding to the behavior test data is the material test data, and the negative correspondence relationship indicates that the prediction result corresponding to the behavior test data is not the material test data. That is, when the correspondence relationship between the behavior data and the material data is the positive correspondence relationship, the output corresponding to the behavior data is the material data, and the material data is recommended to the user with such behavior, and when the correspondence relationship between the behavior data and the material data is the negative correspondence relationship, the output corresponding to the behavior data is not the material data, that is, the material data is not recommended to the user with such behavior.
[0091] Step 302D, determining the recommended performance score of the preliminary recommended slot according to the correspondence relationship recorded in the real behavior material table and the test behavior material table, includes:
[0092] Step 302D1, if the correspondence relationship between the current behavior test data and the current material test data recorded in the real behavior material table is the positive correspondence relationship, and the correspondence relationship between the current behavior test data and the current material test data recorded in the test behavior material table is the positive correspondence relationship, the correspondence relationship between the current behavior test data and the current material test data recorded in the test behavior material table is marked as the correct relationship.
[0093] When the correspondence relationship between a certain behavior test data and a certain material test data is the positive correspondence relationship in both the real behavior material table and the test behavior material table, it is considered that the recommended result output by the recommendation algorithm is completely correct, and then the correspondence relationship between the behavior test data and the material test data in the test behavior material table is marked as the correct relationship, as shown as TP. Figure 3
[0094] Step 302D2, if the correspondence relationship between the current behavior test data and the current material test data recorded in the real behavior material table is the positive correspondence relationship, and the correspondence relationship between the current behavior test data and the current material test data recorded in the test behavior material table is the negative correspondence relationship, the correspondence relationship between the current behavior test data and the current material test data recorded in the test behavior material table is marked as the correct error relationship.
[0095] When the correspondence between a certain behavior test data and a certain material test data is positive correspondence in the real behavior-material table and is negative correspondence in the test behavior-material table, it is considered that the recommended result output by the recommendation algorithm is incorrect, and thus the correspondence between the behavior test data and the material test data is marked as correct error relationship in the test behavior-material table, as shown in Figure 3
[0096] In step 302D3, if the correspondence between the current behavior test data and the current material test data recorded in the real behavior-material table is negative correspondence, and the correspondence between the current behavior test data and the current material test data recorded in the test behavior-material table is positive correspondence, the correspondence between the current behavior test data and the current material test data recorded in the test behavior-material table is marked as error correct relationship.
[0097] When the correspondence between a certain behavior test data and a certain material test data is negative correspondence in the real behavior-material table and is positive correspondence in the test behavior-material table, it is considered that the recommended result output by the recommendation algorithm is incorrect, and thus the correspondence between the behavior test data and the material test data is marked as error correct relationship in the test behavior-material table, as shown in Figure 3
[0098] In step 302D4, the recommendation performance score of the preliminary recommendation slot is obtained based on the number of correct relationships, correct error relationships and error correct relationships marked in the test behavior-material table.
[0099] The first recommendation performance score is calculated according to the number of correct relationships and the number of error correct relationships marked in the test behavior-material table.
[0100] The first recommendation performance score reflects the probability that the actual positive correspondence is among all the predicted positive correspondences, wherein the predicted positive correspondences include correct relationships and error correct relationships, and the actual positive correspondences include correct relationships. For example, the first recommendation score P = TP / (TP+FP), wherein TP is the correct relationship and FP is the error correct relationship. As shown in Figure 3 The first recommendation performance score is 6 / (6+6) = 0.5.
[0101] The second recommendation performance score is calculated according to the number of correct relationships and the number of correct error relationships marked in the test behavior-material table.
[0102] A second recommended performance score reflecting a probability of being predicted as a positive correspondence in a correspondence that is actually a positive correspondence, wherein the correspondence that is actually a positive correspondence and is predicted as a positive correspondence includes a correct relationship, and the correspondence that is actually a positive correspondence but is predicted as a negative correspondence includes a correct error relationship. For example, the second recommended performance score R = TP / (TP + FN), wherein TP is the correct relationship and FN is the correct error relationship. As shown in Figure 3 the first recommended performance score is: 6 / (6+4) = 0.6.
[0103] According to the first recommended performance score and the second recommended performance score, a recommended performance score of the preliminary recommended slot is calculated.
[0104] The recommended performance score F of the preliminary recommended slot comprehensively measures the first recommended performance score and the second recommended performance score, so that the calculation of the recommended performance score is more accurate. For example, the recommended performance score F of the preliminary recommended slot = (2xPxR) / (P+R). As shown in Figure 3 the recommended performance score of the preliminary recommended slot is: (2x0.5x0.6) / (0.5+0.6) = 0.545.
[0105] In one embodiment, as shown in Figure 4 a system 400 for building a recommended service is provided, the system 400 comprising: a data management unit 410 and a recommended slot configuration unit 420;
[0106] The data management unit 410 is provided with a material library 411, a behavior library 412, and an algorithm library 413;
[0107] The recommended slot configuration unit 420 is configured to configure a recommended slot 421, wherein the recommended slot 421 comprises a material slot 4211, a behavior slot 4212, and an algorithm slot 4213. The material slot 41211 is configured to store material data obtained from the material library 411. The behavior slot 4212 is configured to store behavior data obtained from the behavior library 412. The algorithm slot 4213 is configured to store algorithm data obtained from the algorithm library 413.
[0108] The recommended slot configuration unit 420 is configured to obtain target material data corresponding to a target scene from the material library 411 and target behavior data corresponding to the target scene from the behavior library 412 according to the target scene.
[0109] The recommendation slot configuration unit 420 is further configured to obtain a target algorithm from the algorithm library 413, and obtain a target recommendation slot based on the target material data, the target behavior data and the target algorithm, so as to build the recommended service corresponding to the target scene based on the material data, the behavior data and the algorithm stored in the target recommendation slot.
[0110] The system for building the recommended service described above, since the material library, the behavior library and the algorithm library are constructed in advance, when it is necessary to build the recommended service for a certain application scene, the material data, the behavior data and the algorithm can be directly obtained from the material library, the behavior library and the algorithm library, so as to obtain the target recommendation slot based on the material data, the behavior data and the algorithm, and realize the building of the recommended service. Since it is not necessary to spend time to collect the material data, the behavior data and the algorithm of the application scene, the building time of the recommended service is greatly reduced, and the building efficiency of the recommended service is improved.
[0111] In an embodiment, the material library includes at least one material table, and the behavior library includes at least one behavior table; the recommendation slot configuration unit 420 is further configured to obtain a target material table corresponding to the target scene from the at least one material table according to the target scene, obtain the target material data from the target material table, and obtain a target behavior table corresponding to the target material table from the at least one behavior table according to the target material table, and obtain the target behavior data from the target behavior table.
[0112] In an embodiment, the algorithm library includes a plurality of algorithms; the recommendation slot configuration unit 420 is further configured to obtain a target algorithm corresponding to the target scene from the plurality of algorithms according to the target scene.
[0113] In an embodiment, the target algorithm includes a plurality of algorithms; the recommendation slot configuration unit 420 is further configured to store each of the target material data, the target behavior data and the algorithms in the target algorithm into a material slot 4211, a behavior slot 4212 and an algorithm slot 4213 of a recommendation slot 421, to obtain a preliminary recommendation slot; the recommendation slot configuration unit 420 is further configured to calculate a recommendation performance score of each of the preliminary recommendation slots; and the recommendation slot configuration unit 420 is further configured to take the preliminary recommendation slot with the highest recommendation performance score as a target recommendation slot.
[0114] In an embodiment, the target material data includes a plurality of material training data and a plurality of material test data, and the target behavior data includes a plurality of behavior training data and a plurality of behavior test data; the recommendation slot configuration unit 420 is further configured to train the algorithm in the preliminary recommendation slot based on the plurality of material training data and the plurality of behavior training data in the preliminary recommendation slot, to obtain a preliminary algorithm; input the plurality of material test data and the plurality of behavior test data in the preliminary recommendation slot into the preliminary algorithm in the preliminary recommendation slot, to obtain a test behavior material table; obtain a real behavior material table, which records the real corresponding relationship between each behavior test data and each material test data; and determine the recommendation performance score of the preliminary recommendation slot according to the corresponding relationship recorded in the real behavior material table and the test behavior material table.
[0115] In an embodiment, the corresponding relationship includes positive corresponding relationship and negative corresponding relationship, the positive corresponding relationship indicates that the prediction result corresponding to the behavior test data is the material test data, and the negative corresponding relationship indicates that the prediction result corresponding to the behavior test data is not the material test data; the recommendation slot configuration unit 420 is further configured to, if the corresponding relationship between the current behavior test data and the current material test data recorded in the real behavior material table is the positive corresponding relationship, and the corresponding relationship between the current behavior test data and the current material test data recorded in the test behavior material table is the positive corresponding relationship, mark the corresponding relationship between the current behavior test data and the current material test data recorded in the test behavior material table as correct relationship; if the corresponding relationship between the current behavior test data and the current material test data recorded in the real behavior material table is the positive corresponding relationship, and the corresponding relationship between the current behavior test data and the current material test data recorded in the test behavior material table is the negative corresponding relationship, mark the corresponding relationship between the current behavior test data and the current material test data recorded in the test behavior material table as correct error relationship; if the corresponding relationship between the current behavior test data and the current material test data recorded in the real behavior material table is the negative corresponding relationship, and the corresponding relationship between the current behavior test data and the current material test data recorded in the test behavior material table is the positive corresponding relationship, mark the corresponding relationship between the current behavior test data and the current material test data recorded in the test behavior material table as error correct relationship; and obtain the recommendation performance score of the preliminary recommendation slot based on the number of correct relationship, correct error relationship and error correct relationship marked in the test behavior material table.
[0116] In an embodiment, the system 400 further includes a visualization unit, which is provided with a material operation unit, a behavior operation unit and an algorithm operation unit.
[0117] The material operation unit is configured to determine an operation type of the material operation when detecting the material operation, and perform a corresponding material operation according to the type of the material operation;
[0118] The behavior operation unit is configured to determine an operation type of the behavior operation when detecting the behavior operation, and perform a corresponding behavior operation according to the type of the behavior operation;
[0119] The algorithm operation unit is configured to determine an operation type of the algorithm operation when detecting the algorithm operation, and perform a corresponding algorithm operation according to the type of the algorithm operation.
[0120] The visualization unit includes a visualization interface, such as the visualization interface shown in FIG. 6. Figure 5 The visualization interface includes a triangle button, a square button, a circle button, and a diamond button. The material operation unit, the behavior operation unit, and the algorithm operation unit each include the triangle button, the square button, the circle button, and the diamond button. The material operation is an operation performed on the triangle button, the square button, the circle button, and the diamond button in the material operation unit; the behavior operation is an operation performed on the triangle button, the square button, the circle button, and the diamond button in the behavior operation unit; and the algorithm operation is an operation performed on the triangle button, the square button, the circle button, and the diamond button in the algorithm operation unit. Different buttons correspond to different operation types. The triangle button corresponds to a viewing type; the square button corresponds to an adding data type; the circle button corresponds to a deleting data type; and the diamond button corresponds to a modifying data type. When an administrator clicks the triangle button corresponding to a certain library, the administrator can enter the library to view data; when the administrator clicks the square button corresponding to a certain library, the administrator can enter the library to add data; when the administrator clicks the circle button corresponding to a certain library, the administrator can enter the library to delete data; and when the administrator clicks the diamond button corresponding to a certain library, the administrator can enter the library to modify data.
[0121] In one embodiment, different administrators have different permissions, and a high-permission administrator can perform all operations on the three libraries, and a low-permission administrator can only perform part of the operations, thereby improving system security. The material operation unit is configured to determine the operation type of the material operation and the permission of the administrator when detecting the material operation, and determine whether to perform the corresponding material operation according to the type of the material operation and the permission of the administrator; the behavior operation unit is configured to determine the operation type of the behavior operation and the permission of the administrator when detecting the behavior operation, and determine whether to perform the corresponding behavior operation according to the type of the behavior operation and the permission of the administrator; and the algorithm unit is configured to determine the operation type of the algorithm operation and the permission of the administrator when detecting the algorithm operation, and determine whether to perform the corresponding algorithm operation according to the type of the algorithm operation and the permission of the administrator.
[0122] In one embodiment, online behavior data can be obtained after the recommended service is built, and feedback can be performed based on the online behavior data, so that the user experiences the recommended service. The system 400 further includes a communication unit;
[0123] The communication unit is configured to obtain online behavior data corresponding to the target scene, and input the online behavior data into the target recommendation slot;
[0124] The target recommendation slot is further configured to input the online behavior data and the material data in the target recommendation slot as inputs of the algorithm in the target recommendation slot, obtain recommended material data output by the algorithm in the target recommendation slot, and send the recommended material data to the communication unit;
[0125] The communication unit is further configured to feed back the recommended material data.
[0126] Online behavior data, which is behavior data of a user obtained after a recommended service is published; recommended material data, which is material data that needs to be recommended to the user based on the online behavior data; and recommended material data, which is material data in the target recommendation slot.
[0127] In one embodiment, if there are too many recommended material data that need to be recommended, only part of the recommended material data can be fed back when feeding back. Specifically, the communication unit is further configured to feed back a second preset number of recommended material data when the number of the recommended material data is greater than a first preset number, and the first preset number is greater than the second preset number.
[0128] In one embodiment, after the recommendation service is published, the user can not be satisfied with the recommended item, at this time, the user can feed back the place where he is not satisfied, after the system 400 obtains the recommendation opinion, the recommendation algorithm is updated based on the opinion in a period of time, so that the updated recommendation algorithm is more in line with the user's preference. Specifically, the communication unit is also used to obtain a recommendation opinion, the recommendation opinion is the user's opinion on the recommended material data recommended by the system 400; the recommendation opinion is sent to the target recommendation slot, and the algorithm in the target recommendation slot is updated based on the recommendation opinion obtained in a predetermined time period.
[0129] It should be noted that the above method of building a recommendation service and the system of building a recommendation service belong to one general inventive concept, and the contents in the embodiments of the method of building a recommendation service and the system of building a recommendation service can be mutually applicable. The functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part. In this paper, relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. The above is only an embodiment of the present application and is not used to limit the protection scope of the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for building a recommendation service, characterized in that: include: According to the target scenario, target material data corresponding to the target scenario is obtained from the material library and target behavior data corresponding to the target scenario is obtained from the behavior library; Get the target algorithm from the algorithm library; Based on the target material data, the target behavior data and the target algorithm, a target recommendation slot is obtained, so as to build a recommendation service corresponding to the target scenario based on the material data, behavior data and algorithm stored in the target recommendation slot; The target algorithm includes multiple algorithms; obtaining the target recommendation slot based on the target material data, the target behavior data and the target algorithm includes: Building a preliminary recommendation slot based on the target material data, the target behavior data, and each of the target algorithms; Calculating a recommendation performance score for each of the preliminary recommendation slots; The preliminary recommendation slot with the highest recommendation performance score is used as the target recommendation slot; The target material data includes a plurality of material training data and a plurality of material test data, and the target behavior data includes a plurality of behavior training data and a plurality of behavior test data; and the step of calculating the recommendation performance score of each of the preliminary recommendation slots includes: Based on the multiple material training data and the multiple behavior training data in the preliminary recommendation slot, the algorithm in the preliminary recommendation slot is trained to obtain a preliminary algorithm; Inputting a plurality of material test data and a plurality of behavior test data in the preliminary recommendation slot into a preliminary algorithm in the preliminary recommendation slot to obtain a test behavior material table; Obtaining a real behavior material table, wherein the real behavior material table records the real correspondence between each behavior test data and each material test data; The recommendation performance score of the preliminary recommendation slot is determined according to the correspondence between the real behavior material table and the test behavior material table.
2. The method according to claim 1, wherein The material library includes at least one material table, and the behavior library includes at least one behavior table; and obtaining target material data corresponding to the target scenario from the material library and obtaining target behavior data corresponding to the target scenario from the behavior library according to the target scenario includes: According to the target scenario, obtaining a target material table corresponding to the target scenario from the at least one material table; Acquire the target material data from the target material table; According to the target material table, obtaining a target behavior table corresponding to the target material table from the at least one behavior table; The target behavior data is obtained from the target behavior table.
3. The method according to claim 1, wherein The algorithm library includes multiple algorithms; obtaining the target algorithm from the algorithm library includes: According to the target scenario, a target algorithm corresponding to the target scenario is acquired from the multiple algorithms.
4. The method according to claim 1, wherein The correspondence includes a positive correspondence and a negative correspondence, wherein the positive correspondence indicates that the prediction result corresponding to the behavior test data is the material test data, and the negative correspondence indicates that the prediction result corresponding to the behavior test data is not the material test data; The determining of the recommendation performance score of the preliminary recommendation slot according to the correspondence between the real behavior material table and the test behavior material table includes: If the correspondence between the current behavior test data and the current material test data recorded in the real behavior material table is a positive correspondence, and the correspondence between the current behavior test data and the current material test data recorded in the test behavior material table is a positive correspondence, then the correspondence between the current behavior test data and the current material test data recorded in the test behavior material table is marked as a correct relationship; If the correspondence between the current behavior test data and the current material test data recorded in the real behavior material table is a positive correspondence, and the correspondence between the current behavior test data and the current material test data recorded in the test behavior material table is a negative correspondence, then the correspondence between the current behavior test data and the current material test data recorded in the test behavior material table is marked as a true-false relationship; If the correspondence between the current behavior test data and the current material test data recorded in the real behavior material table is a negative correspondence, and the correspondence between the current behavior test data and the current material test data recorded in the test behavior material table is a positive correspondence, then the correspondence between the current behavior test data and the current material test data recorded in the test behavior material table is marked as an incorrect correct relationship; Based on the number of correct relationships, correct-incorrect relationships, and incorrect-correct relationships marked in the test behavior material table, a recommendation performance score of the preliminary recommendation slot is obtained.
5. A system for building a recommendation service, characterized in that: The system includes: a data management unit and a recommended slot configuration unit; The data management unit is provided with a material library, a behavior library and an algorithm library; The recommendation slot configuration unit is used to configure the recommendation slots, which include material slots, behavior slots, and algorithm slots. The material slots are used to store material data obtained from the material library, the behavior slots are used to store behavior data obtained from the behavior library, and the algorithm slots are used to store algorithm data obtained from the algorithm library. The recommendation slot configuration unit is used to obtain target material data corresponding to the target scenario from the material library and target behavior data corresponding to the target scenario from the behavior library according to the target scenario; The recommendation slot configuration unit is further configured to obtain a target algorithm from the algorithm library, and obtain a target recommendation slot based on the target material data, the target behavior data, and the target algorithm, so as to build a recommendation service corresponding to the target scenario based on the material data, behavior data, and algorithm stored in the target recommendation slot; Wherein, the target algorithm includes multiple algorithms; The recommendation slot configuration unit is further configured to store the target material data, the target behavior data, and each of the target algorithms into the material slot, the behavior slot, and the algorithm slot of the recommendation slot to obtain a preliminary recommendation slot; The recommendation slot configuration unit is further configured to calculate a recommendation performance score for each of the preliminary recommendation slots; The recommendation slot configuration unit is further configured to use the preliminary recommendation slot with the highest recommendation performance score as the target recommendation slot; Wherein, the target material data of the material library includes a plurality of material training data and a plurality of material test data, and the target behavior data of the behavior library includes a plurality of behavior training data and a plurality of behavior test data; The recommendation slot configuration unit calculates the recommendation performance score of each preliminary recommendation slot, including: Based on the multiple material training data and the multiple behavior training data in the preliminary recommendation slot, the algorithm in the preliminary recommendation slot is trained to obtain a preliminary algorithm; Inputting a plurality of material test data and a plurality of behavior test data in the preliminary recommendation slot into a preliminary algorithm in the preliminary recommendation slot to obtain a test behavior material table; Obtaining a real behavior material table, wherein the real behavior material table records the real correspondence between each behavior test data and each material test data; The recommendation performance score of the preliminary recommendation slot is determined according to the correspondence between the real behavior material table and the test behavior material table.
6. The system according to claim 5, wherein: The system further includes a visualization unit, wherein the visualization unit is provided with a material operation unit, a behavior operation unit and an algorithm operation unit; The material operation unit is used to determine the operation type of the material operation when a material operation is detected, and perform a corresponding material operation according to the type of the material operation; The behavior operation unit is used to determine the operation type of the behavior operation when a behavior operation is detected, and perform a corresponding behavior operation according to the type of the behavior operation; The algorithm operation unit is used to determine the operation type of the algorithm operation when an algorithm operation is detected, and perform a corresponding algorithm operation according to the type of the algorithm operation.
7. The system according to claim 5, wherein: The system further comprises a communication unit; The communication unit is used to obtain online behavior data corresponding to the target scenario and input the online behavior data into the target recommendation slot; The target recommendation slot is further configured to use the online behavior data and the material data in the target recommendation slot as inputs to an algorithm in the target recommendation slot, obtain recommended material data output by the algorithm in the target recommendation slot, and send the recommended material data to the communication unit; The communication unit is further configured to feed back the recommended material data.
Citation Information
Patent Citations
Service providing method and device, electronic equipment and storage medium
CN112000326A
Standardized recommendation algorithm construction method and system based on news scene
CN112612972A