CN114943590A - Object recommendation method and device based on double-tower model - Google Patents

Object recommendation method and device based on double-tower model Download PDF

Info

Publication number
CN114943590A
CN114943590A CN202210748520.5A CN202210748520A CN114943590A CN 114943590 A CN114943590 A CN 114943590A CN 202210748520 A CN202210748520 A CN 202210748520A CN 114943590 A CN114943590 A CN 114943590A
Authority
CN
China
Prior art keywords
question
feature vector
target user
time
record
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
CN202210748520.5A
Other languages
Chinese (zh)
Inventor
袁子涵
武文杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Longzhi Digital Technology Service Co Ltd
Original Assignee
Beijing Longzhi Digital Technology Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Longzhi Digital Technology Service Co Ltd filed Critical Beijing Longzhi Digital Technology Service Co Ltd
Priority to CN202210748520.5A priority Critical patent/CN114943590A/en
Publication of CN114943590A publication Critical patent/CN114943590A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0251Targeted advertisements
    • G06Q30/0255Targeted advertisements based on user history
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure relates to the technical field of artificial intelligence, and provides an object recommendation method and device based on a double-tower model. The method comprises the following steps: acquiring a first time when a target user initiates a question currently and a target historical question record of the target user; processing the first time and the target historical question record according to a preset template to obtain the question information of the target user corresponding to the target user; extracting a first feature vector corresponding to the question information of the target user by using a first text encoder, and extracting a second feature vector corresponding to each question record in the candidate set by using a second text encoder; calculating the similarity between the first characteristic vector and each second characteristic vector, and determining a subset from the candidate set according to the similarity between the first characteristic vector and each second characteristic vector; and acquiring a recommendation list based on the subset, and recommending an object for the target user based on the recommendation list.

Description

