CN110929136A - Personalized recommendation method and device - Google Patents

Personalized recommendation method and device Download PDF

Info

Publication number
CN110929136A
CN110929136A CN201811002297.XA CN201811002297A CN110929136A CN 110929136 A CN110929136 A CN 110929136A CN 201811002297 A CN201811002297 A CN 201811002297A CN 110929136 A CN110929136 A CN 110929136A
Authority
CN
China
Prior art keywords
data
recommendation
recommendation model
user
articles
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811002297.XA
Other languages
Chinese (zh)
Inventor
方万冬
于林坤
袁睿达
王文官
谷长征
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201811002297.XA priority Critical patent/CN110929136A/en
Publication of CN110929136A publication Critical patent/CN110929136A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a personalized recommendation method and device, and relates to the technical field of computers. One embodiment of the method comprises: receiving a data acquisition rule, and acquiring basic data which accords with the data acquisition rule from a data warehouse; the data acquisition rule is a value taking rule set for an attribute field of the basic data according to a service scene; preprocessing the basic data to obtain a sample data set, and inputting the sample data set into a recommendation algorithm for training; and determining the data of the articles which are interested by the user according to the trained recommendation model. According to the method, the data acquisition rule defined by the user according to the service scene is received, the basic data meeting the data acquisition rule is acquired from the data warehouse, a recommendation model can be trained based on the basic data subsequently, and then the data of the articles interested by the user in the service scene is determined, so that personalized recommendation of different service scenes is achieved, and the development efficiency is high.

Description

