Recommendation method and device, electronic equipment and storage medium

By receiving the recommendation request from the terminal, obtain the object information of the candidate object and multiple preset feature templates, fill in the feature values ​​of the object features and customer features in the feature template, find the statistical values ​​in the preset database, build the feature vector and The preset recommendation model is used to generate recommendation scores, which solves the problems of high and low efficiency of existing recommendation systems, and achieves more accurate user recommendations and reduces development costs.

CN119397093APending Publication Date: 2025-02-07CSC FINANCIAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411439926.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

Due to the different requirements for input data in different recommendation models, existing recommendation systems have high development costs and low efficiency, and require manual customized development of the construction algorithm for input data.

Method used

By receiving the recommendation request from the terminal, obtain the object information of the candidate object and multiple preset feature templates, fill in the feature values ​​of the object features and customer features in the feature template, find the statistical values ​​in the preset database, build the feature vector and Generate recommended scores using the preset recommendation model.

Benefits of technology

It reduces the development cost of recommended methods, improves development efficiency, reduces the need for manual customized development, and achieves more accurate user recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397093A_ABST
    Figure CN119397093A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a recommendation method and device, electronic equipment and a storage medium, and relates to the technical field of data processing, and the technical scheme comprises the steps that a recommendation request sent by a terminal is received, and the recommendation request comprises user information; then, according to the object information of each candidate object, the feature value of the object feature included in each feature template is filled in, according to the user information, the feature value of the customer group feature included in each feature template is filled in, and a feature representation formed after each feature template is filled in is obtained; searching a statistical value represented by each feature from a preset database; and then constructing a feature vector by using each statistical value searched based on each candidate object, and generating a recommendation score of the candidate object based on the feature vector by using a preset recommendation model. And then selecting a preset number of candidate objects as recommended objects according to a sequence of the recommendation scores from high to low, and sending the recommended objects to the terminal. The development cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a recommendation method, device, electronic device and storage medium. Background Art

[0002] By analyzing the correlation between customer group information and candidate recommendation object information, users' preferences for candidate recommendation objects can be obtained, so as to more accurately recommend objects that users may be interested in from the candidate recommendation objects. This makes this correlation analysis technology widely used in various personalized recommendation systems, such as advertising recommendation systems and financial product recommendation systems. Current recommendation systems generally use recommendation models to predict the user's interest in each candidate recommendation object, and then recommend the predicted candidate recommendation objects with higher interest to the user.

[0003] However, different recommendation systems currently use different recommendation models, and different recommendation models have different requirements for input data. For example, the dimensions of the input data of different recommendation models are different, and the meaning of each data included in the input data is different. Therefore, each recommendation system needs to manually customize the input data construction algorithm based on the recommendation model used. For example, the construction algorithm is: obtain the number of clicks and browsing time of the user on the candidate recommendation objects A to Z each day in the previous three days, and then construct the obtained clicks and browsing time as input data. It can be seen that the development cost of this method is high and the efficiency is low. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a recommendation method, device, electronic device and storage medium to reduce the development cost of the recommendation method. The specific technical solution is as follows:

[0005] In a first aspect of an embodiment of the present application, a recommendation method is provided, the method comprising:

[0006] receiving a recommendation request sent by a terminal, wherein the recommendation request includes user information;

[0007] Obtaining object information of each candidate object and a plurality of preset feature templates, wherein each feature template includes a time window feature, a customer group feature, an object feature, and an event feature, wherein the feature value of the time window feature represents a preset time period, and the feature value of the event feature represents a preset operation event;

[0008] For each candidate object, fill in the feature value of the object feature included in each feature template according to the object information of the candidate object, and fill in the feature value of the customer group feature included in each feature template according to the user information, so as to obtain a feature representation formed after each feature template is filled in;

[0009] For each feature representation, searching a preset database for a statistical value of a preset operation event performed by a user represented by the customer group feature on an object represented by the object feature within a preset time period included in the feature representation;

[0010] For each candidate object, construct a feature vector using the statistical values ​​found based on the candidate object, and generate a recommendation score for the candidate object based on the feature vector using a preset recommendation model;

[0011] Select a preset number of candidate objects as recommended objects in descending order of recommendation scores;

[0012] The recommended object is sent to the terminal.

[0013] Optionally, the user information and the object information each include at least one parameter; and filling in the feature value of the object feature included in each feature template according to the object information of the candidate object includes:

[0014] For each feature template, searching for a parameter name that is the same as the feature name of the object feature included in the feature template from the parameter names of the parameters included in the object information of the candidate object, and recording the feature value of the object feature in the feature template as the parameter value corresponding to the parameter name;

[0015] The feature values ​​of the customer group features included in each feature template are filled in according to the user information, including:

[0016] For each feature template, the parameter name identical to the feature name of the customer group feature included in the feature template is searched from the parameter names of the parameters included in the user information, and the feature value of the customer group feature is recorded in the feature template as the parameter value corresponding to the parameter name.

[0017] Optionally, searching a preset database for statistical values ​​of preset operation events performed by users represented by the customer group characteristics on objects represented by the object characteristics within a preset time period included in the characteristic representation, includes:

[0018] According to the multiple feature values ​​included in the feature representation, fill in the preset query template to obtain the query key;

[0019] The statistical value corresponding to the query key is searched from the preset database.

[0020] Optionally, the feature template further includes a serial number feature, a feature value of the serial number feature represents a position corresponding to a statistical value found based on the feature template in the feature vector, and the recommendation model is a linear model; and constructing a feature vector using the statistical values ​​found based on the candidate object includes:

[0021] Sort the statistical values ​​according to the feature values ​​of the sequence features included in each feature template;

[0022] The sorted statistical values ​​are constructed as the feature vector.

[0023] Optionally, the feature template further includes a weight feature, the feature value of the weight feature is a weight of a statistical value found based on the feature template, and the recommendation model is a linear model; and using a preset recommendation model to generate a recommendation score for the candidate object based on the feature vector includes:

[0024] The feature vector and the weights of the statistical values ​​included in the feature vector are input into the recommendation model, and the recommendation model calculates the product of each statistical value included in the feature vector and its own weight to obtain the weighted value of each statistical value, and generates a recommendation score for the candidate object based on the weighted values ​​of the statistical values.

[0025] Optionally, the feature template further includes at least one of the following features: a category feature and a scene feature; the feature value of the category feature is a preset object category; the feature value of the scene feature represents a preset scene in which a preset operation event is located;

[0026] The customer group feature includes at least one of the following sub-features: user identification sub-feature, age sub-feature, education level sub-feature, region sub-feature and risk level sub-feature;

[0027] The object feature includes at least one of the following sub-features: a keyword sub-feature and an industry sub-feature;

[0028] The preset operation event includes at least one of the following operation events: click, add to favorite list, watch and buy.

[0029] Optionally, the method further includes:

