CN113641897B - Recommendation method and device based on session text, electronic equipment and storage medium - Google Patents

Recommendation method and device based on session text, electronic equipment and storage medium Download PDF

Info

Publication number
CN113641897B
CN113641897B CN202110859016.8A CN202110859016A CN113641897B CN 113641897 B CN113641897 B CN 113641897B CN 202110859016 A CN202110859016 A CN 202110859016A CN 113641897 B CN113641897 B CN 113641897B
Authority
CN
China
Prior art keywords
target
candidate
session
sequence
recommendation
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.)
Active
Application number
CN202110859016.8A
Other languages
Chinese (zh)
Other versions
CN113641897A (en
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.)
Shanghai Minglue Artificial Intelligence Group Co Ltd
Original Assignee
Shanghai Minglue Artificial Intelligence Group 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 Shanghai Minglue Artificial Intelligence Group Co Ltd filed Critical Shanghai Minglue Artificial Intelligence Group Co Ltd
Priority to CN202110859016.8A priority Critical patent/CN113641897B/en
Publication of CN113641897A publication Critical patent/CN113641897A/en
Application granted granted Critical
Publication of CN113641897B publication Critical patent/CN113641897B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a recommendation method and device based on a session text, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring a target session text of a target object; determining a first timing relationship of each target label in the target session text; obtaining a target session sequence corresponding to the target session text according to the first timing relation of each label; and inputting the target vector into a target model obtained by pre-training to obtain a target recommendation result of the target object. The method provided by the embodiment of the application can determine the target recommendation result for the target object based on the session text of the target object under the condition that the historical performance of the target object or the click record of the item and other data cannot be acquired, so that the application provides a new personalized recommendation method, and solves the problem that the target object cannot be recommended in a memorial way under the condition of cold start.

Description