Personalized recommendation method and device
Technical Field
The invention relates to the field of computers, in particular to a personalized recommendation method and device.
Background
With the development of information technology and the internet, it is very difficult for users to find information of interest from massive information. The personalized recommendation service can provide diversified and intelligent personalized services for the user so as to assist the user to efficiently and comprehensively acquire interesting information. Taking a vertical service as an example, there are many personalized demands, and in the prior art, when implementing personalized recommendation service for each service scene of the vertical service, each service scene needs to be customized and developed. The vertical service is to provide relevant information and relevant services related to a certain specific field or a certain specific requirement.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
(1) different service scenes of vertical services are similar in solution, but each service scene needs to be customized and developed in the prior art, so that the development period is long and the development efficiency is low;
(2) data is configured by developers, user interfaces seen by each user are the same, personalized differences cannot be reflected, and the problem of data expiration exists.
Disclosure of Invention
In view of this, embodiments of the present invention provide a personalized recommendation method and apparatus, where a data acquisition rule defined by a user according to a service scene is received, and basic data conforming to the data acquisition rule is acquired from a data warehouse, and then a recommendation model can be trained based on the basic data, so as to determine data of an article that the user is interested in the service scene, thereby implementing personalized recommendation of different service scenes, and having high development efficiency.
To achieve the above object, according to an aspect of an embodiment of the present invention, a personalized recommendation method is provided.
The personalized recommendation method of the embodiment of the invention comprises the following steps: receiving a data acquisition rule, and acquiring basic data which accords with the data acquisition rule from a data warehouse; the data acquisition rule is a value taking rule set for an attribute field of the basic data according to a service scene; preprocessing the basic data to obtain a sample data set, and inputting the sample data set into a recommendation algorithm for training; and determining the data of the articles which are interested by the user according to the trained recommendation model.
Optionally, the recommendation algorithm is an alternating least squares method; inputting the sample data set into a recommendation algorithm for training, wherein the training comprises: dividing the sample data set into a training set and a testing set, and inputting the training set and preset parameter values into the recommendation algorithm to establish an initial recommendation model; inputting the test set into the initial recommendation model to validate the initial recommendation model; when the verification result meets the preset standard, taking the initial recommendation model as the recommendation model; and when the verification result does not meet the preset standard, adjusting the parameter value to retrain the recommendation model.
Optionally, the determining, according to the trained recommendation model, item data of interest to the user includes: inputting user identifications and item identifications into the recommendation model to output corresponding item scores through the recommendation model; and sorting the articles according to the article scores, and taking a preset number of high-score articles as articles which are interested by the user, or taking the articles corresponding to the article scores larger than a preset threshold value as the articles which are interested by the user.
Optionally, the method further comprises: receiving a data output rule, and outputting the article data according to the data output rule; wherein, the data output rule is provided with an attribute field to be output in the article data.
To achieve the above object, according to another aspect of the embodiments of the present invention, a personalized recommendation apparatus is provided.
The personalized recommendation device of the embodiment of the invention comprises: the acquisition module is used for receiving a data acquisition rule and acquiring basic data which accord with the data acquisition rule from a data warehouse; the data acquisition rule is a value taking rule set for an attribute field of the basic data according to a service scene; the training module is used for preprocessing the basic data to obtain a sample data set, and inputting the sample data set into a recommendation algorithm for training; and the determining module is used for determining the data of the articles which are interested by the user according to the trained recommendation model.
Optionally, the recommendation algorithm is an alternating least squares method; the training module is further configured to: dividing the sample data set into a training set and a testing set, and inputting the training set and preset parameter values into the recommendation algorithm to establish an initial recommendation model; inputting the test set into the initial recommendation model to validate the initial recommendation model; when the verification result meets a preset standard, taking the initial recommendation model as the recommendation model; and when the verification result does not meet the preset standard, adjusting the parameter value to retrain the recommendation model.
Optionally, the determining module is further configured to: inputting user identifications and item identifications into the recommendation model to output corresponding item scores through the recommendation model; and sorting the articles according to the article scores, and taking a preset number of high-score articles as articles which are interested by the user, or taking the articles corresponding to the article scores larger than a preset threshold value as articles which are interested by the user.
Optionally, the apparatus further comprises: the output module is used for receiving a data output rule and outputting the article data according to the data output rule; wherein, the data output rule is provided with an attribute field to be output in the article data.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the personalized recommendation method of the embodiment of the invention.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention stores thereon a computer program, which when executed by a processor implements a personalized recommendation method of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: by receiving a data acquisition rule defined by a user according to a service scene and acquiring basic data conforming to the data acquisition rule from a data warehouse, a recommendation model can be trained subsequently based on the basic data, and then the data of an article which the user is interested in the service scene is determined, so that personalized recommendation of different service scenes is realized, and the development efficiency is high; the model training is carried out based on the alternating least square method, the realization is simple, the iteration speed is high, the training effect is good, and the maintenance is convenient; the items which are interested by the user are determined according to the item scores output by the recommendation model, so that the items which are possibly interested by the user can be known more quickly and accurately; and finally, the finally output article data meets the personalized requirements of the user by receiving the data output rule defined by the user.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a personalized recommendation method according to an embodiment of the invention;
FIG. 2 is a schematic main flow chart of a personalized recommendation method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the main modules of a personalized recommendation device according to an embodiment of the invention;
FIG. 4 is a schematic diagram of information interaction among modules in the personalized recommendation device according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 6 is a schematic diagram of a computer apparatus suitable for use in an electronic device to implement an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of main steps of a personalized recommendation method according to an embodiment of the present invention. As shown in fig. 1, the personalized recommendation method according to the embodiment of the present invention mainly includes the following steps:
step S101: receiving a data acquisition rule, and acquiring basic data which accords with the data acquisition rule from a data warehouse; the data acquisition rule is a value-taking rule set for the attribute field of the basic data according to a service scene. The attribute fields required by different service scenarios are different, such as service scenario one: recommending articles on a certain floor of a supermarket for a user, wherein a second business scene is as follows: and recommending the items belonging to vegetables in the supermarket to the user. For the first service scenario, the required attribute fields comprise item identifications, prices and historical sales data of all items on the floor; for the second service scenario, the required attribute fields include item identifications, prices and historical sales data for all vegetable items in the supermarket. And setting the value-taking rule of the attribute field in a client interface by the user according to the service scene, for example, setting the price field of the article A to be less than 100 yuan/piece, and setting the value-taking interval of the historical sales data to be 5/1/2018 to 5/31/2018. And then the client sends the data acquisition rule to a server, and the server acquires basic data conforming to the data acquisition rule from a data warehouse.
Step S102: and preprocessing the basic data to obtain a sample data set, and inputting the sample data set into a recommendation algorithm for training. Wherein, the recommendation algorithm may be a content-based filtering algorithm, a collaborative filtering algorithm, a matrix decomposition algorithm, etc. And after formatting the basic data, the server performs characteristic conversion on the formatting result to obtain a sample data set. Then dividing the sample data set into a training set and a testing set, and inputting the training set and preset parameter values into the recommendation algorithm to establish an initial recommendation model; inputting the test set into the initial recommendation model to validate the initial recommendation model; when the verification result meets the preset standard, taking the initial recommendation model as the recommendation model; and when the verification result does not meet the preset standard, adjusting the parameter value to retrain the recommendation model.
Step S103: and determining the data of the articles which are interested by the user according to the trained recommendation model. Inputting user identifications and item identifications into the recommendation model to output corresponding item scores through the recommendation model; and sorting the articles according to the article scores, and taking a preset number of high-score articles or articles with scores larger than a preset threshold value as articles in which the user is interested. In the embodiment, a user sets a data acquisition rule according to a business scene, a server acquires basic data according to the data acquisition rule, model training is performed based on a recommendation algorithm, and finally, an article which is interested in the user in the business scene is determined. The user sets different service rules according to different service scenes, and the server processes the service rules according to the steps to realize personalized recommendation under different service scenes, so that the service scenes are covered completely, and the development efficiency is improved.
Fig. 2 is a main flow diagram of a personalized recommendation method according to an embodiment of the present invention. As shown in fig. 2, the personalized recommendation method according to the embodiment of the present invention mainly includes the following steps:
step S201: and acquiring basic data which accords with the data acquisition rule from a data warehouse according to the data acquisition rule in the configuration information. And the configuration information needs to be customized by a user according to the self-demand. The configuration information comprises a data acquisition rule and a data output rule, the data acquisition rule is used for defining the limiting conditions which need to be met by basic data acquired from a data warehouse, and the data output rule is used for defining the limiting conditions which need to be met by article data output from a unified interface. The data acquisition rules, such as the price of the item being less than a set threshold, the recommended type of item, etc. The data warehouse stores various data such as user figures, commodity sales data, flow data, commodity basic data, buried point data, and the like. The user sets configuration information at the client and then outputs the configuration information to the server, and the server acquires data meeting data acquisition rules from the database as basic data.
In an embodiment, the item sales data, the user click data, the user browsing data, the user ordering data and the item basic data, which are based on the automobile model as the item type and the item price of less than 100 m, may be obtained from a data warehouse, and the item sales data, the user click data, the user browsing data, the user ordering data and the item basic data may be used as basic data. The item basic data comprises item identification, item price, item description information and the like.
Step S202: and carrying out formatting treatment and feature conversion on the basic data to obtain a sample data set. In the embodiment, data cleaning is performed on the basic data, that is, error data, repeated data, incomplete data, and the like are deleted from the basic data, and then formatting processing and feature conversion are performed on the cleaned data. The feature transformation is to transform the data into data recognizable by spark calculation engine. For example, the user identification is converted into an index. Among them, spark calculation engine is a fast general purpose calculation engine designed specially for large scale data processing.
In the embodiment, after the basic data is cleaned, formatting processes such as standardization, normalization, binning/partitioning and the like are required. The calculation formula for standardizing the raw data obtained after the data cleaning is as follows:
Figure BDA0001783244310000071
in the formula, x*For the normalized result, x is the current raw data,
Figure BDA0001783244310000072
is the average of the raw data and s is the standard deviation of the raw data.
The calculation formula for normalizing the normalized raw data is as follows:
Figure BDA0001783244310000073
wherein x' is the result of normalization, xmaxIs the maximum value, x, in the raw dataminIs the minimum value in the original data, and x is the current original data.
The basic data comprises data of various attribute types, wherein the attribute types comprise a numerical value attribute and a classification attribute. Accordingly, the basic data of the numerical attribute is referred to as numerical attribute data herein, and the basic data of the classification attribute is referred to as classification attribute data. Binning/partitioning is the conversion of numerical attribute data to classification attribute data. For example, the car price is divided into different user grades, the car price is numerical attribute data, and the user grade is classification attribute data.
Step S203: and inputting the sample data set into a spark calculation engine for training to obtain a recommendation model. An MLlib algorithm component is provided in the spark calculation engine, and a recommendation algorithm is provided in the MLlib algorithm component: an Alternating Least Squares (ALS) method, which belongs to a matrix decomposition algorithm. In the embodiment, the sample data set is input into an ALS algorithm for training to obtain a recommendation model. The ALS algorithm receives three parameters: rank, iterations and lambda, where the rank parameter corresponds to an implicit characteristic number, and the value is set to be more accurate, but will also generate more calculation amount, and is generally set to 10-200; the iteration number corresponding to the iteration parameter is generally set to 10; the lambda parameter controls the regularization process, the higher the value, the deeper the regularization degree, and is typically set to 0.01.
The ALS algorithm has the following calculation flow: initializing a sample data set and a spark environment; dividing the sample data set into a training set and a test set; inputting the values of rank parameter, iteration parameter and lambda parameter into ALS algorithm to train an initial recommendation model; verifying the initial recommendation model by using the test set, and if a verification result meets a preset standard, taking the model as a recommendation model; and if the verification result does not meet the preset standard, adjusting the values of the rank parameter, the iterations parameter and the lambda parameter, and continuing training until the preset standard is met to obtain the recommendation model. In an embodiment, when the initial recommendation model is verified, two recommendation indexes, namely Mean-Square Error (MSE) and/or K-value average accuracy (MAPK), may be used for verification.
Step S204: and determining the item data which are interested by the user according to the recommendation model. And storing the trained recommendation model, wherein the storage position can be a Redis database, an HBase database, an Elasticissearch search server and the like. Inputting the user identification and the article identification into the recommendation model, and then outputting the article score of the article; taking a preset number of high-score articles as articles in which the user is interested; the item data of the items are the item data which are interesting to the user, and the item data are output. In an embodiment, the item corresponding to the item score larger than the preset threshold may also be used as the item in which the user is interested. In this step, the commodity data of interest to the user may be items purchased by a user group having similar interests to the current user, or other items similar to items in the historical shopping data of the current user. The similarity between the users can be obtained by calculating the proportion of the same articles purchased by the two users to all the articles, and the similarity between the articles can be obtained by calculating the cosine similarity.
Step S205: and outputting the article data according to a data output rule in the configuration information. The data output rules, such as attribute fields specifying the output item data, include user information, item name, and item price. And outputting the item data recommended by the recommendation model according to the data output rule set by the user so as to perform personalized display to the user.
Step S206: acquiring log data, and carrying out visual display on the log data. And providing services for the recommendation process from the step S201 to the step S205 through a unified interface, so that other users can conveniently call the interface to realize article recommendation. After the user calls the interface and executes the interface, some log data are generated, wherein the log data comprise click quantity, next single quantity, second-level access quantity (record of interface data requested by the user every second), abnormal information and the like, and the log data are visually displayed, so that the user can conveniently know the article recommendation effect through the user interface.
In a preferred embodiment, a life cycle of the recommended item data may also be set, and the item data is discarded when the life cycle is exceeded. The up-down time of the unified interface can be configured to specify the use duration of the interface.
In another preferred embodiment, the method further comprises: and carrying out A/B test on a plurality of the recommended models. In an embodiment, a plurality of recommendation algorithms may be used to obtain the recommendation model, and the recommendation results of different recommendation algorithms may be different. An A/B test mode can be used, for example, the item data which are interested by the user are calculated by using the recommendation model I and the recommendation model II respectively, and then the recommendation effect of which recommendation model is good can be evaluated according to the click quantity, the order quantity and the like in the log data. And taking the model with good recommendation effect as a final recommendation model, and recommending the articles through the final recommendation model so as to more accurately determine article data which are interested by the user.
According to the personalized recommendation method provided by the embodiment of the invention, the data acquisition rule defined by the user according to the service scene is received, the basic data conforming to the data acquisition rule is acquired from the data warehouse, and then the recommendation model can be trained based on the basic data, so that the data of the articles interested by the user in the service scene is determined, the personalized recommendation of different service scenes is realized, and the development efficiency is high; model training is carried out based on an alternating least square method, the realization is simple, and the training effect is good; the items which are interested by the user are determined according to the item scores output by the recommendation model, so that the items which are possibly interested by the user can be known more quickly and accurately; and finally, the finally output article data meets the personalized requirements of the user by receiving the data output rule defined by the user.
Fig. 3 is a schematic diagram of main modules of a personalized recommendation device according to an embodiment of the present invention. As shown in fig. 3, the personalized recommendation device 300 according to the embodiment of the present invention mainly includes:
an obtaining module 301, configured to receive a data obtaining rule, and obtain basic data meeting the data obtaining rule from a data warehouse; the data acquisition rule is a value-taking rule set for the attribute field of the basic data according to a service scene. The attribute fields required by different service scenarios are different, such as service scenario one: recommending articles on a certain floor of a supermarket for a user, wherein a second business scene is as follows: and recommending the items belonging to vegetables in the supermarket to the user. For the first service scenario, the required attribute fields comprise item identifications, prices and historical sales data of all items on the floor; for the second service scenario, the required attribute fields include item identifications, prices and historical sales data for all vegetable items in the supermarket. And setting the value-taking rule of the attribute field in a client interface by the user according to the service scene, for example, setting the price field of the article A to be less than 100 yuan/piece, and setting the value-taking interval of the historical sales data to be 5/1/2018 to 5/31/2018. And then the client sends the data acquisition rule to a server, and the server acquires basic data conforming to the data acquisition rule from a data warehouse.
A training module 302, configured to pre-process the basic data to obtain a sample data set, and input the sample data set into a recommendation algorithm for training. The recommendation algorithm may be a content-based filtering algorithm, a collaborative filtering algorithm, a matrix decomposition algorithm, or the like. And after formatting the basic data, the server performs characteristic conversion on the formatting result to obtain a sample data set. Then dividing the sample data set into a training set and a testing set, and inputting the training set and preset parameter values into the recommendation algorithm to establish an initial recommendation model; inputting the test set into the initial recommendation model to validate the initial recommendation model; when the verification result meets the preset standard, taking the initial recommendation model as the recommendation model; and when the verification result does not meet the preset standard, adjusting the parameter value to retrain the recommendation model.
A determining module 303, configured to determine, according to the trained recommendation model, data of an item in which the user is interested. Inputting user identifications and item identifications into the recommendation model to output corresponding item scores through the recommendation model; and sorting the articles according to the article scores, and taking a preset number of high-score articles or articles with scores larger than a preset threshold value as articles in which the user is interested. In the embodiment, a user sets a data acquisition rule according to a business scene, a server acquires basic data according to the data acquisition rule, model training is performed based on a recommendation algorithm, and finally, an article which is interested in the user in the business scene is determined. The user sets different service rules according to different service scenes, and the modules correspondingly realize the functions thereof, so that personalized recommendation under different service scenes can be realized, and the development efficiency is improved.
In addition, the personalized recommendation device 300 according to the embodiment of the present invention may further include: an output module (not shown in fig. 3) for receiving a data output rule and outputting the item data according to the data output rule; wherein, the data output rule is provided with an attribute field to be output in the article data. And the monitoring module is used for acquiring the log data from the unified interface and reporting the log data to a data warehouse for storage. And the management module is used for configuring the life cycle of the article data and the online and offline time of the unified interface for receiving the configuration information, and acquiring and displaying the log data from the data warehouse. The output module is a componentization module and can realize the definition of fields of the unified interface.
Fig. 4 is a schematic diagram of information interaction of modules in a personalized recommendation device according to an embodiment of the present invention. The data warehouse stores various data such as user figures, commodity sales data, flow data, commodity basic data, buried point data, and the like. As shown in fig. 4, the management module receives configuration information set by a user, configures a life cycle of the item data, and configures the online time and the offline time of the unified interface. The acquisition module extracts the data acquisition rule in the configuration information from the management module to acquire basic data conforming to the data acquisition rule from a data warehouse and outputs the basic data to the training module. The training module is used for preprocessing the basic data to obtain a sample data set, then training a recommendation model according to a set parameter value and the sample data set, and outputting the recommendation model to the determining module. The determining module receives the user identification and the article identification, determines article data which are interesting to the user through the recommendation model, and sends the article data to the output module. And the output module extracts a data output rule in the configuration information from the management module and outputs the article data according to the data output rule. And the monitoring module acquires log data and reports the log data to a data warehouse for storage. And the management module acquires log data from the data warehouse and displays the log data. The modules are combined for use, and comprehensive personalized recommendation service is provided. Each module is a background which can be repeatedly used, the modules and resources can be shared for other users to use, and the users can build data which the users want.
As can be seen from the above description, by receiving a data acquisition rule defined by a user according to a service scene and acquiring basic data conforming to the data acquisition rule from a data warehouse, a recommendation model can be trained subsequently based on the basic data, so as to determine item data of interest of the user in the service scene, thereby realizing personalized recommendation of different service scenes and having high development efficiency; model training is carried out based on an alternating least square method, the realization is simple, and the training effect is good; the items which are interested by the user are determined according to the item scores output by the recommendation model, so that the items which are possibly interested by the user can be known more quickly and accurately; and finally, the finally output article data meets the personalized requirements of the user by receiving the data output rule defined by the user.
Fig. 5 shows an exemplary system architecture 500 of a personalized recommendation method or a personalized recommendation apparatus to which an embodiment of the present invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. The terminal devices 501, 502, 503 may have various communication client applications installed thereon, such as a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server that provides various services, such as a background management server that provides support for a user using configuration information set by the terminal devices 501, 502, 503. The background management server may analyze the received configuration information, and feed back a processing result (e.g., item data recommended to the user) to the terminal device.
It should be noted that the personalized recommendation method provided in the embodiment of the present application is generally executed by the server 505, and accordingly, the personalized recommendation apparatus is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The invention also provides an electronic device and a computer readable medium according to the embodiment of the invention.
The electronic device of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the personalized recommendation method of the embodiment of the invention.
The computer readable medium of the present invention has stored thereon a computer program which, when executed by a processor, implements a personalized recommendation method of an embodiment of the present invention.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use with the electronic device implementing an embodiment of the present invention. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the computer system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, the processes described above with respect to the main step diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program article comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the main step diagram. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program articles according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an acquisition module, a training module, and a determination module. The names of these modules do not in some cases constitute a limitation on the modules themselves, and for example, an acquisition module may also be described as a "module that receives data acquisition rules and acquires basic data conforming to the data acquisition rules from a data repository".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: receiving a data acquisition rule, and acquiring basic data which accords with the data acquisition rule from a data warehouse; the data acquisition rule is a value taking rule set for an attribute field of the basic data according to a service scene; preprocessing the basic data to obtain a sample data set, and inputting the sample data set into a recommendation algorithm for training; and determining the data of the articles which are interested by the user according to the trained recommendation model.
As can be seen from the above description, by receiving a data acquisition rule defined by a user according to a service scene and acquiring basic data conforming to the data acquisition rule from a data warehouse, a recommendation model can be trained subsequently based on the basic data, so as to determine item data of interest of the user in the service scene, thereby realizing personalized recommendation of different service scenes and having high development efficiency; model training is carried out based on an alternating least square method, the realization is simple, and the training effect is good; the items which are interested by the user are determined according to the item scores output by the recommendation model, so that the items which are possibly interested by the user can be known more quickly and accurately; and finally, the finally output article data meets the personalized requirements of the user by receiving the data output rule defined by the user.
The article can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for personalized recommendation, comprising:
receiving a data acquisition rule, and acquiring basic data which accords with the data acquisition rule from a data warehouse; the data acquisition rule is a value taking rule set for an attribute field of the basic data according to a service scene;
preprocessing the basic data to obtain a sample data set, and inputting the sample data set into a recommendation algorithm for training;
and determining the data of the articles which are interested by the user according to the trained recommendation model.
2. The method of claim 1, wherein the recommendation algorithm is an alternating least squares method;
inputting the sample data set into a recommendation algorithm for training, wherein the training comprises:
dividing the sample data set into a training set and a testing set, and inputting the training set and preset parameter values into the recommendation algorithm to establish an initial recommendation model;
inputting the test set into the initial recommendation model to validate the initial recommendation model;
when the verification result meets the preset standard, taking the initial recommendation model as the recommendation model; and when the verification result does not meet the preset standard, adjusting the parameter value to retrain the recommendation model.
3. The method according to claim 1, wherein the determining the item data of interest to the user according to the trained recommendation model comprises:
inputting user identifications and item identifications into the recommendation model to output corresponding item scores through the recommendation model;
and sorting the articles according to the article scores, and taking a preset number of high-score articles as articles which are interested by the user, or taking the articles corresponding to the article scores larger than a preset threshold value as the articles which are interested by the user.
4. The method according to any one of claims 1 to 3, further comprising:
receiving a data output rule, and outputting the article data according to the data output rule; wherein, the data output rule is provided with an attribute field to be output in the article data.
5. A personalized recommendation device, comprising:
the acquisition module is used for receiving a data acquisition rule and acquiring basic data which accord with the data acquisition rule from a data warehouse; the data acquisition rule is a value taking rule set for an attribute field of the basic data according to a service scene;
the training module is used for preprocessing the basic data to obtain a sample data set, and inputting the sample data set into a recommendation algorithm for training;
and the determining module is used for determining the data of the articles which are interested by the user according to the trained recommendation model.
6. The apparatus of claim 5, wherein the recommendation algorithm is an alternating least squares method;
the training module is further configured to:
dividing the sample data set into a training set and a testing set, and inputting the training set and preset parameter values into the recommendation algorithm to establish an initial recommendation model;
inputting the test set into the initial recommendation model to validate the initial recommendation model; and
when the verification result meets the preset standard, taking the initial recommendation model as the recommendation model; and when the verification result does not meet the preset standard, adjusting the parameter value to retrain the recommendation model.
7. The apparatus of claim 5, wherein the determining module is further configured to:
inputting user identifications and item identifications into the recommendation model to output corresponding item scores through the recommendation model; and
and sorting the articles according to the article scores, and taking a preset number of high-score articles as articles which are interested by the user, or taking the articles corresponding to the article scores larger than a preset threshold value as the articles which are interested by the user.
8. The apparatus of any of claims 5 to 7, further comprising: the output module is used for receiving a data output rule and outputting the article data according to the data output rule; wherein, the data output rule is provided with an attribute field to be output in the article data.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN201811002297.XA 2018-08-30 2018-08-30 Personalized recommendation method and device Pending CN110929136A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811002297.XA CN110929136A (en) 2018-08-30 2018-08-30 Personalized recommendation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811002297.XA CN110929136A (en) 2018-08-30 2018-08-30 Personalized recommendation method and device

