CN115982452A - Information recommendation method and device, electronic equipment and storage medium - Google Patents

Information recommendation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115982452A
CN115982452A CN202211633738.2A CN202211633738A CN115982452A CN 115982452 A CN115982452 A CN 115982452A CN 202211633738 A CN202211633738 A CN 202211633738A CN 115982452 A CN115982452 A CN 115982452A
Authority
CN
China
Prior art keywords
information
behavior
word
sequence
time interval
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
CN202211633738.2A
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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202211633738.2A priority Critical patent/CN115982452A/en
Publication of CN115982452A publication Critical patent/CN115982452A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides an information recommendation method and device, electronic equipment and a storage medium, and belongs to the technical field of artificial intelligence. The method comprises the following steps: acquiring an object behavior sequence of a target object; the object behavior sequence comprises behavior information of a target object; inputting the object behavior sequence into an embedded layer model to obtain object coding information; the embedded layer model is used for modeling the time interval of the behavior information; inputting the object coding information into an encoder model to obtain a semantic expression vector; the encoder model is used for modeling semantic information in the object behavior sequence; and recommending information to the target object based on the semantic expression vector. The method and the device are beneficial to improving the accuracy of information recommendation and meanwhile improve the applicability of the method.

Description

Information recommendation method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to an information recommendation method and apparatus, an electronic device, and a storage medium.
Background
In the fields of recommendation, advertisement, wind control and the like, the object behavior sequence is important information, and the object behavior sequence is modeled to better recommend information, so that the method is an important method for improving the service quality and the satisfaction degree. In the related art, a common method is to model behavior characteristics, focus on the design process of the characteristics, need more expert experience, have low model accuracy and have unsatisfactory information recommendation effect.
Disclosure of Invention
The embodiment of the application mainly aims to provide an information recommendation method, an information recommendation device, an electronic device and a storage medium, and aims to improve the accuracy of information recommendation.
In order to achieve the above object, a first aspect of an embodiment of the present application provides an information recommendation method, where the method includes:
acquiring an object behavior sequence of a target object; the object behavior sequence comprises behavior information of a target object;
inputting the object behavior sequence into an embedded layer model to obtain object coding information; the embedded layer model is used for modeling the time interval of the behavior information;
inputting the object coding information into an encoder model to obtain a semantic expression vector; the encoder model is used for modeling semantic information in the object behavior sequence;
and recommending information to the target object based on the semantic expression vector. By modeling the time intervals in the object behavior sequence, continuous relevant behaviors and idle behaviors of the object can be distinguished conveniently when information recommendation is carried out, and meanwhile, the recommendation accuracy is improved without depending on expert experience; and modeling is carried out based on the embedded layer, so that fusion with other models is convenient to realize, and the applicability of the models is improved.
In some embodiments, the inputting the object behavior sequence into an embedded layer model to obtain object coding information includes:
constructing a word sequence according to the object behavior sequence; the word sequence comprises behavior information and time interval information which are arranged at intervals;
determining object coding information according to the word sequence; the object coding information includes position coding information, word type coding information, and word value coding information set based on the word sequence.
In some embodiments, the object behavior sequence is used to characterize a plurality of behavior information arranged in chronological order; according to the object behavior sequence, constructing a word sequence, comprising:
inserting time interval information between every two behavior information to construct a word sequence; the time interval information is used for representing the time interval between the front behavior information and the rear behavior information of the time interval information;
updating the corner marks of each word information in the word sequence in an increasing mode; wherein the corner mark is encoded starting from zero.
In some embodiments, determining object coding information from the sequence of words comprises:
carrying out embedding coding processing on the corner marks of the word information to obtain position coding information at the corresponding positions;
performing embedding coding processing on the type of the word information to obtain word type coding information at a corresponding position; the type of the word information includes a behavior and a time interval.
In some embodiments, determining object coding information from the sequence of words comprises:
if the word information in the word sequence belongs to the behavior information, determining the word value coding information as the behavior characteristic information of the corresponding behavior information;
if the word information in the word sequence belongs to the time interval information, determining word value coding information through the following vectors:
Figure BDA0004006801880000021
wherein, convert (K) i ) For characterizing the minimum time unit required to convert a time interval into a service; k i For characterizing time interval information, E time For characterizing the preset domain vector.
In some embodiments, inputting the object coding information into an encoder model to obtain a semantic representation vector, includes:
and processing the object coding information through a transformer structure to obtain a semantic expression vector.
In some embodiments, the method further comprises:
updating the semantic representation vector by average pooling.
In order to achieve the above object, a second aspect of an embodiment of the present application provides an information recommendation apparatus, including:
the system comprises a first module, a second module and a third module, wherein the first module is used for acquiring an object behavior sequence of a target object; the object behavior sequence comprises behavior information of a target object;
the second module is used for inputting the object behavior sequence into an embedded layer model to obtain object coding information; the embedded layer model is used for modeling the time interval of the behavior information;
a third module, configured to input the object coding information into an encoder model to obtain a semantic representation vector; the encoder model is used for modeling semantic information in the object behavior sequence;
and the fourth module is used for recommending information to the target object based on the semantic expression vector.
In order to achieve the above object, a third aspect of the embodiments of the present application provides an electronic device, where the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the information recommendation method according to the first aspect when executing the computer program.
To achieve the above object, a fourth aspect of embodiments of the present application proposes a computer-readable storage medium storing a computer program, which when executed by a processor, implements the information recommendation method according to the first aspect.
The application provides an information recommendation method, an information recommendation device, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring an object behavior sequence of a target object; the object behavior sequence comprises behavior information of a target object; inputting the object behavior sequence into an embedded layer model to obtain object coding information; the embedded layer model is used for modeling the time interval of the behavior information; by modeling the time intervals in the object behavior sequence, continuous relevant behaviors and idle behaviors of the object can be distinguished conveniently when information recommendation is carried out, so that the recommendation accuracy is improved; and modeling is carried out based on the embedded layer, so that fusion with other models is convenient to realize, and the applicability of the models is improved. Meanwhile, inputting the object coding information into an encoder model to obtain a semantic expression vector; the encoder model is used for modeling semantic information in the object behavior sequence; and recommending information to the target object based on the semantic expression vector. By the method, the accuracy of information recommendation is improved, and meanwhile, the applicability of the method is improved.
Drawings
Fig. 1 is a flowchart of an information recommendation method provided in an embodiment of the present application;
FIG. 2 is a flow diagram for one embodiment of step S200 in FIG. 1;
FIG. 3 is a flow diagram for one embodiment of step S210 in FIG. 2;
FIG. 4 is a flowchart of one embodiment of step S220 in FIG. 2;
fig. 5 is a schematic structural diagram of an information recommendation device according to an embodiment of the present application;
fig. 6 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that although functional blocks are partitioned in a schematic diagram of an apparatus and a logical order is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the partitioning of blocks in the apparatus or the order in the flowchart. The terms first, second and the like in the description and in the claims, and the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the application.
First, several terms referred to in the present application are resolved:
artificial Intelligence (AI): is a new technical science for researching and developing theories, methods, technologies and application systems for simulating, extending and expanding human intelligence; artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produces a new intelligent machine that can react in a manner similar to human intelligence, and research in this field includes robotics, language recognition, image recognition, natural language processing, and expert systems, among others. The artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results.
Natural Language Processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that enable efficient communication between humans and computers using natural language. Natural language processing is a science integrating linguistics, computer science and mathematics. Therefore, the research in this field will involve natural language, i.e. the language that people use everyday, so it is closely related to the research of linguistics. Natural language processing techniques typically include text processing, information extraction, semantic understanding, machine translation, robotic question answering, knowledge mapping, and many other directions.
Embedding (Embedding): is a way to convert discrete variables into a continuous vector representation. In the neural network, embedding can reduce the spatial dimension of discrete variables, can also perform meaning representation on the vectors, and has outstanding effects in the aspects of visualizing the relationship between different discrete variables, serving as the input of a supervised learning task, searching nearest neighbor and the like.
With the continuous development of internet applications, objects can leave a large amount of object behaviors on the internet and on a platform. For the fields of recommendation, advertisement, wind control and the like, the object behavior sequence is important information, the object behavior sequence is modeled to better recommend information, and the method is an important method for improving the service quality and the satisfaction degree. The object behavior sequence is usually a list composed of object specific behaviors, and each specific behavior in the list usually includes two items, the time when the behavior occurs and the specific behavior of the object.
In the related art, the historical behavior sequence of an object is usually modeled by calculating statistical features for the behavior sequence. The method focuses on how to design features, and more expert experience and feature engineering are required. In addition, the existing method for modeling the behavior sequence in deep learning only considers the sequence, and ignores the modeling of the behavior interval time. The time interval contains much information in the behavior sequence, for example, when a customer browses commodities on the e-commerce platform, similar commodities of the same category are generally browsed at close time intervals, and other commodities of another category are generally browsed after a longer time interval; thus, a certain prejudice can be made on the behavior of the object by modeling the time interval.
Based on this, the embodiment of the application provides an information recommendation method, an information recommendation device, an electronic device and a storage medium, and aims to improve the recommendation accuracy. Firstly, acquiring an object behavior sequence of a target object; the object behavior sequence comprises behavior information of a target object; inputting the object behavior sequence into an embedded layer model to obtain object coding information; the embedded layer model is used for modeling the time interval of the behavior information; by modeling the time intervals in the object behavior sequence, continuous relevant behaviors and idle behaviors of the object can be distinguished conveniently when information recommendation is carried out, so that the recommendation accuracy is improved; and modeling is carried out based on the embedded layer, so that fusion with other models is convenient to realize, and the applicability of the models is improved. Secondly, inputting the object coding information into an encoder model to obtain a semantic expression vector; the encoder model is used for modeling semantic information in the object behavior sequence; and recommending information to the target object based on the semantic expression vector. By the method, the accuracy of information recommendation is improved, and meanwhile, the applicability of the method is improved.
The information recommendation method, the information recommendation device, the electronic device, and the storage medium provided in the embodiments of the present application are specifically described in the following embodiments, and first, the information recommendation method in the embodiments of the present application is described.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence base technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The embodiment of the application provides an information recommendation method, and relates to the technical field of artificial intelligence. The information recommendation method provided by the embodiment of the application can be applied to a terminal, a server side and software running in the terminal or the server side. In some embodiments, the terminal may be a smartphone, tablet, laptop, desktop computer, or the like; the server side can be configured into an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and cloud servers for providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN (content delivery network) and big data and artificial intelligence platforms; the software may be an application or the like that implements the information recommendation method, but is not limited to the above form.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In each embodiment of the present application, when data related to the user identity or characteristic, such as user information, user behavior data, user history data, and user location information, is processed, permission or consent of the user is obtained, and the data collection, use, and processing comply with relevant laws and regulations and standards of relevant countries and regions. In addition, when the embodiment of the present application needs to acquire sensitive personal information of a user, individual permission or individual consent of the user is obtained through a pop-up window or a jump to a confirmation page, and after the individual permission or individual consent of the user is definitely obtained, necessary user-related data for enabling the embodiment of the present application to operate normally is acquired.
Fig. 1 is an optional flowchart of an information recommendation method provided in an embodiment of the present application, and the method in fig. 1 may include, but is not limited to, steps S100 to S400.
Step S100, acquiring an object behavior sequence of a target object; the object behavior sequence comprises behavior information of a target object;
in some embodiments, the target object is an object that needs information recommendation. Illustratively, in a shopping class application, a shopping class or a certain single item is recommended to a target object through a terminal. Or, in the news application, information recommendation of the target object is realized by displaying a certain type of news at the prominent position of the screen of the terminal. Meanwhile, the method in the application can also be used in the fields of advertisement, wind control and the like, and the application is not limited. Specifically, the information needed by the target object is obtained through modeling analysis of the object behavior sequence of the target object; in some possible implementations, it is desirable to obtain a sequence of object behaviors of the target object. In particular, a sequence of behaviors can be used to characterize a sequence of behavior events that occur in a certain order in the time dimension. For example, in the short video class application, the behavior information of the object may be a series of click actions of the object for characterizing the short video class of interest selected by the object. According to the method and the device, the behavior of the object is modeled and analyzed by acquiring the click behavior. By acquiring the object behavior sequence of the target object, the subsequent modeling analysis on the object behavior sequence is facilitated, so that the recommendation information of the target object is determined.
Step S200, inputting the object behavior sequence into an embedded layer model to obtain object coding information; the embedded layer model is used for modeling the time interval of the behavior information;
in some embodiments, the time interval of behavior information occurrence is modeled through the embedded layer model, and the time interval influence factor is added in the process of information recommendation of object behaviors, so that the accuracy of information recommendation is improved. In some possible implementation modes, the embedded layer model is established on the embedding layer, so that time modeling is realized, prediction or recommendation work is easily performed by combining with other behavior models, and the application range of information recommendation is improved. Specifically, an imbedding list is finally output through the action of an embedded layer model, and information related to time intervals is introduced into imbedding, so that information recommendation based on the time intervals is achieved.
In some possible implementations, the input to the embedded layer model is a sequence of object behaviors. Specifically, the object behavior sequence may be a list, and the length of the list is L. Each sequence of behaviors in the list includes a timestamp and specific behavior information. And the list is sorted according to the time sequence of the behavior, the earlier the behavior in the list occurs, the later the behavior in the list occurs. For the object behavior sequence input embedding layer model in the above embodiment, the output may be the object encoding information E represented by embedding, and the size of a single sample is (M, H). M is the length of the imbedding list, M =2 × l-1.H is the embedding hidden vector length. For the short video class application scene, for a series of click actions of an object, the time interval between every two different click actions is used for representing the degree of the object's likeness to the selected short video class, and the behavior of the object can be predicted through the time interval; and further used in the field of information recommendation.
Step S300, inputting the object coding information into an encoder model to obtain a semantic expression vector; the encoder model is used for modeling semantic information in the object behavior sequence;
in some embodiments, a semantic representation vector of the object behavior is obtained through the encoder model, so as to facilitate subsequent information recommendation. Specifically, taking click rate prediction in recommendation as an example, modeling of historical behaviors of a client is an important method for realizing click rate prediction, and generally, modeling of historical behaviors of the client into a semantic vector with a fixed size, then piecing together with other features and inputting the semantic vector into a machine learning training model to perform probability prediction on click rate, so as to realize information recommendation on a target object. Therefore, the object coding information containing the time interval information is converted into the semantic vector with the fixed size through the encoder, and the splicing with other semantic features is realized, so that information recommendation is realized. Of course, the present application does not limit the modeling process, the stitching process, and the selection and training process of the model for other features.
And step S400, recommending information to the target object based on the semantic expression vector.
In some embodiments, the semantic representation vector comprises a time interval of behavior information of the target object, and information recommendation is performed on the target object based on the semantic representation vector; the influence of the time interval of the object behaviors on the object behavior prediction can be fully considered, and the accuracy of information recommendation is improved. Illustratively, prediction of object behavior may be achieved through a DNN model, thereby providing recommendation information. It will be appreciated that the prediction of object behavior may also be achieved by other artificial intelligence models. The application does not limit the specific model selection.
Therefore, the application provides an information recommendation method, which includes the steps that an object behavior sequence of a target object is obtained; the object behavior sequence comprises behavior information of a target object; inputting the object behavior sequence into an embedded layer model to obtain object coding information; the embedded layer model is used for modeling the time interval of the behavior information; by modeling the time intervals in the object behavior sequence, continuous relevant behaviors and idle behaviors of the object can be distinguished conveniently when information recommendation is carried out, so that the recommendation accuracy is improved; and modeling is carried out based on the embedded layer, so that fusion with other models is convenient to realize, and the applicability of the models is improved. Meanwhile, inputting the object coding information into a coder model to obtain a semantic expression vector; the encoder model is used for modeling semantic information in the object behavior sequence; and recommending information to the target object based on the semantic expression vector. By the method, the accuracy of information recommendation is improved, and meanwhile, the applicability of the method is improved.
Referring to fig. 2, in some embodiments, step S200 may include, but is not limited to, step S210 to step S220:
step S210, constructing a word sequence according to the object behavior sequence; the word sequence comprises behavior information and time interval information which are arranged at intervals;
step S220, determining object coding information according to the word sequence; the object coding information includes position coding information, word type coding information, and word value coding information set based on the word sequence.
In some embodiments, the embedded layer model models based on the time when the behavior information occurs, and specifically, the time interval of the behavior information may be written into the object behavior sequence to generate the word sequence. Illustratively, the sequence of words may be a token sequence. Inputting an object behavior sequence B with the length of L; the corresponding outputs are: token sequence K, length M, M =2 × l-1. For example, the sequence of object behaviors can be represented by the following vector B:
B=[B 0 ,B 1 ,…,B L-1 ]formula (1)
Wherein, B i Is the ith specific object behavior; b i =[A i ,T i ],A i For specific behavioral information, T i Is the time at which the action occurred.
It can be understood that, as can be seen from an embodiment of the object behavior sequence, the object behavior sequence includes behavior information and occurrence time of the behavior information, and the required time interval needs to be implemented by adding time interval information in the object behavior sequence, so as to facilitate subsequent analysis and recommendation of the time interval and the behavior information. In some possible implementation manners, the word sequence is formed by sequentially arranging the behavior information and the time interval information, so that the word information in the word sequence may represent different types of data, and the different types of data are uniformly represented by the object coding information, so that subsequent semantic representation and information recommendation are facilitated. Specifically, three pieces of encoding information are set based on the specific position, type and value of the word information, which are the position encoding information, the word type encoding information and the word value encoding information, respectively. By means of the word sequence setting, modeling of time interval information can be achieved, and accuracy of information recommendation is improved.
Referring to fig. 3, in some embodiments, the object behavior sequence is used to represent a plurality of behavior information arranged according to a chronological order; step S210 may include, but is not limited to, including steps S211 to S212:
s211, inserting time interval information between every two behavior information, and constructing a word sequence; the time interval information is used for representing the time interval between the front behavior information and the rear behavior information of the time interval information;
s212, updating the corner marks of each word information in the word sequence in an increasing mode; wherein the corner mark is encoded starting from zero.
In some embodiments, time interval information may be placed between behavior information to characterize the time interval between two behavior information before and after it. For the original object behavior sequence, after inserting new time interval information, the corner mark corresponding to the behavior information needs to be updated. Based on the object behavior sequence B in the above embodiment, the corresponding output word sequence is: token sequence K, length M, M =2 × l-1. Inserting the time interval information in B, the token sequence K is represented by the following vector:
K=[K 0 ,K 1 ,…,K M-1 ]formula (2)
Wherein, K i Is the ith word information. Specifically, the token sequence K includes embedding of two tokens, one is specific behavior (behavior information) of the object, and the other is time interval information. Exemplarily, K i And B in the above embodiment i The relationship of (1) is: when i is an even number, K i Is a specific behavior, K i =A i/2 (ii) a When i is odd, K i Representing time interval information between two adjacent behaviors, when K i =T (i+1)/2 -T (i-1)/2 . The word sequence is constructed through the embodiment, and the time interval information is conveniently modeled and analyzed subsequently.
Referring to fig. 4, in some embodiments, step S220 may include, but is not limited to, step S221 to step S222:
step S221, carrying out embedding coding processing on the corner mark of the word information to obtain position coding information at a corresponding position;
step S222, performing embedding coding processing on the type of the word information to obtain word type coding information at a corresponding position; the type of the word information includes a behavior and a time interval.
In some embodiments, the location coding and type coding are performed based on word information at different locations. Specifically, the position coding information can be obtained through an angle mark of each word information, and each subscript position corresponds to embedding to obtain the position coding information. I.e. the position-coding information is represented by the following vector:
e position =[e 0 position ,e 1 position ,…]formula (3)
Wherein e is 0 position 、e 1 position Embedding codes for characterizing location information. It should be noted that the Embedding code using the position information indicates a position where the word information appears in the word sequence, where the Embedding code may be obtained through training or may be obtained through calculation using a preset formula, and the application is not limited in this respect.
Also, the word sequence is composed by alternately arranging the behavior information and the time interval information for distinguishing the behavior part and the time interval part. And for each different type, corresponding embedding each type in the word sequence to obtain word type coding information. The word type coding information is represented by the following vector:
e token type =[e 0 token type ,e 1 token type ,…]formula (4)
Wherein, said e i token type And the embedding codes are used for representing the type of the ith word information. Similarly, the imbedding code using the type information represents a specific type of the word information, wherein the imbedding code can be obtained through training or can be obtained through calculation by using a preset formula, and the application is not limited. It can be understood that the position coding information and the part-of-speech coding information after the embedding coding process have the same dimension.
In some embodiments, step S220 may include, but is not limited to including, steps S2201 to S2202:
s2201, if the word information in the word sequence belongs to the behavior information, determining word value coding information as behavior characteristic information of the corresponding behavior information;
s2202, if the word information in the word sequence belongs to the time interval information, determining word value coding information through the following vectors:
Figure BDA0004006801880000091
wherein, convert (K) i ) For characterizing the minimum time unit required to convert a time interval into a service; k is i For characterizing time interval information, E time For characterizing the preset domain vector.
In some embodiments, the word sequence includes two types of word information, namely behavior information and time interval information, and for different types, the representation modes of word value coding information are also different. Specifically, for word information of a behavior type, word value coding information may obtain corresponding embedding for a corresponding behavior characteristic. For the word information of the time interval type, the word value coding information can be represented by a vector shown in formula (5). The convert () function may be used to convert a date to a function of a specific data type, and at the same time, date/time data may be displayed in a different format. In the present application, convert (K) i ) Will separate the time interval K i The minimum time unit required for conversion to a service may be generally in units of seconds. It will be appreciated that the time difference distribution is very different, spanning from a few seconds to several days, several years, and therefore, the normalization process is performed using a log function. Meanwhile, the time difference can be less than one second or even 0 second, and a log function can be used to generate a large negative number or even an error. Thus, convert (K) was used i ) The +1 mode carries out vector representation, and ensures that the value after the log is within a reasonable range. It should be noted that the foregoing embodiments are exemplary examples, and do not limit a specific representation method of the word value encoded information.
In some possible implementations, the word-valued encoded information is represented by the following vector:
e value =[e 0 value ,e 1 value ,…]formula (6)
Wherein, said e i value And the word value coding information is used for representing the ith word information.
Based on the position coding information, the word type coding information and the word value coding information, the final object coding information can be represented by the following vectors:
e=[e 0 ,e 1 ,……]formula (7)
Wherein e is i =e i position +e i tokentype +e i value . The vector representation of the object coding information is obtained through the formula (7), wherein the object behavior sequence of the time interval is represented, so that the accuracy of information recommendation is improved based on the time interval.
In some embodiments, step S300 may include, but is not limited to including, step S310:
and step S310, processing the object coding information through a transformer structure to obtain a semantic expression vector.
In some embodiments, the transformer structure is different from the CNN and RNN used within the deep learning task, wherein the Bert model is a model constructed based on the transformer structure. the transform structure adopts an encoer-decoder framework, is more complex than an Attention model and has more obvious effect. Specifically, in the embodiment provided by the present application, the object coding information E may be processed by a transformer structure, so as to obtain a mixed semantic vector list a = [ a ] 1 ,A 2 ,…,A L-1 ]The size of a single sample is (L, H). And through semantic representation, subsequent information recommendation processing is facilitated.
In some embodiments, the information recommendation method may include, but is not limited to, step S320:
step S320, updating the semantic expression vector by average pooling.
In some embodiments, the accuracy of information recommendation is improved by extracting higher-order features through an average pooling process. Specifically, the mixed semantic vector list a is subjected to average pooling processing to obtain a semantic expression vector of the object behavior sequence, and the semantic expression vector is expressed by the following vectors:
Figure BDA0004006801880000101
wherein S is i Is the ith value of S.
The application provides an information recommendation method, which comprises the following steps: acquiring an object behavior sequence of a target object; the object behavior sequence comprises behavior information of a target object; inputting the object behavior sequence into an embedded layer model to obtain object coding information; the embedded layer model is used for modeling the time interval of the behavior information; by modeling the time intervals in the object behavior sequence, continuous relevant behaviors and idle behaviors of the object can be distinguished conveniently when information recommendation is carried out, so that the recommendation accuracy is improved; and modeling is carried out based on the embedded layer, so that fusion with other models is convenient to realize, and the applicability of the models is improved. Meanwhile, inputting the object coding information into an encoder model to obtain a semantic expression vector; the encoder model is used for modeling semantic information in the object behavior sequence; and recommending information to the target object based on the semantic expression vector. By the method, the accuracy of information recommendation is improved, and meanwhile, the applicability of the method is improved.
It should be noted that the information recommendation method in the present application may also be used in video playing applications, and by obtaining object behavior information, such as a behavior of sending a bullet screen, a behavior of sharing video connection, and the like; the time intervals in the behavior sequence are subjected to modeling analysis through the method provided by the application, so that the accuracy of information recommendation is improved. It is understood that the method provided by the application is also applicable to other recommendation fields such as advertisement, wind control and the like.
Referring to fig. 5, an embodiment of the present application further provides an information recommendation apparatus, which can implement the information recommendation method, and the apparatus includes:
a first module 510, configured to obtain an object behavior sequence of a target object; the object behavior sequence comprises behavior information of a target object;
a second module 520, configured to input the object behavior sequence into an embedded layer model to obtain object coding information; the embedded layer model is used for modeling the time interval of the behavior information;
a third module 530, configured to input the object coding information into an encoder model to obtain a semantic representation vector; the encoder model is used for modeling semantic information in the object behavior sequence;
a fourth module 540, configured to recommend information to the target object based on the semantic representation vector.
In some embodiments, the second module comprises a first unit for constructing a word sequence according to the object behavior sequence; the word sequence comprises behavior information and time interval information which are set at intervals; determining object coding information according to the word sequence; the object coding information includes position coding information, word type coding information, and word value coding information set based on the word sequence.
In some embodiments, the object behavior sequence is used to represent a plurality of behavior information arranged according to a time sequence, and the first unit is further used to insert time interval information between every two behavior information to construct a word sequence; the time interval information is used for representing the time interval between the front behavior information and the rear behavior information of the time interval information; updating the corner marks of each word information in the word sequence in an increasing mode; wherein the corner mark is encoded starting from zero.
In some embodiments, the first unit is further configured to perform embedding coding processing on the corner mark of the word information to obtain position coding information at a corresponding position; performing embedding coding processing on the type of the word information to obtain word type coding information at a corresponding position; the type of the word information includes a behavior and a time interval.
In some embodiments, the second module is further configured to determine, if the word information in the word sequence belongs to the behavior information, that the word value coding information is behavior feature information of the corresponding behavior information; if the word information in the word sequence belongs to the time interval information, determining word value coding information through the following vectors:
Figure BDA0004006801880000111
wherein, convert (K) i ) For characterizing the minimum time unit required to convert a time interval into a service; k is i For characterizing time interval information, E time For characterizing the preset domain vector.
In some embodiments, the third module is further configured to process the object coding information through a transformer structure to obtain a semantic representation vector.
In some embodiments, the third module is further for updating the semantic representation vector by average pooling.
The specific implementation of the information recommendation apparatus is substantially the same as the specific implementation of the information recommendation method, and is not described herein again.
The device comprises a first module, a second module, a third module and a fourth module, wherein specifically, an object behavior sequence of a target object is obtained; the object behavior sequence comprises behavior information of a target object; inputting the object behavior sequence into an embedded layer model to obtain object coding information; the embedded layer model is used for modeling the time interval of the behavior information; by modeling the time intervals in the object behavior sequence, continuous related behaviors and idle behaviors of the object can be distinguished conveniently when information recommendation is carried out, so that the recommendation accuracy is improved; and modeling is carried out based on the embedded layer, so that fusion with other models is convenient to realize, and the applicability of the models is improved. Meanwhile, inputting the object coding information into an encoder model to obtain a semantic expression vector; the encoder model is used for modeling semantic information in the object behavior sequence; and recommending information to the target object based on the semantic expression vector. By means of the information recommendation device, the accuracy of information recommendation is improved, and meanwhile the applicability of the method is improved.
The embodiment of the application also provides electronic equipment, wherein the electronic equipment comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the information recommendation method. The electronic equipment can be any intelligent terminal including a tablet computer, a vehicle-mounted computer and the like.
Referring to fig. 6, fig. 6 illustrates a hardware structure of an electronic device according to another embodiment, where the electronic device includes:
the processor 601 may be implemented by a general-purpose CPU (central processing unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits, and is configured to execute a relevant program to implement the technical solution provided in the embodiment of the present application;
the memory 602 may be implemented in the form of a Read Only Memory (ROM), a static storage device, a dynamic storage device, or a Random Access Memory (RAM). The memory 602 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, related program codes are stored in the memory 602 and called by the processor 601 to execute the information recommendation method according to the embodiments of the present application;
an input/output interface 603 for implementing information input and output;
the communication interface 604 is configured to implement communication interaction between the device and other devices, and may implement communication in a wired manner (e.g., USB, network cable, etc.) or in a wireless manner (e.g., mobile network, WIFI, bluetooth, etc.);
a bus 605 that transfers information between the various components of the device (e.g., the processor 601, memory 602, input/output interfaces 603, and communication interfaces 604);
wherein the processor 601, the memory 602, the input/output interface 603 and the communication interface 604 are communicatively connected to each other within the device via a bus 605.
An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the information recommendation method.
The memory, as a non-transitory computer-readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer-executable programs. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
According to the information recommendation method, the information recommendation device, the electronic equipment and the storage medium, the object behavior sequence of the target object is obtained; the object behavior sequence comprises behavior information of a target object; inputting the object behavior sequence into an embedded layer model to obtain object coding information; the embedded layer model is used for modeling the time interval of the behavior information; by modeling the time intervals in the object behavior sequence, continuous relevant behaviors and idle behaviors of the object can be distinguished conveniently when information recommendation is carried out, so that the recommendation accuracy is improved; and modeling is carried out based on the embedded layer, so that fusion with other models is convenient to realize, and the applicability of the models is improved. Meanwhile, inputting the object coding information into an encoder model to obtain a semantic expression vector; the encoder model is used for modeling semantic information in the object behavior sequence; and recommending information to the target object based on the semantic expression vector. By the method, the accuracy of information recommendation is improved, and meanwhile, the applicability of the method is improved.
The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute limitations on the technical solutions provided in the embodiments of the present application, and it is obvious to those skilled in the art that the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems with the evolution of technologies and the emergence of new application scenarios.
It will be appreciated by those skilled in the art that the solutions shown in fig. 1-6 are not intended to limit the embodiments of the present application and may include more or fewer steps than those shown, or some of the steps may be combined, or different steps may be included.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
One of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
The terms "first," "second," "third," "fourth," and the like in the description of the application and the above-described figures, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that, in this application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the above-described division of units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing programs, such as a usb disk, a portable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and the scope of the claims of the embodiments of the present application is not limited thereto. Any modifications, equivalents, and improvements that may occur to those skilled in the art without departing from the scope and spirit of the embodiments of the present application are intended to be within the scope of the claims of the embodiments of the present application.

Claims (10)

1. An information recommendation method, characterized in that the method comprises:
acquiring an object behavior sequence of a target object; the object behavior sequence comprises behavior information of a target object;
inputting the object behavior sequence into an embedded layer model to obtain object coding information; the embedded layer model is used for modeling the time interval of the behavior information;
inputting the object coding information into a coder model to obtain a semantic expression vector; the encoder model is used for modeling semantic information in the object behavior sequence;
and recommending information to the target object based on the semantic expression vector.
2. The recommendation method according to claim 1, wherein the inputting the object behavior sequence into an embedded layer model to obtain object coding information comprises:
constructing a word sequence according to the object behavior sequence; the word sequence comprises behavior information and time interval information which are set at intervals;
determining object coding information according to the word sequence; the object coding information includes position coding information, word type coding information, and word value coding information set based on the word sequence.
3. The recommendation method according to claim 2, wherein the object behavior sequence is used for representing a plurality of behavior information arranged according to a chronological order; the constructing of word sequences according to the object behavior sequences comprises:
inserting time interval information between every two pieces of behavior information to construct a word sequence; the time interval information is used for representing the time interval between the front behavior information and the rear behavior information of the time interval information;
updating the corner marks of each word information in the word sequence in an increasing mode; wherein the corner mark is encoded starting from zero.
4. The recommendation method according to claim 3, wherein said determining object coding information based on said word sequence comprises the steps of:
carrying out embedding coding processing on the corner marks of the word information to obtain position coding information at the corresponding positions;
performing embedding coding processing on the type of the word information to obtain word type coding information at a corresponding position; the type of the word information includes a behavior and a time interval.
5. The recommendation method according to claim 3, wherein said determining object coding information based on said word sequence comprises the steps of:
if the word information in the word sequence belongs to the behavior information, determining the word value coding information as the behavior characteristic information of the corresponding behavior information;
if the word information in the word sequence belongs to the time interval information, determining word value coding information through the following vectors:
Figure FDA0004006801870000011
wherein, convert (K) i ) For characterizing the minimum time unit required to convert a time interval into a service; k is i For characterizing time interval information, E time For characterizing the preset domain vector.
6. The recommendation method according to claim 1, wherein said inputting the object coding information into an encoder model to obtain a semantic representation vector comprises:
and processing the object coding information through a transform structure to obtain a semantic expression vector.
7. The recommendation method according to claim 6, further comprising:
updating the semantic representation vector by average pooling.
8. An information recommendation apparatus, characterized in that the apparatus comprises:
the system comprises a first module, a second module and a third module, wherein the first module is used for acquiring an object behavior sequence of a target object; the object behavior sequence comprises behavior information of a target object;
the second module is used for inputting the object behavior sequence into an embedded layer model to obtain object coding information; the embedded layer model is used for modeling the time interval of the behavior information;
the third module is used for inputting the object coding information into an encoder model to obtain a semantic expression vector; the encoder model is used for modeling semantic information in the object behavior sequence;
and the fourth module is used for recommending information to the target object based on the semantic expression vector.
9. An electronic device, comprising a memory storing a computer program and a processor, wherein the processor implements the information recommendation method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the information recommendation method according to any one of claims 1 to 7.
CN202211633738.2A 2022-12-19 2022-12-19 Information recommendation method and device, electronic equipment and storage medium Pending CN115982452A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211633738.2A CN115982452A (en) 2022-12-19 2022-12-19 Information recommendation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211633738.2A CN115982452A (en) 2022-12-19 2022-12-19 Information recommendation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115982452A true CN115982452A (en) 2023-04-18