Recommendation method and device based on session text, electronic equipment and storage medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a recommendation method and apparatus based on a session text, an electronic device, and a storage medium.
Background
In the recommendation scene, the recommendation strategies can be generally classified into recommendation strategies based on user information and item (item clicked in history), but the two strategies depend on data such as historical performance of a user or click records of the item to a certain extent, a recommendation algorithm can play a better recommendation system, and content with higher relevance to the user and the label is recommended. However, in the case of cold start, since there is no data such as historical performance corresponding to the user or click records of the items, the recommendation system cannot recommend the items to the user.
Aiming at the technical problem that the project recommendation cannot be carried out on the user under the condition of cold start of the user in the related technology, no effective solution is provided at present.
Disclosure of Invention
In order to solve the technical problem that the project recommendation cannot be performed on the user under the condition of cold start of the user, the application provides a recommendation method and device based on a session text, electronic equipment and a storage medium.
In a first aspect, an embodiment of the present application provides a method for recommending session text, including:
Acquiring a target session text of a target object;
determining a first timing relation of each target label in the target session text, wherein the target labels are information corresponding to target information types in the target session text, and the first timing relation is used for indicating the front-back sequence of each target label in the target session text;
obtaining a target session sequence corresponding to the target session text according to the first timing relation of each target tag, wherein the target session sequence is used for indicating the correlation between each target tag;
generating a target vector corresponding to the target session sequence;
and inputting the target vector into a target model obtained by training in advance to obtain a target recommendation result of the target object.
Optionally, in the foregoing method, before the inputting the target vector into a target model obtained by training in advance, the method further includes:
Obtaining candidate conversation texts of at least two candidate objects in a candidate object cluster, wherein the candidate objects correspond to the candidate conversation texts one by one;
Generating a training session sequence for training and a testing session sequence according to the candidate session text;
generating a training vector corresponding to the training session sequence and generating a testing vector corresponding to the testing session sequence;
training the model to be trained through the training vector to obtain a trained model;
And under the condition that the test precision obtained by testing the trained model through the test vector reaches a preset requirement, taking the trained model as the target model.
Optionally, the method of generating a training session sequence for training and a testing session sequence according to the candidate session text includes:
For each candidate conversation text, determining a second time sequence relation of each candidate label in the candidate conversation text, and obtaining a candidate conversation sequence corresponding to the candidate conversation text according to the second time sequence relation of each candidate label, wherein the candidate label is information corresponding to the target information type in the candidate conversation text, and the candidate conversation sequence is used for indicating the correlation among the candidate labels;
Determining the association relation among the candidate labels in all the candidate session texts according to the second time sequence relation corresponding to each candidate session text;
Determining at least one potential session sequence according to the association relation, wherein the second time sequence relation between each candidate label in the potential session sequence is different from the second time sequence relation of any candidate session sequence;
the training session sequence and the testing session sequence are determined from all the candidate session sequences and all the potential session sequences.
Optionally, in the foregoing method, the inputting the target vector into a target model trained in advance, to obtain a target recommendation result of the target object includes:
Inputting the target vector into the target model to obtain target high-level semantic information corresponding to the target vector;
matching a preset number of candidate recommended session sequences in all candidate session sequences according to the target high-level semantic information, wherein the similarity between the high-level semantic information of the candidate recommended session sequences and the target high-level semantic information meets a preset similarity requirement;
Screening target recommendation labels with target number from all candidate recommendation labels of the candidate recommendation session sequences, wherein the candidate recommendation labels are information corresponding to the target information type and positioned in the corresponding candidate recommendation session sequences;
And inquiring in a target database to obtain the target recommendation result corresponding to the target recommendation label.
Optionally, in the foregoing method, the selecting a target number of target recommendation tags from candidate recommendation tags of all the candidate recommendation session sequences includes:
According to the matching degree corresponding to each candidate recommended session sequence and the third time sequence relation of each candidate recommended tag in each candidate recommended session sequence, selecting and obtaining the target recommended tag from all the candidate recommended tags, wherein the matching degree corresponding to the candidate recommended session sequence where the target recommended tag is located is higher than or equal to the matching degree corresponding to the candidate recommended session sequences where other candidate recommended tags are located, and the time sequence of the target recommended tag is earlier than the time sequences of other candidate recommended tags in the same candidate recommended session sequence.
Optionally, in the foregoing method, the determining at least one potential session sequence according to the association relationship includes:
obtaining label association structure information for indicating the association relation between the candidate labels according to the association relation between the candidate labels;
and carrying out session sequence inquiry in the tag association structure information through breadth-first search or depth-first search to obtain the potential session sequence.
Optionally, in the foregoing method, the generating the target vector corresponding to the target session sequence includes:
mapping each target label to a target space to obtain a target sub-vector;
And obtaining the target vector according to the target word vector of each target tag in the session sequence.
In a second aspect, an embodiment of the present application provides a session text-based recommendation apparatus, including:
the acquisition module is used for acquiring a target session text of a target object;
the determining module is used for determining a first time sequence relation of each target label in the target session text, wherein the target labels are information corresponding to target information types in the target session text, and the first time sequence relation is used for indicating the front-back sequence of each target label in the target session text;
The sequence module is used for obtaining a target session sequence corresponding to the target session text according to the first time sequence relation of each target tag, wherein the target session sequence is used for indicating the correlation among the target tags;
the generation module is used for generating a target vector corresponding to the target session sequence;
And the result module is used for inputting the target vector into a target model which is obtained through training in advance, and obtaining a target recommendation result of the target object.
In a third aspect, an embodiment of the present application provides an electronic device, including: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
The memory is used for storing a computer program;
The processor is configured to implement a method as claimed in any one of the preceding claims when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, the storage medium comprising a stored program, wherein the program when run performs a method according to any one of the preceding claims.
The technical scheme provided by the embodiment of the application has the following advantages compared with the prior art:
The method provided by the embodiment of the application can determine the target recommendation result for the target object based on the session text of the target object under the condition that the historical performance of the target object or the click record of the item and other data cannot be acquired, so that the application provides a new personalized recommendation method, and solves the problem that the target object cannot be recommended in a memorial way under the condition of cold start.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flow chart of a recommendation method based on a session text according to an embodiment of the present application;
FIG. 2 is a flowchart of a recommendation method based on a text of a conversation according to another embodiment of the present application;
FIG. 3 is a flowchart illustrating a method for recommending text based on a conversation according to another embodiment of the present application;
FIG. 4 is a diagram illustrating a second timing relationship according to an embodiment of the present application;
FIG. 5 is a diagram illustrating a second timing relationship according to another embodiment of the present application;
FIG. 6 is a diagram illustrating a second timing relationship according to another embodiment of the present application;
FIG. 7 is a schematic diagram of an association between candidate tags according to an embodiment of the present application;
FIG. 8 is a block diagram of a recommending apparatus based on a session text according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
According to one aspect of the embodiment of the application, a recommendation method based on session text is provided. Alternatively, in the present embodiment, the above-described session text-based recommendation method may be applied to a hardware environment constituted by a terminal and a server. The server is connected with the terminal through a network, and can be used for providing services (such as advertisement push service, application service, content push service and the like) for the terminal or a client installed on the terminal, and a database can be arranged on the server or independent of the server and used for providing data storage service for the server.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: a wide area network, a metropolitan area network, a local area network, and the wireless network may include, but is not limited to, at least one of: WIFI (WIRELESS FIDELITY ), bluetooth. The terminal may not be limited to a PC, a mobile phone, a tablet computer, or the like.
The recommending method based on the session text in the embodiment of the application can be executed by a server, a terminal and a server together. The recommending method based on the session text, which is executed by the terminal, can also be executed by the client installed on the recommending method.
Taking a server as an example to execute the method for recommending based on the session text in this embodiment, fig. 1 is a flowchart of a method for recommending based on the session text according to an embodiment of the present application, including the following steps:
Step S101, a target session text of a target object is acquired.
The session text-based recommendation method in the present embodiment can be applied to a scene where content needs to be recommended to a user (i.e., an object), for example: scenes for recommending topics to the user, scenes for recommending videos to the user, and the like, and scenes for recommending other contents may be used. In the embodiment of the application, the video is taken as an example to illustrate the recommendation method based on the session text, and the recommendation method based on the session text is also applicable to recommendation of other types of content under the condition of no contradiction.
Taking a topic recommendation recognition scene as an example, the target topic pushed to the target object is determined by carrying out anomaly recognition on the target session text of the target object.
After the target object chatts with other objects through preset chatting software or components, the chatting records in the corresponding chatting windows can be obtained, and then the target session text of the target object can be determined according to the chatting records.
The target session text may be directly based on the chat log of the user, or may be a session abstract obtained by processing the chat log, for example, only text content of a required information type is reserved or extracted.
For example, based on session data between internal employees of the enterprise chat system, a session text corresponding to each employee is determined, and after a target employee (i.e., target object) to be analyzed is determined, a target session text corresponding to the target employee may be obtained, so that content related to a later recommendation for the target session text is given to the target employee.
Step S102, determining a first time sequence relation of each target label in the target session text, wherein the target labels are information corresponding to the target information type in the target session text, and the first time sequence relation is used for indicating the front-back sequence of each target label in the target session text.
After determining the target session text, a first timing relationship for each target tag may be determined.
The target tag may be information corresponding to a target information type in the target session text; for example, when the target session text includes "weather today is good and suitable for outing", and the target information type is the topic type, it is determined that the target tag includes "weather" and "outing". After the target tags are determined, a first timing relationship of each target tag may be determined.
The first timing relationship may be information indicating the order of occurrence of the respective target tags in the target session text; for example, since the target tag "weather" occurs before the target tag "outing", the first timing relationship indicates that the target tag "weather" is before the target tag "outing".
Step S103, according to the first timing relation of each target label, obtaining a target session sequence corresponding to the target session text, wherein the target session sequence is used for indicating the correlation between each target label.
After the first time sequence relation of the target labels is obtained, the target labels can be associated with each other according to the first time sequence relation, and then the target session sequence used for indicating the relevance among the target labels can be obtained.
For example, when a session including the target tag B and the target tag E in the target session text I occurs first and then the target tag D, the target tag E, and the target tag F are session-generated at intervals, the target session sequence corresponding to the target session text I may be as shown in fig. 4.
Step S104, generating a target vector corresponding to the target session sequence.
After the target session sequence is obtained, a target vector corresponding to the target session sequence can be generated, and then the target session sequence is encoded into a representation form matched with a target model, so that a later target model can be predicted according to the target vector. For example, the target session sequence may be processed by the Word Embedding method to obtain a Embedding vector representation of the target session sequence.
Step S105, inputting the target vector into a target model obtained by training in advance to obtain a target recommendation result of the target object.
After the target vector is obtained, the target session sequence is encoded into a representation form matched with the target model obtained through pre-training, and then the target vector can be input into the target model to obtain a target recommendation result of the target object.
The target model can be a deep neural network model which is obtained through pre-training, and a target recommendation result can be obtained based on a result output by the target model.
The target recommendation result can be content corresponding to the target label, and can also comprise content of other labels related to the target label; that is, when the target information type is "topic", then the target recommendation result is content related to the topic. For example, when the target tag includes "weather" and "outing", target recommendation results may be obtained according to "weather" and "outing", such as: the weather conditions of the recent days and scenic spots of outing can also obtain other labels such as clothes related to the weather and the outing, and further obtain target recommended results related to the weather, the outing and the clothes.
By the method in the embodiment, the target recommendation result for the target object can be determined based on the session text of the target object under the condition that the historical performance of the target object or the click record of the item and other data cannot be acquired.
As shown in fig. 2, as an alternative embodiment, the method, before the step S105 inputs the target vector into the target model trained in advance, and the target recommendation result of the target object is obtained, further includes the following steps:
step S201, obtaining candidate conversation texts of at least two candidate objects in the candidate object cluster, wherein the candidate objects are in one-to-one correspondence with the candidate conversation texts.
The candidate object cluster may be a cluster comprising a plurality of candidate objects, for each of which there is a corresponding candidate session text, so that at least two candidate session texts in the candidate object cluster may be obtained.
For example, a candidate cluster may be all group members in a certain group chat. Thus, the candidate objects are the group members, and the candidate session text may be the session text corresponding to each group member.
Step S202, a training session sequence and a testing session sequence for training are generated according to the candidate session text.
After the candidate session texts are obtained, session sequences corresponding to each candidate session text can be obtained according to the method in the foregoing embodiment, and a training session sequence for training and a testing session sequence for testing can be determined from all the session sequences.
Step S203, a training vector corresponding to the training session sequence is generated, and a testing vector corresponding to the testing session sequence is generated.
After the training session sequence and the testing session sequence are obtained, training vectors corresponding to the training session sequence and testing vectors corresponding to the testing session sequence may be generated according to the method in the foregoing embodiment; to encode the training session sequence and the testing session sequence into the representation form corresponding to the model to be trained.
Step S204, training the model to be trained through the training vector to obtain a trained model.
In step S205, when the test accuracy obtained by testing the trained model with the test vector reaches the preset requirement, the trained model is used as the target model.
After the training vector is obtained, the training vector can be input into a model to be trained for training, so as to obtain a trained model. After the trained model is obtained, the trained model may be tested by the test vector.
And when the test accuracy obtained by testing the trained model through the test vector reaches the preset requirement, obtaining a target model for prediction according to the trained model.
The preset requirement may be a preset precision value for indicating that the test precision reaches the preset requirement, and the trained model may be used as the target model.
For example, a predicted result obtained by inputting the test vector into the trained model is obtained, then a matching value between an item corresponding to the predicted result and an item actually clicked by a user corresponding to the test vector is judged, when the matching value reaches a preset requirement, the test precision is judged to reach the preset requirement, and the trained model is taken as a target model.
Through the method in the embodiment, the target model for text prediction can be trained, so that a corresponding target recommendation result can be obtained according to target vector prediction in the later period.
As shown in fig. 3, as an alternative embodiment, the step S202 generates a training session sequence for training and a testing session sequence for testing according to the candidate session text, as described above, including the following steps:
Step S301, for each candidate conversation text, determining a second time sequence relation of each candidate label in the candidate conversation text, and obtaining a candidate conversation sequence corresponding to the candidate conversation text according to the second time sequence relation of each candidate label, wherein the candidate label is information corresponding to the target information type in the candidate conversation text, and the candidate conversation sequence is used for indicating the correlation among the candidate labels.
After determining the respective target session text, for each candidate session text, a second timing relationship of the respective candidate tag in the candidate session text and the candidate session sequence may be determined as follows.
The candidate tag may be information corresponding to the candidate information type in the candidate session text; for example, when the candidate conversation text includes "weather today is good and suitable for outing", and the candidate information type is the topic type, it is determined that the candidate label includes "weather" and "outing". After the candidate tags are determined, a second timing relationship for each candidate tag may be determined.
The second timing relationship may be information indicating an order of occurrence of each candidate tag in the candidate session text; for example, since the candidate tag "weather" appears before the candidate tag "outing", the candidate tag "weather" is indicated before the candidate tag "outing" in the second timing relationship.
After the second time sequence relation of the candidate labels is obtained, the candidate labels can be associated with each other according to the second time sequence relation, and then the candidate session sequence for indicating the relevance among the candidate labels can be obtained.
For example, when a session including a target tag B and a target tag E in a target session text II occurs first, then a session of a target tag D, a target tag E, and a target tag a occurs at intervals.
Step S302, according to the second time sequence relation corresponding to each candidate conversation text, the association relation among the candidate labels in all the candidate conversation texts is determined.
Because the correlation between the candidate labels in the corresponding candidate conversation text is indicated in each second time sequence relation, after the second time sequence relation corresponding to each candidate conversation text is obtained, the association relation between the candidate labels in all the candidate conversation texts can be determined.
For example, in a second timing relationship (as shown in the following table) where three users (candidates) are obtained:
User' s Second timing relationship
user1 B、E/D、E、F
user2 D、A、B
user3 E、C、B/B、A
That is, for user1, in its corresponding candidate session text, B, E occurs first, then at intervals of time D, E, F, then the corresponding second timing relationship is as shown in fig. 4; for the user2, in the corresponding candidate session text, D, A, B occurs in sequence, and the corresponding second time sequence relationship is shown in fig. 5; for user3, in its corresponding candidate session text, E, C, B occurs first, then at intervals B, A, and then the corresponding second timing relationship is shown in fig. 6. Therefore, the above three second timing relationships are integrated, and the association relationship between the respective candidate tags is shown in fig. 7.
Step S303, determining at least one potential session sequence according to the association relation, wherein the second time sequence relation among the candidate labels in the potential session sequence is different from the second time sequence relation of any candidate session sequence.
After the association is obtained, although the correlation between every two candidate tags already exists in one of the candidate session sequences, in the case where the candidate tags are greater than or equal to three, a potential session sequence different from any one of the candidate session sequences is obtained.
The potential session sequence may be a session sequence that does not actually occur and is presumed from the candidate session sequence, e.g., as shown in fig. 7, at least three sets of potential session sequences A, B, E, F may be obtained as shown below; B. e, C, B, A; D. a, B, E, F.
Step S304, determining the training session sequence and the testing session sequence in all candidate session sequences and all potential session sequences.
After the candidate session sequence and the potential session sequence are obtained, determining a training session sequence and a testing session sequence in all the candidate session sequences and all the potential session sequences in a random selection mode; further, each candidate session sequence can only be used for one of the training session sequence or the testing session sequence, and each potential session sequence can only be used for one of the training session sequence or the testing session sequence.
Based on the method, potential relations among different candidate labels can be discovered, behavior data of the user can be enriched, and the purpose of improving accuracy of recommendation results when the user is recommended is achieved.
As an alternative embodiment, the step S105 of inputting the target vector into the target model trained in advance to obtain the target recommendation result of the target object, includes the following steps:
step S401, obtaining target high-level semantic information corresponding to the target vector by inputting the target vector into a target model.
Step S402, matching the target layer semantic information to a candidate recommended session sequence in all candidate session sequences, wherein the similarity between the high-level semantic information of the candidate recommended session sequence and the target high-level semantic information meets the preset similarity requirement;
step S403, screening and obtaining target recommendation labels with target number from candidate recommendation labels of all candidate recommendation session sequences, wherein the candidate recommendation labels are information corresponding to the target information type and positioned in the corresponding candidate recommendation session sequences;
Step S404, inquiring in a target database to obtain a target recommendation result corresponding to the target recommendation label.
After the target vector is obtained, the target vector can be input into a target model, and target high-level semantic information (i.e. feature information) corresponding to the target vector is obtained after the target model convolves the target vector for a plurality of times (i.e. feature extraction).
After the target high-level semantic information is obtained, in order to obtain the corresponding candidate recommended session sequences based on the target high-level semantic information in a matching way, the high-level semantic information of each candidate session sequence can be determined in advance; and then, carrying out similarity calculation on the target high-level semantic information and the high-level semantic information of each candidate session sequence by utilizing collaborative filtering.
After the similarity between the target layer semantic information and the high layer semantic information of each candidate session sequence is obtained, the candidate session sequence with the similarity meeting the preset similarity requirement can be selected as the candidate recommended session sequence.
The preset similarity requirement may be a preset minimum similarity value, and when the similarity corresponding to the candidate session sequence is higher than or equal to the preset similarity requirement, the candidate session sequence is used as a candidate recommended session sequence.
After the candidate recommended session sequence is obtained, a target recommended label can be selected from the candidate recommended session sequence. Since multiple tags may be included in each candidate recommended session sequence, the same tag may be present in the same candidate recommended session sequence or in different candidate recommended session sequences, and the number of tags may exceed the target number. Thus, a target number of target recommendation tags may be selected by de-duplicating each tag, and the target recommendation tags may include target tags in the target session series.
After the target recommendation label is obtained, a target recommendation result corresponding to the target recommendation label can be determined in the target database. For example, the content in the target database may be labeled with a corresponding tag in advance, and then the target content corresponding to each target recommendation tag is matched in the target database one by one through the target recommendation tags in a tag matching manner, so that a target recommendation result may be obtained according to the target content corresponding to all the target recommendation tags.
According to the method, since the candidate recommended session sequence is the session sequence corresponding to other candidate objects different from the target object, potential correlation of sessions between different objects can be achieved by matching the candidate recommended session sequence, and other tags possibly having correlation with the target tag in the target session sequence in time sequence can be determined based on the candidate recommended session sequence, so that the purpose of enriching behavior data of the target object can be achieved, and coverage of target recommendation results can be improved.
As an optional implementation manner, in the foregoing method, the step S403 of screening the target number of target recommendation tags from the candidate recommendation tags of all the candidate recommendation session sequences includes:
Selecting a target recommendation label from all candidate recommendation labels according to the matching degree corresponding to each candidate recommendation session sequence and the third time sequence relation of each candidate recommendation label in each candidate recommendation session sequence, wherein the matching degree corresponding to the candidate recommendation session sequence where the target recommendation label is located is higher than or equal to the matching degree corresponding to the candidate recommendation session sequence where other candidate recommendation labels are located, and the time sequence of the target recommendation label is prior to the time sequence of other candidate recommendation labels in the same candidate recommendation session sequence.
After the candidate recommendation tags are determined, the matching degree corresponding to each candidate recommendation session sequence can be obtained at the same time, and a third time sequence relation of each candidate recommendation tag in each candidate recommendation session sequence is determined.
When the number of targets is greater than the total number of candidate recommendation tags in each candidate recommendation session sequence, the target recommendation tag needs to be selected from all candidate recommendation tags. And, the target recommendation label selected needs to satisfy: the matching degree corresponding to the candidate recommended session sequence where the target recommended label is located is higher than or equal to the matching degree corresponding to the candidate recommended session sequences where other candidate recommended labels are located, and the time sequence of the target recommended label is earlier than the time sequence of other candidate recommended labels in the same candidate recommended session sequence.
For example, there are a candidate recommended session sequence a (the corresponding matching degree is N1, the third timing relationship is A, B, E, F), a candidate recommended session sequence b (the corresponding matching degree is N2, the third timing relationship is B, E, C, B, A), a candidate recommended session sequence c (the corresponding matching degree is N3, the third timing relationship is D, G, H, E, F), and N1> N2> N3, the target number is 6; the selection of the target recommended labels A, B, E, F in the candidate recommended session sequence a is performed, the selection in the candidate recommended session sequence b is continued because less than 6 candidate recommended labels exist, the target recommended labels are taken as the target recommended labels because only C is different from A, B, E, F in the candidate recommended labels in the candidate recommended session sequence b, the total of 5 target recommended labels are obtained, the selection in the candidate recommended session sequence C is continued because the candidate recommended labels in the candidate recommended session sequence C exist D, G and H are different from A, B, C, E, F, only one target recommended label can be selected, the timing of D, G and H needs to be determined, and the target recommended labels are taken as the target recommended labels when the timing of D is determined to be earlier than the timing of G and H, so that the target recommended labels comprise A, B, C, D, E, F.
By the method in the embodiment, the target recommendation label with higher matching degree can be selected and obtained, and further, a better recommendation effect can be achieved.
As an optional implementation manner, the step S303 of determining at least one potential session sequence according to the association relationship includes the following steps:
step S601, obtaining label association structure information for indicating association relations among candidate labels according to the association relations among the candidate labels.
Step S602, performing session sequence inquiry in the tag association structure information through breadth-first search or depth-first search to obtain a potential session sequence.
After the association relations among the candidate labels are obtained, label association structure information can be obtained according to the association relations.
The tag association structure information may be information indicating association relations between all candidate tags, for example: for user1, in the corresponding candidate session text, B, E occurs first, then a period of time D, E, F occurs, and then the corresponding second timing relationship is shown in fig. 4; for the user2, in the corresponding candidate session text, D, A, B occurs in sequence, and the corresponding second time sequence relationship is shown in fig. 5; for user3, in its corresponding candidate session text, E, C, B occurs first, then at intervals B, A, and then the corresponding second timing relationship is shown in fig. 6. Therefore, the above three second time sequence relationships are integrated, and the association relationship between the candidate tags is shown in fig. 7, and the tag association structure information is information indicating the association relationship shown in fig. 7.
After the tag association structure information is obtained, a random walk method can be adopted to construct a potential session sequence, and in practice, one of breadth-first search or depth-first search methods can be adopted to construct the potential session sequence.
In this embodiment, by adopting the breadth-first search or the depth-first search method, the occurrence of infinite session sequences can be avoided, so that the calculation amount in the process of acquiring the target prediction result in the later period can be reduced, and the calculation efficiency can be improved.
As an optional implementation manner, the generating, in step S104, the target vector corresponding to the target session sequence includes the following steps:
step S701, mapping each target label to a target space to obtain a target sub-vector;
step S702, according to the target word vector of each target label in the conversation sequence, a target vector is obtained.
After the target session sequence is obtained, each target tag in the target session sequence may be determined. The target sub-vector for each target tag may be obtained by deriving Embedding representation for each target tag using the Word Embedding method.
After each target word vector is obtained, the target vector may be obtained by adding the respective target word vectors, or the like.
As shown in fig. 8, according to an embodiment of another aspect of the present application, there is further provided a recommending apparatus based on a session text, including:
the acquisition module 1 is used for acquiring a target session text of a target object;
The determining module 2 is configured to determine a first timing relationship of each target tag in the target session text, where the target tag is information corresponding to the target information type in the target session text, and the first timing relationship is used to indicate a front-to-back order of each target tag in the target session text;
A sequence module 3, configured to obtain a target session sequence corresponding to the target session text according to a first timing relationship of each target tag, where the target session sequence is used to indicate a correlation between each target tag;
The generating module 4 is used for generating a target vector corresponding to the target session sequence;
and the result module 5 is used for inputting the target vector into a pre-trained target model to obtain a target recommendation result of the target object.
In particular, the specific process of implementing the functions of each module in the apparatus of the embodiment of the present invention may be referred to the related description in the method embodiment, which is not repeated herein.
According to another embodiment of the present application, there is also provided an electronic apparatus including: as shown in fig. 9, the electronic device may include: the device comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 are in communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501 is configured to execute the program stored in the memory 1503, thereby implementing the steps of the method embodiment described above.
The bus mentioned above for the electronic device may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The memory may include random access memory (Random Access Memory, RAM) or may include non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
The embodiment of the application also provides a computer readable storage medium, wherein the storage medium comprises a stored program, and the program executes the method steps of the method embodiment.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A conversation text-based recommendation method, comprising:
Acquiring a target session text of a target object;
determining a first timing relation of each target label in the target session text, wherein the target labels are information corresponding to target information types in the target session text, and the first timing relation is used for indicating the front-back sequence of each target label in the target session text;
obtaining a target session sequence corresponding to the target session text according to the first timing relation of each target tag, wherein the target session sequence is used for indicating the correlation between each target tag;
generating a target vector corresponding to the target session sequence;
Inputting the target vector into a target model obtained by training in advance to obtain a target recommendation result of the target object, wherein the target recommendation result comprises the following steps: inputting the target vector into the target model to obtain target high-level semantic information corresponding to the target vector; matching the target high-level semantic information to a candidate recommended session sequence in all candidate session sequences, wherein the similarity between the high-level semantic information of the candidate recommended session sequence and the target high-level semantic information meets a preset similarity requirement; screening target recommendation labels with target number from all candidate recommendation labels of the candidate recommendation session sequences, wherein the candidate recommendation labels are information corresponding to the target information type and positioned in the corresponding candidate recommendation session sequences; and inquiring in a target database to obtain the target recommendation result corresponding to the target recommendation label.
2. The method of claim 1, wherein prior to said inputting the target vector into a pre-trained target model to obtain a target recommendation for the target object, the method further comprises:
Obtaining candidate conversation texts of at least two candidate objects in a candidate object cluster, wherein the candidate objects correspond to the candidate conversation texts one by one;
Generating a training session sequence for training and a testing session sequence according to the candidate session text;
generating a training vector corresponding to the training session sequence and generating a testing vector corresponding to the testing session sequence;
training the model to be trained through the training vector to obtain a trained model;
And under the condition that the test precision obtained by testing the trained model through the test vector reaches a preset requirement, taking the trained model as the target model.
3. The method of claim 2, wherein generating a training session sequence and a testing session sequence for training from the candidate session text comprises:
For each candidate conversation text, determining a second time sequence relation of each candidate label in the candidate conversation text, and obtaining a candidate conversation sequence corresponding to the candidate conversation text according to the second time sequence relation of each candidate label, wherein the candidate label is information corresponding to the target information type in the candidate conversation text, and the candidate conversation sequence is used for indicating the correlation among the candidate labels;
Determining the association relation among the candidate labels in all the candidate session texts according to the second time sequence relation corresponding to each candidate session text;
Determining at least one potential session sequence according to the association relation, wherein the second time sequence relation between each candidate label in the potential session sequence is different from the second time sequence relation of any candidate session sequence;
the training session sequence and the testing session sequence are determined from all the candidate session sequences and all the potential session sequences.
4. The method of claim 1, wherein the screening the candidate recommendation tags for the target number from all candidate recommendation session sequences comprises:
According to the matching degree corresponding to each candidate recommended session sequence and the third time sequence relation of each candidate recommended tag in each candidate recommended session sequence, selecting and obtaining the target recommended tag from all the candidate recommended tags, wherein the matching degree corresponding to the candidate recommended session sequence where the target recommended tag is located is higher than or equal to the matching degree corresponding to the candidate recommended session sequences where other candidate recommended tags are located, and the time sequence of the target recommended tag is earlier than the time sequences of other candidate recommended tags in the same candidate recommended session sequence.
5. The method of claim 3, wherein said determining at least one potential session sequence from said association comprises:
obtaining label association structure information for indicating the association relation between the candidate labels according to the association relation between the candidate labels;
and carrying out session sequence inquiry in the tag association structure information through breadth-first search or depth-first search to obtain the potential session sequence.
6. The method of claim 1, wherein generating the target vector for the target session sequence comprises:
mapping each target label to a target space to obtain a target sub-vector;
And obtaining the target vector according to the target word vector of each target tag in the session sequence.
7. A session text based recommendation device, comprising:
the acquisition module is used for acquiring a target session text of a target object;
the determining module is used for determining a first time sequence relation of each target label in the target session text, wherein the target labels are information corresponding to target information types in the target session text, and the first time sequence relation is used for indicating the front-back sequence of each target label in the target session text;
The sequence module is used for obtaining a target session sequence corresponding to the target session text according to the first time sequence relation of each target tag, wherein the target session sequence is used for indicating the correlation among the target tags;
the generation module is used for generating a target vector corresponding to the target session sequence;
The result module is used for inputting the target vector into a target model obtained by training in advance to obtain a target recommendation result of the target object, and comprises the following steps: inputting the target vector into the target model to obtain target high-level semantic information corresponding to the target vector; matching the target high-level semantic information to a candidate recommended session sequence in all candidate session sequences, wherein the similarity between the high-level semantic information of the candidate recommended session sequence and the target high-level semantic information meets a preset similarity requirement; screening target recommendation labels with target number from all candidate recommendation labels of the candidate recommendation session sequences, wherein the candidate recommendation labels are information corresponding to the target information type and positioned in the corresponding candidate recommendation session sequences; and inquiring in a target database to obtain the target recommendation result corresponding to the target recommendation label.
8. An electronic device, comprising: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
The memory is used for storing a computer program;
the processor being adapted to implement the method of any of claims 1 to 6 when executing the computer program.
9. A computer readable storage medium, characterized in that the storage medium comprises a stored program, wherein the program when run performs the method of any of the preceding claims 1 to 6.
CN202110859016.8A 2021-07-28 2021-07-28 Recommendation method and device based on session text, electronic equipment and storage medium Active CN113641897B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110859016.8A CN113641897B (en) 2021-07-28 2021-07-28 Recommendation method and device based on session text, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110859016.8A CN113641897B (en) 2021-07-28 2021-07-28 Recommendation method and device based on session text, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113641897A CN113641897A (en) 2021-11-12
CN113641897B true CN113641897B (en) 2024-04-19

