CN109101505B - Recommendation method, recommendation device and device for recommendation - Google Patents

Recommendation method, recommendation device and device for recommendation Download PDF

Info

Publication number
CN109101505B
CN109101505B CN201710470630.9A CN201710470630A CN109101505B CN 109101505 B CN109101505 B CN 109101505B CN 201710470630 A CN201710470630 A CN 201710470630A CN 109101505 B CN109101505 B CN 109101505B
Authority
CN
China
Prior art keywords
recommendation
content
recommendation result
original content
result
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
CN201710470630.9A
Other languages
Chinese (zh)
Other versions
CN109101505A (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.)
Beijing Sogou Technology Development Co Ltd
Original Assignee
Beijing Sogou Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN201710470630.9A priority Critical patent/CN109101505B/en
Publication of CN109101505A publication Critical patent/CN109101505A/en
Application granted granted Critical
Publication of CN109101505B publication Critical patent/CN109101505B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a recommendation method, a recommendation device and a device for recommendation, wherein the method specifically comprises the following steps: carrying out error correction processing on original content to obtain corrected content corresponding to the original content; acquiring a first recommendation result corresponding to the correction content; and outputting the first recommendation result. The embodiment of the invention can improve the rationality and the accuracy of the recommendation result, and further improve the click rate of the recommendation result.

Description