[0030] If the time window feature, object feature and event feature in any feature template are empty, then the feature value of the customer group feature included in the feature template is obtained from the user information to obtain the original feature value of the customer group;

[0031] If the time window feature, customer group feature, and event feature in any feature template are empty, then for each candidate object, obtain the feature value of the object feature included in the feature template from the object information of the candidate object to obtain the original feature value of the object;

[0032] The method of constructing a feature vector by using the statistical values ​​found based on the candidate object includes:

[0033] A feature vector is constructed by using the statistical values ​​found based on the candidate object and the original feature values ​​of the customer group and / or the original feature values ​​of the object obtained based on the candidate object.

[0034] According to a second aspect of the embodiments of the present application, a recommendation device is provided, the device comprising:

[0035] A receiving module, configured to receive a recommendation request sent by a terminal, wherein the recommendation request includes user information;

[0036] An acquisition module, used to acquire object information of each candidate object and a plurality of preset feature templates, wherein each feature template includes a time window feature, a customer group feature, an object feature and an event feature, wherein the feature value of the time window feature represents a preset time period, and the feature value of the event feature represents a preset operation event;

[0037] A filling module is used to fill in the feature value of the object feature included in each feature template according to the object information of the candidate object obtained by the obtaining module, and fill in the feature value of the customer group feature included in each feature template according to the user information received by the receiving module, so as to obtain a feature representation formed after each feature template is filled in;

[0038] A search module, for searching, for each feature representation obtained by the filling module, from a preset database for a statistical value of a preset operation event performed by a user represented by the customer group feature on an object represented by the object feature within a preset time period included in the feature representation;

[0039] A generating module, for each candidate object, constructing a feature vector based on the statistical values ​​searched by the searching module for the candidate object, and generating a recommendation score for the candidate object based on the feature vector using a preset recommendation model;

[0040] A selection module, configured to select a preset number of candidate objects as recommended objects in descending order of the recommendation scores generated by the generation module;

[0041] A sending module is used to send the recommended object selected by the selection module to the terminal.

[0042] Optionally, the user information and the object information each include at least one parameter; the filling module is specifically used to:

[0043] For each feature template, searching for a parameter name that is the same as the feature name of the object feature included in the feature template from the parameter names of the parameters included in the object information of the candidate object, and recording the feature value of the object feature in the feature template as the parameter value corresponding to the parameter name;

[0044] The filling module is specifically used for:

[0045] For each feature template, the parameter name identical to the feature name of the customer group feature included in the feature template is searched from the parameter names of the parameters included in the user information, and the feature value of the customer group feature is recorded in the feature template as the parameter value corresponding to the parameter name.

[0046] Optionally, the search module is specifically used to:

[0047] According to the multiple feature values ​​included in the feature representation, fill in the preset query template to obtain the query key;

[0048] The statistical value corresponding to the query key is searched from the preset database.

[0049] Optionally, the feature template further includes a serial number feature, a feature value of the serial number feature represents a position corresponding to a statistical value found based on the feature template in the feature vector, and the recommendation model is a linear model; the generation module is specifically used to:

[0050] Sort the statistical values ​​according to the feature values ​​of the sequence features included in each feature template;

[0051] The sorted statistical values ​​are constructed as the feature vector.

[0052] Optionally, the feature template further includes a weight feature, the feature value of the weight feature is a weight of a statistical value found based on the feature template, and the recommendation model is a linear model; the generation module is specifically used to:

[0053] The feature vector and the weights of the statistical values ​​included in the feature vector are input into the recommendation model, and the recommendation model calculates the product of each statistical value included in the feature vector and its own weight to obtain the weighted value of each statistical value, and generates a recommendation score for the candidate object based on the weighted values ​​of the statistical values.

[0054] Optionally, the feature template further includes at least one of the following features: a category feature and a scene feature; the feature value of the category feature is a preset object category; the feature value of the scene feature represents a preset scene in which a preset operation event is located;

[0055] The customer group feature includes at least one of the following sub-features: user identification sub-feature, age sub-feature, education level sub-feature, region sub-feature and risk level sub-feature;

[0056] The object feature includes at least one of the following sub-features: a keyword sub-feature and an industry sub-feature;

[0057] The preset operation event includes at least one of the following operation events: click, add to favorite list, watch and buy.

[0058] The acquisition module is further used for:

[0059] If the time window feature, object feature and event feature in any feature template are empty, then the feature value of the customer group feature included in the feature template is obtained from the user information to obtain the original feature value of the customer group;

[0060] If the time window feature, customer group feature, and event feature in any feature template are empty, then for each candidate object, obtain the feature value of the object feature included in the feature template from the object information of the candidate object to obtain the original feature value of the object;

[0061] The generation module is specifically used for:

[0062] A feature vector is constructed by using the statistical values ​​found based on the candidate object and the original feature values ​​of the customer group and / or the original feature values ​​of the object obtained based on the candidate object.

[0063] According to a third aspect of an embodiment of the present application, an electronic device is provided, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0064] Memory, used to store computer programs;

[0065] The processor is used to implement the recommended method described in any one of the first aspects when executing the program stored in the memory.

[0066] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the recommendation method described in any one of the first aspects is implemented.

[0067] According to a fifth aspect of the embodiments of the present application, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the recommendation method described in any one of the first aspects.

[0068] Beneficial effects of the embodiments of the present application:

[0069] The recommendation method, device, electronic device and storage medium provided in the embodiment of the present application can fill in the feature values ​​of the customer group features and object features included in each feature template according to the user information and the object information of the candidate object to obtain the feature representation. Then, the statistical value of the user represented by the customer group feature performing the preset operation event on the object represented by the object feature within the preset time period included in the feature representation is searched from the preset database. Afterwards, a feature vector is constructed using the statistical value, and a recommendation score is generated based on the feature vector using the preset recommendation model, and the candidate object with a higher recommendation score is sent to the terminal. Since the embodiment of the present application can construct the feature vector of the input recommendation model by filling the feature value into the feature template and searching for the statistical value, and the feature template is pre-constructed and reusable, the embodiment of the present application can select the required feature template during development without the need to manually customize the acquisition algorithm of each data in the input data for the input data of the recommendation model, thereby reducing the development cost.

[0070] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0072] Figure 1 A flowchart of a recommended method provided for an embodiment of the present application;

[0073] Figure 2 An exemplary schematic diagram of a process for generating a feature representation provided in an embodiment of the present application;

[0074] Figure 3 A flowchart of another recommended method provided for an embodiment of the present application;

[0075] Figure 4 An exemplary schematic diagram of a process of generating a query key provided in an embodiment of the present application;

[0076] Figure 5 An exemplary schematic diagram of a recommendation process provided in an embodiment of the present application;

[0077] Figure 6 A schematic diagram of a recommended device provided in an embodiment of the present application;