Publications (1)

Publication Number Publication Date
CN110929136A true CN110929136A (en) 2020-03-27

Family

ID=69854916

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811002297.XA Pending CN110929136A (en) 2018-08-30 2018-08-30 Personalized recommendation method and device

Country Status (1)

Country Link
CN (1) CN110929136A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111439268A (en) * 2020-03-31 2020-07-24 重庆长安汽车股份有限公司 Method and device for actively providing personalized service, cloud server and automobile
CN112131264A (en) * 2020-09-15 2020-12-25 杭州城市大数据运营有限公司 Method, device and system for recommending different source difference information
CN112667923A (en) * 2021-01-15 2021-04-16 北京金和网络股份有限公司 Intelligent recommendation method and device based on big data
CN112950321A (en) * 2021-03-10 2021-06-11 北京汇钧科技有限公司 Article recommendation method and device
CN113763093A (en) * 2020-11-12 2021-12-07 北京沃东天骏信息技术有限公司 User portrait-based item recommendation method and device
CN113934942A (en) * 2021-10-15 2022-01-14 北京中嘉空间展示设计有限公司 Recommendation method combining offline immersion exhibition and recommendation
CN114140140A (en) * 2020-09-03 2022-03-04 中国移动通信集团浙江有限公司 Scene screening method, device and equipment

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111439268A (en) * 2020-03-31 2020-07-24 重庆长安汽车股份有限公司 Method and device for actively providing personalized service, cloud server and automobile
CN111439268B (en) * 2020-03-31 2023-03-14 重庆长安汽车股份有限公司 Method and device for actively providing personalized service, cloud server and automobile
CN114140140A (en) * 2020-09-03 2022-03-04 中国移动通信集团浙江有限公司 Scene screening method, device and equipment
CN114140140B (en) * 2020-09-03 2023-03-21 中国移动通信集团浙江有限公司 Scene screening method, device and equipment
CN112131264A (en) * 2020-09-15 2020-12-25 杭州城市大数据运营有限公司 Method, device and system for recommending different source difference information
CN113763093A (en) * 2020-11-12 2021-12-07 北京沃东天骏信息技术有限公司 User portrait-based item recommendation method and device
CN112667923A (en) * 2021-01-15 2021-04-16 北京金和网络股份有限公司 Intelligent recommendation method and device based on big data
CN112950321A (en) * 2021-03-10 2021-06-11 北京汇钧科技有限公司 Article recommendation method and device
CN113934942A (en) * 2021-10-15 2022-01-14 北京中嘉空间展示设计有限公司 Recommendation method combining offline immersion exhibition and recommendation