Family

ID=78418654

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110859016.8A Active CN113641897B (en) 2021-07-28 2021-07-28 Recommendation method and device based on session text, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113641897B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116775815B (en) * 2022-03-07 2024-04-26 腾讯科技(深圳)有限公司 Dialogue data processing method and device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045907A (en) * 2015-08-10 2015-11-11 北京工业大学 Method for constructing visual attention-label-user interest tree for personalized social image recommendation
CN109299321A (en) * 2018-08-31 2019-02-01 出门问问信息科技有限公司 A kind of song recommended method and device
CN109977215A (en) * 2019-03-29 2019-07-05 百度在线网络技术(北京)有限公司 Sentence recommended method and device based on association point of interest
CN110188272A (en) * 2019-05-27 2019-08-30 南京大学 A kind of community's question and answer web site tags recommended method based on user context
CN111667067A (en) * 2020-05-28 2020-09-15 平安医疗健康管理股份有限公司 Recommendation method and device based on graph neural network and computer equipment
CN112115249A (en) * 2020-09-27 2020-12-22 支付宝(杭州)信息技术有限公司 Statistical analysis and result display method and device for user intention
CN112580368A (en) * 2020-12-25 2021-03-30 网易(杭州)网络有限公司 Method, device, equipment and storage medium for recognizing intention sequence of conversation text
CN112733018A (en) * 2020-12-31 2021-04-30 哈尔滨工程大学 Session recommendation method based on graph neural network GNN and multi-task learning
CN112989209A (en) * 2021-05-10 2021-06-18 腾讯科技(深圳)有限公司 Content recommendation method, device and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045907A (en) * 2015-08-10 2015-11-11 北京工业大学 Method for constructing visual attention-label-user interest tree for personalized social image recommendation
CN109299321A (en) * 2018-08-31 2019-02-01 出门问问信息科技有限公司 A kind of song recommended method and device
CN109977215A (en) * 2019-03-29 2019-07-05 百度在线网络技术(北京)有限公司 Sentence recommended method and device based on association point of interest
CN110188272A (en) * 2019-05-27 2019-08-30 南京大学 A kind of community's question and answer web site tags recommended method based on user context
CN111667067A (en) * 2020-05-28 2020-09-15 平安医疗健康管理股份有限公司 Recommendation method and device based on graph neural network and computer equipment
CN112115249A (en) * 2020-09-27 2020-12-22 支付宝(杭州)信息技术有限公司 Statistical analysis and result display method and device for user intention
CN112580368A (en) * 2020-12-25 2021-03-30 网易(杭州)网络有限公司 Method, device, equipment and storage medium for recognizing intention sequence of conversation text
CN112733018A (en) * 2020-12-31 2021-04-30 哈尔滨工程大学 Session recommendation method based on graph neural network GNN and multi-task learning
CN112989209A (en) * 2021-05-10 2021-06-18 腾讯科技(深圳)有限公司 Content recommendation method, device and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
一种基于时间和标签上下文的协同过滤推荐算法;窦羚源;王新华;;太原理工大学学报;20151115(第06期);全文 *
一种结合相关性和多样性的图像标签推荐方法;崔超然;马军;;计算机学报;20130315(03);全文 *
基于对话内容的交互型文本会话主题挖掘;彭杰;石永革;高胜保;;电信科学;20160920(第09期);全文 *
面向Twitter的个性化信息推荐技术研究;郭亮;面向Twitter的中国优秀硕士学位论文全文数据库 (信息科技辑);20180415;全文 *