Recommendation method, recommendation device and device for recommendation
Technical Field
The present invention relates to the field of information technologies, and in particular, to a recommendation method, a recommendation apparatus, and an apparatus for recommendation.
Background
With the development of information technology, more and more users obtain information through the internet. When a user desires to obtain certain information, the user usually needs to search by means of a search engine or the like, or open a specific website for query. The method needs a plurality of steps of 'clicking a website, inputting and inquiring' and the like, and if the retrieval result is too many, the user is required to carry out screening, so the operation is complicated.
In order to improve the information acquisition efficiency of the user, the input method program may provide a recommendation function, and specifically, the input method program may obtain a corresponding recommendation result based on an analysis of the input content of the user and provide the recommendation result to the user. For example, in the case where the input content of the user is "fat lamb", the input method program may provide the user with a link of "fat lamb restaurant information" so that the user obtains the "fat lamb restaurant information" by triggering the link of "fat lamb restaurant information".
However, in practical applications, a user may have an error in inputting content due to pressing an incorrect key or clicking an incorrect screen position, and in such a case, the input method program may not obtain a recommendation result corresponding to the input content, and thus the recommendation function is not available; or, the input method program may obtain unreasonable recommendation results, which in turn results in a low click rate of the recommendation results. Thus, the user needs to obtain the required information through the traditional information retrieval mode, which undoubtedly reduces the information obtaining efficiency of the user. For example, in the case that the user mistakenly inputs "fat lamb" as "consumption lamb", the input method program cannot obtain the recommendation result corresponding to "fat lamb".
Disclosure of Invention
The embodiment of the invention provides a recommendation method, a recommendation device and a recommendation device, which can improve the rationality and accuracy of a recommendation result and further improve the click rate of the recommendation result.
In order to solve the above problem, the present invention discloses a recommendation method, including:
carrying out error correction processing on original content to obtain corrected content corresponding to the original content;
acquiring a first recommendation result corresponding to the correction content;
and outputting the first recommendation result.
In another aspect, the present invention discloses a recommendation apparatus, comprising:
the error correction module is used for carrying out error correction processing on the original content to obtain corrected content corresponding to the original content;
the first recommendation result acquisition module is used for acquiring a first recommendation result corresponding to the correction content; and
and the output module is used for outputting the first recommendation result.
Optionally, the error correction module includes:
the word segmentation sub-module is used for carrying out word segmentation processing on the original content to obtain a word segmentation result corresponding to the original content;
the error determining module is used for determining that an error exists in the original content when the word segmentation result meets a preset condition;
and the error correction submodule is used for carrying out error correction processing on the original content when the original content is determined to have errors, so as to obtain corrected content corresponding to the original content.
Optionally, the first recommendation obtaining module includes:
the first obtaining sub-module is used for obtaining a target keyword corresponding to the correction content from a preset keyword set;
and the second obtaining sub-module is used for obtaining a service object corresponding to the target keyword according to the target service type corresponding to the target keyword, and the service object is used as a first recommendation result corresponding to the correction content.
Optionally, the first recommendation obtaining module includes:
the first obtaining sub-module is used for obtaining a target keyword corresponding to the correction content from a preset keyword set;
a third obtaining sub-module, configured to obtain a target context corresponding to the correction content from a preset context set;
and the fourth obtaining sub-module is used for obtaining a service object corresponding to the target keyword and the target context according to the service type commonly corresponding to the target keyword and the target context when the target service type corresponding to the target keyword is consistent with the service type corresponding to the target context, and the service object is used as a first recommendation result corresponding to the correction content.
Optionally, the apparatus further comprises:
the first recommendation result acquisition module is used for acquiring a second recommendation result corresponding to the original content;
and the sequencing output module is used for sequencing and outputting the first recommendation result and the second recommendation result.
Optionally, the sorting output module includes:
the first determining submodule is used for determining the comprehensive score of the first recommendation result according to the language model score of the correction content and the recommendation score of the first recommendation result;
the second determining submodule is used for determining the comprehensive score of the second recommendation result according to the language model score of the original content and the recommendation score of the second recommendation result;
and the sorting output sub-module is used for sorting and outputting the first recommendation result and the second recommendation result according to the comprehensive score of the first recommendation result and the comprehensive score of the second recommendation result.
Optionally, the recommendation score of the first recommendation result is obtained according to a first association probability between the target keyword corresponding to the correction content and the service type corresponding to the first recommendation result;
and the recommendation score of the second recommendation result is obtained according to a second association probability between the target keyword corresponding to the original content and the service type corresponding to the second recommendation result.
Optionally, the output module includes:
and the mapping display submodule is used for displaying the mapping from the original content to the corrected content and the first recommendation result.
In yet another aspect, an apparatus for recommendation is disclosed that includes a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured for execution by the one or more processors to include instructions for:
carrying out error correction processing on original content to obtain corrected content corresponding to the original content;
acquiring a first recommendation result corresponding to the correction content;
and outputting the first recommendation result.
In yet another aspect, the present disclosure discloses a machine-readable medium having stored thereon instructions, which when executed by one or more processors, cause an apparatus to perform one or more of the aforementioned recommendation methods.
The embodiment of the invention has the following advantages:
according to the embodiment of the invention, under the condition that the original content has errors, the correction content corresponding to the original content can be obtained, and the first recommendation result corresponding to the correction content is provided for the user, so that the rationality and the accuracy of the recommendation result can be improved, the click rate of the recommendation result can be improved, and the user experience can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a schematic diagram of an environment in which a recommendation method of the present invention may be applied;
FIG. 2 is a flowchart illustrating steps of a first preferred embodiment of the present invention;
FIG. 3 is a flowchart illustrating the steps of a second preferred embodiment of the present invention;
FIG. 4 is a block diagram of a recommender embodiment of the present invention;
FIG. 5 is a block diagram of an apparatus 800 for recommending of the present invention as a terminal; and
fig. 6 is a schematic diagram of a server in some embodiments of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a recommendation method, which can perform error correction processing on original content to obtain corrected content corresponding to the original content, obtain a first recommendation result corresponding to the corrected content, and output the first recommendation result. According to the embodiment of the invention, under the condition that the original content has errors, the correction content corresponding to the original content can be obtained, and the first recommendation result corresponding to the correction content is provided for the user, so that the rationality and the accuracy of the recommendation result can be improved, the click rate of the recommendation result can be improved, and the user experience can be improved.
The embodiment of the invention can be applied to any APP Application environments such as recommendation APP (Application), search APP, browser APP, communication APP and operating system APP to improve the rationality and accuracy of the recommendation result. In addition, the embodiment of the invention can be applied to any recommendation scenes such as text editing, instant messaging, web page search and the like, and it can be understood that the embodiment of the invention does not limit the specific application environment and the specific recommendation scene.
The recommendation method provided by the embodiment of the present invention can be applied to the application environment shown in fig. 1, as shown in fig. 1, the client 100 and the server 200 are located in a wired or wireless network, and the client 100 and the server 200 perform data interaction through the wired or wireless network.
The recommendation process of the embodiment of the present invention may be executed by any one of the client 100 and the server 200:
for example, the client 100 may acquire original content and send the original content to the server 200; after receiving the original content, the server 200 may perform error correction processing on the original content to obtain a corrected content corresponding to the original content, obtain a first recommendation result corresponding to the corrected content, and further output the first recommendation result to the client 100.
Or, the client 100 may obtain the original content of the user, perform error correction processing on the original content to obtain a corrected content corresponding to the original content, obtain a first recommendation result corresponding to the corrected content, and further output the target language content to the user.
Optionally, the client 100 may be run on an intelligent terminal, and the intelligent terminal specifically includes but is not limited to: smart phones, tablet computers, electronic book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop portable computers, car-mounted computers, desktop computers, set-top boxes, smart televisions, wearable devices, and the like.
Method embodiment one
Referring to fig. 2, a flowchart illustrating a first step of a first recommendation method embodiment of the present invention is shown, which may specifically include:
step 201, carrying out error correction processing on original content to obtain corrected content corresponding to the original content;
step 202, obtaining a first recommendation result corresponding to the correction content;
and 203, outputting the first recommendation result.
The embodiment of the invention can be applied to any APP application environments such as recommendation method APP, search APP, browser APP, communication APP and operating system APP. Under the condition of application environment applied to recommendation method APP, the hosting characteristic of the input method APP can be utilized to provide a corresponding first recommendation result for original content of any host APP. The embodiment of the invention mainly takes an input method APP as an example to explain the recommendation method of the embodiment of the invention, and recommendation methods corresponding to other application environments can be referred to each other.
For users of languages such as chinese, japanese, korean, etc., it is generally necessary to interact with a computer through an input method APP. For example, a user may type an input string through a keyboard, and then the input string is converted into a candidate item of a corresponding language and displayed by the input method APP according to a preset standard mapping rule, so as to screen the candidate item selected by the user.
The embodiment of the invention can be applied to the input method APP of the input modes such as keyboard symbol input, voice input, handwriting input and the like, and for convenience of description, the embodiment of the invention refers to the code character string input by the user in the input mode as the input string. In the field of input methods, for an input method APP in, for example, chinese, japanese, korean, or other languages, an input string input by a user may be generally converted into a candidate of a corresponding language. The input process of the present invention is mainly explained below by taking Chinese as an example, and other languages can be referred to each other. It is understood that the Chinese input method may include, but is not limited to, a full pinyin, a simple pinyin, a stroke, five strokes, handwriting, a voice, and the like, and the embodiment of the present invention is not limited to a specific input method APP corresponding to a certain language.
In the embodiment of the invention, the original content can be any content displayed on the interface of the intelligent terminal. Alternatively, the original content may be communication content received by a user, or the like. The user can receive the communication content sent by the opposite communication terminal through instant messaging APP, short message APP, email APP, even webpage APP and other communication APPs.
In addition to the received communication content, the original content of the embodiment of the present invention may further include: the user's entered content. For example, the input content of the user may specifically include: text that has been previously on-screen at the current cursor position, or text that the user copied, etc. It is to be understood that the embodiment of the present invention does not limit the specific original content, for example, the original content may also be a web page, a text already existing in a document, and the like.
The embodiment of the invention can carry out error correction processing on the original content so as to obtain the corrected content corresponding to the original content under the condition that the original content has errors.
In an optional embodiment of the present invention, the step 201 of performing error correction processing on the original content to obtain a corrected content corresponding to the original content specifically includes: performing word segmentation processing on original content to obtain a word segmentation result corresponding to the original content; if the word segmentation result meets a preset condition, determining that an error exists in the original content; when the original content is determined to have errors, carrying out error correction processing on the original content to obtain corrected content corresponding to the original content
In an application example of the present invention, assuming that the original content is "consume sheep", the original content is participled to obtain a corresponding participle result, which may be "consume/sheep", wherein "/" represents a division symbol between words in the participle result.
The embodiment of the invention can judge whether the original content has errors or not according to the word segmentation result. Optionally, the word segmentation result symbol preset condition may include: and the score of the language model corresponding to the word segmentation result is smaller than a preset threshold value.
In the embodiment of the invention, the language model is language abstract mathematical modeling according to the language objective fact, and a certain mapping relation can be established between the language model and the language objective fact.
Alternatively, the statistical language model may describe the probability that an arbitrary word sequence S belongs to a certain language set in the form of probability distribution, where the word sequence S is not required to be complete in syntax, and may give a probability parameter value to the arbitrary word sequence S, and the corresponding calculation formula may be expressed as:
p(S)=p(w1,w2,w3,w4,w5,…,wn)
=p(w1)p(w2|w1)p(w3|w1,w2)...p(wn|w1,w2,...,wn-1) (1)
in formula (1), S includes n words, and w in formula (1)iRepresenting the ith word in the sequence of words. Alternatively, the process of training the "language model" is to estimate the model parameters P (w)i|wi-n+1,...,wi-1) Wherein P (w)i|wi-n+1,...,wi-1) Can be used to denote that the first n-1 words are wi-n+1,...,wi-1In the case of (1), the suffix is wiThe probability of (c).
Depending on the concept of the statistical language model, the existing statistical language model may process the preset corpus based on a statistical algorithm to give the probability of word sequences, or, given context data, predict the next most likely vocabulary.
In practical applications, any statistical language model may be used to obtain the above-mentioned language model score. For example, the statistical language model may specifically include: a context-free Model, an N-gram Model, a Hidden Markov Model (HMM), a Maximum Entropy Model (Maximum Entropy Model), a Recurrent Neural Networks Model (RNN). The context-free model can be independent of a context environment, the N-gram model, the HMM model, the maximum entropy model, the RMM model and the like need to be dependent on the context environment, machine learning methods used by the N-gram model, the HMM model, the maximum entropy model and the RMM model are different, and the machine learning methods used by the HMM model, the maximum entropy model and the RMM model not only consider the relation among preset corpora (namely training texts), but also use the time sequence characteristics of the training texts; and the N-element grammar model can not consider the relation between the training texts, wherein N is a positive integer which is more than or equal to 2.
In the embodiment of the present invention, the preset corpus required by the statistical language model may be derived from an existing corpus, such as an english corpus, a chinese corpus, and the like, or the preset corpus required by the statistical language model may be derived from a famous book, an internet corpus, historical input behavior data of at least one user recorded by an input method APP, and the like. It is understood that any corpus is within the scope of the preset corpus of the embodiment of the present invention.
In an optional embodiment of the present invention, the language model may be a binary language model, and may be used to describe a score of the language model corresponding to two adjacent vocabularies, so as to know whether a binary relationship exists between the adjacent vocabularies. Specifically, the preset threshold may be set to be a smaller value, and if the language model score corresponding to the adjacent words is smaller than the preset threshold, it indicates that there is no binary relationship between the adjacent words or the probability of the existence of the binary relationship is very low. For example, for the above-mentioned segmented word node "consume/sheep", it is known through the binary language model calculation that the language model score (e.g. 0.05) corresponding to the segmented word "consume" and the segmented word "sheep" is smaller than the preset threshold (e.g. 0.8), and it may be determined that there is an error text in the original content "consume sheep".
It should be understood that the above-mentioned binary language model is only an application example of the present invention, and the embodiment of the present invention is not limited to a specific language model, for example, a ternary language model, a quaternary language model, and other multivariate language models may be used to describe three adjacent words, or four corresponding language model scores, or a user language model established according to the input habits of the user, and the like.
It should be noted that after determining that an error exists in the original content, an error text in the original content may also be determined. For example, a binary language model may be used to calculate the language model scores of two adjacent words in the original content, and if the language model scores of the two adjacent words in the original content are smaller than a preset threshold, the two adjacent words may be considered as error texts.
It can be understood that the fact that the language model score corresponding to the word segmentation result is smaller than the preset threshold is only an optional embodiment that the word segmentation result meets the preset condition, and in other embodiments of the present invention, the word segmentation result meets the preset condition may further include: the word segmentation result hits the error correction user word bank. Specifically, the user word bank for error correction may be searched according to the word segmentation result, and if the search is hit, it is determined that an error exists in the original content. The mapping relationship between the source vocabulary and the target vocabulary is recorded in the error correction user lexicon, and the source vocabulary specifically may include: words before error correction corresponding to historical error correction behaviors and corresponding words above and/or below; the target vocabulary may specifically include: and the corrected words corresponding to the historical error correction behaviors and the corresponding upper words and/or lower words.
In practical applications, a data record corresponding to the mapping relationship between the source vocabulary and the target vocabulary may be established in the above-mentioned corrected user lexicon according to the historical error correction behavior of the user, for example, a certain historical error correction behavior of the user corrects the "result" to "marriage", and then the embodiment of the present invention may use the "result" and the corresponding upper and/or lower vocabulary as the source vocabulary (e.g., "result gift"), and use the "marriage" and the corresponding upper and/or lower vocabulary as the target vocabulary (e.g., "marriage gift"); therefore, in the subsequent input process of the user, the error-correcting user word stock can be used for identifying the error-on-screen content in the text content.
For example, for the sentence "did receive your result gift", the original content in the sentence may be matched with the source vocabulary in the thesaurus of the error correction user, wherein the "result gift" is successfully matched with the source vocabulary in the thesaurus of the error correction user, so that the "result" may be determined as the error text existing in the original content, and the target vocabulary may be determined as the target error correction candidate corresponding to the error text.
In practical applications, it may be attempted to correct the vocabulary included in all or part of the original content (e.g., the erroneous text). For example, the error correction processing may obtain a vocabulary corresponding to an input string that is the same as or similar to the pinyin string of the erroneous text or a vocabulary similar to the font of the erroneous text as an error correction candidate, score the error correction candidate by a language model, determine a target error correction candidate by comparing the language model scores, and finally replace the erroneous text in the original content with the target error correction candidate to obtain the corrected content corresponding to the original content.
For example, for the original content "consumed sheep", the word "consumed sheep" corresponding to the input string that is the same as the pinyin string "xiaofeiyang" of the error text "consumed sheep" may be acquired as the correction content corresponding to the original content.
For example, for the original content "you/result/do", the error text may be determined to be "you/result", taking the word "result" as an example, the pinyin string corresponding to "result" is "jieguo", and finding a pinyin string similar to the pinyin string "jieguo" includes: "lieguo", "liehuo", "jiehun", etc., then similar terms may be obtained including: the Chinese characters include "Liouguo", "flamingo" and "marriage". Similarly, for the word segment "you" similar words can be found such as: "that", "mud", and the like. And taking the similar words as error correction candidates, scoring through a language model, and assuming that the finally obtained language model score corresponding to the 'you/marriage' is the highest and is higher than the language model score corresponding to the 'you/result', taking the 'marriage' as a target error correction candidate, replacing the error text 'result' in the original content with the target error correction candidate 'marriage', and obtaining the corrected content 'you are married' corresponding to the original content.
It should be noted that the above-mentioned method for determining that an error exists in the original content according to the preset condition corresponding to the word segmentation result is only an optional embodiment, and actually, a person skilled in the art may also adopt other methods for determining that an error exists in the original content according to an actual application requirement, for example, the method may further identify a mistaken on-screen content in the text content by correcting a user lexicon, and the corresponding identification process may include:
searching in an error correction user word bank according to the words in the original content to obtain a target word sequence matched with the words; the mapping relationship between the source vocabulary and the target vocabulary sequence is recorded in the error correction user lexicon, and the source vocabulary specifically may include: words before error correction corresponding to historical error correction behaviors and corresponding words above and/or below; the target vocabulary sequence may specifically include: the corrected words corresponding to the historical error correction behaviors and the corresponding upper and/or lower words; and obtaining corresponding mistaken screen-up contents according to the words and the upper words and/or the lower words in the target word sequence matched with the words.
In practical applications, a data record corresponding to the mapping relationship between the source vocabulary and the target vocabulary sequence may be established in the above error correction user lexicon according to the historical error correction behavior of the user, for example, a certain historical error correction behavior of the user corrects the "result" to "marriage", and then the embodiment of the present invention may use the "result" and the corresponding upper and/or lower vocabulary as the source vocabulary (e.g., "result gift"), and use the "marriage" and the corresponding upper and/or lower vocabulary as the target vocabulary sequence (e.g., "marriage gift"); therefore, in the subsequent input process of the user, the error-correcting user word stock can be used for identifying the error-on-screen content in the text content. For example, for the communication content "did receive your result gift", the vocabulary therein may be matched with the source vocabulary in the word bank of the error correction user, wherein the "result gift" is successfully matched with the source vocabulary in the word bank of the error correction user, and therefore, the "result" may be determined as the content on screen mistakenly, and the target vocabulary sequence may be determined as the target error correction candidate corresponding to the content on screen mistakenly.
The number of the target error correction candidates is not limited in the embodiment of the present invention, for example, a plurality of target error correction candidates may be determined according to the language model score, and the plurality of target error correction candidates may be sorted according to the level of the language model score, and a reasonable target error correction candidate is selected from the sorted target error correction candidates to serve as the correction content corresponding to the original content.
It can be understood that, in practical application, an arbitrary error correction algorithm may be used to perform error correction processing on the original content to obtain the corrected content corresponding to the original content, and the specific obtaining manner of the corrected content corresponding to the original content is not limited in the embodiment of the present invention.
Step 202 may obtain a first recommendation result corresponding to the correction content obtained in step 101. Optionally, the first recommendation result may be related to a service object, and a service type corresponding to the service object may include: character type, restaurant type, movie type, geographic location type, etc. For example, for a correction content of "fat lamb", a corresponding first recommendation result may be a serving object of a catering type; as another example, for the correction content "name of people", the corresponding first recommendation result may be a movie-type service object, and the like. For another example, for the correction content "i am at five crossing", the corresponding first recommendation result may be a serving object of a restaurant type and/or a geographic location type, and the like.
The embodiment of the invention can provide the following technical scheme for obtaining the first recommendation result corresponding to the correction content:
scheme 1
Scheme 1 may obtain a first recommendation result corresponding to the corrected content based on a preset keyword set, and specifically, the process of obtaining the first recommendation result corresponding to the corrected content in step 202 may include: acquiring a target keyword corresponding to the correction content from a preset keyword set; and acquiring a service object corresponding to the target keyword according to the target service type corresponding to the target keyword, and taking the service object as a first recommendation result corresponding to the correction content.
In the embodiment of the invention, the preset keyword set can be used for storing the keywords corresponding to the service object. Alternatively, the keywords in the preset keyword set may be proper nouns, such as names of stars, brands of restaurants, names of movies and television shows, names of geographic locations, and the like. In practical application, the target keyword matched with the correction content can be obtained by searching in a preset keyword set according to the correction content. All or part of the corrected content may be matched with the keywords in a preset keyword set, for example, the part of the corrected content may be a word obtained by segmenting the corrected content. Matching all or part of the corrected content with the keywords in the preset keyword set may include: string matching and/or semantic matching, etc., such that successfully correcting the content for keyword matching may include: the corrected content is the same as or similar to the character string of the keyword, or the corrected content is the same as or similar to the semantic of the keyword.
The keywords in the preset keyword set may also correspond to service types, for example, the service types corresponding to the star name, the catering brand, the movie name, the geographic location name may be a person type, a catering type, a movie type, a geographic location type, and the like. Therefore, the service object corresponding to the target keyword can be obtained according to the target service type corresponding to the target keyword.
In an optional embodiment of the present invention, a mapping relationship between the target keyword and the service object may be established in advance for the service type, so that the mapping relationship between the target keyword and the service object corresponding to the target service type may be searched according to the target keyword to obtain the service object corresponding to the target keyword. For example, the service object corresponding to the target keyword "fat lamb" may include: the name of the restaurant comprises a small fat sheep, such as a small fat sheep (national trade shop), a small fat sheep (morning sun shop), a small fat sheep self-help of instant-boiling and roasting, and the like.
In another optional embodiment of the present invention, an interface corresponding to the target service type may be called, and a query request may be sent to a query server corresponding to the target service type, where the query request may include: and the target keyword enables the query server corresponding to the target service type to send and obtain a query result corresponding to the query request.
It should be noted that, the specific content of the service object corresponding to the target keyword may be carried by the content item. Optionally, the content item may include: name, address, reason for recommendation, merchandise information, user review information, coupon information, or group purchase information. For example, the content items of the catering-type service object may include: the restaurant information comprises restaurant names, restaurant addresses, recommended dishes, dish information, user comment information, coupon information or group purchase information and the like. It is to be understood that the embodiments of the present invention do not impose limitations on the specific content items of the service object.
In practical application, information such as a keyword and/or a name of a service object may be used as a title of a first recommendation result, and the title of the first recommendation result is displayed, where the title of the first recommendation result may have a link, and a user may trigger the link to obtain a content item of the service object, where the content item of the service object may be located in an independent window or an independent page.
Scheme 2
In scheme 2, the first recommendation result corresponding to the correction content may be obtained based on a preset keyword set and a context set, and specifically, the step 202 of obtaining the first recommendation result corresponding to the correction content may include: acquiring a target keyword corresponding to the correction content from a preset keyword set; acquiring a target context corresponding to the correction content from a preset context set; and when the target service type corresponding to the target keyword is consistent with the service type corresponding to the target context, acquiring a service object corresponding to the target keyword and the target context according to the service type corresponding to the target keyword and the target context together, and taking the service object as a first recommendation result corresponding to the correction content.
The preset context set may be used to store the context of the corresponding keyword of the service object. In practical application, preset corpora can be collected, and based on analysis of the preset corpora, the context of the keyword corresponding to the service object is obtained. Taking the keyword "name of people" as an example, the context of the keyword can be obtained from preset linguistic data such as "do you feel what you look like on the name of people", "look after feeling on the name of people", "college students look like on the name of people" and when people get a big end result on the name of people ". Taking the keyword "apple" as an example, the context of the keyword can be obtained from preset linguistic data such as "how much apple is 7, when apple is 8 on the market", and "what is the ending of the apple".
Optionally, the preset corpus may include: the method comprises the steps of obtaining an internet corpus and a corpus accumulated by a cloud computing input method based on a web crawler technology; in addition, the internet corpus can be an internet blog corpus, an internet news corpus, an internet microblog corpus, an internet forum corpus, and the like. The corpus accumulated by the cloud computing input method can be derived from historical input behavior data, historical search behavior data and the like of a network-wide user, and it can be understood that the embodiment of the invention does not limit specific preset corpora.
Optionally, a mapping relationship between the keyword and the context may be established for the context in the preset context set, and the process of obtaining the target context corresponding to the correction content from the preset context set may include: and inquiring the mapping relation between the keywords and the context according to the target keywords corresponding to the corrected content and the corrected content, or the corrected content and the context thereof, so as to obtain the target context corresponding to the corrected content. Optionally, the target context corresponding to the correction content may be: correct content, or correct content and content in its context other than the target keyword. For example, the original content is "name of people", the corrected content is "name of people", the context of the corrected content is "feeling of you", and if the target keyword corresponding to the corrected content is "name of people", the mapping relationship between the keyword and the context may be queried according to "name of people" and "feeling of you" to obtain the target context "feeling of you" corresponding to the corrected content.
In practical applications, a keyword may correspond to one or more service types, for example, a service type corresponding to "apple" may include: electronic products, movies, fruits, etc. The scheme 2 may further obtain a target context corresponding to the correction content from a preset context set, so that a service type corresponding to the target context may perform a screening and filtering function on a target service type corresponding to a target keyword, and specifically, when the target service type corresponding to the target keyword is consistent with the service type corresponding to the target context, obtain the target keyword and a service object corresponding to the target context according to the service type corresponding to the target keyword and the target context together, as a first recommendation result corresponding to the correction content. For example, when the target keyword is "apple", a service object corresponding to the target keyword and the target context, such as a commodity or an introduction corresponding to "apple 7", may be obtained as the first recommendation result corresponding to the correction content according to a service type "electronic product" corresponding to both the target keyword "apple" and the target context "7 price".
On the basis of the scheme 1 or the scheme 2, in an optional embodiment of the present invention, the first recommendation result obtained by the scheme 1 or the scheme 2 may also be filtered by using the current environmental information.
The environment information may include: geographic location information. Alternatively, the first recommendation that matches the current geographic location may be selected, e.g., restaurant information that does not exceed a preset distance threshold from the current geographic location may be selected, etc.
The environment information may include: time information. Alternatively, the first recommendation matching the current time information may be selected, for example, in a case where the current time information is in a preset night time period (e.g., over 22:00), restaurant information matching the current time information may be selected to provide the user with night store and the like where the current time information is still open.
In another optional embodiment of the present invention, the first recommendation result corresponding to the correction content may be obtained according to preference information of the user. The preference information of the user may be historical preference information, so that the first recommendation result and the like corresponding to the correction content can be obtained from the service object used by the user. Of course, the preference information of the user may also be interest preference, taste preference, price preference, etc.
It can be understood that, according to the actual application requirement, a person skilled in the art may obtain the first recommendation result corresponding to the correction content by using any one or a combination of the scheme 1, the scheme 2, the current geographic location, and the preference information of the user, and the embodiment of the present invention does not limit a specific process of obtaining the first recommendation result corresponding to the correction content.
After the original content is processed with error correction to obtain corresponding correction content in step 201, and the first recommendation result corresponding to the correction content is obtained in step 2021, step 203 may output the first recommendation result to the user. For example, the original content received by the user is "consumed sheep", the correction content "small fat sheep" is obtained by correcting the original content, and a first recommendation result corresponding to the correction content "small fat sheep", such as a restaurant including "small fat sheep", for example, "small fat sheep (country trade store)", "small fat sheep (morning sun shop)", "small fat sheep rinse roast self-help", and the like, is obtained, a link of the restaurant including "small fat sheep" may be presented to the user for the user to select and trigger. Optionally, after receiving a trigger operation of the user on the first recommendation result, the detail information of the first recommendation result may be presented, for example, a page of the first recommendation result may be entered and presented in the page of the first recommendation result, or the detail information of the first recommendation result may be presented in a pop-up window.
In an optional embodiment of the present invention, the process of presenting the first recommendation result may include: presenting a mapping of the original content to the correction content and the first recommendation; therefore, the user can be made to confirm that the first recommendation result is the recommendation result under the condition of completing error correction, and if the user is satisfied with the first recommendation result, the detail information of the first recommendation result can be checked through triggering operation. For example, in a case where the user mistakenly inputs "fat lamb" as "consumption lamb", the first recommendation result obtained by the input method APP for "consumption lamb" may include: "consumer sheep" - > small fat sheep (country trade shop) ", the" consumer sheep "and the" small fat sheep "may be optionally marked (for example, marked with red font, bold font, etc.) to indicate the error correction relationship between the two, wherein" - > "is a mapping symbol. Optionally, the original content in the mapping may be all or part of the original content (e.g., wrong text), and the corrected content in the mapping may be all or part of the corrected content.
In summary, the recommendation method of the embodiment of the present invention can obtain the correction content corresponding to the original content when the original content has an error, and provide the first recommendation result corresponding to the correction content to the user, so that the rationality and accuracy of the recommendation result can be improved, the click rate of the recommendation result can be improved, and the user experience can be improved.
Furthermore, the original content of the embodiment of the present invention may include: the received communication content can be, for example, the communication content sent by the correspondent node under the communication environment (such as the environment of short message application, instant messaging application, etc.), so that, in the case that the communication content has an error, the embodiment of the present invention can perform error correction processing on the communication content and obtain the corresponding first recommendation result, thereby improving the accuracy of the recommendation result.
Method embodiment two
Compared with the first method embodiment shown in fig. 1, the embodiment of the present invention may further obtain the second recommendation result corresponding to the original content, and perform ranking display on the second recommendation result corresponding to the original content and the first recommendation result corresponding to the corrected content, so that the user may select a correct association result from the displayed recommendation results. Referring to fig. 3, a flowchart illustrating steps of a second embodiment of a recommendation method according to the present invention is shown, which may specifically include:
step 301, performing error correction processing on original content to obtain corrected content corresponding to the original content;
step 302, obtaining a first recommendation result corresponding to the correction content;
step 303, obtaining a second recommendation result corresponding to the original content;
for the process of obtaining the second recommendation result corresponding to the original content, since it is similar to the process of obtaining the first recommendation result corresponding to the corrected content, it is not repeated herein and may refer to each other. For example, in the case of replacing the corrected content in the schemes 1 to 2 with the original content, the second recommendation result corresponding to the original content may be obtained by using any one of the two schemes for obtaining the first recommendation result corresponding to the corrected content.
It should be noted that, in the embodiment of the present invention, the sequence of obtaining the second recommendation result corresponding to the original content and obtaining the first recommendation result corresponding to the corrected content is not limited, that is, the execution sequence between step 301 to step 302 and step 303 is not limited in the embodiment of the present invention.
And step 304, sequencing and outputting the first recommendation result and the second recommendation result.
In an optional embodiment of the present invention, the sorting and outputting the first recommendation result and the second recommendation result may specifically include the following:
step S1, determining a comprehensive score of the first recommendation result according to the language model score of the correction content and the recommendation score of the first recommendation result;
step S2, determining a comprehensive score of the second recommendation result according to the language model score of the original content and the recommendation score of the second recommendation result;
and step S3, sorting and outputting the first recommendation result and the second recommendation result according to the comprehensive score of the first recommendation result and the comprehensive score of the second recommendation result.
Specifically, the composite score P of the first recommendation resultALanguage model score P that can be corrected contentA1And a recommendation score P of the first recommendation resultA2Optionally, PA1And PA2The fusion mode of (a) may include: product, add, etc., wherein the manner of adding may include: weighted average, etc.
In an alternative embodiment of the invention, the composite score P for the first recommendation isAThis can be obtained by the following formula:
PA=PA1×PA2 (1)
in an alternative embodiment of the invention, the recommendation score P for the first recommendation isA2May be obtained according to a first association probability between the target keyword corresponding to the corrected content and the service type corresponding to the first recommendation result.
Examples of the first association probability between the target keyword corresponding to the correction content and the service type corresponding to the first recommendation result may include: the probability that the submarine fishing is a catering type and the probability that the submarine fishing is a film and television type.
The embodiment of the invention can provide the following acquisition mode of the first association probability:
acquisition mode 1
The obtaining method 1 may perform statistics on historical input behavior data of the user to obtain an input probability of the keyword in the application environment, which is used as a first association probability between the keyword and the service type. The application environment may correspond to a service type, for example, a catering-related application environment such as a catering APP or a website, a comment APP or a website corresponds to a catering type, and a video-related application environment such as a video APP or a website corresponds to a video type. The obtaining method 1 may obtain the input probability of the keyword in a certain application environment based on statistics of historical input behavior data of the user, and optionally, the input probability may be a ratio of the number of occurrences of the keyword in the certain application environment to the total number of occurrences of the keyword.
Acquisition mode 2
The obtaining method 2 may obtain a first association probability between the keyword and the service type according to the use condition of the user for the recommendation result corresponding to the keyword. For example, the input method APP provides a corresponding recommendation result for a keyword such as "seafloor fishing", where the recommendation result may correspond to a service type, and a first association probability between the keyword and the service type may be determined according to the occurrence frequency of the service type corresponding to the recommendation result selected by the user and the provision frequency of the recommendation result corresponding to the keyword, for example, a ratio of the occurrence frequency of the service type corresponding to the recommendation result selected by the user to the provision frequency of the recommendation result corresponding to the keyword may be used as the first association probability between the keyword and the service type.
It is understood that, according to the actual application requirement, a person skilled in the art may determine the first association probability between the keyword and the service type by using any one or a combination of the above-described obtaining manner 1 and obtaining manner 2. For example, when the use condition data of the user for the recommendation result corresponding to the keyword is empty or less than a certain number, the obtaining method 1 is adopted to obtain a first association probability between the keyword and the service type; and under the condition that the use condition data of the recommendation result corresponding to the keyword exceeds a certain amount, updating and adjusting the first association probability between the keyword and the service type by adopting an acquisition mode 2. Of course, the first association probability obtained by the obtaining method 1 and the obtaining method 2 may also be modified manually, or a machine learning model may also be used to determine the first association probability between the keyword and the service type, where an input of the machine learning model may be the keyword, and an output of the machine learning model may be the first association probability between the keyword and the service type, and the training data of the machine learning model may be: and obtaining a first association probability by keyword linguistic data and manual labeling.
Optionally, the recommendation score P of the first recommendation resultA2The correction content may be obtained according to a first association probability between the target keyword corresponding to the correction content and the service type corresponding to the first recommendation result, and a third association probability between the target context corresponding to the obtained correction content and the service type corresponding to the first recommendation result.
For the process of acquiring the third association probability between the target context corresponding to the corrected content and the service type corresponding to the first recommendation result, the process is similar to the process of acquiring the first association probability, and therefore, the details are not repeated here, and the reference may be made to each other. Specifically, the aforementioned obtaining manner 1, obtaining manner 2, or machine learning model may be adopted to obtain the second association probability between the context and the service type.
Specifically, the composite score P of the second recommendation resultBLanguage model score P that can be raw contentB1And a recommendation score P of the second recommendation resultB2Optionally, PB1And PB2The fusion mode of (a) may include: product, add, etc., wherein the manner of adding may include: weighted average, etc.
In an alternative embodiment of the invention, the composite score P of the second recommendation isBThis can be obtained by the following formula:
PB=PB1×PB2 (2)
in an alternative embodiment of the invention, the recommendation score P of the second recommendation isB2The second association probability may be obtained according to a second association probability between the target keyword corresponding to the original content and the service type corresponding to the second recommendation result.
Optionally, the recommendation score P of the second recommendation resultB2The second association probability between the target keyword corresponding to the original content and the service type corresponding to the second recommendation result and the fourth association probability between the target context corresponding to the obtained original content and the service type corresponding to the second recommendation result may be used as the basisRate of obtaining
The process of obtaining the second association probability may refer to the process of obtaining the first association probability, and the process of obtaining the fourth association probability may refer to the process of obtaining the third association probability, so that details are not repeated herein, and the mutual reference is sufficient.
It can be understood that the recommendation score P of the first recommendation result is obtained according to a first association probability between the target keyword corresponding to the corrected content and the service type corresponding to the first recommendation resultA2Or obtaining a recommendation score P of the first recommendation result according to a first association probability between the target keyword corresponding to the corrected content and the service type corresponding to the first recommendation result and a third association probability between the target context corresponding to the corrected content and the service type corresponding to the first recommendation resultA2As an alternative embodiment only, in fact, the recommendation score P of the first recommendation resultA2Determining the factors may further include: the matching degree between the first recommendation result and the current geographic position, the matching degree between the first recommendation result and the preference information of the user and the like. Similarly, the recommendation score P of the second recommendation result may also be determined according to the matching degree between the second recommendation result and the current geographic location, the matching degree between the second recommendation result and the preference information of the user, and the likeB2
Application example 1
Application example 1 takes original content as received communication content as an example, and it is assumed that a user receives an instant message sent by an opposite end in an instant messaging application as "do you feel good at the name of people", and the original content may be "do you feel good at the name of people", and a recommendation method according to an embodiment of the present invention may specifically include:
step A1, carrying out error correction processing on the original content to obtain corrected content corresponding to the original content;
for example, the original content "how you feel the name of people is" is subjected to word segmentation processing, the word segmentation result "you/feel/people/nominal/good looking/do" corresponding to the original content is obtained, the word segmentation result "you/feel/people/nominal/good looking/do" is subjected to language model scoring, it can be known that there is an error in the original content "you/feel/people/nominal/good looking/do", the error text is "the name of people" and the corrected content after error correction is "is what you feel the name of people is".
Step A2, acquiring a first recommendation result corresponding to the correction content;
specifically, a target keyword "nominal of people" corresponding to the correction content may be obtained from a preset keyword set; and acquiring a service object (such as a play address link corresponding to the name of people) corresponding to the target keyword as a first recommendation result corresponding to the correction content according to the target service type 'film and television type' corresponding to the target keyword 'name of people'. The link of the play address of "nominal people" may originate from one or more video platforms, and in practical applications, a corresponding first recommendation list may be generated for each video platform. Optionally, the first recommendation result corresponding to the correction content includes: the link of the play address corresponding to the name of people may further include: the name of people corresponds to film comments, popular segments, photos, splendid events and other information.
And step A3, displaying the obtained first recommendation result.
Specifically, the first recommendation result may be presented to the user according to the magnitude of the composite score of the first recommendation result, for the user to select.
Application example 2
Application example 2 takes the above that the original content is input by the user as an example, and assuming that the original content is "want to eat a consumer sheep", the recommendation method of the embodiment of the present invention may include:
step B1, carrying out error correction processing on the original content to obtain corrected content corresponding to the original content;
for example, the original content "want to eat and consume sheep" is subjected to word segmentation processing to obtain a word segmentation result "want/go/eat/consume/sheep" corresponding to the original content; and calculating through the language model to obtain that the scores of the language models corresponding to the participles of consumption and sheep are smaller than a preset threshold value, and determining that the error text exists in the original content of the sheep wanting to eat the consumption. Searching and obtaining an error correction candidate 'fat' corresponding to the pinyin string 'xiaoei' which is the same as the pinyin string 'xiaoei' of the wrong text 'consumption', wherein the language model score of the 'consumption sheep' is higher than that of the 'consumption sheep', so that the correction content 'want to eat the fat sheep' can be obtained.
Step B2, acquiring a first recommendation result corresponding to the correction content;
specifically, a target keyword "small fat sheep" corresponding to the correction content may be acquired from a preset keyword set; according to a target service type 'catering type' corresponding to the target keyword 'small fat sheep', obtaining a service object corresponding to the target keyword 'small fat sheep', such as 'small fat sheep (national trade shop),' small fat sheep (morning shop), 'small fat sheep rinse and roast self-service,' and the like; further, the service object corresponding to the target keyword "small fat sheep" may be screened according to the current geographic location, and assuming that the current geographic location is "national trade", the screened "small fat sheep (national trade shop)" may be obtained, and the link of the "small fat sheep (national trade shop)" is used as the first recommendation result.
And step A3, displaying the obtained first recommendation result.
Specifically, the first recommendation result may be presented to the user according to the magnitude of the composite score of the first recommendation result, for the user to select.
In summary, before associating the original content of the user, the embodiment of the present invention performs error correction processing on the original content to obtain the first recommendation result corresponding to the corrected text, so as to solve the problem that the associated result deviates from the user's intention when the original content is wrong. In addition, the embodiment of the invention also obtains the second recommendation result corresponding to the original content, and performs sequencing display on the second recommendation result corresponding to the original content and the first recommendation result corresponding to the corrected content, so that the situation of error correction of the original content can be prevented, a user can select a correct association result, and the association accuracy is further improved.
Device embodiment
Referring to fig. 4, a block diagram of a recommendation device according to an embodiment of the present invention is shown, which may specifically include:
an error correction module 401, configured to perform error correction processing on original content to obtain corrected content corresponding to the original content;
a first recommendation result obtaining module 402, configured to obtain a first recommendation result corresponding to the correction content; and
an output module 403, configured to output the first recommendation result.
Optionally, the error correction module 401 may include:
the word segmentation sub-module is used for carrying out word segmentation processing on the original content to obtain a word segmentation result corresponding to the original content;
the error determining module is used for determining that an error exists in the original content when the word segmentation result meets a preset condition;
and the error correction submodule is used for carrying out error correction processing on the original content when the original content is determined to have errors, so as to obtain corrected content corresponding to the original content.
Optionally, the first recommendation obtaining module 402 may include:
the first obtaining sub-module is used for obtaining a target keyword corresponding to the correction content from a preset keyword set;
and the second obtaining sub-module is used for obtaining a service object corresponding to the target keyword according to the target service type corresponding to the target keyword, and the service object is used as a first recommendation result corresponding to the correction content.
Optionally, the first recommendation obtaining module 402 may include:
the first obtaining sub-module is used for obtaining a target keyword corresponding to the correction content from a preset keyword set;
a third obtaining sub-module, configured to obtain a target context corresponding to the correction content from a preset context set;
and the fourth obtaining sub-module is used for obtaining a service object corresponding to the target keyword and the target context according to the service type commonly corresponding to the target keyword and the target context when the target service type corresponding to the target keyword is consistent with the service type corresponding to the target context, and the service object is used as a first recommendation result corresponding to the correction content.
Optionally, the apparatus may further include:
the first recommendation result acquisition module is used for acquiring a second recommendation result corresponding to the original content;
and the sequencing output module is used for sequencing and outputting the first recommendation result and the second recommendation result.
Optionally, the sorting output module 403 may include:
the first determining submodule is used for determining the comprehensive score of the first recommendation result according to the language model score of the correction content and the recommendation score of the first recommendation result;
the second determining submodule is used for determining the comprehensive score of the second recommendation result according to the language model score of the original content and the recommendation score of the second recommendation result;
and the sorting output sub-module is used for sorting and outputting the first recommendation result and the second recommendation result according to the comprehensive score of the first recommendation result and the comprehensive score of the second recommendation result.
Optionally, the recommendation score of the first recommendation result may be obtained according to a first association probability between the target keyword corresponding to the correction content and the service type corresponding to the first recommendation result;
the recommendation score of the second recommendation result may be obtained according to a second association probability between the target keyword corresponding to the original content and the service type corresponding to the second recommendation result.
Optionally, the output module 403 may include:
and the mapping display submodule is used for displaying the mapping from the original content to the corrected content and the first recommendation result.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Embodiments of the present invention also provide an apparatus for recommending, which may include a memory, and one or more programs, where the one or more programs are stored in the memory, and the one or more programs configured to be executed by the one or more processors include instructions for: carrying out error correction processing on original content to obtain corrected content corresponding to the original content; acquiring a first recommendation result corresponding to the correction content; and outputting the first recommendation result.
Optionally, the performing error correction processing on the original content to obtain corrected content corresponding to the original content includes: performing word segmentation processing on original content to obtain a word segmentation result corresponding to the original content; if the word segmentation result meets a preset condition, determining that an error exists in the original content; and when the original content is determined to have errors, carrying out error correction processing on the original content to obtain corrected content corresponding to the original content.
Optionally, the obtaining of the first recommendation result corresponding to the correction content includes: acquiring a target keyword corresponding to the correction content from a preset keyword set; and acquiring a service object corresponding to the target keyword according to the target service type corresponding to the target keyword, and taking the service object as a first recommendation result corresponding to the correction content.
Optionally, the obtaining of the first recommendation result corresponding to the correction content includes: acquiring a target keyword corresponding to the correction content from a preset keyword set; acquiring a target context corresponding to the correction content from a preset context set; and when the target service type corresponding to the target keyword is consistent with the service type corresponding to the target context, acquiring a service object corresponding to the target keyword and the target context according to the service type corresponding to the target keyword and the target context together, and taking the service object as a first recommendation result corresponding to the correction content.
Optionally, the device is also configured to execute the one or more programs by the one or more processors including instructions for: acquiring a second recommendation result corresponding to the original content; and sequencing and outputting the first recommendation result and the second recommendation result.
Optionally, the sorting and outputting the first recommendation result and the second recommendation result includes: determining a comprehensive score of the first recommendation result according to the language model score of the correction content and the recommendation score of the first recommendation result; determining a comprehensive score of the second recommendation result according to the language model score of the original content and the recommendation score of the second recommendation result; and sorting and outputting the first recommendation result and the second recommendation result according to the comprehensive score of the first recommendation result and the comprehensive score of the second recommendation result.
Optionally, the recommendation score of the first recommendation result is obtained according to a first association probability between the target keyword corresponding to the correction content and the service type corresponding to the first recommendation result; and the recommendation score of the second recommendation result is obtained according to a second association probability between the target keyword corresponding to the original content and the service type corresponding to the second recommendation result.
Optionally, the outputting the first recommendation result includes: presenting a mapping of the original content to the correction content and the first recommendation.
Fig. 5 is a block diagram illustrating an apparatus 800 for recommending as a terminal according to an example embodiment. For example, the apparatus 800 may be a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop, a car computer, a desktop computer, a set-top box, a smart tv, a wearable device, a mobile phone, a digital broadcast terminal, a messaging device, a game console, a medical device, a fitness device, a personal digital assistant, and the like.
Referring to fig. 5, the apparatus 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices 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 or optical disks.
Power components 806 provide power to the various components of device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a 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 an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a 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 facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be 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.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed state of the device 800, the relative positioning of the components, such as a display and keypad of the apparatus 800, the sensor assembly 814 may also detect a change in position of the apparatus 800 or a component of the apparatus 800, the presence or absence of user contact with the apparatus 800, orientation or acceleration/deceleration of the apparatus 800, and a change in temperature of the apparatus 800. 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 a light 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 acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may 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 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Fig. 6 is a schematic diagram of a server in some embodiments of the invention. The server 1900 may vary widely by configuration or performance and may include one or more Central Processing Units (CPUs) 1922 (e.g., one or more processors) and memory 1932, one or more storage media 1930 (e.g., one or more mass storage devices) storing applications 1942 or data 1944. Memory 1932 and storage medium 1930 can be, among other things, transient or persistent storage. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a series of instructions operating on a server. Still further, a central processor 1922 may be provided in communication with the storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.
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-output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
A machine-readable medium, which may be, for example, a non-transitory computer-readable storage medium, in which instructions, when executed by a processor of an apparatus (terminal or server), enable the apparatus to perform a recommendation method, the method comprising: carrying out error correction processing on original content to obtain corrected content corresponding to the original content; acquiring a first recommendation result corresponding to the correction content; and outputting the first recommendation result.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements 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 invention is only limited by the appended claims
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
The recommendation method, the recommendation device and the device for recommendation provided by the invention are described in detail above, and specific examples are applied in the text to explain the principle and the implementation of the invention, and the description of the above examples is only used to help understanding the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (19)

