Information recommendation method and device
By constructing and using the method of combining encyclopedia entry vectors with query entries, the problem of semantic bias in proper noun queries in image matching is solved, and more accurate information recommendation is achieved.
Patent Information
- Application Number
- CN201811447651.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-11-29
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2038-11-29
AI Technical Summary
In the existing technology, when matching/acquiring images, the user inputs a query term containing a proper noun and is unable to identify the true meaning of the query term, resulting in semantic deviation and inability to obtain accurate result information.
By obtaining the query terms input by the user, constructing a matching encyclopedia entry vector, combining the query entry vectors for splicing, inputting the preset query model to obtain recommended information, and using the encyclopedia entry vectors to supplement semantics and improve recommended information. accuracy.
It solves the problem of semantic deviation in image matching/acquisition, obtains more accurate recommendation information, and ensures that the recommendation results conform to the true meaning of the query terms.
Smart Images

Figure CN111241844B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to an information recommendation method and device. Background Art
[0002] With the rapid development of Internet technology, the information contained on the Internet is becoming more and more diverse. It is becoming increasingly difficult for users to obtain the required data from the massive amount of data on the Internet.
[0003] For example, when a user enters a description text to search for an image, there is not only a text-to-text match for web page search, but also a multi-modal retrieval match between text and image. In current image search, there are two traditional methods for calculating the correlation between text and image. One is an indirect method, which requires the use of image technology to generate a description text of the image, and then use the text to match the search term entered by the user. The other is a direct method, which maps the search term entered by the user and the image to a high-dimensional semantic space for matching.
[0004] However, the above-mentioned image matching / acquisition method cannot identify the true meaning of the query term when the query term contains a proper noun input by the user, which easily leads to semantic deviation and fails to obtain accurate result information. Summary of the invention
[0005] In view of this, an embodiment of the present invention aims to provide an information recommendation method and device, which solves the problem that the image matching / acquisition method in the prior art cannot identify the true meaning of the query terms containing proper nouns input by the user, and can obtain more accurate recommended information.
[0006] In the first aspect, an embodiment of the present application provides the following technical solution:
[0007] An information recommendation method, comprising:
[0008] Obtain a query term to be queried; obtain an input vector based on the query term and an encyclopedia term vector matching the query term, wherein the encyclopedia term vector is a vectorized representation of the semantic content corresponding to the term name in the encyclopedia information; input the input vector into a preset query model, obtain recommendation information for recommendation to the user through the query model query, and output the recommendation information.
[0009] Preferably, before the step of obtaining the query term to be queried, a step of constructing an encyclopedia term vector matching the query term is also included, the step comprising: obtaining encyclopedia information, the encyclopedia information including the term name and the associated tag of the term name; obtaining the encyclopedia term vector according to the term name in the encyclopedia information and the associated tag of the term name.
[0010] Preferably, the step of obtaining an encyclopedia entry vector based on the entry name in the encyclopedia information and the associated label of the entry name includes: constructing the entry name in the encyclopedia information and the associated label of the entry name into a bipartite graph; taking the entry name in the encyclopedia information as a starting point, performing a random walk in the bipartite graph to obtain an associated sequence; and obtaining the encyclopedia entry vector corresponding to the entry name based on the associated sequence.
[0011] Preferably, the step of obtaining the input vector according to the query term and the encyclopedia term vector matching the query term specifically includes: vectorizing the query term to obtain the query term vector; obtaining the similarity between the query term vector and the encyclopedia term vector according to the query term vector; and concatenating the query term vector and the encyclopedia term vector having the greatest similarity to the query term vector to obtain the input vector.
[0012] Preferably, the step of obtaining an input vector based on the query term and the encyclopedia term vector matching the query term specifically includes: obtaining a target term name corresponding to the query term from the encyclopedia information; obtaining an encyclopedia term vector corresponding to the target term name; and concatenating the query term vector corresponding to the query term and the encyclopedia term vector corresponding to the target term name to obtain the input vector.
[0013] Preferably, the step of inputting the input vector into a preset query model, obtaining recommendation information for recommendation to the user through the query model query, and outputting the recommendation information also includes: inputting the input vector into a preset query model, obtaining a target vector through the query model; obtaining a cosine distance between the target vector and the input vector, and obtaining a candidate target vector whose cosine distance is within a set threshold range; obtaining the recommendation information based on the candidate target vector and outputting the recommendation information.
[0014] Preferably, the recommended information includes: pictures, advertisements, news, e-commerce products or games.
[0015] Preferably, the training method of the preset query model includes: obtaining historical query records, wherein the historical query records include historical query terms and historical recommendation information included in query results; obtaining training samples, including: obtaining an input vector of the training sample based on the historical query terms and encyclopedia term vectors corresponding to the historical query terms, and using the historical recommendation information as a calibration result of the input vector; and training the preset query model based on the training samples to obtain a trained preset query model.
[0016] In the second aspect, based on the same inventive concept, an embodiment of the present application provides the following technical solution:
[0017] An information recommendation device, comprising:
[0018] A query term acquisition module is used to acquire a query term to be queried; an input vector acquisition module is used to acquire an input vector based on the query term and an encyclopedia term vector matching the query term, wherein the encyclopedia term vector is a vectorized representation of the semantic content corresponding to the term name in the encyclopedia information; an output module is used to input the input vector into a preset query model, obtain recommendation information for recommendation to the user through the query model query, and output the recommendation information.
[0019] Preferably, it also includes a construction module, which is used to: obtain encyclopedia information before the step of obtaining the query term to be queried, the encyclopedia information including the term name and the associated label of the term name; obtain the encyclopedia term vector according to the term name in the encyclopedia information and the associated label of the term name.
[0020] Preferably, the construction module is also used to construct the entry names in the encyclopedia information and the associated labels of the entry names into a bipartite graph; starting from the entry names in the encyclopedia information, perform random walks in the bipartite graph to obtain an associated sequence; and obtain the encyclopedia entry vector corresponding to the entry name based on the associated sequence.
[0021] Preferably, the input vector acquisition module is further used to: vectorize the query term to obtain a query term vector; obtain the similarity between the query term vector and the encyclopedia term vector based on the query term vector; and concatenate the query term vector and the encyclopedia term vector having the greatest similarity to the query term vector to obtain the input vector.
[0022] Preferably, the input vector acquisition module is further used to: obtain a target term name corresponding to the query term from the encyclopedia information; obtain an encyclopedia term vector corresponding to the target term name; and concatenate the query term vector corresponding to the query term and the encyclopedia term vector corresponding to the target term name to obtain the input vector.
[0023] Preferably, the output module is also used to: input the input vector into a preset query model, and obtain a target vector through the query model; obtain the cosine distance between the target vector and the input vector, and obtain candidate target vectors whose cosine distance is within a set threshold range; obtain the recommendation information based on the candidate target vector and output the recommendation information.
[0024] Preferably, the recommended information includes: pictures, advertisements, news, e-commerce products or games.
[0025] Preferably, it also includes a training module for training the preset query model, the training module is used to: obtain historical query records, the historical query records contain historical query terms and historical recommendation information contained in query results; obtain training samples, including: obtaining an input vector of the training sample based on the historical query terms and the encyclopedia term vectors corresponding to the historical query terms, and using the historical recommendation information as the calibration result of the input vector; and train the preset query model based on the training samples to obtain the trained preset query model.
[0026] In the third aspect, based on the same inventive concept, an embodiment of the present application provides the following technical solutions:
[0027] An electronic device includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations:
[0028] Obtain a query term to be queried; obtain an input vector based on the query term and an encyclopedia term vector matching the query term, wherein the encyclopedia term vector is a vectorized representation of the semantic content corresponding to the term name in the encyclopedia information; input the input vector into a preset query model, obtain recommendation information for recommendation to the user through the query model query, and output the recommendation information.
[0029] In the fourth aspect, based on the same inventive concept, an embodiment of the present application provides the following technical solutions:
[0030] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0031] Obtain a query term to be queried; obtain an input vector based on the query term and an encyclopedia term vector matching the query term, wherein the encyclopedia term vector is a vectorized representation of the semantic content corresponding to the term name in the encyclopedia information; input the input vector into a preset query model, obtain recommendation information for recommendation to the user through the query model query, and output the recommendation information.
[0032] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0033] Compared with the prior art, the information recommendation method provided in the embodiment of the present invention obtains the query terms input by the user and obtains the input vector through the query terms, wherein the input vector includes the query term vector and the encyclopedia term vector matching the query term; the encyclopedia term vector can be used to complement the query term semantically; finally, the input vector including the query term vector and the encyclopedia term vector matching the query term is input into a preset query model, so that the recommended information that is more in line with the semantics of the query term can be obtained. The present invention solves the problem that the information recommendation method in the prior art cannot identify the true meaning of the query term and is prone to semantic deviation, and can obtain more accurate recommended information.
[0034] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0036] Figure 1 This is a flow chart of an information recommendation method provided by the first embodiment of the present invention.
[0037] Figure 2 A flow chart of a method for constructing an encyclopedia term vector in the first embodiment of the present invention;
[0038] Figure 3 is an exemplary bipartite graph of the first embodiment of the present invention;
[0039] Figure 4 for Figure 1 Specific flow chart of step S20;
[0040] Figure 5 is a functional module diagram of an information recommendation device according to a second embodiment of the present invention;
[0041] Figure 6 An information recommendation device is shown as an exemplary embodiment of the present invention;
[0042] Figure 7 A schematic diagram of the structure of an exemplary server provided by the present invention. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0044] For ease of explanation and understanding, embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0045] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0046] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.
[0047] First embodiment
[0048] Please refer to Figure 1 In this embodiment, an information recommendation method is provided. Using the method, after a user enters a query term, the recommended information that matches the semantics of the query term can be obtained. Figure 1 The information recommendation method is described in detail. The specific method includes:
[0049] Step S10: Obtain the query term to be searched.
[0050] Step S20: obtaining an input vector according to the query term and the encyclopedia term vector matching the query term.
[0051] Step S30: inputting the input vector into a preset query model, querying the query model to obtain recommendation information for recommending to the user, and outputting the recommendation information.
[0052] In step S10, the query term is used to query recommended information related to the query term. The query term can be directly input by the user. An exemplary explanation is as follows: when the user wants to query pictures related to "Li Na" (the recommended information is pictures), he can directly input "Li Na", and at this time "Li Na" is the query term.
[0053] The query terms can also be generated by capturing the user's personal information by the software or program using the information recommendation method. An exemplary explanation is as follows, for example, when the relevant software or program needs to recommend news or advertising information to the user (the recommended information is news or advertising), the personal information may include the user's age, gender, hobbies, and software usage habits, and the corresponding generated content may include "post-90s", "male", "watching movies", and "audio-visual users". At this time, "post-90s", "male", "watching movies", and "audio-visual users" can be used as input query terms.
[0054] The usage scenarios in the embodiments of the present invention include but are not limited to the above two, and can also be applied to other multimodal retrievals. Multimodal retrieval is to achieve mutual retrieval of data in different modes.
[0055] Step S20: obtaining an input vector according to the query term and the encyclopedia term vector matching the query term.
[0056] In step S20, the encyclopedia term vector is a vectorized representation of the semantic content corresponding to the term name in the encyclopedia information. Since the input vector is obtained by the query term and the encyclopedia term vector matching the query term, the encyclopedia term vector can perform semantic expansion on the query term to ensure that the subsequent recommended information is more consistent with the semantics actually expressed by the query term, improve the accuracy of the recommended information, and avoid inaccurate recommended information due to semantic deviation.
[0057] Please refer to Figure 2 As for the encyclopedia term vector, it should be noted that it can be pre-constructed, that is, the encyclopedia term vector is constructed before step S10. Specifically, the constructed encyclopedia term vector includes the encyclopedia term vector matching the query term, which can be constructed by the following steps:
[0058] Step S101: Obtain encyclopedia information.
[0059] In step S101, the encyclopedia information includes the name of the entry and the associated tag of the entry. The encyclopedia information can be directly captured by crawling tools such as web crawlers and other encyclopedia information from major websites. For example, Sogou Encyclopedia, 360 Encyclopedia, Baidu Encyclopedia, Wikipedia, and Hudong Encyclopedia can be used as encyclopedia information without limitation.
[0060] The entry name included in the encyclopedia information is the entry title, and the associated tag of the entry name is the attribute of the entry name. For example, if the entry name is "Li Na", then the associated tags of "Li Na" are "athlete", "tennis", "sports figure", and "figure". More examples are shown in the following table:
[0061] Table 1
[0062]
[0063]
[0064] If there is no keyword in the query term that corresponds to the term name of the encyclopedia information, as an optional method, the term name closest to the query term can also be obtained, and the closest means the closest in semantics.
[0065] The obtained encyclopedia information may include one or more entry names, and each entry name has a corresponding associated tag, as shown in Table 1. It should be noted that in the encyclopedia information, there may be multiple entry names corresponding to the same associated tag. For example, the entry names "Li Na" and "Yao Ming" both correspond to the associated tag "athlete".
[0066] Step S102: Obtain an encyclopedia entry vector according to the entry name in the encyclopedia information and the associated label of the entry name.
[0067] Among them, an exemplary encyclopedia entry vector acquisition method specifically provided in the embodiment of the present invention is:
[0068] First, all the entry names in the encyclopedia information and the associated labels of all the entry names are constructed into a bipartite graph. Figure 3 As shown, Figure 3 It is an exemplary bipartite graph, which includes multiple entry names, such as "Australian Open", "Li Na", and "Yao Ming"; it also includes multiple associated tags of the entry names, such as "sports events", "tennis", "person", "athlete", and "basketball".
[0069] Then, starting from the entry name in the encyclopedia information, a random walk is performed in the bipartite graph to obtain a correlation sequence. Specifically, Figure 3As shown in the figure, starting from "Li Na", the random walk can traverse to "tennis" and "Australian Open", "character" and "Yao Ming", and "athlete" and "Yao Ming". Then the entry name and the associated tags traversed from the entry name as the starting point and other entry names can be regarded as an associated sequence of the entry name.
[0070] In order to ensure that the associated sequence has a strong correlation, the step size of the random walk can be set during the random walk.
[0071] Finally, according to the association sequence corresponding to the entry name, the encyclopedia entry vector corresponding to the entry name is obtained. Specifically, the association sequence can be vectorized to obtain the encyclopedia entry vector. During vectorization, each entry name and label in the association sequence can be vectorized separately. The specific method of vectorization can adopt known technical means, such as inputting the association sequence into the CBOW model (Continuous Bag-Of-Words) or the Skip-gram model (The Skip-GramModel), and the vectorized representation corresponding to the association sequence can be obtained, which can be used as the encyclopedia entry vector.
[0072] Among them, another exemplary encyclopedia entry vector acquisition method specifically provided by the embodiment of the present invention is:
[0073] The entry name and the associated label of the entry name in the encyclopedia information can be directly regarded as an associated sequence, and then the associated sequence is vectorized to obtain the encyclopedia entry vector.
[0074] See also Figure 4 In step S20, the specific steps of obtaining the input vector according to the query term and its matching encyclopedia term vector are as follows:
[0075] Step S21: vectorize the query term to obtain a query term vector.
[0076] In step S21, the query term vector is a vectorized representation of the query term, and the vectorization method can adopt known technical means, which will not be described in detail. For example, the vectorized representation of the query term can be obtained by a CBOW model (continuous bag of words model) or a Skip-gram model.
[0077] Step S22: according to the query term vector, obtaining the similarity between the query term vector and the encyclopedia term vector.
[0078] In step S22, the query term vector and the encyclopedia term vector can be matched directly by the similarity of the terms. Specifically, since the encyclopedia term vector has been constructed before step S10, the similarity between the query term vector and the encyclopedia term vector can be directly calculated, for example, it can be measured by the cosine distance. The encyclopedia term vector with the highest similarity to the query term vector can be used as the encyclopedia term vector that matches the query term vector, and several vectors with high similarity to the query term vector can also be used as the encyclopedia term vector that matches the query term vector; in addition, the similarity can also be measured by Euclidean distance, Manhattan distance, etc., without limitation.
[0079] Step S23: concatenate the query term vector and the encyclopedia term vector having the greatest similarity to the query term vector to obtain the input vector.
[0080] In step S23, the splicing includes: the encyclopedia entry vector can be directly spliced behind the query entry vector. For example, the query entry vector is V1, and the encyclopedia entry vector matching the query entry vector is V2. Then the splicing method can be splicing on the vector dimension to form a vector of V1+V2, where V1+V2 is the input vector; as a specific example, V1=[1,2,3,4,5], V2=[6,7,8,9,10], then the input vector V1+V2=[7,9,11,13,15].
[0081] This embodiment also provides another method for obtaining the input vector, as follows:
[0082] Obtaining a target entry name corresponding to the query entry from the encyclopedia information;
[0083] Obtaining an encyclopedia entry vector corresponding to the target entry name;
[0084] The query term vector corresponding to the query term and the encyclopedia term vector corresponding to the target term name are concatenated to obtain the input vector.
[0085] Since there are corresponding association sequences and entry names in the process of constructing encyclopedia entry vectors, the target entry name corresponding to the query entry can be obtained from the encyclopedia information, wherein the target entry name includes: the same entry name as the query entry, and one or more entry names that are closest in semantics to the query entry name.
[0086] Since the association sequence has been pre-constructed, each entry name has a corresponding encyclopedia entry vector, and the encyclopedia entry vector corresponding to the target entry name can be directly obtained through the target entry name.
[0087] The query term vector corresponding to the query term and the encyclopedia term vector corresponding to the term name are concatenated to obtain the input vector. For details, refer to step 23.
[0088] Step S30: inputting the input vector into a preset query model, querying the query model to obtain recommendation information for recommending to the user, and outputting the recommendation information.
[0089] In step S30, the following process may be specifically included:
[0090] The input vector is input into a preset query model, and a target vector is obtained through the query model; wherein the target vector is a vectorized representation of the recommendation information.
[0091] Then, the cosine distance between the target vector and the input vector is obtained, and the candidate target vector whose cosine distance is within a set threshold range is obtained; wherein the set threshold range is used to limit the size of the cosine distance. For example, a threshold is set, and the target vector corresponding to the cosine distance less than the threshold is used as the candidate target vector.
[0092] Since there may be multiple recommended information, for example, multiple image search results may be obtained by using text to search for images; for another example, multiple news and advertisements may be recommended to the user through the user's personal information. Therefore, the recommended information may be output according to the cosine distance between the target vector and the input vector, and the recommended information may be sorted and output, or the first few recommended information most relevant to the query term may be recommended to the user.
[0093] In step S30, the preset query model is a trained model, and the specific model training method is:
[0094] First, obtain historical query records, which include historical query terms and historical recommendation information included in the query results. The historical query records may be records obtained through search engine queries, and the query terms entered in the search engine may be used as historical query terms, and the query results obtained by the search engine or part of the information in the query results may be used as historical recommendation information. Search engines may include Baidu Search, 360 Search, and Sogou Search, etc., without limitation.
[0095] Acquire training samples, the method for acquiring the training samples comprising: obtaining an input vector of the sample according to the historical query terms and the encyclopedia term vectors corresponding to the historical query terms, and using the historical recommendation information as a calibration result of the input vector.
[0096] Taking image retrieval as an example, the method of obtaining training samples includes: grabbing the historical query terms entered by users in the existing search engine, splicing the vectorized representation of the historical query terms and the encyclopedia term vector corresponding to the historical query terms to obtain the input vector of the training sample, and referring to step S23 for details. At the same time, the output of the top N historical recommendation information corresponding to the historical query terms in the search engine can be used as the calibration result, where N can be defined as any value, such as N is 3, 4, 5, etc. In addition, before training, the VGGNET-19 model (Visual Geometry Groupnetwork-19, VGGNET-19) can be used to process the historical recommendation information of the top N items of the search engine output as pictures, and the pictures are represented as multi-dimensional vectors, and the pictures processed by the VGGNET-19 model are used as the calibration results. Among them, the VGGNET-19 model is a prior art and will not be repeated. The step of using the VGGNET-19 model to process the output results of the search engine does not limit the protection scope of the present invention, and does not process the output historical recommendation information of the search engine, or other processing methods can be used.
[0097] On this basis, a more preferred implementation is to capture the number of times users click on the historical recommendation information output in the search engine, and use the historical recommendation information that has been clicked or has a high number of clicks (the number of clicks can be limited by a threshold) as the calibration result.
[0098] The preset query model may specifically be a deep semantic model, such as a DSSM model (Deep Structured Semantic Model, DSSM).
[0099] Then, according to the training samples, the preset query model is trained to obtain the trained preset query model, that is, the correlation between the query term vector, the encyclopedia term vector and the recommended information such as pictures is established. After inputting the input vector composed of the query term vector and the encyclopedia term vector, the recommended information with higher correlation can be output accordingly.
[0100] It should be noted that the information recommendation method in this embodiment is applicable not only to image retrieval, advertisement push, and news push, but also to e-commerce product recommendation, game recommendation, etc. without limitation.
[0101] Therefore, compared with the prior art, the information recommendation method provided in the embodiment of the present invention obtains the query terms input by the user and obtains the input vector through the query terms, wherein the input vector includes the query term vector and the encyclopedia term vector matching the query term, so that the encyclopedia term vector can play a role of semantic supplement to the query term. Finally, the input vector including the query term vector and the encyclopedia term vector matching the query term is input into the preset query model, and the recommended information that is more in line with the semantics of the query term can be obtained. The problem that the information recommendation method in the prior art cannot identify the true meaning of the query term and is prone to semantic deviation is solved, and more accurate recommended information can be obtained.
[0102] Second embodiment
[0103] See also Figure 5 In this embodiment, an information recommendation device 400 is provided, including: a query term acquisition module 401, an input vector acquisition module 402 and an output module 403.
[0104] Specific:
[0105] The query term acquisition module 401 is used to acquire the query term to be queried; the input vector acquisition module 402 is used to acquire the input vector based on the query term and the encyclopedia term vector matching the query term, wherein the encyclopedia term vector is a vectorized representation of the semantic content corresponding to the term name in the encyclopedia information; the output module 403 is used to input the input vector into a preset query model, obtain the recommended information for recommendation to the user through the query model query, and output the recommended information.
[0106] As an optional implementation, it also includes a construction module, which is used to: obtain encyclopedia information before the step of obtaining the query term to be queried, the encyclopedia information including the term name and the associated label of the term name; obtain the encyclopedia term vector according to the term name in the encyclopedia information and the associated label of the term name.
[0107] As an optional implementation, the construction module is also used to construct the entry names in the encyclopedia information and the associated labels of the entry names into a bipartite graph; starting from the entry names in the encyclopedia information, perform random walks in the bipartite graph to obtain an associated sequence; and obtain the encyclopedia entry vector corresponding to the entry name based on the associated sequence.
[0108] As an optional implementation, the input vector acquisition module 402 is further used to: vectorize the query term to obtain a query term vector; obtain the similarity between the query term vector and the encyclopedia term vector based on the query term vector; and concatenate the query term vector and the encyclopedia term vector with the greatest similarity to the query term vector to obtain the input vector.
[0109] As an optional implementation, the input vector acquisition module 402 is further used to: obtain a target term name corresponding to the query term from the encyclopedia information; obtain an encyclopedia term vector corresponding to the target term name; and concatenate the query term vector corresponding to the query term and the encyclopedia term vector corresponding to the target term name to obtain the input vector.
[0110] As an optional implementation, the output module 403 is also used to: input the input vector into a preset query model, and obtain a target vector through the query model; obtain a cosine distance between the target vector and the input vector, and obtain a candidate target vector whose cosine distance is within a set threshold range; obtain the recommendation information based on the candidate target vector and output the recommendation information.
[0111] As an optional implementation, the recommendation information includes: pictures, advertisements, news, e-commerce products or games.
[0112] As an optional implementation, it also includes a training module for training the preset query model, the training module is used to: obtain historical query records, the historical query records contain historical query terms and historical recommendation information contained in query results; obtain training samples, including: obtaining the input vector of the training sample based on the historical query terms and the encyclopedia term vectors corresponding to the historical query terms, and using the historical recommendation information as the calibration result of the input vector; according to the training samples, train the preset query model to obtain the trained preset query model.
[0113] Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here. For details, please refer to the above method embodiment.
[0114] Figure 6 8 is a block diagram of an information recommendation device 800 according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0115] Reference Figure 6, the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0116] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0117] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0118] The power component 806 provides power to the various components of the device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0119] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
[0120] The touch panel includes one or more touch sensors to sense touch, slide and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0121] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0122] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0123] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0124] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0125] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0126] Third embodiment
[0127] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0128] A computer-readable storage medium, in particular a non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform an information recommendation method, the method comprising:
[0129] Obtain a query term to be queried; obtain an input vector based on the query term and an encyclopedia term vector matching the query term, wherein the encyclopedia term vector is a vectorized representation of the semantic content corresponding to the term name in the encyclopedia information; input the input vector into a preset query model, obtain recommendation information for recommendation to the user through the query model query, and output the recommendation information. Figure 71 is a schematic diagram of the structure of the server in an embodiment of the present invention. The server 1900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1922 (for example, one or more processors) and memory 1932, and one or more storage media 1930 (for example, one or more mass storage devices) storing application programs 1942 or data 1944. Among them, the memory 1932 and the storage medium 1930 can be short-term storage or permanent storage. The program stored in the storage medium 1930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 1922 can be configured to communicate with the storage medium 1930 and execute a series of instruction operations in the storage medium 1930 on the server 1900.
[0130] The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input and output interfaces 1958, one or more keyboards 1956, and / or, one or more operating systems 1941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0131] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0132] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
[0133] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. An information recommendation method, characterized in that: include: Get the query term to be searched; Obtaining an input vector according to the query term and an encyclopedia term vector matching the query term, wherein the encyclopedia term vector is a vectorized representation of the semantic content corresponding to the term name in the encyclopedia information; Inputting the input vector into a preset query model, querying the query model to obtain recommendation information for recommending to the user, and outputting the recommendation information; The step of obtaining an input vector according to the query term and the encyclopedia term vector matching the query term specifically includes: Vectorizing the query term to obtain a query term vector; According to the query term vector, obtaining the similarity between the query term vector and the encyclopedia term vector; The query term vector and the encyclopedia term vector having the greatest similarity to the query term vector are concatenated to obtain the input vector.
2. The method according to claim 1, characterized in that: Before the step of obtaining the query term to be queried, the method further includes the step of constructing an encyclopedia term vector matching the query term, the step comprising: Obtaining encyclopedia information, the encyclopedia information including entry names and associated tags of the entry names; An encyclopedia entry vector is obtained according to the entry name in the encyclopedia information and the associated label of the entry name.
3. The method according to claim 2, characterized in that The step of obtaining an encyclopedia entry vector according to the entry name in the encyclopedia information and the associated label of the entry name comprises: Constructing the entry names in the encyclopedia information and the associated labels of the entry names into a bipartite graph; Taking the entry name in the encyclopedia information as a starting point, a random walk is performed in the bipartite graph to obtain an associated sequence; According to the association sequence, the encyclopedia entry vector corresponding to the entry name is obtained.
4. The method according to claim 1, characterized in that: The step of obtaining an input vector according to the query term and the encyclopedia term vector matching the query term specifically includes: Obtaining a target entry name corresponding to the query entry from the encyclopedia information; Obtaining an encyclopedia entry vector corresponding to the target entry name; The query term vector corresponding to the query term and the encyclopedia term vector corresponding to the target term name are concatenated to obtain the input vector.
5. The method according to claim 1, characterized in that: The step of inputting the input vector into a preset query model, querying the query model to obtain recommendation information for recommending to the user, and outputting the recommendation information further includes: Inputting the input vector into a preset query model, and obtaining a target vector through the query model; Obtaining a cosine distance between the target vector and the input vector, and obtaining a candidate target vector whose cosine distance is within a set threshold range; The recommendation information is obtained according to the candidate target vector and the recommendation information is output.
6. The method according to any one of claims 1 to 5, characterized in that: The recommended information includes: pictures, advertisements, news, e-commerce products or games.
7. The method according to any one of claims 1 to 5, characterized in that: The training method of the preset query model includes: Obtaining historical query records, wherein the historical query records include historical query terms and historical recommendation information included in the query results; Acquiring training samples, including: obtaining an input vector of the training sample according to the historical query terms and the encyclopedia term vector corresponding to the historical query terms, and using the historical recommendation information as a calibration result of the input vector; The preset query model is trained according to the training samples to obtain a trained preset query model.
8. An information recommendation device, characterized in that: include: A query term acquisition module, used to acquire the query term to be queried; An input vector acquisition module, configured to acquire an input vector according to the query term and an encyclopedia term vector matching the query term, wherein the encyclopedia term vector is a vectorized representation of the semantic content corresponding to the term name in the encyclopedia information; The input vector acquisition module is further used for: Vectorizing the query term to obtain a query term vector; According to the query term vector, obtaining the similarity between the query term vector and the encyclopedia term vector; Concatenate the query term vector and the encyclopedia term vector with the greatest similarity to the query term vector to obtain the input vector; The output module is used to input the input vector into a preset query model, obtain recommendation information for recommendation to the user through the query model query, and output the recommendation information.
9. The device according to claim 8, characterized in that It also includes a construction module for, before the step of obtaining the query term to be queried: Obtaining encyclopedia information, the encyclopedia information including entry names and associated tags of the entry names; An encyclopedia entry vector is obtained according to the entry name in the encyclopedia information and the associated label of the entry name.
10. The device according to claim 9, characterized in that The building blocks are also used to: Constructing the entry names in the encyclopedia information and the associated labels of the entry names into a bipartite graph; Taking the entry name in the encyclopedia information as a starting point, a random walk is performed in the bipartite graph to obtain an associated sequence; According to the association sequence, the encyclopedia entry vector corresponding to the entry name is obtained.
11. The device according to claim 8, characterized in that The input vector acquisition module is further used for: Obtaining a target entry name corresponding to the query entry from the encyclopedia information; Obtaining an encyclopedia entry vector corresponding to the target entry name; The query term vector corresponding to the query term and the encyclopedia term vector corresponding to the target term name are concatenated to obtain the input vector.
12. The device according to claim 8, characterized in that The output module is further used for: Inputting the input vector into a preset query model, and obtaining a target vector through the query model; Obtaining a cosine distance between the target vector and the input vector, and obtaining a candidate target vector whose cosine distance is within a set threshold range; The recommendation information is obtained according to the candidate target vector and the recommendation information is output.
13. The device according to any one of claims 8 to 12, characterized in that: The recommended information includes: pictures, advertisements, news, e-commerce products or games.
14. The device according to any one of claims 8 to 12, characterized in that: The system further comprises a training module for training the preset query model, wherein the training module is used to: Obtaining historical query records, wherein the historical query records include historical query terms and historical recommendation information included in the query results; Acquiring training samples, including: obtaining an input vector of the training sample according to the historical query terms and the encyclopedia term vector corresponding to the historical query terms, and using the historical recommendation information as a calibration result of the input vector; The preset query model is trained according to the training samples to obtain a trained preset query model.
15. An electronic device, characterized in that: The system comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: Get the query term to be searched; Obtaining an input vector according to the query term and an encyclopedia term vector matching the query term, wherein the encyclopedia term vector is a vectorized representation of the semantic content corresponding to the term name in the encyclopedia information; Inputting the input vector into a preset query model, querying the query model to obtain recommendation information for recommending to the user, and outputting the recommendation information; The step of obtaining an input vector according to the query term and the encyclopedia term vector matching the query term specifically includes: Vectorizing the query term to obtain a query term vector; According to the query term vector, obtaining the similarity between the query term vector and the encyclopedia term vector; The query term vector and the encyclopedia term vector having the greatest similarity to the query term vector are concatenated to obtain the input vector.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, the following steps are implemented: Get the query term to be searched; Obtaining an input vector according to the query term and an encyclopedia term vector matching the query term, wherein the encyclopedia term vector is a vectorized representation of the semantic content corresponding to the term name in the encyclopedia information; Inputting the input vector into a preset query model, querying the query model to obtain recommendation information for recommending to the user, and outputting the recommendation information; The step of obtaining an input vector according to the query term and the encyclopedia term vector matching the query term specifically includes: Vectorizing the query term to obtain a query term vector; According to the query term vector, obtaining the similarity between the query term vector and the encyclopedia term vector; The query term vector and the encyclopedia term vector having the greatest similarity to the query term vector are concatenated to obtain the input vector.