Also Published As

Publication number Publication date
CN113641897A (en) 2021-11-12

Similar Documents

Publication Publication Date Title
CN110309427B (en) Object recommendation method and device and storage medium
US20210327428A1 (en) Adversarial learning and generation of dialogue responses
US9449271B2 (en) Classifying resources using a deep network
WO2018033030A1 (en) Natural language library generation method and device
CN110704626B (en) Short text classification method and device
KR102133825B1 (en) Voice conversation method and system of enhanced word features
Li et al. Universal sequential outlier hypothesis testing
CN103473036B (en) A kind of input method skin method for pushing and system
CN110069612B (en) Reply generation method and device
CN111125521A (en) Information recommendation method, device, equipment and storage medium
CN110532469B (en) Information recommendation method, device, equipment and storage medium
CN108319628B (en) User interest determination method and device
CN110597965B (en) Emotion polarity analysis method and device for article, electronic equipment and storage medium
CN110598109A (en) Information recommendation method, device, equipment and storage medium
CN110781396A (en) Information recommendation method, device, equipment and storage medium
US11361762B2 (en) Recommending multimedia based on user utterances
CN113641897B (en) Recommendation method and device based on session text, electronic equipment and storage medium
CN113220974B (en) Click rate prediction model training and search recall method, device, equipment and medium
CN111126422B (en) Method, device, equipment and medium for establishing industry model and determining industry
CN108710682B (en) Object recommendation method, device and equipment
CN115730217A (en) Model training method, material recalling method and device
CN113010664B (en) Data processing method and device and computer equipment
Kondylidis et al. Category aware explainable conversational recommendation
CN111538898B (en) Web service package recommendation method and system based on combined feature extraction
CN115017362A (en) Data processing method, electronic device 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
GR01 Patent grant
GR01 Patent grant