CN107621886A - Method, apparatus and electronic equipment are recommended in one kind input - Google Patents
Method, apparatus and electronic equipment are recommended in one kind input Download PDFInfo
- Publication number
- CN107621886A CN107621886A CN201610561614.6A CN201610561614A CN107621886A CN 107621886 A CN107621886 A CN 107621886A CN 201610561614 A CN201610561614 A CN 201610561614A CN 107621886 A CN107621886 A CN 107621886A
- Authority
- CN
- China
- Prior art keywords
- data information
- key data
- keywords
- candidate
- level
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 74
- 238000012216 screening Methods 0.000 claims description 5
- 239000002131 composite material Substances 0.000 claims 1
- 230000003993 interaction Effects 0.000 abstract description 5
- 230000000694 effects Effects 0.000 abstract description 4
- 238000012545 processing Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 14
- 230000008569 process Effects 0.000 description 12
- 238000004891 communication Methods 0.000 description 11
- 238000003860 storage Methods 0.000 description 11
- 238000005516 engineering process Methods 0.000 description 9
- 238000004590 computer program Methods 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000011161 development Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000005070 sampling Methods 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000012905 input function Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 238000010845 search algorithm Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention relates to field of human-computer interaction, discloses a kind of input and recommends method, apparatus and electronic equipment, to solve the very few technical problem of the data volume of the recommended candidate item provided in the prior art based on input operation.This method includes:After obtaining and being used to determine the critical data information of recommended candidate item, M candidate's sentence can be determined based on language model by the critical data information, first order keyword and second level keyword are comprised at least in the M candidate sentence, the first order keyword determines that the second level keyword is at least determined based on the first order keyword based on the critical data information;Recommended candidate item using at least a portion content of every candidate's sentence in M bars candidate's sentence as the critical data information.Reach the technique effect of the information content for the recommended candidate item that increase is provided based on critical data information, thus improve input efficiency.
Description
Technical Field
The invention relates to the field of human-computer interaction, in particular to an input recommendation method and device and electronic equipment.
Background
With the continuous development of science and technology, electronic technology has also gained rapid development, and the variety of electronic products is also more and more, and people also enjoy various conveniences brought by the development of science and technology. People can enjoy comfortable life brought along with the development of science and technology through various types of electronic equipment. For example, electronic devices such as a notebook computer, a desktop computer, a smart phone, and a tablet computer have become an important part of people's life, and a user can listen to music, play games, and the like by using the electronic devices such as the mobile phone and the tablet computer, so as to relieve the pressure of modern fast-paced life.
In the process of using the electronic device, an input function of the electronic device is often needed to implement interaction with the electronic device, and an input method application program is an important means for implementing the input function. In order to provide the input efficiency of the input method application program, after the input keyword is selected based on the input method application program, a recommendation candidate item corresponding to the keyword can be provided, however, in the prior art, only the next word of the keyword on the screen of the user can be provided, so that the technical problem that the data amount of the provided recommendation candidate item is too small exists.
Disclosure of Invention
The invention provides an input recommendation method, an input recommendation device and electronic equipment, and aims to solve the technical problem that the data volume of recommended candidate items provided based on input operation is too small in the prior art.
In a first aspect, an embodiment of the present invention provides an input recommendation method, including:
obtaining key data information for determining recommendation candidate items;
determining M candidate sentences based on a language model through the key data information, wherein the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information.
Optionally, the determining M candidate sentences based on the language model by using the key data information includes:
and determining keywords with the occurrence probability meeting a first preset probability condition under the condition that the key data information occurs as the first-level keywords based on the language model.
Optionally, the determining M candidate sentences based on the language model by using the key data information includes:
determining keywords meeting a second preset probability condition as second-level keywords under the condition that any keyword in the first-level keywords appears based on the language model; or,
and determining keywords meeting a second preset probability condition as second-level keywords under the condition that any keyword in the key data information and the first-level keywords appears based on the language model.
Optionally, the determining M candidate sentences based on the language model by using the key data information further includes:
after the L-level keywords are determined, N sentences are obtained based on the combination of the key data information and the determined 1 st to L-level keywords, N is an integer not less than M, the i +1 th-level keywords are keywords meeting the i-th preset probability condition under the condition that the i-th-level keywords appear, and i is an integer from 1 to L-1;
scoring the N sentences based on the language model to obtain the comprehensive score value of each sentence;
and screening and obtaining sentences of which the comprehensive score values meet the preset score value condition from the N sentences as the M candidate sentences.
Optionally, scoring the N sentences based on the language model to obtain a comprehensive score value of each sentence, including:
based on the language model, respectively performing 2-k-element scoring on each statement in the N statements based on the contained keywords, wherein k is not larger than a preset value, and the preset value is the sum of L and the number of the keywords contained in the key data information;
and for each statement, the scores of 2-k elements contained in each statement are added based on the weights, so that the comprehensive score value of the corresponding statement is obtained.
Optionally, the method further includes:
determining an input environment where the electronic equipment is located when the key data information is obtained;
and determining the preset value based on the input environment.
Optionally, the method further includes:
acquiring the number of keywords input by a user in each search operation under each input environment;
and determining the preset value under the corresponding input environment by searching the number of the input keywords each time under the corresponding environment.
Optionally, the key data information includes: a preset number of keywords located in front of a current input cursor; and/or the presence of a gas in the gas,
and the preferred keywords corresponding to the currently input character string.
Optionally, the taking at least a part of the content of each candidate sentence in the M candidate sentences as recommendation candidates of the key data information includes:
and taking the part of each candidate sentence, from which the key data information is removed, as a recommendation candidate item of the key data information.
In a second aspect, an embodiment of the present invention provides an input recommendation method, including:
obtaining key data information for determining recommendation candidate items;
sending the key data information to a network server, so that the network server determines M candidate sentences through the key data information based on a language model, and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information; the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
and receiving the recommendation candidate item sent by the network server.
Optionally, before sending the key data information to the network server, the method further includes:
searching candidate sentences containing the key data information in a historical operating record of the electronic equipment through the key data information;
and if no search result exists, sending the key data information to the network server.
Optionally, the key data information includes: a preset number of keywords located in front of a current input cursor; and/or the presence of a gas in the gas,
and the preferred keywords corresponding to the currently input character string.
In a third aspect, an embodiment of the present invention provides an input recommendation apparatus, including:
the device comprises a first obtaining module, a second obtaining module and a recommendation module, wherein the first obtaining module is used for obtaining key data information used for determining recommendation candidate items;
a first determining module, configured to determine, based on a language model, M candidate sentences through the key data information, where the M candidate sentences include at least a first-level keyword and a second-level keyword, the first-level keyword is determined based on the key data information, and the second-level keyword is determined based on at least the first-level keyword;
and the second determining module is used for taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information.
In a fourth aspect, an embodiment of the present invention provides an input recommendation apparatus, including:
the third obtaining module is used for obtaining key data information used for determining the recommended candidate items;
the sending module is used for sending the key data information to a network server so that the network server can determine M candidate sentences through the key data information based on a language model, and at least part of content of each candidate sentence in the M candidate sentences is used as a recommendation candidate item of the key data information; the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
and the receiving module is used for receiving the recommendation candidate items sent by the network server.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including a memory, and one or more programs, where the one or more programs are stored in the memory, and configured to be executed by one or more processors, the one or more programs including instructions for:
obtaining key data information for determining recommendation candidate items;
determining M candidate sentences based on a language model through the key data information, wherein the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information.
In a sixth aspect, an embodiment of the present invention provides an electronic device, including a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs including instructions for:
obtaining key data information for determining recommendation candidate items;
sending the key data information to a network server, so that the network server determines M candidate sentences through the key data information based on a language model, and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information; the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
and receiving the recommendation candidate item sent by the network server.
The invention has the following beneficial effects:
in the embodiment of the invention, after obtaining the key data information for determining the recommended candidate items, M candidate sentences can be determined through the key data information based on a language model, wherein the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on at least the first-level keywords; and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information. That is to say, the determined recommendation candidate items comprise first-level keywords determined based on the key data information and second-level keywords determined by the first-level keywords, so that layer-by-layer association of the key data information is realized, the technical effect of increasing the information amount of the recommendation candidate items provided based on the key data information is achieved, and the input efficiency is improved.
Drawings
FIG. 1 is a flow chart of a method for inputting recommendations according to a first aspect of the present invention;
FIG. 2 is a flowchart of determining M candidate sentences in the input recommendation method according to the first aspect of the embodiment of the present invention;
FIG. 3 is a flow chart of a method for inputting recommendations according to a second aspect of the present invention;
FIG. 4 is a block diagram of an input recommendation device in accordance with a third aspect of the present invention;
FIG. 5 is a block diagram of an input recommendation device in accordance with a fourth aspect of the present invention;
FIG. 6 is a block diagram of an electronic device illustrating a method of entering a recommendation, in accordance with an exemplary embodiment;
fig. 7 is a schematic structural diagram of a server in an embodiment of the present invention.
Detailed Description
The invention provides an input recommendation method, an input recommendation device and electronic equipment, and aims to solve the technical problem that the data volume of recommended candidate items provided based on input operation is too small in the prior art.
In order to solve the technical problems, the general idea of the embodiment of the present application is as follows:
after obtaining key data information used for determining recommended candidate items, determining M candidate sentences based on a language model through the key data information, wherein the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords; and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information. That is to say, the determined recommendation candidate items comprise first-level keywords determined by the key data information and second-level keywords determined by the first-level keywords, so that layer-by-layer association of the key data information is realized, the technical effect of increasing the information amount of the recommendation candidate items provided based on the key data information is achieved, and the input efficiency is improved.
In order to better understand the technical solutions of the present invention, the following detailed descriptions of the technical solutions of the present invention are provided with the accompanying drawings and the specific embodiments, and it should be understood that the specific features in the embodiments and the examples of the present invention are the detailed descriptions of the technical solutions of the present invention, and are not limitations of the technical solutions of the present invention, and the technical features in the embodiments and the examples of the present invention may be combined with each other without conflict.
In a first aspect, an embodiment of the present invention provides an input recommendation method, please refer to fig. 1, including:
step S101: obtaining key data information for determining recommendation candidate items;
step S102: determining M candidate sentences based on a language model through the key data information, wherein the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
step S103: and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information.
For example, the scheme may be applied to a client device, such as: the mobile phone, the tablet computer, the notebook computer, the PC, and the like may also be applied to the network server, and the embodiment of the present invention is not limited. If the scheme is applied to the client device, the client device directly obtains key data information on the client device and determines recommendation candidate items based on the key data information; if the scheme is applied to the network server, the network server can receive the key data information sent by the client device, then the recommendation candidate items are determined through the key data information, and after the recommendation candidate items are determined, the network server can send the recommendation candidate items to the client device so as to provide the recommendation candidate items for the user of the client device to input. The scheme can be applied to the input process of the input method application program, and the obtained recommendation candidate items are provided by the input method application program.
In step S101, the key data information may include a plurality of kinds of information, and two kinds of information are listed below for description, but of course, in the specific implementation process, the following two cases are not limited, and in addition, in the case of no conflict, the following two cases may be used in combination.
First, the key data information includes: and a preset number of keywords located in front of the current input cursor.
For example, the preset number may be a default number, such as: 1. 2, etc., for example: assuming that the current input area contains the following input content "see beijing yesterday", if the preset number is 1, it may be determined that the key data information includes "beijing", and if the preset number is 2, it may be determined that the key data information includes "see" + "beijing", and the like; the preset number may also be determined by analyzing a number of characters in front of the current input cursor, for example: determining a word in a preset category closest to a current input cursor, and then using the content behind the word in the preset category as key data information, wherein the word in the preset category comprises: the assistant words, verbs, and the like are also exemplified by "yesterday sees beijing", the last verb is "see", and the last assistant word is "see", so that the content "beijing" after "see" is determined as the key data information.
Second, the key data information includes: and the preferred keywords corresponding to the currently input character string.
For example, assuming that the currently inputted character string is "aiqiing", which provides the following four recommended keywords ① love ② love paniculate ③ Aiqing ④ love, the preferred keyword therein is "love", so that the keyword "love" can be used as the preferred keyword.
In addition, the above two modes can be used in combination, for example: the preset number of keywords and the preferred keywords in front of the current position are used as the key data information together, for example, if the preset number of keywords in front of the current position are 'Beijing', the preferred keywords are 'love', and thus the key data information can be determined to be 'Beijing love'.
In step S102, the language model refers to a model established based on context-dependent features of natural language, and can describe the distribution of the probability of occurrence of a given word sequence in the language. The language model is, for example, an n-gram language model, a neural network language model, or the like.
In the specific implementation process, the first-level keywords may be determined in the following manner: and determining keywords with the occurrence probability meeting a first preset probability condition under the condition that the key data information occurs as the first-level keywords based on the language model.
The first preset probability condition is, for example: the occurrence probability is located in the first few digits (e.g., 3, 5, etc.), the occurrence frequency is greater than a preset frequency (e.g., 1000, 2000, etc.), and the like, wherein if the key data information only contains one keyword, it may be directly determined that the keyword whose occurrence probability satisfies a first preset probability condition is taken as a first-level keyword when the keyword occurs, taking the keyword as "beijing", for example, it may be obtained that the keyword whose occurrence frequency is located in the first 4 digits is taken as the first-level keyword when the keyword "beijing" occurs, and the first-level keyword includes, for example: love, time, subway, bus; if the key data information contains a plurality of keywords, it can be determined that, under the condition that all the keywords occur, the keywords whose occurrence probability satisfies the first preset probability condition are used as the first-level keywords, taking the key data information as "beijing love", for example, it can be obtained that, under the condition that the keywords "beijing" + "love" occur, the keywords whose occurrence times are located at the top 3 positions are used as the first-level keywords, and the first-level keywords include, for example: stories, movies, television shows; or select a part of keywords in the key data information to determine the first-level keywords, which is not listed in detail in the embodiment of the present invention and is not limited.
In another alternative embodiment, the first level keywords may also be obtained by: obtaining at least one sampled text; extracting sentences with the occurrence times larger than the preset times in the at least one sampling text as preset sentences; inquiring in preset sentences to obtain key sentences based on the key data information; and extracting a first keyword contained after the key data information in the key sentence as a first-level keyword.
For example, the sample text is, for example: each network text on the network can be matched in the preset sentence through partial keywords or keywords in the key data information to obtain the key sentence. Assuming that the following key sentence "Beijing love story # TV drama" is matched through the key data information "Beijing", the first keyword after "Beijing" is "love", thereby determining that "love" is the first-level keyword. Of course, the matched first-level keywords are different based on different key data information, and the embodiment of the present invention is not limited.
In the specific implementation process, the second level keyword can be determined in various ways, and two of the second level keywords are listed below for description, but of course, the second level keyword is not limited to the following two cases in the specific implementation process.
Firstly, based on the language model, determining that the keywords meeting a second preset probability condition are used as second-level keywords under the condition that any keywords in the first-level keywords appear.
For example, assume that the first level keywords include: b is1、B2Then it can be determined that the keyword B is1Under the condition of occurrence, the keyword C meeting a second preset probability condition1、C2It can also be determined that the keyword B is2Under the condition of occurrence, the keyword C meeting a second preset probability condition3、C4Thus, it can be determined that the second level keywords include: c1、C2、C3、C4The second preset probability condition is satisfied, for example: when the first-level keyword occurs, the occurrence frequency is greater than the preset frequency, the trip frequency is ranked in the first digits, and the like, where the second preset probability condition may be the same as or different from the preset frequency corresponding to the first preset probability condition, and the second preset probability condition may be the same as or different from the first digits corresponding to the second preset probability condition, which is not limited in the embodiment of the present invention.
Secondly, determining keywords meeting a second preset probability condition as second-level keywords under the condition that any keyword in the key data information and the first-level keywords appears based on the language model.
For example, assuming that the key data information is a, the first level keywords include: b is1、B2Then it can be determined at AB1And under the condition of simultaneous occurrence, the keyword C meeting a second preset probability condition5、C6AB can also be determined2And under the condition of simultaneous occurrence, the keyword C meeting a second preset probability condition7、C8And, thus, the second level keywords include: c5、C6、C7、C8And so on.
In addition, in the specific implementation process, after the second-level keywords are determined, the next-level keywords can be determined through the second-level keywords, and in general, the (i + 1) th-level keywords can be determined through the ith-level keywords based on the language model until the L-level keywords are determined.
For example, the value of L may be any value preset, such as: 2. 3, etc. may also be obtained by subtracting the number of keywords included in the key data information from a preset value, where the preset value may be a preset value, for example: 4. 5, etc., as an alternative embodiment, the preset value may be determined by: determining an input environment where the electronic equipment is located when the key data information is obtained; and determining the preset value based on the input environment.
The input environment includes, for example: a video search environment, an audio search environment, a web search environment, a goods search environment, etc., where video data is searched for in the video search environment, audio data is searched for in the audio search environment, web data is searched for in the web search environment, goods are searched for in the goods search environment, where the input environment may be determined by the type of input box or the current page type, for example: if the input box is used to search for video data, the input environment may be determined to be a video search environment, if the input box is used to search for audio data, the input environment may be determined to be an audio search environment, and so on; for another example, if the current page is a search engine, the input environment may be determined to be a web search environment, if the current page is a shopping website, the input environment may be determined to be a merchandise search environment, and so on. Under different input environments, due to different input purposes, the number of the input keywords is different, and based on the scheme, the more accurate length of the candidate sentence can be determined.
As an alternative embodiment, the L value in each input environment may be determined by: acquiring the number of keywords input by a user in each search operation under each input environment; and determining the L value under the corresponding input environment by searching the number of the input keywords each time under the corresponding environment.
For example, the user here may be a user of the current client device, or may be at least one sampling user of the system, and if the user is the user of the current client device, a more accurate L value may be determined, and if the user is at least one sampling user, since the value only needs to determine the preset value for a part of sampling users, and does not need to determine the preset value for each user, the processing load of the device (client device or server) can be reduced.
In each input environment, after the number of the input keywords is obtained and searched each time, the average value of the number of the keywords may be calculated as the preset value in the corresponding input environment, and then the maximum number of the keywords may be obtained as the preset value in the corresponding input environment, and so on.
In the specific implementation process, after keywords at all levels are determined, the key data information is combined with the determined keywords at levels 1 to L to obtain N sentences.
For example, assuming the keyword data information is A, the first level keywords include B1、B2By first level keywords B1The determined second level keywords comprise C1、C2By first level keywords B2The determined second level keywords comprise: c3、C4Thus, the following four sentences can be determined:
①A→B1→C1
②A→B1→C2
③A→B2→C3
①A→B2→C4
after the N sentences are determined, the N sentences may be directly used as M candidate sentences, and as an alternative embodiment, a part of sentences may be screened from the N sentences as M candidate sentences, in this case, referring to fig. 2, the M candidate sentences may be determined by:
step S201: after the L-level keywords are determined, N sentences are obtained based on the combination of the key data information and the determined 1 st to L-level keywords, N is an integer not less than M, the i +1 th-level keywords are keywords meeting the i-th preset probability condition under the condition that the i-th-level keywords appear, and i is an integer from 1 to L-1;
step S202: scoring the N sentences based on the language model to obtain the comprehensive score value of each sentence;
step S203: and screening and obtaining sentences of which the comprehensive score values meet the preset score value condition from the N sentences as the M candidate sentences.
In step S201, as to how to determine N statements specifically, the description is omitted here because the description is already given above.
In step S202, the comprehensive score value of each of the N sentences may be determined in a variety of ways, and two of the N sentences are listed below for introduction, which is of course not limited to the following two cases in the specific implementation process.
First, the scoring the N sentences based on the language model to obtain a comprehensive score value of each sentence includes:
based on the language model, respectively performing 2-k-element scoring on each statement in the N statements based on the contained keywords, wherein k is not larger than L, and the number of the keywords contained in the key data information is subtracted;
and for each statement, the scores of 2-k elements contained in each statement are added based on the weights, so that the comprehensive score value of the corresponding statement is obtained.
For example, if the preset value is 5, it indicates that the number of keywords included in the corresponding sentence is 5, and if the preset value is 3, it indicates that the number of keywords included in the corresponding sentence is 3, and so on, wherein, the sentence is AB1C1Then its 2-tuple score is: l is2=P(AB1)+P(B1C1) Wherein P (A)1B1) Indicates that in the case of occurrence of keyword A, keyword B1Can determine that the keyword B appears under the condition that the keyword A appears1And determines the number of occurrences of all keywords in the case of occurrence of keyword a, and then passes keyword B1Is divided by the number of occurrences of all keywords, so that P (AB) can be obtained1),P(B1C1) The calculation method is similar to that of the above method, and is not described herein again; its 3 yuan is divided into L3=P(AB1C1) Represented at keyword A, B1In case of simultaneous occurrence, keyword C1Wherein the probability of occurrence at the keyword A, B can be determined1In case of simultaneous occurrence, keyword C1And determines the number of occurrences at keyword A, B1All in the case of simultaneous occurrenceNumber of occurrences of keyword, then by keyword C1Is divided by the number of occurrences of all keywords, P (AB) can be determined1C1). The statement AB thus obtained1C1The integrated score value of (a) is: l ═ x1*L2+x2*L3Wherein x is1Weight, x, representing a binary score2Weight, x, representing a 3-dimensional score1+x2The method for calculating the comprehensive score value is similar to that of the sentence length of other preset values, and thus is not described in detail. In order to reduce the computational complexity, a beam search algorithm (beam search) may be selected, that is, only words that are ranked in the first few binary digits (e.g., 3, 5, etc.) of the previous word are selected as candidates when predicting the next associated word, so as to reduce the complexity.
In the specific implementation process, the comprehensive score value of the corresponding sentence is calculated after the whole sentence is obtained, for example: if the preset value is 5, calculating the comprehensive score value when the sentence length reaches 5, and if the preset value is 3, calculating the comprehensive score value when the sentence length reaches 3, and the like; the comprehensive score value of the sentence can be calculated once each time the first-level keyword is obtained, and if the comprehensive score value is smaller than the preset score value, the next-level keyword can be stopped being obtained, so that the processing load of the equipment can be reduced. The preset score value may be set according to actual requirements, for example: 0.1, 0.01, etc., embodiments of the present invention are not limited.
Secondly, determining the occurrence frequency of the next level keyword under the condition that the previous level keyword occurs based on the language model; and adding the occurrence times of the keywords at all levels in each sentence to obtain a comprehensive scoring value.
For example, assume a statement AB1C1Then it can be determined that keyword B occurred in the case of keyword a1Then determines the number of occurrences in the keyword B1Key word C in case of occurrence1And then adds them to obtain a sentenceAB1C1The integrated score value of (a).
In step S203, the sentences ranked in the top several places (e.g., 3, 5, etc.) or having the comprehensive score value greater than the preset score value (e.g., 0.3, 0.15, etc.) may be screened out from the N sentences as the sentences having the comprehensive score value satisfying the preset score value condition, so as to obtain M candidate sentences.
In step S103, the recommendation candidates may be determined based on various principles, and two of the recommendation candidates are listed below for introduction, which is not limited to the following two cases in the specific implementation process.
First, the using at least a part of the content of each of the M candidate sentences as recommendation candidates of the key data information includes:
and taking the part of each candidate sentence, from which the key data information is removed, as a recommendation candidate item of the key data information.
For example, assuming that the key data information is "beijing", 3 candidate sentences are obtained in total, which are respectively as follows:
① Beijing # love story # film edition # ending
② Beijing # love story # TV play # ending
③ Beijing # love story # TV play # first album
Then the keyword "beijing" may be removed from each candidate sentence to obtain the following 3 recommended candidates:
① love story # movie edition # ending
② love story TV play ending
③ love story # TV play # first album
Based on the scheme, the display area for displaying the recommendation candidates can be reduced.
Secondly, the using at least a part of the content of each candidate sentence in the M candidate sentences as recommendation candidates of the key data information includes: and taking the whole content of each candidate sentence as a recommendation candidate item of the key data information.
Or taking the key data information mentioned above as "beijing" as an example, the obtained candidate sentences may not be processed, but the candidate sentences may be directly used as recommended candidates.
In addition, when the recommendation candidate item determined based on the candidate sentence is provided to the user, in order to prevent the recommendation candidate item provided based on the input character string from being blocked, the recommendation candidate item determined based on the candidate sentence may be displayed at the bottom or the top of the recommendation candidate item provided based on the character string, and of course, may also be displayed in other areas, which is not limited in the embodiment of the present invention.
In a second aspect, based on the same inventive concept, an embodiment of the present invention provides an input recommendation method, please refer to fig. 3, including:
step S301: obtaining key data information for determining recommendation candidate items;
step S302: sending the key data information to a network server, so that the network server determines M candidate sentences through the key data information based on a language model, and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information; the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
step S303: and receiving the recommendation candidate item sent by the network server.
As an optional embodiment, before the sending the key data information to the network server, the method further includes: searching candidate sentences containing the key data information in a historical operating record of the electronic equipment through the key data information; and if no search result exists, sending the key data information to the network server.
For example, the history operation record is, for example, a history input record, a history search record, and the like, the history input record refers to content input by a user in history, the history search record refers to a history search record corresponding to a network search performed by the user, the history search record may include a plurality of text contents, and at least one sentence may be extracted from the history operation record; then, searching in at least one statement through key data information, and if a search result can be obtained, directly taking the search result as a candidate statement; and if the search result cannot be obtained, sending the key data information to the network server, and inquiring to obtain the corresponding candidate statement through the network server.
In addition, besides the key data information can be sent to the network server, the input environment can be sent to the network server, so that more accurate recommendation candidate items can be obtained through the key data information and the input environment.
As an alternative embodiment, the key data information includes: a preset number of keywords located in front of a current input cursor; and/or the preferred keywords corresponding to the currently input character string.
Since the input recommendation method introduced in the second aspect of the present invention corresponds to the input recommendation method introduced in the first aspect of the present invention, based on the input recommendation method introduced in the first aspect of the present invention, a person skilled in the art can understand a specific implementation manner of the input recommendation method introduced in the second aspect of the present invention, and thus details are not described herein.
In a third aspect, based on the same inventive concept, an embodiment of the present invention provides an input recommendation apparatus, please refer to fig. 4, including:
a first obtaining module 40, configured to obtain key data information for determining recommendation candidate items;
a first determining module 41, configured to determine, based on a language model, M candidate sentences through the key data information, where the M candidate sentences at least include a first-level keyword and a second-level keyword, the first-level keyword is determined based on the key data information, and the second-level keyword is determined based on at least the first-level keyword;
a second determining module 42, configured to use at least a part of content of each candidate sentence in the M candidate sentences as recommendation candidates of the key data information.
Optionally, the first determining module 41 is configured to:
and determining keywords with the occurrence probability meeting a first preset probability condition under the condition that the key data information occurs as the first-level keywords based on the language model.
Optionally, the first determining module 41 includes:
a first determining unit, configured to determine, based on the language model, a keyword that meets a second preset probability condition as a second-level keyword when any keyword in the first-level keywords appears; or,
and determining keywords meeting a second preset probability condition as second-level keywords under the condition that any keyword in the key data information and the first-level keywords appears based on the language model.
Optionally, the first determining module 41 further includes:
the second determining unit is used for obtaining N sentences based on the key data information and the determined 1 st to L-level key word combinations after the L-level key words are determined, N is an integer not less than M, the (i + 1) th level key word is a key word meeting the (i) th preset probability condition under the condition that the (i) th level key word appears, and i is an integer from 1 to L-1;
the scoring unit is used for scoring the N sentences based on the language model to obtain the comprehensive score value of each sentence;
and the screening unit is used for screening and obtaining sentences of which the comprehensive score values meet the preset score value condition from the N sentences as the M candidate sentences.
Optionally, the scoring unit includes:
a scoring subunit, configured to perform, based on the language model, 2-k-element scoring on each statement in the N statements based on included keywords, where k is not greater than a preset value, and the preset value is a sum of L and the number of keywords included in the key data information;
and the adding subunit is used for adding the scores of the 2-k elements contained in each statement based on the weight value so as to obtain the comprehensive score value of the corresponding statement.
Optionally, the apparatus further comprises:
the third determining module is used for determining the input environment of the electronic equipment when the key data information is obtained;
and the fourth determination module is used for determining the preset value based on the input environment.
Optionally, the apparatus further comprises:
the second obtaining module is used for obtaining the number of keywords input by the user in each search operation under each input environment;
and the fifth determining module is used for determining the preset value in the corresponding input environment by searching the number of the input keywords in each time in the corresponding environment.
Optionally, the key data information includes: a preset number of keywords located in front of a current input cursor; and/or the presence of a gas in the gas,
and the preferred keywords corresponding to the currently input character string.
Optionally, the second determining module 42 is configured to:
and taking the part of each candidate sentence, from which the key data information is removed, as a recommendation candidate item of the key data information.
Since the input recommendation device described in the third aspect of the present invention is a device used for implementing the input recommendation method described in the second aspect of the present invention, based on the input recommendation method described in the first aspect of the present invention, those skilled in the art can understand the specific structure and variations of the input recommendation device described in the third aspect of the present invention, and all the devices used in the input recommendation method described in the first aspect of the present invention belong to the scope of the embodiments of the present invention to be protected.
In a fourth aspect, based on the same inventive concept, an embodiment of the present invention provides an input recommendation apparatus, please refer to fig. 5, including:
a third obtaining module 50, configured to obtain key data information for determining recommendation candidate items;
a sending module 51, configured to send the key data information to a network server, so that the network server determines M candidate sentences through the key data information based on a language model, and uses at least a part of content of each candidate sentence in the M candidate sentences as recommended candidate items of the key data information; the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
a receiving module 52, configured to receive the recommendation candidate sent by the network server.
Optionally, the apparatus further comprises:
the searching module is used for searching candidate sentences containing the key data information in the historical operating records of the electronic equipment through the key data information;
and if no search result exists, sending the key data information to the network server.
Optionally, the key data information includes: a preset number of keywords located in front of a current input cursor; and/or the presence of a gas in the gas,
and the preferred keywords corresponding to the currently input character string.
Since the input recommendation device described in the fourth aspect of the present invention is a device used for implementing the input recommendation method described in the second aspect of the present invention, based on the input recommendation method described in the second aspect of the present invention, those skilled in the art can understand the specific structure and variations of the input recommendation device described in the fourth aspect of the present invention, and all the devices used in the input recommendation method described in the second aspect of the present invention belong to the scope of the embodiments of the present invention to be protected.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including a memory, and one or more programs, where the one or more programs are stored in the memory, and configured to be executed by one or more processors, the one or more programs including instructions for:
obtaining key data information for determining recommendation candidate items;
determining M candidate sentences based on a language model through the key data information, wherein the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information.
In a sixth aspect, an embodiment of the present invention provides an electronic device, including a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs including instructions for:
obtaining key data information for determining recommendation candidate items;
sending the key data information to a network server, so that the network server determines M candidate sentences through the key data information based on a language model, and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information; the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
and receiving the recommendation candidate item sent by the network server.
FIG. 6 is a block diagram illustrating an electronic device 800 that inputs a recommendation method in accordance with an example embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, electronic device 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 electronic 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 the electronic 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.
The power supply component 806 provides power to the various components of the electronic 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 electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic 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 camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation 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 electronic device 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 electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 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 wired or wireless communication between the electronic device 800 and other devices. The electronic 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 associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications 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 electronic device 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 electronic 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.
A non-transitory computer readable storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform a method of input recommendation, the method comprising:
obtaining key data information for determining recommendation candidate items;
determining M candidate sentences based on a language model through the key data information, wherein the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information.
A non-transitory computer readable storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform a method of input recommendation, the method comprising:
obtaining key data information for determining recommendation candidate items;
sending the key data information to a network server, so that the network server determines M candidate sentences through the key data information based on a language model, and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information; the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
and receiving the recommendation candidate item sent by the network server.
Fig. 7 is a schematic structural diagram of a server in an embodiment of the present 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.
One or more embodiments of the invention have at least the following beneficial effects:
in the embodiment of the invention, after obtaining the key data information for determining the recommended candidate items, M candidate sentences can be determined through the key data information based on a language model, wherein the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on at least the first-level keywords; and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information. That is to say, the determined recommendation candidate items comprise first-level keywords determined by the key data information and second-level keywords determined by the first-level keywords, so that layer-by-layer association of the key data information is realized, the technical effect of increasing the information amount of the recommendation candidate items provided based on the key data information is achieved, and the input efficiency is improved.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (16)
1. An input recommendation method, comprising:
obtaining key data information for determining recommendation candidate items;
determining M candidate sentences based on a language model through the key data information, wherein the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information.
2. The method of claim 1, wherein said determining M candidate sentences based on a language model from said key data information comprises:
and determining keywords with the occurrence probability meeting a first preset probability condition under the condition that the key data information occurs as the first-level keywords based on the language model.
3. The method of claim 2, wherein said determining M candidate sentences based on a language model from said key data information comprises:
determining keywords meeting a second preset probability condition as second-level keywords under the condition that any keyword in the first-level keywords appears based on the language model; or,
and determining keywords meeting a second preset probability condition as second-level keywords under the condition that any keyword in the key data information and the first-level keywords appears based on the language model.
4. The method of claim 3, wherein said determining M candidate sentences based on a language model from said key data information further comprises:
after the L-level keywords are determined, N sentences are obtained based on the combination of the key data information and the determined 1 st to L-level keywords, N is an integer not less than M, the i +1 th-level keywords are keywords meeting the i-th preset probability condition under the condition that the i-th-level keywords appear, and i is an integer from 1 to L-1;
scoring the N sentences based on the language model to obtain the comprehensive score value of each sentence;
and screening and obtaining sentences of which the comprehensive score values meet the preset score value condition from the N sentences as the M candidate sentences.
5. The method of claim 4, wherein scoring the N sentences based on the language model to obtain a composite score value for each sentence, comprises:
based on the language model, respectively performing 2-k-element scoring on each statement in the N statements based on the contained keywords, wherein k is not larger than a preset value, and the preset value is the sum of L and the number of the keywords contained in the key data information;
and for each statement, the scores of 2-k elements contained in each statement are added based on the weights, so that the comprehensive score value of the corresponding statement is obtained.
6. The method of claim 5, wherein the method further comprises:
determining an input environment where the electronic equipment is located when the key data information is obtained;
and determining the preset value based on the input environment.
7. The method of claim 6, wherein the method further comprises:
acquiring the number of keywords input by a user in each search operation under each input environment;
and determining the preset value under the corresponding input environment by searching the number of the input keywords each time under the corresponding environment.
8. The method of any of claims 1-7, wherein the critical data information comprises: a preset number of keywords located in front of a current input cursor; and/or the presence of a gas in the gas,
and the preferred keywords corresponding to the currently input character string.
9. The method of any one of claims 1 to 7, wherein said using at least a portion of the content of each of the M candidate sentences as recommendation candidates for the key data information comprises:
and taking the part of each candidate sentence, from which the key data information is removed, as a recommendation candidate item of the key data information.
10. An input recommendation method, comprising:
obtaining key data information for determining recommendation candidate items;
sending the key data information to a network server, so that the network server determines M candidate sentences through the key data information based on a language model, and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information; the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
and receiving the recommendation candidate item sent by the network server.
11. The method of claim 10, wherein prior to said sending said critical data information to a network server, said method further comprises:
searching candidate sentences containing the key data information in a historical operating record of the electronic equipment through the key data information;
and if no search result exists, sending the key data information to the network server.
12. The method of claim 10, wherein the critical data information comprises: a preset number of keywords located in front of a current input cursor; and/or the presence of a gas in the gas,
and the preferred keywords corresponding to the currently input character string.
13. An input recommendation device, comprising:
the device comprises a first obtaining module, a second obtaining module and a recommendation module, wherein the first obtaining module is used for obtaining key data information used for determining recommendation candidate items;
a first determining module, configured to determine, based on a language model, M candidate sentences through the key data information, where the M candidate sentences include at least a first-level keyword and a second-level keyword, the first-level keyword is determined based on the key data information, and the second-level keyword is determined based on at least the first-level keyword;
and the second determining module is used for taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information.
14. An input recommendation device, comprising:
the third obtaining module is used for obtaining key data information used for determining the recommended candidate items;
the sending module is used for sending the key data information to a network server so that the network server can determine M candidate sentences through the key data information based on a language model, and at least part of content of each candidate sentence in the M candidate sentences is used as a recommendation candidate item of the key data information; the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
and the receiving module is used for receiving the recommendation candidate items sent by the network server.
15. An electronic device comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors the one or more programs including instructions for:
obtaining key data information for determining recommendation candidate items;
determining M candidate sentences based on a language model through the key data information, wherein the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information.
16. An electronic device comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors the one or more programs including instructions for:
obtaining key data information for determining recommendation candidate items;
sending the key data information to a network server, so that the network server determines M candidate sentences through the key data information based on a language model, and taking at least part of content of each candidate sentence in the M candidate sentences as recommendation candidate items of the key data information; the M candidate sentences at least comprise first-level keywords and second-level keywords, the first-level keywords are determined based on the key data information, and the second-level keywords are determined based on the first-level keywords;
and receiving the recommendation candidate item sent by the network server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610561614.6A CN107621886B (en) | 2016-07-15 | 2016-07-15 | Input recommendation method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610561614.6A CN107621886B (en) | 2016-07-15 | 2016-07-15 | Input recommendation method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107621886A true CN107621886A (en) | 2018-01-23 |
CN107621886B CN107621886B (en) | 2021-12-21 |
Family
ID=61087841
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610561614.6A Active CN107621886B (en) | 2016-07-15 | 2016-07-15 | Input recommendation method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107621886B (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108376162A (en) * | 2018-02-22 | 2018-08-07 | 北京百度网讯科技有限公司 | Method and apparatus for pushed information |
CN109766013A (en) * | 2018-12-28 | 2019-05-17 | 北京金山安全软件有限公司 | Poetry sentence input recommendation method and device and electronic equipment |
CN110162710A (en) * | 2019-05-28 | 2019-08-23 | 北京搜狗科技发展有限公司 | Information recommendation method and device under input scene |
CN110244860A (en) * | 2018-03-08 | 2019-09-17 | 北京搜狗科技发展有限公司 | A kind of input method, device and electronic equipment |
CN110378704A (en) * | 2019-07-23 | 2019-10-25 | 珠海格力电器股份有限公司 | Opinion feedback method based on fuzzy recognition, storage medium and terminal equipment |
WO2020062014A1 (en) * | 2018-09-28 | 2020-04-02 | 华为技术有限公司 | Method for inputting information into input box and electronic device |
CN111198619A (en) * | 2018-11-20 | 2020-05-26 | 北京搜狗科技发展有限公司 | Association candidate generation method and device |
CN111381685A (en) * | 2018-12-29 | 2020-07-07 | 北京搜狗科技发展有限公司 | Sentence association method and device |
CN111831130A (en) * | 2019-04-18 | 2020-10-27 | 成都鼎桥通信技术有限公司 | Input content recommendation method, terminal device and storage medium |
CN114594861A (en) * | 2020-12-03 | 2022-06-07 | 北京搜狗科技发展有限公司 | Recommendation method and device and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1282900A (en) * | 2000-09-07 | 2001-02-07 | 马晓光 | Intelligent man-machine interaction mathod for inputting Chinese characters and keyboard layout |
US20040158567A1 (en) * | 2003-02-12 | 2004-08-12 | International Business Machines Corporation | Constraint driven schema association |
CN103430172A (en) * | 2012-03-21 | 2013-12-04 | 株式会社东芝 | Search apparatus, search method, and program |
CN103440299A (en) * | 2013-08-20 | 2013-12-11 | 陈喜 | Quick information input method based on focus context associational words |
CN105760521A (en) * | 2016-02-29 | 2016-07-13 | 百度在线网络技术(北京)有限公司 | Information input method and device |
-
2016
- 2016-07-15 CN CN201610561614.6A patent/CN107621886B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1282900A (en) * | 2000-09-07 | 2001-02-07 | 马晓光 | Intelligent man-machine interaction mathod for inputting Chinese characters and keyboard layout |
US20040158567A1 (en) * | 2003-02-12 | 2004-08-12 | International Business Machines Corporation | Constraint driven schema association |
CN103430172A (en) * | 2012-03-21 | 2013-12-04 | 株式会社东芝 | Search apparatus, search method, and program |
CN103440299A (en) * | 2013-08-20 | 2013-12-11 | 陈喜 | Quick information input method based on focus context associational words |
CN105760521A (en) * | 2016-02-29 | 2016-07-13 | 百度在线网络技术(北京)有限公司 | Information input method and device |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108376162A (en) * | 2018-02-22 | 2018-08-07 | 北京百度网讯科技有限公司 | Method and apparatus for pushed information |
CN110244860A (en) * | 2018-03-08 | 2019-09-17 | 北京搜狗科技发展有限公司 | A kind of input method, device and electronic equipment |
CN110244860B (en) * | 2018-03-08 | 2024-02-02 | 北京搜狗科技发展有限公司 | Input method and device and electronic equipment |
CN112740148A (en) * | 2018-09-28 | 2021-04-30 | 华为技术有限公司 | Method for inputting information into input box and electronic equipment |
WO2020062014A1 (en) * | 2018-09-28 | 2020-04-02 | 华为技术有限公司 | Method for inputting information into input box and electronic device |
CN111198619A (en) * | 2018-11-20 | 2020-05-26 | 北京搜狗科技发展有限公司 | Association candidate generation method and device |
CN109766013A (en) * | 2018-12-28 | 2019-05-17 | 北京金山安全软件有限公司 | Poetry sentence input recommendation method and device and electronic equipment |
CN111381685A (en) * | 2018-12-29 | 2020-07-07 | 北京搜狗科技发展有限公司 | Sentence association method and device |
CN111381685B (en) * | 2018-12-29 | 2024-03-22 | 北京搜狗科技发展有限公司 | Sentence association method and sentence association device |
CN111831130A (en) * | 2019-04-18 | 2020-10-27 | 成都鼎桥通信技术有限公司 | Input content recommendation method, terminal device and storage medium |
CN110162710A (en) * | 2019-05-28 | 2019-08-23 | 北京搜狗科技发展有限公司 | Information recommendation method and device under input scene |
CN110162710B (en) * | 2019-05-28 | 2022-06-21 | 北京搜狗科技发展有限公司 | Information recommendation method and device under input scene |
CN110378704A (en) * | 2019-07-23 | 2019-10-25 | 珠海格力电器股份有限公司 | Opinion feedback method based on fuzzy recognition, storage medium and terminal equipment |
CN110378704B (en) * | 2019-07-23 | 2021-10-22 | 珠海格力电器股份有限公司 | Opinion feedback method based on fuzzy recognition, storage medium and terminal equipment |
CN114594861A (en) * | 2020-12-03 | 2022-06-07 | 北京搜狗科技发展有限公司 | Recommendation method and device and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN107621886B (en) | 2021-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107621886B (en) | Input recommendation method and device and electronic equipment | |
CN107608532B (en) | Association input method and device and electronic equipment | |
EP3173948A1 (en) | Method and apparatus for recommendation of reference documents | |
CN108073303B (en) | Input method and device and electronic equipment | |
CN109144285B (en) | Input method and device | |
CN109799916B (en) | Candidate item association method and device | |
CN107315487B (en) | Input processing method and device and electronic equipment | |
CN110391966B (en) | Message processing method and device and message processing device | |
CN107291772B (en) | Search access method and device and electronic equipment | |
CN108345608A (en) | A kind of searching method, device and equipment | |
CN110244860A (en) | A kind of input method, device and electronic equipment | |
CN110019885A (en) | A kind of expression data recommended method and device | |
CN114374663B (en) | Message processing method and message processing device | |
CN111381685B (en) | Sentence association method and sentence association device | |
WO2024183434A1 (en) | Text-based picture generation method and apparatus, model training method and apparatus, device, and storage medium | |
CN109901726B (en) | Candidate word generation method and device and candidate word generation device | |
CN110929122A (en) | Data processing method and device and data processing device | |
CN106776990B (en) | Information processing method and device and electronic equipment | |
CN107436896B (en) | Input recommendation method and device and electronic equipment | |
CN107784037B (en) | Information processing method and device, and device for information processing | |
CN109918624B (en) | Method and device for calculating similarity of webpage texts | |
CN112306251A (en) | Input method, input device and input device | |
CN107301188B (en) | Method for acquiring user interest and electronic equipment | |
CN114676308A (en) | Search term recommendation method and device, electronic equipment, storage medium and product | |
CN108108356A (en) | A kind of character translation method, apparatus and equipment |
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 |