Family

ID=85969304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211633738.2A Pending CN115982452A (en) 2022-12-19 2022-12-19 Information recommendation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115982452A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116541608A (en) * 2023-07-04 2023-08-04 深圳须弥云图空间科技有限公司 House source recommendation method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116541608A (en) * 2023-07-04 2023-08-04 深圳须弥云图空间科技有限公司 House source recommendation method and device, electronic equipment and storage medium
CN116541608B (en) * 2023-07-04 2023-10-03 深圳须弥云图空间科技有限公司 House source recommendation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN114240552A (en) Product recommendation method, device, equipment and medium based on deep clustering algorithm
CN114676704A (en) Sentence emotion analysis method, device and equipment and storage medium
CN115640394A (en) Text classification method, text classification device, computer equipment and storage medium
CN114519356A (en) Target word detection method and device, electronic equipment and storage medium
CN114841146A (en) Text abstract generation method and device, electronic equipment and storage medium
CN114492661B (en) Text data classification method and device, computer equipment and storage medium
CN114201516A (en) User portrait construction method, information recommendation method and related device
CN114998583A (en) Image processing method, image processing apparatus, device, and storage medium
CN115982452A (en) Information recommendation method and device, electronic equipment and storage medium
CN115424013A (en) Model training method, image processing apparatus, and medium
CN113434722A (en) Image classification method, device, equipment and computer readable storage medium
CN115879455A (en) Word emotion polarity prediction method and device, electronic equipment and storage medium
CN115828153A (en) Task prediction method, device, equipment and medium based on artificial intelligence
CN114998041A (en) Method and device for training claim settlement prediction model, electronic equipment and storage medium
CN115205546A (en) Model training method and device, electronic equipment and storage medium
CN115375484A (en) Matrix decomposition-based insurance product extraction method and device, equipment and medium
CN114896294A (en) Method, device and equipment for generating product test data table and storage medium
CN115619903A (en) Training and synthesizing method, device, equipment and medium for text image synthesis model
CN115270746A (en) Question sample generation method and device, electronic equipment and storage medium
CN114625658A (en) APP stability test method, device, equipment and computer readable storage medium
CN114817734A (en) Recommendation model training method, recommendation method and device, electronic device and medium
CN114090778A (en) Retrieval method and device based on knowledge anchor point, electronic equipment and storage medium
CN113761272A (en) Data processing method, data processing equipment and computer readable storage medium
CN115222486B (en) Article recommendation model training method, article recommendation method, device and storage medium
CN115130432B (en) Text processing method, text processing device, electronic equipment and storage medium

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