Object recommendation method and device based on double-tower model
Technical Field
The disclosure relates to the technical field of artificial intelligence, in particular to an object recommendation method and device based on a double-tower model.
Background
In the field of e-commerce and the like, a suitable item needs to be recommended to a client according to a chat record of the client, for example, an item desired by the client is determined according to a keyword in the chat record of the client. Such methods are only applicable to recommending items to the customer that are directly related to keywords in the customer's current session record each time the session is completed with the customer. In the prior art, a proper item can be recommended to a client according to the historical conversation record of the client, but the method only considers keywords in the historical conversation record and still has the problem of low recommendation efficiency. In fact, when recommending appropriate items to the customer, the customer's question in the history session record should be considered more because the customer's question in the history session record has important information such as the customer's intention.
In the process of implementing the disclosed concept, the inventors found that at least the following technical problems exist in the related art: the problem of low efficiency exists in recommending articles to the user because the information in the user session record is not fully utilized.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide an object recommendation method and apparatus based on a double-tower model, so as to solve the problem in the prior art that the efficiency is low because information in a user session record is not fully utilized, and then an item is recommended to a user.
In a first aspect of the embodiments of the present disclosure, an object recommendation method is provided, including: acquiring a first time when a target user initiates a question currently and a target historical question record of the target user, wherein the target historical question record comprises: a plurality of question records and a second time corresponding to each question record; processing the first time and the target historical question record according to a preset template to obtain the question information of the target user corresponding to the target user; extracting a first feature vector corresponding to target user question information by using a first text encoder, and extracting a second feature vector corresponding to each question record in a candidate set by using a second text encoder, wherein the candidate set comprises a plurality of question records; calculating the similarity between the first feature vector and each second feature vector, and determining a subset from the candidate set according to the similarity between the first feature vector and each second feature vector, wherein the subset comprises one or more question records; and acquiring a recommendation list based on the subset, and recommending objects for the target user based on the recommendation list, wherein the recommendation list comprises one or more objects.
In a second aspect of the embodiments of the present disclosure, there is provided an object recommendation apparatus including: the system comprises a first obtaining module, a first obtaining module and a target historical question record, wherein the first obtaining module is configured to obtain a first time when a target user initiates a question currently and the target historical question record of the target user, and the target historical question record comprises: a plurality of question records and a second time corresponding to each question record; the processing module is configured to process the first time and the target historical question record according to a preset template to obtain the question information of the target user corresponding to the target user; the extraction module is configured to extract a first feature vector corresponding to the question information of the target user by using a first text encoder, and extract a second feature vector corresponding to each question record in a candidate set by using a second text encoder, wherein the candidate set comprises a plurality of question records; the calculation module is configured to calculate the similarity between the first feature vector and each second feature vector, and determine a subset from the candidate set according to the similarity between the first feature vector and each second feature vector, wherein the subset comprises one or more question records; and the second obtaining module is configured to obtain a recommendation list based on the subset and recommend the object for the target user based on the recommendation list, wherein the recommendation list comprises one or more objects.
In a third aspect of the embodiments of the present disclosure, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above method when executing the computer program.
In a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, which stores a computer program, which when executed by a processor, implements the steps of the above-mentioned method.
Compared with the prior art, the embodiment of the disclosure has the following beneficial effects: because the embodiment of the present disclosure obtains the first time when the target user currently initiates a question and the target history question record of the target user, the target history question record includes: a plurality of question records and a second time corresponding to each question record; processing the first time and the target historical question record according to a preset template to obtain the question information of the target user corresponding to the target user; extracting a first feature vector corresponding to target user question information by using a first text encoder, and extracting a second feature vector corresponding to each question record in a candidate set by using a second text encoder, wherein the candidate set comprises a plurality of question records; calculating the similarity between the first feature vector and each second feature vector, and determining a subset from the candidate set according to the similarity between the first feature vector and each second feature vector, wherein the subset comprises one or more question records; the recommendation list is obtained based on the subset, and the object is recommended to the target user based on the recommendation list, wherein the recommendation list comprises one or more objects, so that the technical means can solve the problem that in the prior art, because the information in the user session record is not fully utilized, the object recommendation efficiency is low for the user, and the object recommendation efficiency is improved.
Drawings
To more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without inventive efforts.
FIG. 1 is a scenario diagram of an application scenario of an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of an object recommendation method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an object recommendation device provided in an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system structures, techniques, etc. in order to provide a thorough understanding of the disclosed embodiments. However, it will be apparent to one skilled in the art that the present disclosure may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present disclosure with unnecessary detail.
An object recommendation method and apparatus according to an embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.
Fig. 1 is a scene schematic diagram of an application scenario of an embodiment of the present disclosure. The application scenario may include terminal devices 101, 102, and 103, server 104, and network 105.
The terminal devices 101, 102, and 103 may be hardware or software. When terminal devices 101, 102, and 103 are hardware, they may be various electronic devices having a display screen and supporting communication with server 104, including but not limited to smart phones, tablets, laptop portable computers, desktop computers, and the like; when the terminal apparatuses 101, 102, and 103 are software, they can be installed in the electronic apparatus as above. The terminal devices 101, 102, and 103 may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, which is not limited by the embodiments of the present disclosure. Further, various applications, such as data processing applications, instant messaging tools, social platform software, search-type applications, shopping-type applications, etc., may be installed on the terminal devices 101, 102, and 103.
The server 104 may be a server providing various services, for example, a backend server receiving a request sent by a terminal device establishing a communication connection with the server, and the backend server may receive and analyze the request sent by the terminal device and generate a processing result. The server 104 may be a server, may also be a server cluster composed of a plurality of servers, or may also be a cloud computing service center, which is not limited in this disclosure.
The server 104 may be hardware or software. When the server 104 is hardware, it may be various electronic devices that provide various services to the terminal devices 101, 102, and 103. When the server 104 is software, it may be multiple software or software modules providing various services for the terminal devices 101, 102, and 103, or may be a single software or software module providing various services for the terminal devices 101, 102, and 103, which is not limited by the embodiment of the present disclosure.
The network 105 may be a wired network connected by a coaxial cable, a twisted pair and an optical fiber, or may be a wireless network that can interconnect various Communication devices without wiring, for example, Bluetooth (Bluetooth), Near Field Communication (NFC), Infrared (Infrared), and the like, which is not limited in the embodiment of the present disclosure.
A user can establish a communication connection with the server 104 via the network 105 through the terminal apparatuses 101, 102, and 103 to receive or transmit information or the like. It should be noted that the specific types, numbers and combinations of the terminal devices 101, 102 and 103, the server 104 and the network 105 may be adjusted according to the actual requirements of the application scenario, and the embodiment of the present disclosure does not limit this.
Fig. 2 is a schematic flowchart of an object recommendation method according to an embodiment of the present disclosure. The object recommendation method of fig. 2 may be performed by the terminal device or the server of fig. 1. As shown in fig. 2, the object recommendation method includes:
s201, obtaining a first time when a target user initiates a question and a target historical question record of the target user, wherein the target historical question record comprises: a plurality of question records and a second time corresponding to each question record;
s202, processing the first time and the target historical question record according to a preset template to obtain question information of a target user corresponding to the target user;
s203, extracting a first feature vector corresponding to the question information of the target user by using a first text encoder, and extracting a second feature vector corresponding to each question record in a candidate set by using a second text encoder, wherein the candidate set comprises a plurality of question records;
s204, calculating the similarity between the first feature vector and each second feature vector, and determining a subset from the candidate set according to the similarity between the first feature vector and each second feature vector, wherein the subset comprises one or more question records;
s205, acquiring a recommendation list based on the subset, and recommending objects for the target user based on the recommendation list, wherein the recommendation list comprises one or more objects.
The embodiment of the disclosure can be applied to e-commerce platforms or other scenes which can provide various objects for users, or some consulting platforms; in the scenes of an e-commerce platform and the like, one object can be an article or a commodity; in a scenario such as a consultation platform, one object may be a piece of text. The target history question record corresponding to the target user may be questions asked by the target user and the intelligent customer service in a chat, and the candidate set may be questions that all users collected by the e-commerce platform have asked or may be questions asked. The subset is the closest one or more of the query records in the candidate set to the target history query record, which is determined by the one or more second feature vectors with the highest similarity to the first feature vector.
According to the technical scheme provided by the embodiment of the disclosure, the first time when a target user initiates a question currently and a target historical question record of the target user are obtained, wherein the target historical question record comprises: a plurality of question records and a second time corresponding to each question record; processing the first time and the target historical question record according to a preset template to obtain the question information of the target user corresponding to the target user; extracting a first feature vector corresponding to target user question information by using a first text encoder, and extracting a second feature vector corresponding to each question record in a candidate set by using a second text encoder, wherein the candidate set comprises a plurality of question records; calculating the similarity between the first feature vector and each second feature vector, and determining a subset from the candidate set according to the similarity between the first feature vector and each second feature vector, wherein the subset comprises one or more question records; the recommendation list is obtained based on the subset, and the object is recommended to the target user based on the recommendation list, wherein the recommendation list comprises one or more objects, so that the technical means can solve the problem that in the prior art, because the information in the user session record is not fully utilized, the object recommendation efficiency is low for the user, and the object recommendation efficiency is improved.
In step S201, a first time when a target user currently initiates a question and a target historical question record of the target user are obtained, where the target historical question record includes: the second time corresponding to the plurality of question records and each question record comprises: acquiring the current first time of starting a question by a target user; and acquiring a target historical question record of the target user corresponding to the first time characteristic based on the first time characteristic of the first time.
The first time may be understood as the time when the current session is formed, or the time when the target user enters a session window. The question records in the target historical question records are all questions of the target user, the second time corresponding to one question record is the time when the question record is generated, and one question record is a question. Because the questions asked by the user at a particular time are similar, such as in a consulting platform or the like, the questions that the user may ask for a day are similar. The first time characteristic of the first time is a description of the characteristics of the first time. For example, if a user always asks similar questions on a certain date of each month, then that date of each month may be marked as a particular time to be attended to, and based on the questions asked on that date, a first time characteristic of that date is determined, such as the date on which the user always asks salary related questions, and then the first time characteristic of that date is a salary day. And acquiring a target historical questioning record of the target user corresponding to the first time characteristic based on the first time characteristic of the first time, for example, if the first time characteristic of the first time is a paying day, the target historical questioning record is a questioning record of the target user several months before the first time.
In step S202, the first time and the target history question record are processed according to a preset template, so as to obtain the question information of the target user corresponding to the target user, where the step includes: arranging a plurality of question records in the target historical question record according to the sequence of time from morning to evening, and inserting a second time corresponding to each question record before each question record to obtain historical question information; and obtaining the question information of the target user at the first time after the history question information.
For example, the target user's historical questions may include "my bank card balance", "how to credit after consumption (credit complement)", and the question time is 20220101032743 and 20220101032749, respectively, and when he accesses the system at 20220101032754, the question information of the target user may be: question asking at 2022, 01, 03, 27 minutes and 43 seconds: the balance # #2022 of my bank card at 03 of 01/27 min 49 sec: how to integrate (complement of integration) ## after consumption is 27 minutes and 54 seconds at 03, 01/2022.
In step S203, extracting a first feature vector corresponding to the target user question information by using a first text encoder includes: extracting a second time characteristic about time in the question information of the target user by using a first text encoder; extracting text features about question records in question information of a target user by using a first text encoder; and performing feature fusion processing on the second time feature and the text feature to obtain a first feature vector.
The first text encoder and the second text encoder may be any one of the commonly used networks of encoded parts in the encoder-decoder model. The first text encoder differs from the second text encoder in that the first text encoder needs to take into account temporal characteristics. The second time characteristic is similar to the first time characteristic, except that the second time characteristic integrates all time information in the user question information, including the first time and the second time, and the first time characteristic is only of the first time. The text characteristics about the question records in the question information of the target user are extracted, and the information about the question records in the question information of the target user is converted into vectors by using a natural language processing technology. And performing feature fusion processing on the second time feature and the text feature, wherein the text feature is considered whether the text feature is proposed at a specific time or not.
Before step S203 is executed, that is, before the first text encoder is used to extract a first feature vector corresponding to the question information of the target user, and the second text encoder is used to extract a second feature vector corresponding to each question record in a candidate set, where the candidate set includes a plurality of question records, the method further includes: acquiring a first training data set, wherein the first training data set comprises user question information of a plurality of users, and the user question information of each user comprises: a plurality of question records and a second time corresponding to each question record; labeling the first training data set, training a first text encoder by using the labeled first training data set, enabling the first network layer to learn and store the corresponding relation between the second time and the second time characteristic in the user question information, enabling the second network layer to learn and store the corresponding relation between the question record and the text characteristic in the user question information, and enabling the third network layer to learn and store the corresponding relation between the second time characteristic and the text characteristic and the first characteristic vector; wherein the first text encoder comprises: the network comprises a first network layer, a second network layer and a third network layer, wherein the first network layer and the second network layer are connected in parallel, and the third network layer is connected behind the first network layer and the second network layer in series.
Labeling the first training data set, comprising: marking a second time characteristic corresponding to a second time in the user question information in the candidate set; labeling text features corresponding to the question records in the user question information in the candidate set; and labeling the first feature vector corresponding to the second time feature and the text feature. The first network layer, the second network layer and the third network layer in the first text encoder are divided according to the role of the network layer, and in fact, the first network layer, the second network layer and the third network layer may each include a plurality of network layers, such as a plurality of convolutional layers, normalization layers and pooling layers. The first network layer and the second network layer are connected in parallel, the third network layer is connected in series behind the first network layer, and the third network layer is connected in series behind the second network layer. The first text encoder extracts a second time characteristic about time in the question information of the target user by utilizing the first network layer in work; extracting text features about question records in question information of a target user by utilizing a second network layer; and performing feature fusion processing on the second time feature and the text feature by using a third network layer to obtain a first feature vector.
It should be noted that the second time corresponding to each question record in the embodiment of the present disclosure is the same as the second time in the foregoing, and only the user to which the question record belongs is different.
Before step S203 is executed, that is, before the first text encoder is used to extract a first feature vector corresponding to the question information of the target user, and the second text encoder is used to extract a second feature vector corresponding to each question record in a candidate set, where the candidate set includes a plurality of question records, the method further includes: obtaining a second training data set, wherein the second training data set comprises: a plurality of questioning records; and performing labeling processing on the second training data set, and training a second text encoder by using the labeled second training data set, so that the second text encoder learns and saves the corresponding relation between the question record and the second feature vector.
Compared with the first training data set, the first training data set has time information, namely second time, meanwhile, the first training data set trains the first text encoder according to the user question information of each user, and the second training data set trains the second text encoder without training according to the user question information of each user, namely, only by training according to each question record. And performing labeling processing on the second training data set, namely labeling a second feature vector corresponding to each question record in the second training data set.
In step S204, calculating a similarity between the first feature vector and each of the second feature vectors, and determining a subset from the candidate set according to the similarity between the first feature vector and each of the second feature vectors, including: calculating Euclidean distance between the first feature vector and each second feature vector, and determining a subset from the candidate set according to the Euclidean distance between the first feature vector and each second feature vector; or calculating the cosine distance between the first characteristic vector and each second characteristic vector, and determining a subset from the candidate set according to the cosine distance between the first characteristic vector and each second characteristic vector; or calculating the Euclidean distance and the cosine distance between the first feature vector and each second feature vector, and determining a subset from the candidate set according to the Euclidean distance and the cosine distance between the first feature vector and each second feature vector.
The similarity between the first feature vector and each second feature vector may be a euclidean distance between the first feature vector and each second feature vector, may also be a cosine distance between the first feature vector and each second feature vector, and may also be a weighted sum of the euclidean distance and the cosine distance between the first feature vector and each second feature vector according to a preset threshold.
And determining a subset from the candidate set, wherein one or more question records with the largest similarity between the corresponding second feature vector and the first feature vector are selected from the candidate set. One or more of the questioning records in the subset are the most likely questions that the target user presents at the first time.
And acquiring a recommendation list based on the subset, and recommending an object for the target user based on the recommendation list, wherein the recommendation list comprises one or more objects.
For example, in a business platform, the objects are commodities, and one or more objects in the recommendation list are commodities most likely to be needed by the target user. It should be noted that the objects in the recommendation list and the question records in the subset may be in a one-to-one correspondence relationship, or multiple question records may correspond to one object, or one question record may correspond to multiple objects.
By the technical means, when a user enters a current session, the user can determine one or more question sentences which are most likely to be asked by the user, namely the question records, according to the first time when the user initiates a question and the historical question records of the user without waiting for the user to send out specific question sentences in the current session, and then the most appropriate object is recommended to the user according to the one or more question sentences which are most likely to be asked by the user. Each question record may also be understood as a sentence that the user uses to consult the question.
All the above optional technical solutions may be combined arbitrarily to form optional embodiments of the present application, and are not described herein again.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 3 is a schematic diagram of an object recommendation device according to an embodiment of the present disclosure. As shown in fig. 3, the object recommending apparatus includes:
a first obtaining module 301, configured to obtain a first time when a target user currently initiates a question and a target historical question record of the target user, where the target historical question record includes: the plurality of question records and the second time corresponding to each question record;
the processing module 302 is configured to process the first time and the target historical question record according to a preset template to obtain question information of a target user corresponding to the target user;
the extracting module 303 is configured to extract a first feature vector corresponding to the question information of the target user by using a first text encoder, and extract a second feature vector corresponding to each question record in a candidate set by using a second text encoder, where the candidate set includes a plurality of question records;
a calculating module 304 configured to calculate a similarity between the first feature vector and each of the second feature vectors, and determine a subset from the candidate set according to the similarity between the first feature vector and each of the second feature vectors, where the subset includes one or more question records;
a second obtaining module 305 configured to obtain a recommendation list based on the subset and recommend objects for the target user based on the recommendation list, wherein the recommendation list includes one or more objects.
The embodiment of the disclosure can be applied to e-commerce platforms or other scenes which can provide various objects for users, or some consultation platforms; in the scenes of an e-commerce platform and the like, one object can be an article or a commodity; in a scenario such as a consultation platform, one object may be a piece of text. The target historical question record corresponding to the target user can be questions asked by the target user and the intelligent customer service in a chat, and the candidate set can be questions once asked by all users collected by the e-commerce platform or questions possibly asked by all users. The subset is the closest one or more of the query records in the candidate set to the target history query record, which is determined by the one or more second feature vectors with the highest similarity to the first feature vector.
According to the technical scheme provided by the embodiment of the disclosure, the first time when a target user initiates a question currently and a target historical question record of the target user are obtained, wherein the target historical question record comprises: a plurality of question records and a second time corresponding to each question record; processing the first time and the target historical question record according to a preset template to obtain the question information of the target user corresponding to the target user; extracting a first feature vector corresponding to target user question information by using a first text encoder, and extracting a second feature vector corresponding to each question record in a candidate set by using a second text encoder, wherein the candidate set comprises a plurality of question records; calculating the similarity between the first feature vector and each second feature vector, and determining a subset from the candidate set according to the similarity between the first feature vector and each second feature vector, wherein the subset comprises one or more question records; the recommendation list is obtained based on the subset, and the object is recommended to the target user based on the recommendation list, wherein the recommendation list comprises one or more objects, so that the technical means can solve the problem that in the prior art, because the information in the user session record is not fully utilized, the object recommendation efficiency is low for the user, and the object recommendation efficiency is improved.
Optionally, the first obtaining module 301 is further configured to obtain a plurality of question records and a second time corresponding to each question record, including: acquiring the current first time of starting a question by a target user; and acquiring a target historical question record of the target user corresponding to the first time characteristic based on the first time characteristic of the first time.
The first time may be understood as the time when the current session is formed, or the time when the target user enters a session window. The question records in the target historical question records are all questions of the target user, the second time corresponding to one question record is the time when the question record is generated, and one question record is a question. Because the questions of the user at a specific time are similar, such as in a scenario like a consultation platform, the questions that the user may ask on a user-paid day are similar. The first time characteristic of the first time is a description of the characteristics of the first time. For example, if a user always asks similar questions on a certain date of each month, then that date of each month may be marked as a particular time to be attended to, and based on the questions asked on that date, a first time characteristic of that date is determined, such as the date on which the user always asks salary related questions, and then the first time characteristic of that date is a salary day. And acquiring a target historical questioning record of the target user corresponding to the first time characteristic based on the first time characteristic of the first time, for example, if the first time characteristic of the first time is a paying day, the target historical questioning record is a questioning record of the target user several months before the first time.
Optionally, the processing module 302 is further configured to arrange multiple question records in the target historical question record in order from morning to evening, and insert a second time corresponding to each question record before each question record to obtain historical question information; and obtaining the question information of the target user at the first time after the history question information.
For example, the target user's historical questions may include "my bank card balance", "how to credit after consumption (credit complement)", and the question time is 20220101032743 and 20220101032749, respectively, and when he accesses the system at 20220101032754, the question information of the target user may be: question asking at 2022, 01, 03, 27 minutes and 43 seconds: the balance # #2022 of my bank card at 03 of 01/27 min 49 sec: how to integrate after consumption (integration complement) ### the current time is 27 minutes and 54 seconds at 01/03 in 2022.
Optionally, the extracting module 303 is further configured to extract a second time feature about time in the target user question information by using the first text encoder; extracting text features about question records in question information of a target user by using a first text encoder; and performing feature fusion processing on the second time feature and the text feature to obtain a first feature vector.
The first text encoder and the second text encoder may be any one of the commonly used networks of encoded parts in the encoder-decoder model. The first text encoder differs from the second text encoder in that the first text encoder needs to take into account temporal characteristics. The second time characteristic is similar to the first time characteristic, except that the second time characteristic integrates all time information in the user question information, including the first time and the second time, and the first time characteristic is only of the first time. The text characteristics about the question records in the question information of the target user are extracted, and the information about the question records in the question information of the target user is converted into vectors by using a natural language processing technology. And performing feature fusion processing on the second time feature and the text feature, wherein the text feature is considered whether the text feature is proposed at a specific time or not.
Optionally, the extracting module 303 is further configured to extract a first feature vector corresponding to the question information of the target user by using a first text encoder, and extract a second feature vector corresponding to each question record in a candidate set by using a second text encoder, where before the candidate set includes multiple question records, the method further includes: acquiring a first training data set, wherein the first training data set comprises user question information of a plurality of users, and the user question information of each user comprises: a plurality of question records and a second time corresponding to each question record; labeling the first training data set, training a first text encoder by using the labeled first training data set, enabling the first network layer to learn and store the corresponding relation between second time and second time characteristics in user question information, enabling the second network layer to learn and store the corresponding relation between question records and text characteristics in the user question information, and enabling the third network layer to learn and store the corresponding relation between the second time characteristics and the text characteristics and the first characteristic vector; wherein the first text encoder comprises: the network comprises a first network layer, a second network layer and a third network layer, wherein the first network layer and the second network layer are connected in parallel, and the third network layer is connected behind the first network layer and the second network layer in series.
Labeling the first training data set, comprising: marking a second time characteristic corresponding to a second time in the user question information in the candidate set; marking text characteristics corresponding to the question records in the question information of the users in the candidate set; and labeling the first feature vector corresponding to the second time feature and the text feature. The first network layer, the second network layer and the third network layer in the first text encoder are divided according to the role of the network layer, and in fact, the first network layer, the second network layer and the third network layer may each include a plurality of network layers. The first network layer and the second network layer are connected in parallel, the third network layer is connected in series behind the first network layer, and the third network layer is connected in series behind the second network layer. The first text encoder extracts a second time characteristic about time in the question information of the target user by utilizing a first network layer in work; extracting text features related to the question record in the question information of the target user by utilizing a second network layer; and performing feature fusion processing on the second time feature and the text feature by using a third network layer to obtain a first feature vector.
It should be noted that, in the embodiment of the present disclosure, the second time corresponding to each question record is the same as the second time in the foregoing, and only the user to which the question record belongs is different.
Optionally, the extracting module 303 is further configured to obtain a second training data set, wherein the second training data set comprises: a plurality of questioning records; and performing labeling processing on the second training data set, and training a second text encoder by using the labeled second training data set, so that the second text encoder learns and stores the corresponding relation between the question record and the second feature vector.
Compared with the first training data set, the first training data set has time information, meanwhile, the first training data set trains the first text encoder according to the user question information of each user, and the second training data set trains the second text encoder without training according to the user question information of each user, namely only training according to each question record. And performing labeling processing on the second training data set, namely labeling a second feature vector corresponding to each question record in the second training data set.
Optionally, the calculating module 304 is further configured to calculate a euclidean distance between the first feature vector and each second feature vector, and determine a subset from the candidate set according to the euclidean distance between the first feature vector and each second feature vector; or calculating the cosine distance between the first characteristic vector and each second characteristic vector, and determining a subset from the candidate set according to the cosine distance between the first characteristic vector and each second characteristic vector; or calculating the Euclidean distance and the cosine distance between the first feature vector and each second feature vector, and determining a subset from the candidate set according to the Euclidean distance and the cosine distance between the first feature vector and each second feature vector.
The similarity between the first feature vector and each second feature vector may be a euclidean distance between the first feature vector and each second feature vector, may also be a cosine distance between the first feature vector and each second feature vector, and may also be a weighted sum of the euclidean distance and the cosine distance between the first feature vector and each second feature vector according to a preset threshold.
The similarity between the first feature vector and each second feature vector may be a euclidean distance between the first feature vector and each second feature vector, may also be a cosine distance between the first feature vector and each second feature vector, and may also be a weighted sum of the euclidean distance and the cosine distance between the first feature vector and each second feature vector according to a preset threshold.
And determining a subset from the candidate set, wherein one or more question records with the largest similarity between the corresponding second feature vector and the first feature vector are selected from the candidate set. One or more of the questioning records in the subset are the most likely questions the target user presents at the first time.
And acquiring a recommendation list based on the subset, and recommending an object for the target user based on the recommendation list, wherein the recommendation list comprises one or more objects.
For example, in a business platform, the objects are commodities, and one or more of the objects in the recommendation list are the commodities most likely to be needed by the target user. It should be noted that the objects in the recommendation list and the question records in the subset may be in a one-to-one correspondence relationship, or multiple question records may correspond to one object, or one question record may correspond to multiple objects.
By the technical means, when a user enters a current session, the user can determine one or more question sentences which are most likely to be asked by the user, namely the question records, according to the first time when the user initiates a question and the historical question records of the user without waiting for the user to send out specific question sentences in the current session, and then the most appropriate object is recommended to the user according to the one or more question sentences which are most likely to be asked by the user. Each question is recorded as a sentence that the user uses to consult the question.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.
Fig. 4 is a schematic diagram of an electronic device 4 provided by the embodiment of the present disclosure. As shown in fig. 4, the electronic apparatus 4 of this embodiment includes: a processor 401, a memory 402 and a computer program 403 stored in the memory 402 and executable on the processor 401. The steps in the various method embodiments described above are implemented when the processor 401 executes the computer program 403. Alternatively, the processor 401 implements the functions of the respective modules/units in the above-described respective apparatus embodiments when executing the computer program 403.
The electronic device 4 may be a desktop computer, a notebook, a palm computer, a cloud server, or other electronic devices. The electronic device 4 may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that fig. 4 is merely an example of electronic device 4 and does not constitute a limitation of electronic device 4 and may include more or fewer components than shown, or different components.
The Processor 401 may be a Central Processing Unit (CPU), other general purpose Processor, 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 device, discrete hardware component, or the like.
The storage 402 may be an internal storage unit of the electronic device 4, for example, a hard disk or a memory of the electronic device 4. The memory 402 may also be an external storage device of the electronic device 4, for example, a plug-in hard disk provided on the electronic device 4, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. The memory 402 may also include both internal storage units of the electronic device 4 and external storage devices. The memory 402 is used for storing computer programs and other programs and data required by the electronic device.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, the present disclosure may implement all or part of the flow of the method in the above embodiments, and may also be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of the above methods and embodiments. The computer program may comprise computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic diskette, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier signal, telecommunications signal, software distribution medium, etc. It should be noted that the computer readable medium may contain suitable additions or additions that may be required in accordance with legislative and patent practices within the jurisdiction, for example, in some jurisdictions, computer readable media may not include electrical carrier signals or telecommunications signals in accordance with legislative and patent practices.
The above examples are only intended to illustrate the technical solution of the present disclosure, not to limit it; although the present disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present disclosure, and are intended to be included within the scope of the present disclosure.