[0078] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0079] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0080] In order to reduce the development cost of the recommendation method, the present application embodiment provides a recommendation method, which is applied to an electronic device. For example, the electronic device can be a server, a desktop computer, or a laptop computer, etc., which has data processing and communication capabilities. Figure 1 As shown, the recommended method provided in the embodiment of the present application includes the following steps:

[0081] S101: Receive a recommendation request sent by a terminal.

[0082] The terminal may send a recommendation request to the electronic device when it detects that the user has opened an application (APP), a web page, or a mini-program. Alternatively, the terminal may send a recommendation request to the electronic device when it detects that the user has triggered a recommendation instruction in the display interface of the APP, web page, or mini-program. Alternatively, the terminal may also send a recommendation request to the electronic device in other circumstances, and the embodiment of the present application does not specifically limit the timing of the terminal sending the recommendation request.

[0083] Taking the shopping scenario as an example, the terminal displays the homepage of the shopping APP, and then sends a recommendation request to the electronic device when it detects that the user clicks a product recommendation button on the homepage.

[0084] The recommendation request includes user information. For example, the user information includes at least one of the following: user identifier (ID), gender, age, education level, and user location.

[0085] S102: Obtain object information of each candidate object and a plurality of preset feature templates.

[0086] Candidate objects are pre-set objects that can be recommended, and the specific candidate objects can be set according to actual needs. For example, candidate objects can be advertisements, short videos, music, commodities or financial products.

[0087] Each feature template is used to obtain the statistical value of the operation events performed by a class of users on a class of objects within a period of time. Since each data in the input data of the recommendation model can represent the statistical value of an operation event, the developer can select the corresponding feature template in advance based on the meaning of each data in the input data of the recommendation model used in the embodiment of the present application.

[0088] Each feature template includes: time window feature, customer group feature, object feature and event feature.

[0089] The characteristic value of the time window feature represents a preset time period. For example, the preset time period is the time period from the current moment to the moment one hour before the current moment, and the time period can be referred to as the previous hour. For another example, the preset time period is the time period from the start time of the day to the current moment, and the time period can be referred to as the day.

[0090] The feature value of the event feature represents a preset operation event. The preset operation event includes at least one of the following operation events: click, add to favorite list, watch and buy. The favorite list is a list of objects selected by the user. For example, the favorite list is a list of items to be purchased selected by the user, which can also be called a shopping cart list.

[0091] S103. For each candidate object, fill in the feature value of the object feature included in each feature template according to the object information of the candidate object, and fill in the feature value of the customer group feature included in each feature template according to the user information, to obtain a feature representation formed after each feature template is filled in.

[0092] Through S103, the user information and the object information of the candidate object can be filled into the feature template, so that the filled feature template can represent: a preset operation event performed by the user represented by the user information on the object represented by the object information.

[0093] S104 . For each feature representation, search from a preset database for statistical values ​​of preset operation events performed by users represented by the customer group feature on objects represented by the object feature within a preset time period included in the feature representation.

[0094] Taking the advertising recommendation scenario as an example, the feature representation includes the time window feature of the previous hour, the customer group feature is Guangdong Province, the object feature is the financial industry, and the event feature is click; based on this feature representation, the number of clicks on financial industry advertisements by users in Guangdong Province within the previous hour of the current moment can be found from the preset database.

[0095] S105 . For each candidate object, construct a feature vector using the statistical values ​​found based on the candidate object, and generate a recommendation score for the candidate object based on the feature vector using a preset recommendation model.

[0096] The electronic device can input the feature vector of each candidate object into the recommendation model respectively to obtain the recommendation score of the candidate object output by the recommendation model.

[0097] Alternatively, the electronic device may merge the feature vectors of each candidate object, and input the merged feature vector into the recommendation model to obtain the recommendation score of each candidate object output by the recommendation model. For example, the size of the feature vector of each candidate object is 1×64, and there are 32 candidate objects, then the size of the feature vectors of each candidate object after merging is 32×64. Afterwards, the electronic device may input the merged feature vector into a preset recommendation model to obtain the recommendation score of each candidate object output by the recommendation model. For example, the output data dimension of the recommendation model is 1×32, where each value represents the recommendation score of a candidate object.

[0098] S106: Select a preset number of candidate objects as recommended objects in descending order of recommendation scores.

[0099] The preset number may be a preset value, for example, if the preset number is 3, the first three candidate objects may be selected as the recommended objects in descending order of recommendation scores.

[0100] Alternatively, the preset number may be the product of the number of candidate objects and the preset ratio. For example, if the number of candidate objects is 100 and the preset ratio is 0.1, then the preset number = 100 × 0.1 = 10, that is, the first 10 candidate objects may be selected as recommended objects in descending order of recommendation scores.

[0101] S107: Send the recommended object to the terminal.

[0102] Among them, the electronic device may send the recommended object to the terminal so that the terminal displays the recommended object in the currently displayed page. Alternatively, the electronic device may send a feedback page including the recommended object to the terminal so that the terminal displays the feedback page. Alternatively, the electronic device may also send the recommended object to the terminal in other forms, which are not specifically limited in the embodiments of the present application.

[0103] In an embodiment of the present application, the feedback page sent by the electronic device to the terminal may include other information in addition to the recommended object. Taking the shopping scenario as an example, the candidate object is an advertisement. When the terminal detects that the user has opened the shopping app, it sends a recommendation request to the electronic device. After the electronic device selects three advertisements as recommended objects, it sends the homepage of the shopping app to the terminal so that the electronic device displays the homepage. Among them, the homepage includes: the above three advertisements and information on multiple products provided by the shopping platform.

[0104] The recommendation method provided in the embodiment of the present application can fill in the feature values ​​of the customer group features and object features included in each feature template based on the user information and the object information of the candidate object to obtain the feature representation. Then, the statistical value of the user represented by the customer group feature performing the preset operation event on the object represented by the object feature within the preset time period included in the feature representation is searched from the preset database. Afterwards, a feature vector is constructed using the statistical value, and a recommendation score is generated based on the feature vector using the preset recommendation model, and the candidate object with a higher recommendation score is sent to the terminal. Since the embodiment of the present application can construct the feature vector of the input recommendation model by filling the feature value into the feature template and searching for the statistical value, and the feature template is pre-constructed and reusable, the embodiment of the present application can select the required feature template during development without the need to manually customize the acquisition algorithm of each data in the input data for the input data of the recommendation model, thereby reducing the development cost.

[0105] The following is a detailed description of the recommended method provided in the embodiments of the present application:

[0106] In the embodiment of the present application, developers can pre-build a variety of general feature templates. As described above, the feature templates include: time window features, customer group features, object features and event features. The feature values ​​included in each feature template are not exactly the same.

[0107] For example, the feature value of the time window feature of feature template a is 0, which means the current day, and the feature value of the event feature is click, which means a click operation. The feature value of the time window feature of feature template b is hour, which means the previous hour, and the feature value of the event feature is product_add_optional, which means an add to optional list operation.