Similar Documents

Publication Publication Date Title
CN110929136A (en) Personalized recommendation method and device
CN109492772B (en) Method and device for generating information
CN107506495B (en) Information pushing method and device
CN110020162B (en) User identification method and device
CN110555451A (en) information identification method and device
CN108595448B (en) Information pushing method and device
CN111427974A (en) Data quality evaluation management method and device
CN110866625A (en) Promotion index information generation method and device
CN107291835B (en) Search term recommendation method and device
WO2022156589A1 (en) Method and device for determining live broadcast click rate
CN112749323A (en) Method and device for constructing user portrait
CN110895761A (en) Method and device for processing after-sale service application information
CN111967611A (en) Feature generation method and apparatus, electronic device, and storage medium
CN116186541A (en) Training method and device for recommendation model
CN113495991A (en) Recommendation method and device
CN107357847B (en) Data processing method and device
CN112667770A (en) Method and device for classifying articles
CN108959289B (en) Website category acquisition method and device
CN110766431A (en) Method and device for judging whether user is sensitive to coupon
CN110827101A (en) Shop recommendation method and device
CN113742593A (en) Method and device for pushing information
CN112906723A (en) Feature selection method and device
CN111833085A (en) Method and device for calculating price of article
CN110738538A (en) Method and device for identifying similar articles
CN112783956B (en) Information processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination