Disclosure of Invention
The present disclosure provides an information recommendation model training scheme and a corresponding information recommendation scheme. By utilizing the scene characteristics of the user, accurate information delivery is realized.
According to a first aspect of the embodiments of the present disclosure, there is provided an information recommendation model training method, including: extracting user historical behavior characteristic information and user attribute information, wherein the user historical behavior characteristic information comprises historical scene characteristic information associated with user behaviors; respectively converting the historical scene characteristic information and the user attribute information by using an embedding layer to obtain corresponding historical scene characteristic vectors and user attribute characteristic vectors; and training a deep learning model by using the historical scene feature vector and the user attribute feature vector to obtain an information recommendation model.
In some embodiments, the historical scene characteristic information includes at least one of an occurrence period of a user behavior, a place where the behavior occurs, a type of a point of interest where the behavior occurs, and a distance between the place where the behavior occurs and a user's regular premises.
In some embodiments, the user attribute information includes at least one of a user representation and user statistics.
In some embodiments, the above method further comprises: and generating a user characteristic index table according to the mapping relation between the user attribute information and the user attribute characteristic vector.
In some embodiments, the above method further comprises: and generating a vector embedding index table according to the mapping relation between the historical scene characteristic information and the historical scene characteristic vector.
According to a second aspect of the embodiments of the present disclosure, there is provided an information recommendation model training apparatus, including: an extraction module configured to extract user historical behavior feature information and user attribute information, wherein the user historical behavior feature information comprises historical scene feature information associated with user behavior; the conversion processing module is configured to perform conversion processing on the historical scene feature information and the user attribute information respectively by using the embedded layer so as to obtain corresponding historical scene feature vectors and corresponding user attribute feature vectors; and the training module is configured to train a deep learning model by using the historical scene feature vector and the user attribute feature vector to obtain an information recommendation model.
According to a third aspect of the embodiments of the present disclosure, there is provided an information recommendation model training apparatus, including: a memory configured to store instructions; a processor coupled to the memory, the processor configured to execute a method for implementing the information recommendation model training method according to any of the embodiments described above based on instructions stored in the memory.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an information recommendation method, including: extracting user identification and current scene characteristic information from an information recommendation request sent by a user; acquiring a user attribute feature vector associated with the user identifier; converting the current scene feature information into a corresponding current scene feature vector; and processing the user attribute feature vector and the current scene feature vector by using the information recommendation model in any embodiment to obtain recommendation information matched with the current scene of the user.
In some embodiments, obtaining a user attribute feature vector associated with the user identification comprises: according to the user feature index table in any of the above embodiments, a user attribute feature vector associated with the user identifier is obtained.
In some embodiments, converting the current scene feature information into a corresponding current scene feature vector comprises: according to the vector embedding index table in any of the embodiments, the current scene feature vector corresponding to the current scene feature information of the user is obtained.
According to a fifth aspect of the embodiments of the present disclosure, there is provided an information recommendation apparatus including: the extraction module is configured to extract a user identifier and current scene characteristic information from an information recommendation request sent by a user; a first feature vector acquisition module configured to acquire a user attribute feature vector associated with the user identifier; a second feature vector obtaining module configured to convert the current scene feature information into a corresponding current scene feature vector; the information processing module is configured to process the user attribute feature vector and the current scene feature vector by using the information recommendation model according to any one of the embodiments to obtain recommendation information matched with the current scene of the user.
According to a sixth aspect of the embodiments of the present disclosure, there is provided an information recommendation apparatus including: a memory configured to store instructions; a processor coupled to the memory, the processor configured to execute a method for implementing the information recommendation method according to any of the embodiments described above based on instructions stored in the memory.
According to a seventh aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, in which computer instructions are stored, and when executed by a processor, the computer-readable storage medium implements the method according to any of the embodiments described above.
Other features of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
The relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Fig. 1 is a schematic flow chart of an information recommendation model training method according to an embodiment of the present disclosure. In some embodiments, the following information recommendation model training method steps are performed by an information recommendation model training apparatus.
In step 101, user historical behavior feature information and user attribute information are extracted, wherein the user historical behavior feature information comprises historical scene feature information associated with user behaviors.
In some embodiments, the historical scene characteristic information includes at least one of an occurrence period of the user behavior, a place where the behavior occurs, a type of point of interest where the behavior occurs, and a distance of the place where the behavior occurs from the user's regular premises.
For example, if a user browses, collects, searches, purchases or the like at 11 points on saturday night, 10-12 points on saturday night are used as the occurrence period of the user behavior.
Additionally, the place where the action occurred may be a code, such as a zip code, of the user's current location.
The type of a Point of Interest (POI) where a behavior occurs is a type of an area where the behavior occurs, such as a home, an office, a mall, a school, and the like.
The customer premises may be set to the geographical location where the customer is most frequently present at night. The place where the behavior occurs is a floating point number from the customer premises. The distance may be split into a predetermined length, for example, the distance may be split into 4 buckets of [0,10 ], [10, 30 ], [30, 100 ], [100 ], in kilometers. Thus, the distance is converted into a type variable, and the value of the type variable is determined according to which sub-bucket the actual distance falls into.
In some embodiments, the user attribute information includes at least one of a user representation and user statistics.
For example, the user representation includes the user's gender, age, occupation, income, and the like. The statistical characteristic information includes some historical statistical data of the user, such as total consumption of the past year, how many times different types of items were viewed, and the like.
In step 102, the embedded layer is used to perform conversion processing on the historical scene feature information and the user attribute information respectively to obtain corresponding historical scene feature vectors and user attribute feature vectors.
It should be noted here that the historical scene feature information and the user attribute information are characterized by high dimensionality and very sparse. In order to reduce data dimension, reduce storage space, and increase computation speed, so as to improve generalization capability of the model, it is necessary to perform conversion processing by using an Embedding (Embedding) layer. Since the embedding layer itself is irrelevant to the inventive point of the present disclosure, it is not described here.
For example, the historical scene characteristic information comprises the occurrence time of the user behavior, the city of the occurrence location of the behavior, the type poi of the interest point where the behavior occurs, and the distance dist between the occurrence location of the behavior and the user regular location. After the embedding layer processing, obtaining an occurrence period vector EtimeWhere the action occurred, vector EcityType of interest point E where behavior occurspoiAnd the distance E between the behavior generating place and the user's regular stationdist. The scene feature is transformed from scene = (time, city, poi, dist) to Escene=(Etime, Ecity, Epoi, Edist)。
In addition, the user portrait profile is processed by the embedding layer to obtain a user portrait vector E
profile. Processing the item identification item through the embedding layer to obtain an item identification vector E
item. The user requests the information u = (,)
]Profile, stat) transform
. Wherein
]Is a list of user actions that include context information.
It should be noted here that since the sparseness of the user statistic is not serious, the user statistic stat can be processed without using the embedding layer.
In step 103, the deep learning model is trained by using the historical scene feature vector and the user attribute feature vector to obtain an information recommendation model.
In some embodiments, the user characteristic index table is generated according to a mapping relation between the user attribute information and the user attribute characteristic vector. And generating a vector embedding index table according to the mapping relation between the historical scene characteristic information and the scene characteristic vector.
By generating the user characteristic index table and the vector embedding index table, when the information recommendation model is used for recommending information to a user on line, the user attribute characteristic vector and the characteristic vector of the current scene of the user can be obtained by inquiring the corresponding index table, so that the speed of on-line processing is improved.
For example, the related information may be stored in the index table in a key value pair (key: value) manner. For example:
time index: (time period ID: E)time)
City index: (City ID: E)city)
Poi indexes: (POI type ID: E)poi)
Dist index: (dist barrel: E)dist)
Profile index: (Profile ID: E)profile)
Item ID indexing: (article ID: E)item)
User indexing: (user ID: E)u)
Fig. 2 is a schematic structural diagram of an information recommendation model training apparatus according to an embodiment of the present disclosure. As shown in fig. 2, the information recommendation model training apparatus includes an extraction module 21, a conversion processing module 22, and a training module 23.
The extraction module 21 is configured to extract user historical behavior feature information and user attribute information, wherein the user historical behavior feature information includes historical scenario feature information associated with user behavior.
In some embodiments, the historical scene characteristic information includes at least one of an occurrence period of the user behavior, a place where the behavior occurs, a type of point of interest where the behavior occurs, and a distance of the place where the behavior occurs from the user's regular premises.
In some embodiments, the user attribute information includes at least one of a user representation and user statistics.
The conversion processing module 22 is configured to perform conversion processing on the historical scene feature information and the user attribute information by using the embedding layer, respectively, to obtain corresponding historical scene feature vectors and user attribute feature vectors.
It should be noted here that the historical scene feature information and the user attribute information are characterized by high dimensionality and very sparse. In order to reduce data dimension, reduce storage space, and increase computation speed, so as to improve generalization capability of the model, it is necessary to perform conversion processing by using an Embedding (Embedding) layer.
The training module 23 is configured to train the deep learning model with the historical scene feature vectors and the user attribute feature vectors to obtain an information recommendation model.
In some embodiments, the conversion processing module 22 is further configured to generate a user feature index table according to a mapping relationship between the user attribute information and the user attribute feature vector after the group training is finished. And generating a vector embedding index table according to the mapping relation between the scene characteristic information and the scene characteristic vector.
Fig. 3 is a schematic structural diagram of an information recommendation model training apparatus according to another embodiment of the present disclosure. As shown in fig. 3, the information recommendation model training apparatus includes a memory 31 and a processor 32.
The memory 31 is used for storing instructions, the processor 32 is coupled to the memory 31, and the processor 32 is configured to execute the method according to any embodiment in fig. 1 based on the instructions stored in the memory.
As shown in fig. 3, the apparatus further includes a communication interface 33 for information interaction with other devices. Meanwhile, the device also comprises a bus 34, and the processor 32, the communication interface 33 and the memory 31 are communicated with each other through the bus 34.
The memory 31 may comprise a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 31 may also be a memory array. The storage 31 may also be partitioned and the blocks may be combined into virtual volumes according to certain rules.
Further, the processor 32 may be a central processing unit CPU or may be an application specific integrated circuit ASIC or one or more integrated circuits configured to implement embodiments of the present disclosure.
The present disclosure also relates to a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the instructions, when executed by a processor, implement the method according to any one of the embodiments in fig. 1.
Fig. 4 is a flowchart illustrating an information recommendation method according to an embodiment of the disclosure. In some embodiments, the following information recommendation method steps are performed by an information recommendation device.
In step 401, user identification and current scene feature information are extracted from an information recommendation request sent by a user.
In some embodiments, the current scene characteristic information includes at least one of an occurrence period of a behavior of the user, a place where the behavior occurs, a type of a point of interest where the behavior occurs, and a distance between the place where the behavior occurs and a regular residence of the user.
At step 402, a user attribute feature vector associated with a user identification is obtained.
For example, the user attribute information of the user may be queried according to the user identifier, and then the user attribute information may be converted to generate the user attribute feature vector. In addition, the user attribute feature vector of the user can be inquired by using the user feature index table generated by the embodiment, so that the calculation amount of the online service is effectively reduced, and the response speed is improved.
In step 403, the current scene feature information is converted into a corresponding current scene feature vector.
For example, the current scene feature information may be subjected to a conversion process to generate a corresponding scene feature vector. In addition, the vector generated by the embodiment can be used to embed into the index table to generate the corresponding scene feature vector, so as to effectively reduce the calculation amount of the online service and improve the response speed.
In step 404, the trained information recommendation model is used to process the user attribute feature vector and the current scene feature vector to obtain recommendation information matched with the current scene of the user.
Here, the information recommendation model trained in fig. 1 is used for processing. For example, the information recommendation model calculates the recommendation probability of each item in the current scene of the user according to the input user attribute feature vector and the current scene feature vector. And then the recommendation probabilities are ranked from high to low so as to recommend one or more item information with the highest recommendation probability to the user.
For example, the information recommendation model includes a CNN (Convolutional Neural Network) for processing the input user attribute feature vector and the current scene feature vector. In addition, the information recommendation model further comprises a Softmax layer, which is used for performing corresponding classification processing on the output of the CNN so as to obtain the recommendation probability of each item in the current scene of the user.
Fig. 5 is a schematic structural diagram of an information recommendation device according to an embodiment of the present disclosure. As shown in fig. 5, the information recommendation apparatus includes an extraction module 51, a first feature vector acquisition module 52, a second feature vector acquisition module 53, and an information processing module 54.
The extracting module 51 is configured to extract the user identifier and the current scene feature information from the information recommendation request sent by the user.
In some embodiments, the scene characteristic information includes at least one of an occurrence period of the behavior of the user, a place where the behavior occurs, a type of a point of interest where the behavior occurs, and a distance between the place where the behavior occurs and the regular premises of the user.
The first feature vector acquisition module 52 is configured to acquire a user attribute feature vector associated with the user identification.
For example, the user attribute information of the user may be queried according to the user identifier, and then the user attribute information may be converted to generate the user attribute feature vector. In addition, the user attribute feature vector of the user can be inquired by using the user feature index table generated by the embodiment, so that the calculation amount of the online service is effectively reduced, and the response speed is improved.
The second feature vector obtaining module 53 is configured to convert the current scene feature information into a corresponding current scene feature vector.
For example, the current scene feature information may be subjected to a conversion process to generate a corresponding scene feature vector. In addition, the vector generated by the embodiment can be used to embed into the index table to generate the corresponding scene feature vector, so as to effectively reduce the calculation amount of the online service and improve the response speed.
The information processing module 54 is configured to process the user attribute feature vectors and the current scene feature vectors using the trained information recommendation model to obtain recommendation information that matches the current scene of the user.
Here, the information recommendation model trained in fig. 1 is used for processing. For example, the information recommendation model calculates the recommendation probability of each item in the current scene of the user according to the input user attribute feature vector and the current scene feature vector. And then the recommendation probabilities are ranked from high to low so as to recommend one or more item information with the highest recommendation probability to the user.
Fig. 6 is a schematic structural diagram of an information recommendation device according to another embodiment of the present disclosure. As shown in fig. 6, the information recommendation device includes a memory 61, a processor 62, a communication interface 63, and a bus 64. Fig. 6 differs from fig. 3 in that, in the embodiment shown in fig. 6, the processor 62 is configured to perform the method referred to in any of the embodiments of fig. 4 based on instructions stored in the memory.
The present disclosure also relates to a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the instructions, when executed by a processor, implement the method according to any one of the embodiments in fig. 4.
In some embodiments, the functional unit modules described above may be implemented as a general purpose Processor, a Programmable Logic Controller (PLC), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable Logic device, discrete gate or transistor Logic, discrete hardware components, or any suitable combination thereof for performing the functions described in this disclosure.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The description of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the disclosure in the form disclosed. Many modifications and variations will be apparent to practitioners skilled in this art. The embodiment was chosen and described in order to best explain the principles of the disclosure and the practical application, and to enable others of ordinary skill in the art to understand the disclosure for various embodiments with various modifications as are suited to the particular use contemplated.