[0108] Among them, the characteristic value of the event feature can not only represent the preset operation event, but also represent the statistical method of the preset operation event. For example, the characteristic value of the event feature is click, which means the number of click operations is counted; the characteristic value of the event feature is click-through rate, which means the proportion of click operations. The characteristic value of the event feature is product_add_optional, which means the number of operations of adding to a watchlist is counted.

[0109] In addition, the feature template may also include at least one of the following features: a sequence feature, a weight feature, a category feature, and a scene feature. Moreover, the feature values ​​of the sequence feature, the weight feature, the category feature, and the scene feature in the feature template may be preset.

[0110] The feature value of the sequence feature indicates the position of the statistical value found based on the feature template in the feature vector. For example, the feature value of the sequence feature is 100, which indicates the position of the 100th data in the feature vector corresponding to the statistical value found based on the feature template.

[0111] The feature value of the weight feature is the weight of the statistical value found based on the feature template. The feature value of the weight feature can be preset according to actual needs, and the value range of the feature value of the weight feature can be [0,1].

[0112] The characteristic value of the category feature is the preset object category. For example, the characteristic value of the category feature is all_item_type, which means the general category, that is, all object categories. The characteristic value of the category feature is rec_product, which means the investment advisor category.

[0113] The characteristic value of the scene feature indicates the preset scene in which the preset operation event is located. For example, the characteristic value of the scene feature is all_laneCode, which indicates that the preset operation event is in the recommendation column scene, for example, the user's click operation on the advertisement is in the recommendation page, recommendation pop-up window, or recommendation column within the page. The characteristic value of the scene feature is all (all), which indicates that the preset operation event is in a general scene, that is, all scenes provided by the specified platform, for example, the user's click operation on the advertisement is on any page of the APP, or the user's click operation on the advertisement is on any web page of the website.

[0114] On the other hand, the feature values ​​of the customer group features and object features included in the feature template are filled in real time when S103 is executed.

[0115] Each feature included in a feature template may have a feature name.

[0116] For example, the feature name of the time window feature is time (time), the feature name of the event feature is event (event), the feature name of the sequence feature is number (number), the feature name of the weight feature is weight (weight), the feature name of the category feature is category (type), and the feature name of the scene feature is source (source).

[0117] The customer group feature includes at least one of the following sub-features: user identification sub-feature, age sub-feature, education level sub-feature, region sub-feature, and risk level sub-feature. For example, the feature name of the user identification sub-feature is user (user), the feature name of the age sub-feature is age (age), the feature name of the education level sub-feature is education (edu), the feature name of the region sub-feature is province (prov), and the feature name of the risk level sub-feature is risk (risk). Among them, the age sub-feature value can represent the age group, for example, the age sub-feature value is A1, which represents children; the age sub-feature value is A2, which represents youth; the age sub-feature value is A3, which represents middle-aged; and the age sub-feature value is A4, which represents the elderly. The risk level sub-feature value represents the user's risk tolerance, for example, the risk level sub-feature value is R1, which represents cautious type; the risk level sub-feature value is R2, which represents stable type; the risk level sub-feature value is R3, which represents balanced type; the risk level sub-feature value is R4, which represents aggressive type; and the risk level sub-feature value is R5, which represents aggressive type.

[0118] The object feature includes at least one of the following sub-features: keyword sub-feature and industry sub-feature. For example, the feature name of the keyword sub-feature is item_keywords, and the feature name of the industry sub-feature is stock_industryC1. The feature value of the keyword sub-feature is the keyword that describes the object, for example, the feature value of the keyword sub-feature is: technology, entertainment, or finance. The feature value of the industry sub-feature is the industry ID of the industry to which the object belongs. For example, the feature value of the industry sub-feature is 001, indicating the stock industry; the feature value of the industry sub-feature is 002, indicating the education industry.

[0119] In some embodiments of the present application, the user information in S101 and the object information of each candidate object in S102 include at least one parameter, and each parameter includes a parameter name and a parameter value. The user information included in each recommendation request and the object information of each candidate object are a data transfer object (DTO).

[0120] For example, user information includes: user: 111, age: 20, edu: 5, prov: Guangdong Province, risk: 3. The object information of candidate object A includes: item_keywords: technology, stock_industryC1: 001. Different parameters are separated by ",", and the content before ":" represents the parameter name, and the content after ":" represents the parameter value.

[0121] In an embodiment of the present application, the electronic device can use the parsing engine of the feature template to match the parameter names included in the user information with the feature names of the customer characteristics included in the feature template, and match the parameter names included in the object information with the feature names of the object characteristics included in the feature template based on keyword matching, thereby filling in the feature values ​​of the feature template.

[0122] That is, the above S103 fills in the feature value of the object feature included in each feature template for each candidate object according to the object information of the candidate object, which can be implemented as follows: for each feature template, search for the parameter name that is the same as the feature name of the object feature included in the feature template from the parameter names of the parameters included in the object information of the candidate object, and record the feature value of the object feature in the feature template as the parameter value corresponding to the parameter name.

[0123] Correspondingly, the above S103 fills in the characteristic value of the customer group characteristic included in each characteristic template based on the user information, which can be implemented as follows: for each characteristic template, from the parameter names of the parameters included in the user information, search for the parameter name that is the same as the characteristic name of the customer group characteristic included in the characteristic template, and record the characteristic value of the customer group characteristic in the characteristic template as the parameter value corresponding to the parameter name.

[0124] The features included in the feature template can be separated by preset separators. For example, the preset separators include: "*", "^" and ":", etc. The feature template can be: customer group feature * object feature ^ time window feature * category feature * scene feature * event feature: sequence feature: weight feature.

[0125] For example, user information includes: user: 111, age: 20, prov: Guangdong Province; object information of candidate object A includes: item_keywords: technology, stock_industryC1: 001.

[0126] See also Figure 2, assuming that the feature template a is: user*item_keywords^0*all_item_type*all_laneCode*click:10:0.5. Among them, user is the feature name of the user identification sub-feature included in the customer group feature, item_keywords is the feature name of the keyword sub-feature included in the object feature, 0 is the feature value of the time window feature, all_item_type is the feature value of the category feature, all_laneCode is the feature value of the scene feature, click is the feature value of the event feature, 10 is the feature value of the sequence feature, and 0.5 is the feature value of the weight feature. Feature template a means: the number of times a user clicks on an object of a certain keyword in the general category in the recommendation column scenario on that day. This number is the 10th data included in the feature vector, and the weight of this number is 0.5.

[0127] When the electronic device uses the parsing engine to construct the feature representation, it determines that both the user information and the template file a include user through keyword matching, so the parameter value "111" corresponding to the user included in the user information is used as the feature value of the customer group feature included in the template file a. Similarly, through keyword matching, it is determined that both the object information of candidate object A and the template file a include item_keywords, so the parameter value "technology" corresponding to the item_keywords included in the object information is used as the feature value of the object feature included in the template file a, and the obtained feature representation 1 is: 111*technology^0*all_item_type*all_laneCode*click:10:0.5.