1. A recommendation method, characterized in that the method comprises:
if the language model score corresponding to the adjacent vocabulary is smaller than a preset threshold value, carrying out error correction processing on the original content to obtain corrected content corresponding to the original content; the adjacent words are at least two adjacent words in the original content;
acquiring a first recommendation result corresponding to the correction content; the first recommendation includes: a link of information corresponding to the service object;
outputting the first recommendation result;
the method further comprises the following steps:
acquiring a second recommendation result corresponding to the original content;
sorting and outputting the first recommendation result and the second recommendation result;
the sorting and outputting the first recommendation result and the second recommendation result comprises:
determining a comprehensive score of the first recommendation result according to the language model score of the correction content and the recommendation score of the first recommendation result;
determining a comprehensive score of the second recommendation result according to the language model score of the original content and the recommendation score of the second recommendation result;
and sorting and outputting the first recommendation result and the second recommendation result according to the comprehensive score of the first recommendation result and the comprehensive score of the second recommendation result.
2. The method according to claim 1, wherein the performing error correction processing on the original content to obtain corrected content corresponding to the original content comprises:
performing word segmentation processing on original content to obtain a word segmentation result corresponding to the original content;
if the word segmentation result meets a preset condition, determining that an error exists in the original content;
and when the original content is determined to have errors, carrying out error correction processing on the original content to obtain corrected content corresponding to the original content.
3. The method of claim 1, wherein obtaining the first recommendation corresponding to the correction content comprises:
acquiring a target keyword corresponding to the correction content from a preset keyword set;
and acquiring a service object corresponding to the target keyword according to the target service type corresponding to the target keyword, and taking the service object as a first recommendation result corresponding to the correction content.
4. The method of claim 1, wherein obtaining the first recommendation corresponding to the correction content comprises:
acquiring a target keyword corresponding to the correction content from a preset keyword set;
acquiring a target context corresponding to the correction content from a preset context set;
and when the target service type corresponding to the target keyword is consistent with the service type corresponding to the target context, acquiring a service object corresponding to the target keyword and the target context according to the service type corresponding to the target keyword and the target context together, and taking the service object as a first recommendation result corresponding to the correction content.
5. The method of claim 1, wherein the recommendation score of the first recommendation result is obtained according to a first association probability between a target keyword corresponding to the corrected content and a service type corresponding to the first recommendation result;
and the recommendation score of the second recommendation result is obtained according to a second association probability between the target keyword corresponding to the original content and the service type corresponding to the second recommendation result.
6. The method of any of claims 1-4, wherein the outputting the first recommendation comprises:
presenting a mapping of the original content to the correction content and the first recommendation.
7. A recommendation device, comprising:
the error correction module is used for performing error correction processing on the original content if the language model score corresponding to the adjacent vocabulary is smaller than a preset threshold value so as to obtain corrected content corresponding to the original content; the adjacent words are at least two adjacent words in the original content;
the first recommendation result acquisition module is used for acquiring a first recommendation result corresponding to the correction content; the first recommendation includes: a link of information corresponding to the service object; and
the output module is used for outputting the first recommendation result;
the device further comprises:
the first recommendation result acquisition module is used for acquiring a second recommendation result corresponding to the original content;
the sorting output module is used for sorting and outputting the first recommendation result and the second recommendation result;
the sequencing output module comprises:
the first determining submodule is used for determining the comprehensive score of the first recommendation result according to the language model score of the correction content and the recommendation score of the first recommendation result;
the second determining submodule is used for determining the comprehensive score of the second recommendation result according to the language model score of the original content and the recommendation score of the second recommendation result;
and the sorting output sub-module is used for sorting and outputting the first recommendation result and the second recommendation result according to the comprehensive score of the first recommendation result and the comprehensive score of the second recommendation result.
8. The apparatus of claim 7, wherein the error correction module comprises:
the word segmentation sub-module is used for carrying out word segmentation processing on the original content to obtain a word segmentation result corresponding to the original content;
the error determining module is used for determining that an error exists in the original content when the word segmentation result meets a preset condition;
and the error correction submodule is used for carrying out error correction processing on the original content when the original content is determined to have errors, so as to obtain corrected content corresponding to the original content.
9. The apparatus of claim 7, wherein the first recommendation obtaining module comprises:
the first obtaining sub-module is used for obtaining a target keyword corresponding to the correction content from a preset keyword set;
and the second obtaining sub-module is used for obtaining a service object corresponding to the target keyword according to the target service type corresponding to the target keyword, and the service object is used as a first recommendation result corresponding to the correction content.
10. The apparatus of claim 7, wherein the first recommendation obtaining module comprises:
the first obtaining sub-module is used for obtaining a target keyword corresponding to the correction content from a preset keyword set;
a third obtaining sub-module, configured to obtain a target context corresponding to the correction content from a preset context set;
and the fourth obtaining sub-module is used for obtaining a service object corresponding to the target keyword and the target context according to the service type commonly corresponding to the target keyword and the target context when the target service type corresponding to the target keyword is consistent with the service type corresponding to the target context, and the service object is used as a first recommendation result corresponding to the correction content.
11. The apparatus according to claim 7, wherein the recommendation score of the first recommendation result is obtained according to a first association probability between the target keyword corresponding to the corrected content and the service type corresponding to the first recommendation result;
and the recommendation score of the second recommendation result is obtained according to a second association probability between the target keyword corresponding to the original content and the service type corresponding to the second recommendation result.
12. The apparatus of any one of claims 7 to 10, wherein the output module comprises:
and the mapping display submodule is used for displaying the mapping from the original content to the corrected content and the first recommendation result.
13. An apparatus for recommendation, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and wherein execution of the one or more programs by one or more processors comprises instructions for:
if the language model score corresponding to the adjacent vocabulary is smaller than a preset threshold value, carrying out error correction processing on the original content to obtain corrected content corresponding to the original content; the adjacent words are at least two adjacent words in the original content;
acquiring a first recommendation result corresponding to the correction content; the first recommendation includes: a link of information corresponding to the service object;
outputting the first recommendation result;
acquiring a second recommendation result corresponding to the original content; sorting and outputting the first recommendation result and the second recommendation result;
the sorting and outputting the first recommendation result and the second recommendation result comprises:
determining a comprehensive score of the first recommendation result according to the language model score of the correction content and the recommendation score of the first recommendation result;
determining a comprehensive score of the second recommendation result according to the language model score of the original content and the recommendation score of the second recommendation result;
and sorting and outputting the first recommendation result and the second recommendation result according to the comprehensive score of the first recommendation result and the comprehensive score of the second recommendation result.
14. The apparatus according to claim 13, wherein said performing error correction processing on the original content to obtain a corrected content corresponding to the original content comprises:
performing word segmentation processing on original content to obtain a word segmentation result corresponding to the original content;
if the word segmentation result meets a preset condition, determining that an error exists in the original content;
and when the original content is determined to have errors, carrying out error correction processing on the original content to obtain corrected content corresponding to the original content.
15. The apparatus of claim 13, wherein the obtaining of the first recommendation corresponding to the correction content comprises:
acquiring a target keyword corresponding to the correction content from a preset keyword set;
and acquiring a service object corresponding to the target keyword according to the target service type corresponding to the target keyword, and taking the service object as a first recommendation result corresponding to the correction content.
16. The apparatus of claim 13, wherein the obtaining of the first recommendation corresponding to the correction content comprises:
acquiring a target keyword corresponding to the correction content from a preset keyword set;
acquiring a target context corresponding to the correction content from a preset context set;
and when the target service type corresponding to the target keyword is consistent with the service type corresponding to the target context, acquiring a service object corresponding to the target keyword and the target context according to the service type corresponding to the target keyword and the target context together, and taking the service object as a first recommendation result corresponding to the correction content.
17. The apparatus of claim 13, wherein the recommendation score of the first recommendation result is obtained according to a first association probability between a target keyword corresponding to the corrected content and a service type corresponding to the first recommendation result;
and the recommendation score of the second recommendation result is obtained according to a second association probability between the target keyword corresponding to the original content and the service type corresponding to the second recommendation result.
18. The apparatus of any of claims 13-16, wherein the outputting the first recommendation comprises: presenting a mapping of the original content to the correction content and the first recommendation.
19. A machine-readable medium having stored thereon instructions, which when executed by one or more processors, cause an apparatus to perform the recommendation method of any of claims 1-6.
CN201710470630.9A 2017-06-20 2017-06-20 Recommendation method, recommendation device and device for recommendation Active CN109101505B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710470630.9A CN109101505B (en) 2017-06-20 2017-06-20 Recommendation method, recommendation device and device for recommendation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710470630.9A CN109101505B (en) 2017-06-20 2017-06-20 Recommendation method, recommendation device and device for recommendation

Publications (2)

Publication Number Publication Date
CN109101505A CN109101505A (en) 2018-12-28
CN109101505B true CN109101505B (en) 2021-09-03

Family

ID=64795728

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710470630.9A Active CN109101505B (en) 2017-06-20 2017-06-20 Recommendation method, recommendation device and device for recommendation

Country Status (1)

Country Link
CN (1) CN109101505B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287412B (en) * 2019-06-10 2023-10-24 腾讯科技(深圳)有限公司 Content recommendation method, recommendation model generation method, device, and storage medium
CN112232061A (en) * 2019-06-28 2021-01-15 傲基科技股份有限公司 Content processing method, electronic device, and computer-readable storage medium
CN110489723A (en) * 2019-08-19 2019-11-22 绍兴数纺科技有限公司 A kind of data error detection and error correction system of dyeing information system
CN113360742A (en) * 2021-05-19 2021-09-07 维沃移动通信有限公司 Recommendation information determination method and device and electronic equipment
CN113590806B (en) * 2021-08-02 2022-05-27 山东建筑大学 Personalized news recommendation method and system based on object three-dimensional language concept

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765791A (en) * 2015-03-24 2015-07-08 北京搜狗科技发展有限公司 Information inputting method and device
CN105607756A (en) * 2015-12-24 2016-05-25 百度在线网络技术(北京)有限公司 Information recommendation method and device
CN106293119A (en) * 2016-07-29 2017-01-04 百度在线网络技术(北京)有限公司 A kind of method and apparatus carrying out information recommendation in input method
CN106528532A (en) * 2016-11-07 2017-03-22 上海智臻智能网络科技股份有限公司 Text error correction method and device and terminal
CN106528616A (en) * 2016-09-30 2017-03-22 厦门快商通科技股份有限公司 Language error correcting method and system for use in human-computer interaction process

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9165074B2 (en) * 2011-05-10 2015-10-20 Uber Technologies, Inc. Systems and methods for performing geo-search and retrieval of electronic point-of-interest records using a big index
CN103455507B (en) * 2012-05-31 2017-03-29 国际商业机器公司 Search engine recommends method and device
CN105447005B (en) * 2014-08-08 2020-03-17 北京小度互娱科技有限公司 Object pushing method and device
CN106294676B (en) * 2016-08-05 2017-05-31 张家口乐淘商贸有限公司 A kind of data retrieval method of ecommerce government system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765791A (en) * 2015-03-24 2015-07-08 北京搜狗科技发展有限公司 Information inputting method and device
CN105607756A (en) * 2015-12-24 2016-05-25 百度在线网络技术(北京)有限公司 Information recommendation method and device
CN106293119A (en) * 2016-07-29 2017-01-04 百度在线网络技术(北京)有限公司 A kind of method and apparatus carrying out information recommendation in input method
CN106528616A (en) * 2016-09-30 2017-03-22 厦门快商通科技股份有限公司 Language error correcting method and system for use in human-computer interaction process
CN106528532A (en) * 2016-11-07 2017-03-22 上海智臻智能网络科技股份有限公司 Text error correction method and device and terminal

Also Published As

Publication number Publication date
CN109101505A (en) 2018-12-28

Similar Documents

Publication Publication Date Title
CN109101505B (en) Recommendation method, recommendation device and device for recommendation
EP2972691B1 (en) Language model dictionaries for text predictions
US20140267045A1 (en) Adaptive Language Models for Text Predictions
CN107918496B (en) Input error correction method and device for input error correction
CN108304412B (en) Cross-language search method and device for cross-language search
CN107564526B (en) Processing method, apparatus and machine-readable medium
CN107515870B (en) Searching method and device and searching device
CN107424612B (en) Processing method, apparatus and machine-readable medium
CN109521888B (en) Input method, device and medium
CN108648031B (en) Product recommendation method and device
CN110020106B (en) Recommendation method, recommendation device and device for recommendation
CN110633017A (en) Input method, input device and input device
CN108073293B (en) Method and device for determining target phrase
CN112825076B (en) Information recommendation method and device and electronic equipment
CN112306252A (en) Data processing method and device and data processing device
CN109388252B (en) Input method and device
CN114115550A (en) Method and device for processing association candidate
CN109032374B (en) Candidate display method, device, medium and equipment for input method
CN107688400B (en) Input error correction method and device for input error correction
CN112214692A (en) Data processing method and device based on input method and machine readable medium
CN113010768B (en) Data processing method and device for data processing
US20230196001A1 (en) Sentence conversion techniques
CN111381685B (en) Sentence association method and sentence association device
CN113031787A (en) Input method, input device and input device
CN114139005A (en) Picture keyword determination method and device

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