Claims (10)

1. An object recommendation method, comprising:
acquiring a first time when a target user initiates a question currently and a target historical question record of the target user, wherein the target historical question record comprises: a plurality of question records and a second time corresponding to each question record;
processing the first time and the target historical question record according to a preset template to obtain question information of a target user corresponding to the target user;
extracting a first feature vector corresponding to the question information of the target user by using a first text encoder, and extracting a second feature vector corresponding to each question record in a candidate set by using a second text encoder, wherein the candidate set comprises a plurality of question records;
calculating the similarity between the first feature vector and each second feature vector, and determining a subset from the candidate set according to the similarity between the first feature vector and each second feature vector, wherein the subset comprises one or more question records;
and acquiring a recommendation list based on the subset, and recommending an object for the target user based on the recommendation list, wherein the recommendation list comprises one or more objects.
2. The method according to claim 1, wherein the obtaining a first time when a target user currently initiates a question and a target historical question record of the target user, wherein the target historical question record comprises: the second time corresponding to the plurality of question records and each question record comprises:
acquiring the current first time for the target user to initiate a question;
and acquiring a target historical question record of the target user corresponding to the first time characteristic based on the first time characteristic of the first time.
3. The method according to claim 1, wherein the processing the first time and the target historical question record according to a preset template to obtain the question information of the target user corresponding to the target user comprises:
arranging a plurality of question records in the target historical question record according to the sequence of time from morning to evening, and inserting a second time corresponding to each question record before each question record to obtain historical question information;
and obtaining the question information of the target user at the first time after the historical question information.
4. The method of claim 1, wherein the extracting, by using the first text encoder, the first feature vector corresponding to the target user question information comprises:
extracting a second time characteristic about time in the question information of the target user by utilizing the first text encoder;
extracting text features related to a question record in the question information of the target user by using the first text encoder;
and performing feature fusion processing on the second time feature and the text feature to obtain the first feature vector.
5. The method of claim 1, wherein before extracting a first feature vector corresponding to the question information of the target user by using a first text encoder and extracting a second feature vector corresponding to each question record in a candidate set by using a second text encoder, the method further comprises:
acquiring a first training data set, wherein the first training data set comprises user question information of a plurality of users, and the user question information of each user comprises: a plurality of question records and a second time corresponding to each question record;
labeling the first training data set, training the first text encoder by using the labeled first training data set, so that the first network layer learns and stores the corresponding relation between the second time and the second time characteristic in the user question information, so that the second network layer learns and stores the corresponding relation between the question record and the text characteristic in the user question information, and so that the third network layer learns and stores the corresponding relation between the second time characteristic and the text characteristic and the first characteristic vector;
wherein the first text encoder comprises: the first network layer, the second network layer, and the third network layer, the first network layer and the second network layer being connected in parallel, the third network layer being connected in series after the first network layer and the second network layer.
6. The method of claim 1, wherein before extracting a first feature vector corresponding to the question information of the target user by using a first text encoder and extracting a second feature vector corresponding to each question record in a candidate set by using a second text encoder, the method further comprises:
obtaining a second training data set, wherein the second training data set comprises: a plurality of questioning records;
and performing labeling processing on the second training data set, and training the second text encoder by using the labeled second training data set, so that the second text encoder learns and saves the corresponding relation between the question record and the second feature vector.
7. The method of claim 1, wherein calculating a similarity between the first eigenvector and each of the second eigenvectors and determining a subset from the candidate set based on the similarity between the first eigenvector and each of the second eigenvectors comprises:
calculating Euclidean distance between the first feature vector and each second feature vector, and determining the subset from the candidate set according to the Euclidean distance between the first feature vector and each second feature vector; or
Calculating cosine distances between the first feature vectors and each second feature vector, and determining the subset from the candidate set according to the cosine distances between the first feature vectors and each second feature vector; or
And calculating Euclidean distance and cosine distance between the first feature vector and each second feature vector, and determining the subset from the candidate set according to the Euclidean distance and cosine distance between the first feature vector and each second feature vector.
8. An object recommendation apparatus, comprising:
the system comprises a first obtaining module, a first obtaining module and a target historical question record of a target user, wherein the first obtaining module is configured to obtain a first time when the target user currently initiates a question and the target historical question record of the target user, and the target historical question record comprises: a plurality of question records and a second time corresponding to each question record;
the processing module is configured to process the first time and the target historical question record according to a preset template to obtain question information of a target user corresponding to the target user;
the extraction module is configured to extract a first feature vector corresponding to the question information of the target user by using a first text encoder, and extract a second feature vector corresponding to each question record in a candidate set by using a second text encoder, wherein the candidate set comprises a plurality of question records;
a calculation module configured to calculate a similarity between the first feature vector and each of the second feature vectors, and determine a subset from the candidate set according to the similarity between the first feature vector and each of the second feature vectors, wherein the subset includes one or more question records;
a second obtaining module configured to obtain a recommendation list based on the subset and recommend an object for the target user based on the recommendation list, wherein the recommendation list includes one or more objects.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of a method according to any one of claims 1 to 7.
CN202210748520.5A 2022-06-28 2022-06-28 Object recommendation method and device based on double-tower model Pending CN114943590A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210748520.5A CN114943590A (en) 2022-06-28 2022-06-28 Object recommendation method and device based on double-tower model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210748520.5A CN114943590A (en) 2022-06-28 2022-06-28 Object recommendation method and device based on double-tower model