[0128] See also Figure 2 , assuming that the feature template b is: prov*product_industryC1^hour*rec_product*all*product_add_optional:50:0.2. Among them, prov is the feature name of the sub-feature of the region included in the customer feature, product_industryC1 is the feature name of the sub-feature of the industry included in the object feature, hour is the feature value of the time window feature, rec_product is the feature value of the category feature, all is the feature value of the scenario feature, product_add_optional is the feature value of the event feature, 50 is the feature value of the sequence feature, and 0.2 is the feature value of the weight feature. Feature template b means: the number of times a user in a certain province in a general scenario performs the operation of adding objects of a certain industry in the investment advisory category to the watchlist in the previous hour. This number is the 50th data included in the feature vector, and the weight of this number is 0.2.

[0129] When the electronic device uses the parsing engine to construct a feature representation, it determines through keyword matching that both the user information and template file a include prov, so the parameter value "Guangdong Province" corresponding to prov included in the user information is used as the feature value of the customer group feature included in template file b. Similarly, through keyword matching, it is determined that both the object information of candidate object A and template file b include product_industryC1, so the parameter value "001" corresponding to product_industryC1 included in the user information is used as the feature value of the object feature included in template file b, and the resulting feature representation 2 is: Guangdong Province*001^hour*rec_product*all*product_add_optional:50:0.2.

[0130] Through the above method, the embodiment of the present application can fill in the feature values ​​of the customer characteristics included in the feature template based on user information through keyword matching, and fill in the feature values ​​of the object characteristics included in the feature template based on the object information of the candidate object, thereby realizing automatic filling of the feature template and generating feature representation without relying on manual labor, thereby improving the efficiency of generating feature representation.

[0131] Moreover, in the embodiment of the present application, the parsing method for various feature templates is the same, that is, a unified feature parsing standard is used to generate feature representations, and there is no need to design a generation method for each feature representation in advance for the recommendation model used by the recommendation method, so that the feature representation generation process is more efficient and the response speed to the recommendation request is improved. In addition, compared with the method of using different algorithms to generate different feature representations, since there may be errors in manually designing multiple feature representation generation algorithms, the accuracy of the generated feature representation is reduced. The embodiment of the present application uses a unified method to generate feature representations, which reduces the errors introduced by the feature parsing process and improves the accuracy of the generated feature representation.

[0132] In addition, the embodiment of the present application fills the parameter values ​​corresponding to the parameter names in the user information that are the same as the feature names of the feature template, and the parameter values ​​corresponding to the parameter names in the object information that are the same as the feature names of the feature template, into the feature template, thereby improving the accuracy of the generated feature representation. In addition to the parameter values ​​filled into the feature template, other parameters included in the user information and object information can be ignored. Therefore, the embodiment of the present application does not need to design a dedicated format and content of user information and object information specifically for the recommendation method, that is, there is no need to customize the data transmission object used by the recommendation method, which reduces the complexity of data transmission, reduces development and maintenance costs, makes the recommendation process more simple and easy, and the data transmission object can also be reused in various scenarios.

[0133] In some embodiments of the present application, after obtaining the feature representation, see Figure 3The above S104 electronic device searches a preset database for statistical values ​​of preset operation events performed by users represented by the customer group characteristics on objects represented by the object characteristics within a preset time period included in the characteristic representation, including the following steps:

[0134] S1041. For each feature representation, fill in a preset query template according to multiple feature values ​​included in the feature representation to obtain a query key.

[0135] Among them, the preset query template can be constructed according to the query requirements of the preset database.

[0136] The query template includes: customer group features, object features and event features. Moreover, the query template may also include at least one of the following: time window features, category features and scene features. For example, the preset query template is: scene feature name*category feature name*customer group feature name*customer group feature value*object feature name*object feature value*event feature name.

[0137] For example, see Figure 4 , assuming that feature representation 1 is: 111*technology^0*all_item_type*all_laneCode*click:10:0.5. The electronic device deconstructs feature representation 1 and determines that feature representation 1 includes: customer group feature, object feature, time window feature, category feature, scene feature, event feature, sequence feature and weight feature. The query template is: source*type*customer group feature name*customer group feature value*object feature name*object feature value*event. Since the feature name of 111 is user, which belongs to the customer group feature, user is filled in the position of customer group feature name and 111 is filled in the position of customer group feature value in the query template. Similarly, in the query template, the feature name of technology, item_keywords, is filled in the position of object feature name, and technology is filled in the position of object feature value. The feature name of all_item_type is type, so all_item_type is filled in the position of type in the query template; similarly, in the query template, all_laneCode is filled in the position of source and click is filled in the position of event. The query template after filling in, i.e., key, is: all_laneCode*all_item_type*user*111*item_keywords*technology*click. This key indicates the number of click operations performed by 111 users on objects in the general category with the keyword technology in the recommended column scenario.

[0138] S1042: Search for a statistical value corresponding to the query key from a preset database.

[0139] The preset database may be set based on actual needs, for example, the preset database may be a remote dictionary server (remote dictionary server, redis) or a huge database (humongous data base, MongoDB).

[0140] When filling in the query template, you can directly fill in the time window feature value included in the feature representation into the query template, where different time window feature values ​​represent different query time periods. For example, if the time window feature is hour, it means that the statistical value is determined from the data recorded in the previous hour; if the time window feature is 0, it means that the statistical value is determined from the data recorded in the previous day.

[0141] Alternatively, the time window feature value included in the feature representation may be converted into a preset format, and the converted time window feature value may be filled into the query template. For example, if the time window feature value included in the query template is hour, and the current time is 11:00, then hour is converted into 10:00-11:00 and filled into the position of time in the query template.

[0142] Afterwards, the electronic device can use the value found according to the key as a statistical value.

[0143] It should be noted that Figure 3 For the specific implementation of other steps in Figure 1 The description of the relevant steps will not be repeated here.

[0144] In an embodiment of the present application, when storing data in a preset database, an electronic device or other device may also construct a key according to a query template, and store the key and the data to be stored in the preset database in correspondence.

[0145] Through the above method, the embodiment of the present application can fill in the preset query template based on the feature representation, thereby obtaining the key for searching the database, and searching the statistical value from the database based on the key. Since the feature representations obtained based on different feature templates can all be filled in the query template and the key can be obtained in the same way, that is, the embodiment of the present application provides a unified method of constructing keys based on feature representation, without having to design different methods of constructing keys based on different forms of feature representations, thereby saving development costs and improving the query efficiency of statistical values.

[0146] Moreover, the embodiments of the present application can uniformly set the first item of data included in the key to be a scene feature value or a category feature value, so that the scene feature value or the category feature value is used as the prefix of the key, which can distinguish the storage locations of data of different scenes or different categories, thereby obtaining statistical values ​​from the preset database more quickly.

[0147] In some embodiments of the present application, there is a situation where some features in the feature template are empty.

[0148] If the time window feature, object feature and event feature in any feature template are empty, the feature value of the customer group feature included in the feature template is obtained from the user information to obtain the original feature value of the customer group.

[0149] If the time window feature, customer group feature and event feature in any feature template are empty, then for each candidate object, the feature value of the object feature included in the feature template is obtained from the object information of the candidate object to obtain the original feature value of the object.

[0150] Among them, for a feature template whose time window feature, object feature, and event feature are empty, the electronic device can search for a parameter name that is the same as the feature name of the customer group feature included in the feature template from the parameter name of the parameter included in the user information, and determine that the feature value of the customer group feature in the feature template is the parameter value corresponding to the parameter name, thereby using the feature value of the customer group feature as an original feature value of the customer group. For example, if the feature template includes a user identification sub-feature, 111 corresponding to user is obtained from the user information as an original feature value of the customer group.

[0151] And for the feature templates of time window features, customer group features, and event features, the electronic device can, for each candidate object, search for the parameter name of the parameter included in the object information of the candidate object, the same parameter name as the feature name of the object feature included in the feature template, and determine that the feature value of the object feature in the feature template is the parameter value corresponding to the parameter name. For example, if the feature template includes the industry sub-feature, 001 corresponding to stock_industryC1 is obtained from the object information of the candidate object as an object original feature value of the candidate object.

[0152] On this basis, the above S105 constructs a feature vector for each candidate object using the statistical values ​​found based on the candidate object, which can be implemented as follows: construct a feature vector using the statistical values ​​found based on the candidate object, as well as the original feature values ​​of the customer group and / or the original feature values ​​of the object obtained based on the candidate object.

[0153] That is, when the original feature value of the customer group is obtained based on the candidate object, the feature vector is constructed based on the original feature value of the customer group, and when the original feature value of the object is obtained based on the candidate object, the feature vector is constructed based on the original feature value of the object and combined with the statistical values ​​found by the candidate object.

[0154] It should be noted that if the original feature value of the customer group is not in the specified format, the original feature value of the customer group is converted into the specified format; if the original feature value of the object is not in the specified format, the original feature value of the object is converted into the specified format.

[0155] For example, if the specified format is a floating point number (float), and the original characteristic value of the customer group is Guangdong Province, then the preset encoding algorithm or the preset province coding table is used to convert Guangdong Province to 005.

[0156] The specific method of constructing the feature vector can be referred to the description below.

[0157] In some embodiments of the present application, the recommendation model in the above S105 may be a linear model or a nonlinear model.

[0158] Among them, the linear model includes: a linear regression model, a logistic regression (LR) model or an eXtreme Gradient Boosting (xgboost) model, etc.

[0159] For example, the linear regression model is:

[0160] y=β0+β1x1+β2x2+…+β n x n (1)

[0161] Among them, β0 is the preset parameter, x1, x2, …, x n is n statistical values, β1 is the weight of x1, β2 is the weight of x2, and so on. n For x n The weight of .

[0162] For example, nonlinear models include: symbolic math systems (tensorflow), polynomial regression, neural networks, decision trees, or support vector machines.

[0163] In some embodiments of the present application, after searching for the statistical values, when the recommendation model is a linear model, the above-mentioned S105 electronic device uses the statistical values ​​searched based on the candidate object to construct a feature vector, which can be implemented as follows: for each candidate object, the statistical values ​​searched based on the candidate object are sorted according to the feature value of the serial feature included in each feature template, and the sorted statistical values ​​are constructed as a feature vector.

[0164] It should be noted that the statistical values ​​based on the candidate object search are: after filling each feature template based on the object information of the candidate object to obtain the feature representation, the statistical values ​​are searched using the key generated by each feature representation.

[0165] Since the serial number feature value included in the feature template is the position of the statistical value obtained based on the feature template in the feature vector, the order of the statistical value can be directly determined based on the serial number feature value included in the feature template.

[0166] It should be noted that when the time window feature, object feature and event feature in the feature template are empty, the serial number feature of the feature template indicates the position of the original feature value of the customer group obtained based on the feature template in the feature vector; when the time window feature, customer group feature and event feature in the feature template are empty, the serial number feature of the feature template indicates the position of the original feature value of the object obtained based on the feature template in the feature vector. Therefore, when the candidate object has the original feature value of the customer group and / or the original feature value of the object, the statistical values ​​corresponding to the candidate object, as well as the original feature value of the customer group and / or the original feature value of the object can be sorted according to the feature value of the serial number feature included in each feature template, and the sorted statistical values, as well as the original feature value of the customer group and / or the original feature value of the object can be constructed as a feature vector.

[0167] Through the above method, the embodiment of the present application can sort the statistical values ​​according to the serial number feature values ​​included in the feature template, and construct a feature vector that can be used as the input data of the recommendation model. Therefore, in the embodiment of the present application, developers can select multiple feature templates during development, and configure the serial number feature values ​​of each feature template according to the meaning of each data included in the input data of the recommendation model, without having to customize the acquisition algorithm of each data included in the input data, thereby improving development efficiency, reducing errors caused by manually developing the acquisition algorithm, and improving the accuracy of the constructed feature vector.

[0168] When the recommendation model is a nonlinear model, the feature template may not include the ordinal feature. At this time, the above-mentioned S105 electronic device uses the statistical values ​​found based on the candidate object to construct the feature vector, which can be implemented as follows: based on a preset construction method, determine the position of each statistical value corresponding to the candidate object in the feature vector, and the position of the original feature value of the customer group and / or the original feature value of the object corresponding to the candidate object in the feature vector, and according to the determined position, construct each statistical value, the original feature value of the customer group and / or the original feature value of the object into a feature vector.

[0169] The preset construction method is used to represent the position of the statistical value, the original characteristic value of the customer group or the original characteristic value of the object obtained based on each feature template in the feature vector. For example, if the input data of the recommendation model is two-dimensional data, the preset construction method includes: setting the statistical value obtained based on feature template a in the first row and first column of the feature vector, and setting the original characteristic value of the customer group obtained based on feature template b in the second row and second column of the feature vector.

[0170] When the recommendation model in S105 is a linear model, the above-mentioned S105 electronic device uses a preset recommendation model to generate a recommendation score for the candidate object based on a feature vector, which can be implemented as follows: for each candidate object, the feature vector corresponding to the candidate and the weight of each statistical value included in the feature vector are input into the recommendation model, and the product of each statistical value included in the feature vector and its own weight is calculated by the recommendation model to obtain the weighted value of each statistical value, and the recommendation score of the candidate object is generated based on the weighted value of each statistical value.

[0171] When the recommendation model includes other parameters in addition to the weighted values ​​of each statistical value, for example, in addition to each weighted value, β0 is also included in formula (1), the sum of the weighted value of each statistical value and other parameters can be used as the recommendation score of the candidate object.

[0172] When the recommendation model does not include other parameters except the weighted values ​​of the statistical values, the sum of the weighted values ​​of the statistical values ​​may be directly used as the recommendation score of the candidate object.

[0173] Since the embodiment of the present application can carry the weight of the statistical value in the feature template, there is no need to record the weight of each feature value in the recommendation model, so that the embodiment of the present application can adopt a universal recommendation model, so that the recommendation model can be reused in various recommendation scenarios, thereby improving development efficiency and utilization of the recommendation model.

[0174] When the recommendation model in S105 is a nonlinear model, the feature template may not include a weight feature, and the above-mentioned S105 electronic device generates a recommendation score for the candidate object based on the feature vector using a preset recommendation model, which can be implemented as follows: inputting the feature vector into the recommendation model and obtaining the recommendation score of the candidate object predicted by the recommendation model.

[0175] In an embodiment of the present application, a general feature template and a unified template parsing process can be used to construct a feature vector that can be used as input data for a recommendation model. Therefore, there is no need to customize the input data acquisition logic based on the input data requirements of the recommendation model used by the recommendation method, making this method applicable to various types of recommendation models in various scenarios, thereby improving the versatility and flexibility of the recommendation process.

[0176] See also Figure 5 , the overall process of the recommended method provided in the embodiment of the present application is described below in combination with actual application scenarios:

[0177] Predefine multiple features such as customer group features, object features, time window features, category features, scene features, event features, sequence features, and weight features, design multiple common feature templates and query templates. Then, for the actual recommendation scenario, select multiple feature templates based on the recommendation model used in the scenario, and construct multiple feature templates used in the recommendation scenario. For example, set sequence features and / or weight features in the common feature template based on the meaning of each data included in the input data of the recommendation model.

[0178] Afterwards, after receiving the recommendation request sent by the terminal, the electronic device obtains the object information of each candidate object and a plurality of pre-selected feature templates, and for each candidate object, fills in the feature value of the customer group feature included in each feature template according to the user information included in the recommendation request, and fills in the feature value of the object feature included in each feature template according to the object information of the candidate object, and obtains a feature representation formed after each feature template is filled in. Then, for each feature representation, the statistical value of the user represented by the customer group feature performing a preset operation event on the object represented by the object feature within the preset time period included in the feature representation is searched from the preset database. Then, for each candidate object, a feature vector is constructed using the statistical values ​​found based on the candidate object, and a recommendation score of the candidate object is generated based on the feature vector using a preset recommendation model. Then, in descending order of the recommendation scores, a preset number of candidate objects are selected as recommended objects, and the recommended objects are sent to the terminal.

[0179] The embodiment of the present application provides a process of generating feature vectors and determining recommended objects based on a universal feature template and a universal template parsing method, which has a higher degree of automation, lower development and maintenance costs, and stronger versatility. The embodiment of the present application can more effectively realize the correlation analysis between users and recommended objects, and provides a more reliable and efficient solution for the field of personalized recommendation.

[0180] Based on the same inventive concept, corresponding to the above method embodiment, the present application embodiment also provides a recommendation device, such as Figure 6 As shown, the device includes: a receiving module 601, an acquiring module 602, a filling module 603, a searching module 604, a generating module 605, a selecting module 606 and a sending module 607;

[0181] The receiving module 601 is used to receive a recommendation request sent by a terminal, where the recommendation request includes user information;

[0182] The acquisition module 602 is used to acquire object information of each candidate object and a plurality of preset feature templates, wherein each feature template includes a time window feature, a customer group feature, an object feature and an event feature, the feature value of the time window feature represents a preset time period, and the feature value of the event feature represents a preset operation event;

[0183] The filling module 603 is used to fill in the feature value of the object feature included in each feature template according to the object information of the candidate object obtained by the obtaining module 602 for each candidate object, and fill in the feature value of the customer group feature included in each feature template according to the user information received by the receiving module 601, so as to obtain a feature representation formed after each feature template is filled in;

[0184] A search module 604 is used to search, for each feature representation obtained by the filling module 603, from a preset database for a statistical value of a preset operation event performed by a user represented by the customer group feature on an object represented by the object feature within a preset time period included in the feature representation;

[0185] The generating module 605 is used to construct a feature vector for each candidate object based on the statistical values ​​found by the finding module 604 for the candidate object, and to generate a recommendation score for the candidate object based on the feature vector using a preset recommendation model;

[0186] A selection module 606 is used to select a preset number of candidate objects as recommended objects in descending order of the recommendation scores generated by the generation module 605;

[0187] The sending module 607 is used to send the recommended object selected by the selecting module 606 to the terminal.

[0188] Optionally, both the user information and the object information include at least one parameter; the filling module 603 is specifically used to:

[0189] For each feature template, searching for a parameter name that is the same as the feature name of the object feature included in the feature template from the parameter names of the parameters included in the object information of the candidate object, and recording the feature value of the object feature in the feature template as the parameter value corresponding to the parameter name;

[0190] Fill in module 603, specifically for:

[0191] For each feature template, the parameter name identical to the feature name of the customer group feature included in the feature template is searched from the parameter names of the parameters included in the user information, and the feature value of the customer group feature is recorded in the feature template as the parameter value corresponding to the parameter name.

[0192] Optionally, the search module 604 is specifically used for:

[0193] According to the multiple feature values ​​included in the feature representation, fill in the preset query template to obtain the query key;

[0194] Search for the statistical value corresponding to the query key from the preset database.

[0195] Optionally, the feature template further includes a serial number feature, and the feature value of the serial number feature represents the corresponding position of the statistical value found based on the feature template in the feature vector, and the recommended model is a linear model; the generation module 605 is specifically used to:

[0196] Sort the statistical values ​​according to the characteristic values ​​of the sequence characteristics included in each characteristic template;

[0197] The sorted statistical values ​​are constructed as feature vectors.

[0198] Optionally, the feature template further includes a weight feature, the feature value of the weight feature is the weight of the statistical value found based on the feature template, and the recommended model is a linear model; the generation module 605 is specifically used for:

[0199] The feature vector and the weights of the statistical values ​​included in the feature vector are input into the recommendation model. The recommendation model calculates the product of each statistical value included in the feature vector and its own weight to obtain the weighted value of each statistical value, and generates the recommendation score of the candidate object based on the weighted value of each statistical value.

[0200] Optionally, the feature template further includes at least one of the following features: a category feature and a scene feature; the feature value of the category feature is a preset object category; the feature value of the scene feature represents a preset scene in which the preset operation event is located;

[0201] The customer group characteristics include at least one of the following sub-characteristics: user identification sub-characteristic, age sub-characteristic, education level sub-characteristic, region sub-characteristic and risk level sub-characteristic;

[0202] The object feature includes at least one of the following sub-features: a keyword sub-feature and an industry sub-feature;

[0203] The preset operation events include at least one of the following operation events: click, add to favorite list, watch, and purchase.