Publications (1)

Publication Number Publication Date
CN114943590A true CN114943590A (en) 2022-08-26

Family

ID=82911425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210748520.5A Pending CN114943590A (en) 2022-06-28 2022-06-28 Object recommendation method and device based on double-tower model

Country Status (1)

Country Link
CN (1) CN114943590A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115545572A (en) * 2022-11-29 2022-12-30 支付宝(杭州)信息技术有限公司 Method, device, equipment and storage medium for business wind control

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115545572A (en) * 2022-11-29 2022-12-30 支付宝(杭州)信息技术有限公司 Method, device, equipment and storage medium for business wind control
CN115545572B (en) * 2022-11-29 2023-03-21 支付宝(杭州)信息技术有限公司 Method, device, equipment and storage medium for business wind control

Similar Documents

Publication Publication Date Title
CN111932144B (en) Customer service agent distribution method and device, server and storage medium
CN110782318A (en) Marketing method and device based on audio interaction and storage medium
TW201917601A (en) User intention recognition method and device capable of recognizing user intention by acquiring dialogue text from a user
CN108595448B (en) Information pushing method and device
CN112559865B (en) Information processing system, computer-readable storage medium, and electronic device
CN109685536B (en) Method and apparatus for outputting information
CN108268450B (en) Method and apparatus for generating information
CN110798567A (en) Short message classification display method and device, storage medium and electronic equipment
CN110399465A (en) Method and apparatus for handling information
CN107832941A (en) Order processing method and device
CN107977678A (en) Method and apparatus for output information
CN111639162A (en) Information interaction method and device, electronic equipment and storage medium
CN110347786A (en) A kind of tuning method and system of semantic model
CN111104590A (en) Information recommendation method, device, medium and electronic equipment
CN115470318A (en) Customer service problem processing method and device
CN110059172B (en) Method and device for recommending answers based on natural language understanding
CN114943590A (en) Object recommendation method and device based on double-tower model
CN113051384B (en) User portrait extraction method based on dialogue and related device
CN114861064A (en) Object recommendation method and device based on double-tower model
CN110955835A (en) Sharing platform information publishing system based on big data technology
CN110414205A (en) For generating method, apparatus, electronic equipment and the medium of user's portrait
CN115563281A (en) Text classification method and device based on text data enhancement
CN114638221A (en) Business model generation method and device based on business requirements
CN111782776A (en) Method and device for realizing intention identification through slot filling
CN114418609A (en) Deal probability estimation method, storage medium, and program product

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