[0204] The acquisition module 602 is further used for:

[0205] If the time window feature, object feature, and event feature in any feature template are empty, the feature value of the customer group feature included in the feature template is obtained from the user information to obtain the original feature value of the customer group;

[0206] If the time window feature, customer group feature, and event feature in any feature template are empty, then for each candidate object, obtain the feature value of the object feature included in the feature template from the object information of the candidate object to obtain the original feature value of the object;

[0207] The generating module 605 is specifically used for:

[0208] A feature vector is constructed by using the statistical values ​​found based on the candidate object and the original feature values ​​of the customer group and / or the original feature values ​​of the object obtained based on the candidate object.

[0209] The present application also provides an electronic device, such as Figure 7 As shown, it includes a processor 701 , a communication interface 702 , a memory 703 and a communication bus 704 , wherein the processor 701 , the communication interface 702 , and the memory 703 communicate with each other via the communication bus 704 .

[0210] Memory 703, used for storing computer programs;

[0211] The processor 701 is used to implement the method executed by the electronic device in the above method embodiment when executing the program stored in the memory 703.

[0212] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0213] The communication interface is used for communication between the above electronic device and other devices.

[0214] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0215] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0216] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned recommendation methods are implemented.

[0217] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the recommended methods in the above embodiments.

[0218] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0219] It should be noted that, in this article, relational terms such as first and second, etc. 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 these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0220] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0221] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A recommendation method, characterized in that: The method comprises: receiving a recommendation request sent by a terminal, wherein the recommendation request includes user information; Obtaining object information of each candidate object and a plurality of preset feature templates, wherein each feature template includes a time window feature, a customer group feature, an object feature, and an event feature, wherein the feature value of the time window feature represents a preset time period, and the feature value of the event feature represents a preset operation event; For each candidate object, fill in the feature value of the object feature included in each feature template according to the object information of the candidate object, and fill in the feature value of the customer group feature included in each feature template according to the user information, so as to obtain a feature representation formed after each feature template is filled in; For each feature representation, searching a preset database for a statistical value of a preset operation event performed by a user represented by the customer group feature on an object represented by the object feature within a preset time period included in the feature representation; For each candidate object, construct a feature vector using the statistical values ​​found based on the candidate object, and generate a recommendation score for the candidate object based on the feature vector using a preset recommendation model; Select a preset number of candidate objects as recommended objects in descending order of recommendation scores; The recommended object is sent to the terminal.

2. The method according to claim 1, characterized in that The user information and the object information each include at least one parameter; the step of filling in the feature value of the object feature included in each feature template based on the object information of the candidate object includes: For each feature template, searching for a parameter name that is the same as the feature name of the object feature included in the feature template from the parameter names of the parameters included in the object information of the candidate object, and recording the feature value of the object feature in the feature template as the parameter value corresponding to the parameter name; The feature values ​​of the customer group features included in each feature template are filled in according to the user information, including: For each feature template, the parameter name identical to the feature name of the customer group feature included in the feature template is searched from the parameter names of the parameters included in the user information, and the feature value of the customer group feature is recorded in the feature template as the parameter value corresponding to the parameter name.

3. The method according to claim 1, characterized in that The step of searching a preset database for a statistical value of a preset operation event performed by a user represented by the customer group characteristic on an object represented by the object characteristic within a preset time period included in the characteristic representation includes: According to the multiple feature values ​​included in the feature representation, fill in the preset query template to obtain the query key; The statistical value corresponding to the query key is searched from the preset database.

4. The method according to claim 1, characterized in that: The feature template further includes a serial number feature, the feature value of the serial number feature represents the position corresponding to the statistical value found based on the feature template in the feature vector, and the recommendation model is a linear model; the use of the statistical values ​​found based on the candidate object to construct the feature vector includes: Sort the statistical values ​​according to the feature values ​​of the sequence features included in each feature template; The sorted statistical values ​​are constructed as the feature vector.

5. The method according to claim 1, characterized in that: The feature template further includes a weight feature, the feature value of the weight feature is a weight of a statistical value found based on the feature template, and the recommendation model is a linear model; and using a preset recommendation model to generate a recommendation score for the candidate object based on the feature vector includes: The feature vector and the weights of the statistical values ​​included in the feature vector are input into the recommendation model, and the recommendation model calculates the product of each statistical value included in the feature vector and its own weight to obtain the weighted value of each statistical value, and generates a recommendation score for the candidate object based on the weighted values ​​of the statistical values.

6. The method according to any one of claims 1 to 5, characterized in that: The feature template also includes at least one of the following features: category feature and scene feature; The feature value of the category feature represents the preset object category; the feature value of the scene feature represents the preset scene where the preset operation event is located; The customer group feature includes at least one of the following sub-features: user identification sub-feature, age sub-feature, education level sub-feature, region sub-feature and risk level sub-feature; The object feature includes at least one of the following sub-features: a keyword sub-feature and an industry sub-feature; The preset operation event includes at least one of the following operation events: click, add to favorite list, watch and buy.

7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: If the time window feature, object feature and event feature in any feature template are empty, then the feature value of the customer group feature included in the feature template is obtained from the user information to obtain the original feature value of the customer group; If the time window feature, customer group feature, and event feature in any feature template are empty, then for each candidate object, obtain the feature value of the object feature included in the feature template from the object information of the candidate object to obtain the original feature value of the object; The method of constructing a feature vector by using the statistical values ​​found based on the candidate object includes: A feature vector is constructed by using the statistical values ​​found based on the candidate object and the original feature values ​​of the customer group and / or the original feature values ​​of the object obtained based on the candidate object.

8. A recommendation device, characterized in that: The device comprises: A receiving module, configured to receive a recommendation request sent by a terminal, wherein the recommendation request includes user information; An acquisition module, used to acquire object information of each candidate object and a plurality of preset feature templates, wherein each feature template includes a time window feature, a customer group feature, an object feature and an event feature, wherein the feature value of the time window feature represents a preset time period, and the feature value of the event feature represents a preset operation event; A filling module is used to fill in the feature value of the object feature included in each feature template according to the object information of the candidate object obtained by the obtaining module, and fill in the feature value of the customer group feature included in each feature template according to the user information received by the receiving module, so as to obtain a feature representation formed after each feature template is filled in; A search module, for searching, for each feature representation obtained by the filling module, from a preset database for a statistical value of a preset operation event performed by a user represented by the customer group feature on an object represented by the object feature within a preset time period included in the feature representation; A generating module, for each candidate object, constructing a feature vector based on the statistical values ​​searched by the searching module for the candidate object, and generating a recommendation score for the candidate object based on the feature vector using a preset recommendation model; A selection module, configured to select a preset number of candidate objects as recommended objects in descending order of the recommendation scores generated by the generation module; A sending module is used to send the recommended object selected by the selection module to the terminal.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method according to any one of claims 1 to 7 when executing a program stored in a memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.