WO2022135474A1 - Information recommendation method and apparatus, and electronic device - Google Patents

Information recommendation method and apparatus, and electronic device Download PDF

Info

Publication number
WO2022135474A1
WO2022135474A1 PCT/CN2021/140476 CN2021140476W WO2022135474A1 WO 2022135474 A1 WO2022135474 A1 WO 2022135474A1 CN 2021140476 W CN2021140476 W CN 2021140476W WO 2022135474 A1 WO2022135474 A1 WO 2022135474A1
Authority
WO
WIPO (PCT)
Prior art keywords
input
user
interface
keywords
thesaurus
Prior art date
Application number
PCT/CN2021/140476
Other languages
French (fr)
Chinese (zh)
Inventor
胡双威
Original Assignee
维沃移动通信有限公司
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 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2022135474A1 publication Critical patent/WO2022135474A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • G06F3/0236Character input methods using selection techniques to select from displayed items

Definitions

  • the present application belongs to the field of communication technologies, and in particular relates to an information recommendation method, device and electronic device.
  • the electronic device can recommend candidate words corresponding to the character string, and the user can select from the candidate words. target candidates.
  • the electronic device may read the candidate word corresponding to the input string from the thesaurus for recommendation.
  • the electronic device since a large number of words are usually stored in the thesaurus, every time the electronic device recommends candidate words for the user, it needs to traverse the large number of words stored in the whole thesaurus to determine the candidate words corresponding to the input string, resulting in It is less efficient to recommend candidate words for users.
  • the electronic device will recommend the multiple matching items as candidate words at this time. In this way, the accuracy of recommending candidate words for the user is low, thereby affecting the input efficiency of the user.
  • the purpose of the embodiments of the present application is to provide an information recommendation method, which can solve the problems of complicated steps and long time-consuming in the text input process.
  • an embodiment of the present application provides an information recommendation method, the method includes: receiving a first input from a user on a first interface; in response to the first input, based on the character string corresponding to the first input and the above The first interface matches candidate words from a thesaurus, and displays the above-mentioned candidate words; wherein, the above-mentioned thesaurus stores keywords and the mapping relationship between the keywords and the first interface.
  • an embodiment of the present application provides an information recommendation device, the device includes: the above device includes: a receiving module, a processing module and a display module, wherein: the above-mentioned receiving module is used for receiving the first user's first interface on the first interface. an input; the above-mentioned processing module, in response to the above-mentioned first input received by the above-mentioned receiving module, based on the character string corresponding to the above-mentioned first input and the above-mentioned first interface, matching candidate words from the thesaurus; the above-mentioned display module, used for Display the above-mentioned candidate words matched from the thesaurus by the above-mentioned processing module;
  • the thesaurus stores keywords and a mapping relationship between the keywords and the first interface.
  • embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the method according to the first aspect when executed.
  • an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented .
  • an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect the method described.
  • an embodiment of the present application provides a computer program product, where the program product is stored in a non-volatile storage medium, and the program product is executed by at least one processor to implement the method described in the first aspect.
  • the electronic device stores keywords and the mapping relationship between the keywords and the first interface in the thesaurus, so that when the user inputs a character string on the first interface, the user can input the character string based on the character string and the first interface. , and determine candidate words matching the character string and the first interface from the thesaurus. In this way, the electronic device can recommend candidate words that match the current input interface for the user, so that the user can recommend candidate words that are more in line with the user's input requirements on the current input interface, and improve the flexibility of recommending candidate words for the user. and accuracy.
  • FIG. 2 is one of the schematic structural diagrams of an information recommendation apparatus provided by an embodiment of the present application.
  • FIG 3 is one of the schematic diagrams of the hardware structure of an electronic device provided by an embodiment of the present application.
  • FIG. 4 is a second schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • first, second and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between “first”, “second”, etc.
  • the objects are usually of one type, and the number of objects is not limited.
  • the first object may be one or more than one.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the associated objects are in an "or” relationship.
  • the information recommendation method provided by the embodiment of the present application can be applied to the scenario of text input.
  • Embodiments of the present application provide an information recommendation method, apparatus, and electronic device, because users usually use various symbols to represent text content in input text content with complete semantics (eg, complete sentences or words). Pause and tone of voice. Therefore, when detecting that the content on the screen by the user includes the first symbol, the information recommendation device can perform text splitting on the text entered by the user based on the target character and the first symbol in the text entered by the user, thereby The target text containing the complete words that the user wants to input can be extracted from the text that the user has input, and the complete words contained in the target text can be stored in the thesaurus. So that when the user inputs the keyword again, the keyword can be recommended to the user as a candidate word.
  • complete semantics eg, complete sentences or words.
  • FIG. 1 shows a flowchart of a display method provided by an embodiment of the present application.
  • the information recommendation method provided by this embodiment of the present application may include the following steps 101 and 102:
  • Step 101 Receive a first input from a user on a first interface.
  • the above-mentioned first interface may include any one of the following: a conversation window interface, and a text input interface.
  • the above-mentioned first interface includes an information input area and an information display area.
  • the above-mentioned information input area is used for inputting character strings, for example, the above-mentioned information input area may be an input method interface.
  • the above-mentioned information display area is used to display text information displayed on the screen by the user.
  • the above-mentioned first input may be an input of a character string entered by the user in the above-mentioned information input area.
  • Step 102 In response to the above-mentioned first input, based on the character string corresponding to the first input and the first interface, match candidate words from the thesaurus, and display the above-mentioned candidate words.
  • the above-mentioned thesaurus stores keywords and a mapping relationship between the keywords and the first interface. It can be understood that a plurality of mapping relationships will be stored in the above thesaurus, one mapping relationship is the mapping relationship between at least one keyword and one interface, and/or one mapping relationship may be between at least one keyword and one interface type. Mapping relations.
  • the information recommendation apparatus may display candidate words in the candidate word display area.
  • the above-mentioned candidate word display area may be an area on an input method interface, or the above-mentioned candidate word display area may be a floating window.
  • the information recommendation device may search for keywords that have a mapping relationship with the first interface (that is, keywords associated with the first interface) from the thesaurus ), and use the above keywords as alternative keywords. Then, based on the character string input by the user, the information recommendation apparatus may, from the above keywords (ie, the above candidate keywords) that have a mapping relationship with the first interface, search for keywords that match the character string input by the user as candidate words .
  • the thesaurus stores the keyword A, the keyword B, the keyword C and the keyword D that have a mapping relationship with the first interface
  • the keyword matching the character string 1 can be determined from the above-mentioned four keywords that have a mapping relationship with the conversation interface 1, and the keyword can be recommended to the user as a candidate word.
  • the process for the information recommendation apparatus to determine, from the keywords associated with the first interface, a keyword that matches the character string input by the user includes at least the following three ways:
  • Method 1 Memory gives priority to words. That is, if the thesaurus includes the same character string as the first character string entered by the user on the first interface (that is, the character string currently entered by the user through the physical keyboard or the virtual keyboard), the information recommendation device can display the candidate words in the candidate word display area. The text corresponding to the character string (that is, the keyword stored in association with the thesaurus and the character string corresponding to the keyword) is displayed in the front position.
  • the information recommendation device obtains the text "Korean Fei” in the thesaurus, And "Korean Fei” is displayed at the front of the candidate word display area, that is, "Korean Fei" is recommended to the user as the first candidate word.
  • Method 2 Prefix combined with memorized words. That is, when the user types a character string on the first interface, the information recommending device detects that there is a character string in the thesaurus that includes the first character string currently typed by the user, and the information recommending device can display The previous position displays the text corresponding to the string.
  • the information recommendation device obtains the text "Korean Fei” in the thesaurus, And "Korean Fei” is displayed at the front of the candidate word display area, that is, "Korean Fei" is recommended to the user as the first candidate word.
  • Method 3 Word prefix association combined with memorizing words. That is, the user types a character string on the first interface, selects a candidate word corresponding to the character string on the screen, and after the candidate word is displayed on the input interface, there is a word in the thesaurus including the text input interface that the user has screened this time.
  • the information recommendation device obtains the character in the thesaurus, and displays the characters in the character except the first character in the front position of the candidate word display area.
  • the user types in “han” and selects “Han” on the upper screen.
  • the information recommendation device detects that there is “Han Yufei” including the character “Han” in the thesaurus, the information recommendation device can obtain the “Han” in the thesaurus.
  • the text “Korean Philip”, and “Yu fei” is displayed at the front of the candidate word display area.
  • the electronic device stores the keyword and the mapping relationship between the keyword and the first interface in the thesaurus, so that when the user inputs a character string on the first interface, the user can input the character string based on the character string.
  • candidate words matching the character string and the first interface are determined from the thesaurus.
  • the electronic device can recommend candidate words that match the current input interface for the user, so that the user can recommend candidate words that are more in line with the user's input requirements on the current input interface, and improve the flexibility of recommending candidate words for the user. and accuracy.
  • the information recommendation device may extract keywords from the target text displayed on the first interface, and save the above keywords and the mapping relationship between the above keywords and the first interface in a in the thesaurus.
  • the information recommendation method provided in this embodiment of the present application further includes the following steps A1 to A3:
  • Step A1 Obtain the target text when it is detected that the content input on the first interface includes the first symbol.
  • Step A2 Extract the keywords in the above target text.
  • Step A3 correspondingly store the above keywords and the above mapping relationships in the thesaurus.
  • the content input on the above-mentioned first interface is the text displayed on the screen by the user.
  • the above-mentioned target text includes: a character between the target character input by the user and the first symbol; the above-mentioned target character is: the first character input by the user, or, the above-mentioned first symbol The previous second symbol displayed in the first interface.
  • the target text is the text between the first character input by the user and the first symbol currently input. For example, if the text content input by the user is "Tomorrow is Lan Yufei's birthday.”, the target text is the text between the word “Ming" and ".”.
  • the target text is the text between the second symbol and the first symbol.
  • the text content entered by the user is "Tomorrow the weather is fine, we are going to help Lanyufei move.”
  • the target text is the text between ",” and ".”.
  • the information recommendation apparatus when the information recommendation apparatus detects the first character input by the user and the above-mentioned second character from the input text at the same time, the information recommendation apparatus will determine the second symbol as the target character.
  • the information recommendation apparatus may perform real-time or periodic detection (eg, every 5s) on the content input by the user (that is, the content on the screen this time). check once) to determine whether it contains the first symbol.
  • the information recommendation apparatus may determine the first text from the text that the user has entered when it detects that the content on the screen by the user this time includes the first symbol, and then, in the first A target character is detected in the text, where the target character is a character in the first text that satisfies a predetermined condition.
  • the above-mentioned first text includes: all texts input by the user, text input by the user within a predetermined time before inputting the first symbol, text composed of a predetermined number of characters input by the user before inputting the first symbol (for example, the user 30 characters entered before the first symbol).
  • the information recommendation apparatus may detect in real time whether the text input by the user contains the first character. Therefore, when the user currently inputs (on the screen) a symbol, the information recommendation device will acquire the target text once, so as to ensure that all the content input by the user can be detected.
  • both the above-mentioned first symbol and the above-mentioned second symbol belong to target symbols, wherein the above-mentioned target symbols include any one of the following: punctuation marks and separators.
  • the delimiter includes: newline character, space character.
  • the user uses various symbols to represent the pauses in the text content and the tone to be expressed.
  • the text content between the two punctuation marks before and after is usually a sentence or a text containing complete words (such as a person's name or a place name).
  • complete words such as a person's name or a place name.
  • different symbols express different meanings.
  • Example 1 For punctuation, some punctuation marks (such as “,” “, “”.”) are usually used to express pauses in text content, and some punctuation marks (such as "! "?") are usually used by users to express text content The tone that the corresponding user wants to express.
  • Example 2 For delimiters, delimiters are often used to separate and split text content. For example, when it is detected that the user is currently inputting a space character, it means that the user has input a complete sentence or a word. The target text to ensure the integrity of the obtained target text.
  • the information recommending apparatus regards the text between "," and ".” as the target text, thereby obtaining a sentence.
  • the information recommendation device may perform word segmentation or semantic recognition on the target text, extract keywords in the target text, and obtain the target text. at least one keyword in .
  • the above keywords may be phrases or phrases containing specific semantics in the target text, and the above keywords include at least one of the following: a person's name, a place name, an institution name, and a proper noun.
  • the information recommendation apparatus may extract one or more keywords from the target text, which is not limited in this embodiment of the present application.
  • the information recommendation apparatus can extract keywords with complete semantics from the target text input by the user on the first interface. Since the keyword is extracted from the first interface, it is more in line with the user's input intention on the first interface.
  • the information recommendation apparatus may establish a mapping relationship between the above-mentioned first interface and keywords.
  • the information recommendation apparatus may automatically establish a mapping relationship between the above-mentioned first interface and keywords, or may be triggered by a user to establish a mapping relationship between the above-mentioned first interface and keywords.
  • the information recommending device can store the above-mentioned 4 keywords in the thesaurus , and generate the mapping relationship between each of the above four keywords and the conversation interface, obtain four mapping relationships, and store the four mapping relationships in the thesaurus respectively.
  • the information recommendation device can save the mapping relationship between the keywords extracted from the target text of the first interface and the first interface in the thesaurus.
  • the information recommendation device can The mapping relationship between the first interface and the keywords recommends candidate words for the user that conform to the user's input habit on the first interface.
  • the keywords are stored in the thesaurus, including the following step B1:
  • Step B1 Associate the keywords with the character strings corresponding to the keywords and store them in the thesaurus.
  • the information recommendation device may obtain the character string (eg, pinyin) corresponding to the keyword, and then, the corresponding relationship between the character string and the character string corresponding to the keyword. stored in the thesaurus.
  • the information recommendation apparatus can find the keyword corresponding to the character string in the thesaurus based on the corresponding relationship, so as to display the keyword as a candidate word to the user, thereby improving the recommendation efficiency of the candidate word.
  • the character string corresponding to the above keyword may include at least one of the following: the pinyin of the keyword, the pinyin that is more similar to the pinyin of the keyword (for example, if the pinyin of the keyword is "lanyufei", it is the same as the key word.
  • the pinyin of the word close to the pinyin can be "hanyufei” or lanyuwei, etc.)
  • the foreign language translation of the keyword for example, the keyword is "Blue Yufei"
  • the English translation of the keyword can be obtained and saved, for example, "Lanyufei" .
  • step A2 includes the following steps C1 to C3:
  • Step C1 Perform word segmentation on the target text to obtain N candidate word segmentations.
  • Step C2 Receive a second input from the user for the target candidate word segmentation among the N candidate word segmentations.
  • Step C3 In response to the second input, use the target candidate word segmentation as a keyword.
  • the above-mentioned first input includes: any feasible input, such as touch input, gesture input, and voice input.
  • the information recommendation apparatus may perform word segmentation operations on the target text by using word segmentation methods such as character matching, comprehension method, or statistical method, to obtain N candidate word segmentations, and based on the user's input operation on the target candidate word segmentation among the N candidate word segmentations,
  • the target candidate word segmentation is determined as a keyword.
  • the information recommendation device can display the above N candidate word segmentations in the keyword display area, and the user can select (eg, check) the required candidate word segmentation in the keyword selection area, and then the information recommendation device can select the candidate word segmentation selected by the user. Participles are identified as keywords.
  • the information recommendation device can perform a syntactic understanding analysis on the target text, and obtain candidate word segmentations such as "Korean Fei", "A restaurant” and “hot pot”, and display them in the keywords. If these candidate word segments are displayed in the area, the user can click or tick the candidate word segment "Korean Philip" among them to determine the candidate word segment as a keyword. In this way, the information recommendation apparatus can determine the keywords based on the user's selection operation on the candidate word segmentation, so as to obtain the keywords required by the user.
  • the word storage device may perform word segmentation operations on the target text by using word segmentation methods such as character matching, comprehension, or statistical methods, obtain word units in the target text, and then establish a machine learning model based on a machine learning algorithm, and use the word units in the target text.
  • word segmentation methods such as character matching, comprehension, or statistical methods
  • the word features and sentence features of the word unit are extracted, and the keywords in the target text are extracted.
  • the text storage device can acquire the word feature of the word unit, the sentence feature of the word unit in the corresponding target text, and the word feature of the word unit refers to the part-of-speech feature and the named entity feature of the word unit.
  • the part-of-speech feature of the word unit above refers to the part-of-speech of the word unit, such as a noun or a verb. It can be understood that, under normal circumstances, word units of certain part-of-speech features are more likely to become keywords, for example, word units of noun features.
  • the named entity feature of the word unit above refers to whether the word unit is a named entity. Generally, a word unit that is generally a named entity is more likely to become a keyword.
  • the sentence feature of the above-mentioned word unit in the corresponding target text refers to the feature of the word unit in the target text, for example, the part-of-speech feature of the front compound word, the part-of-speech feature of the rear compound word, and the sentence position feature of the word unit in the target text. and dependencies, etc.
  • the information recommendation device can perform a syntactic analysis on the target text, and obtain the word units "Korean Fei", “in”, “restaurant A”, “eat” and “hot pot” , and according to part-of-speech analysis and named entity recognition, the word features of these word units (for example, "Korean Fei” is a person's name, "A restaurant” is a place name, and "eat” is a verb) and sentence features (for example, "hot pot” is Noun object, "Korean Fei” as the subject, "Korean Fei” and “eat” as the subject-predicate relationship), and then based on the established machine learning model, using the word features and sentence features of the word unit to extract keywords in the target text , ie, "Korean Fei” and "A Restaurant".
  • the text storage device can automatically and intelligently extract keywords in the target text, which improve
  • the display method provided by the embodiment of the present application further includes the following steps D1 and D2:
  • Step D1 Display keywords.
  • Step D2 Receive the third input of the keyword by the user.
  • step D3 storing the above-mentioned keywords in the thesaurus includes the following steps D3:
  • Step D3 In response to the above-mentioned second input, the keywords are stored in the thesaurus.
  • the information recommending apparatus may display the at least one keyword in a predetermined display manner.
  • the above predetermined display manner includes at least one of the following: displaying at least one keyword above the target text, highlighting or highlighting at least one keyword in the target text, and displaying the at least one keyword in the keyword display interface.
  • the information recommendation apparatus may, after displaying the above at least one keyword, the user may check or click on any keyword in the above at least one keyword (ie, the third input), and the above at least one keyword may be selected.
  • the user can store keywords in a targeted manner according to requirements, which improves the flexibility of storing keywords, further ensures that the keywords stored in the thesaurus can be effectively used, and at the same time saves the storage space of the thesaurus.
  • the information recommendation device can perform text splitting on the text entered by the user based on the target character and the first symbol in the text entered by the user, thereby
  • the target text containing the complete words that the user wants to input can be extracted from the text that the user has input, and the complete words contained in the target text can be stored in the thesaurus. So that when the user inputs the keyword again, the keyword can be recommended to the user as a candidate word.
  • the execution subject may be an information recommendation device, or a control module in the information recommendation device for executing the information recommendation method.
  • the information recommending device provided by the embodiment of the present application is described by taking the information recommending device executing the information recommending method as an example.
  • the information recommendation device includes: a receiving module 401 , a processing module 402 and a display module 403 , wherein: the above-mentioned receiving module 401 is used to receive the user's first interface
  • the above-mentioned processing module 402 in response to the above-mentioned first input received by the above-mentioned receiving module 401, based on the character string corresponding to the above-mentioned first input and the above-mentioned first interface, matching candidate words from the vocabulary; the above-mentioned
  • the display module 403 is configured to display the candidate words matched from the thesaurus by the processing module 402; wherein the thesaurus stores keywords and the mapping relationship between the keywords and the first interface.
  • the electronic device stores the keyword and the mapping relationship between the keyword and the first interface in the thesaurus, so that when the user inputs a character string on the first interface, the user can input the character string based on the character string.
  • candidate words matching the character string and the first interface are determined from the thesaurus.
  • the electronic device can recommend candidate words that match the current input interface for the user, so that the user can recommend candidate words that are more in line with the user's input requirements on the current input interface, and improve the flexibility of recommending candidate words for the user. and accuracy.
  • the above-mentioned apparatus further includes: an acquisition module 404 and a storage module 405, wherein: the above-mentioned acquisition module 404 is configured to detect that the content input on the above-mentioned first interface includes the first symbol , obtain the target text; the above target text includes: the character between the target character input by the user and the above-mentioned first symbol; the above-mentioned target character is: the first character input by the user, or, the previous one of the above-mentioned first symbol is in the above-mentioned first symbol The second symbol displayed in an interface; the above-mentioned processing module 402 is also used to extract the keywords in the above-mentioned target text obtained by the above-mentioned acquisition module 404; the above-mentioned storage module 405 is used to extract the above-mentioned keywords and The above-mentioned mapping relationship is correspondingly stored in the above-mentioned thesaurus.
  • the above-mentioned acquisition module 404 is configured to
  • both the above-mentioned first symbol and the above-mentioned second symbol belong to target symbols; wherein, the above-mentioned target symbols include any one of the following: punctuation marks and separators.
  • the delimiter includes: newline character, space character.
  • the above-mentioned storage module 405 is specifically configured to associate and store the above-mentioned keywords and the character strings corresponding to the above-mentioned keywords in the thesaurus.
  • the above-mentioned processing module 402 is specifically configured to perform word segmentation on the above-mentioned target text to obtain N candidate word segmentations; the above-mentioned receiving module 401 is further configured to receive the above-mentioned information obtained by the above-mentioned processing module 402 from the user.
  • the second input of the target candidate word segmentation in the N candidate word segmentations; the above-mentioned processing module 402 is specifically configured to use the above-mentioned target candidate word segmentation as a keyword in response to the second input received by the above-mentioned receiving module 401 .
  • the above-mentioned display module 403 is further configured to display the above-mentioned keywords; the above-mentioned receiving module 401 is further configured to receive a third input from the user on the keywords displayed by the above-mentioned display module 403; the above-mentioned storage
  • the module 405 is specifically configured to store the above-mentioned keywords in the thesaurus in response to the above-mentioned third input received by the above-mentioned receiving module 401 .
  • the information recommendation device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal.
  • the apparatus may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant).
  • UMPC ultra-mobile personal computer
  • netbook or a personal digital assistant
  • non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
  • Network Attached Storage NAS
  • personal computer personal computer, PC
  • television television
  • teller machine or self-service machine etc.
  • the information recommendation device in the embodiment of the present application may be a device with an operating system.
  • the operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
  • the information recommendation apparatus provided in this embodiment of the present application can implement each process implemented by the method embodiment in FIG. 1 , and to avoid repetition, details are not described here.
  • an embodiment of the present application further provides an electronic device 500, including a processor 501, a memory 502, a program or instruction stored in the memory 502 and executable on the processor 501,
  • an electronic device 500 including a processor 501, a memory 502, a program or instruction stored in the memory 502 and executable on the processor 501,
  • the program or instruction is executed by the processor 501, each process of the above-mentioned information recommendation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.
  • the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 4 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
  • the electronic device 100 includes but is not limited to: a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110, etc. part.
  • the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, so as to manage charging, discharging, and power management through the power management system. consumption management and other functions.
  • a power source such as a battery
  • the structure of the electronic device shown in FIG. 4 does not constitute a limitation to the electronic device.
  • the electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .
  • the above-mentioned user input unit 107 is used for receiving the first input of the user on the first interface; the above-mentioned processor 110 is used for responding to the above-mentioned first input received by the above-mentioned user input unit 107, based on the corresponding first input
  • the character string and the above-mentioned first interface match candidate words from the thesaurus; the above-mentioned display unit 106 is used to display the above-mentioned candidate words matched by the above-mentioned processor 110 from the thesaurus; wherein, the above-mentioned thesaurus stores keywords and the above-mentioned key words The mapping relationship between the word and the above-mentioned first interface.
  • the electronic device stores the keyword and the mapping relationship between the keyword and the first interface in the thesaurus, so that when the user inputs a character string on the first interface, the user can In the first interface, candidate words matching the character string and the first interface are determined from the thesaurus. In this way, the electronic device can recommend candidate words that match the current input interface for the user, so that the user can recommend candidate words that are more in line with the user's input requirements on the current input interface, and improve the flexibility of recommending candidate words for the user. and accuracy.
  • the above-mentioned processor 110 is configured to obtain the target text when it is detected that the content input on the above-mentioned first interface includes the first symbol; the above-mentioned target text includes: the target entered by the user The character between the character and the above-mentioned first symbol; the above-mentioned target character is: the first character input by the user, or the second symbol displayed in the above-mentioned first interface before the above-mentioned first symbol; the above-mentioned processor 110, also is used to extract the keywords in the target text; the memory 109 is used to store the keywords extracted by the processor 110 and the mapping relationship in the thesaurus correspondingly.
  • both the above-mentioned first symbol and the above-mentioned second symbol belong to target symbols; wherein, the above-mentioned target symbols include any one of the following: punctuation marks and separators.
  • the delimiter includes: newline character, space character.
  • the above-mentioned memory 109 is specifically configured to associate and store the above-mentioned keywords and the character strings corresponding to the above-mentioned keywords in the thesaurus.
  • the above-mentioned processor 110 is specifically configured to perform word segmentation on the above-mentioned target text to obtain N candidate word segmentations; the above-mentioned user input unit 107 is further configured to receive the user's input on the above-mentioned processor 110 obtained by the above-mentioned processor 110.
  • the above-mentioned display unit 106 is further configured to display the above-mentioned keywords; the above-mentioned user input unit 107 is also used to receive a third user input on the keywords displayed by the above-mentioned display unit 106; the above-mentioned
  • the memory 109 is specifically configured to store the above-mentioned keywords in the thesaurus in response to the above-mentioned third input received by the above-mentioned user input unit 107 .
  • the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042. Such as camera) to obtain still pictures or video image data for processing.
  • the display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 107 includes a touch panel 1071 and other input devices 1072 .
  • the touch panel 1071 is also called a touch screen.
  • the touch panel 1071 may include two parts, a touch detection device and a touch controller.
  • Other input devices 1072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.
  • Memory 109 may be used to store software programs as well as various data including, but not limited to, application programs and operating systems.
  • the processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the like, and the modem processor mainly processes wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 110 .
  • the embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium.
  • a program or an instruction is stored on the readable storage medium.
  • the processor is the processor in the electronic device described in the foregoing embodiments.
  • the readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
  • An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the above information recommendation method embodiment.
  • the chip includes a processor and a communication interface
  • the communication interface is coupled to the processor
  • the processor is configured to run a program or an instruction to implement the above information recommendation method embodiment.
  • An embodiment of the present application provides a computer program product, where the program product is stored in a non-volatile storage medium, and the program product is executed by at least one processor to implement the method according to the first aspect.
  • the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)

Abstract

Disclosed are an information recommendation method and apparatus, and an electronic device. The method comprises: receiving a first input of a user on a first interface; and in response to the first input, matching a candidate word from a word bank on the basis of a character string corresponding to the first input and the first interface, and displaying the candidate word, wherein the word bank stores a keyword and a mapping relationship between the keyword and the first interface.

Description

信息推荐方法、装置及电子设备Information recommendation method, device and electronic device
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请主张在2020年12月25日在中国提交的中国专利申请号No.202011565318.6的优先权,其全部内容通过引用包含于此。This application claims priority to Chinese Patent Application No. 202011565318.6 filed in China on Dec. 25, 2020, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请属于通信技术领域,具体涉及一种信息推荐方法、装置及电子设备。The present application belongs to the field of communication technologies, and in particular relates to an information recommendation method, device and electronic device.
背景技术Background technique
随着电子技术的发展,用户在电子设备上输入文字的场景越来越多,目前,电子设备可以在用户输入字符串时,推荐该字符串对应的候选词,由用户从该候选词中选择目标候选词。With the development of electronic technology, there are more and more scenarios where users input text on electronic devices. At present, when a user inputs a character string, the electronic device can recommend candidate words corresponding to the character string, and the user can select from the candidate words. target candidates.
在相关技术中,电子设备在向用户推荐候选词时,可以从词库中读取输入的字符串对应的候选词进行推荐。然而,由于词库中通常存储了大量的词汇,电子设备每次为用户推荐候选词时,需要对整个词库中保存的大量词汇进行遍历,以确定与输入的字符串对应的候选词,导致为用户推荐候选词的效率较低。并且,针对用户输入的同一字符串,词库中可能存在多个匹配项,电子设备此时会将上述多个匹配项作为候选词进行推荐。如此,导致为用户推荐候选词的准确性较低,从而影响用户的输入效率。In the related art, when recommending a candidate word to the user, the electronic device may read the candidate word corresponding to the input string from the thesaurus for recommendation. However, since a large number of words are usually stored in the thesaurus, every time the electronic device recommends candidate words for the user, it needs to traverse the large number of words stored in the whole thesaurus to determine the candidate words corresponding to the input string, resulting in It is less efficient to recommend candidate words for users. In addition, for the same character string input by the user, there may be multiple matching items in the thesaurus, and the electronic device will recommend the multiple matching items as candidate words at this time. In this way, the accuracy of recommending candidate words for the user is low, thereby affecting the input efficiency of the user.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的是提供一种信息推荐方法,能够解决文字输入过程步骤繁琐、耗时较长的问题。The purpose of the embodiments of the present application is to provide an information recommendation method, which can solve the problems of complicated steps and long time-consuming in the text input process.
为了解决上述技术问题,本申请是这样实现的:In order to solve the above technical problems, this application is implemented as follows:
第一方面,本申请实施例提供了一种信息推荐方法,该方法包括:接收用户在第一界面上的第一输入;响应于上述第一输入,基于上述第一输入对应的字符串与上述第一界面,从词库中匹配候选词,并显示上述候选词;其中,上述词库中存储关键词 以及所述关键词与所述第一界面间的映射关系。In a first aspect, an embodiment of the present application provides an information recommendation method, the method includes: receiving a first input from a user on a first interface; in response to the first input, based on the character string corresponding to the first input and the above The first interface matches candidate words from a thesaurus, and displays the above-mentioned candidate words; wherein, the above-mentioned thesaurus stores keywords and the mapping relationship between the keywords and the first interface.
第二方面,本申请实施例提供了一种信息推荐装置,该装置包括:上述装置包括:接收模块、处理模块和显示模块,其中:上述接收模块,用于接收用户在第一界面上的第一输入;上述处理模块,用于响应于上述接收模块接收的上述第一输入,基于上述第一输入对应的字符串与上述第一界面,从词库中匹配候选词;上述显示模块,用于显示上述处理模块从词库中匹配的上述候选词;In a second aspect, an embodiment of the present application provides an information recommendation device, the device includes: the above device includes: a receiving module, a processing module and a display module, wherein: the above-mentioned receiving module is used for receiving the first user's first interface on the first interface. an input; the above-mentioned processing module, in response to the above-mentioned first input received by the above-mentioned receiving module, based on the character string corresponding to the above-mentioned first input and the above-mentioned first interface, matching candidate words from the thesaurus; the above-mentioned display module, used for Display the above-mentioned candidate words matched from the thesaurus by the above-mentioned processing module;
其中,上述词库中存储关键词以及上述关键词与上述第一界面间的映射关系。The thesaurus stores keywords and a mapping relationship between the keywords and the first interface.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the method according to the first aspect when executed.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented .
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect the method described.
第六方面,本申请实施例提供了一种计算机程序产品,该程序产品被存储在非易失的存储介质中,该程序产品被至少一个处理器执行以实现如第一方面所述的方法。In a sixth aspect, an embodiment of the present application provides a computer program product, where the program product is stored in a non-volatile storage medium, and the program product is executed by at least one processor to implement the method described in the first aspect.
在本申请实施例中,电子设备通过在词库中存储关键词以及该关键词与第一界面的映射关系,使得用户在第一界面输入字符串时,可以基于该字符串和该第一界面,从词库中确定出与该字符串和第一界面匹配的候选词。如此,电子设备可以为用户推荐与当前的输入界面相匹配的候选词,从而可以为用户推荐更加符合用户在当前的输入界面上的输入需求的候选词,提高了为用户推荐候选词的灵活性和准确性。In the embodiment of the present application, the electronic device stores keywords and the mapping relationship between the keywords and the first interface in the thesaurus, so that when the user inputs a character string on the first interface, the user can input the character string based on the character string and the first interface. , and determine candidate words matching the character string and the first interface from the thesaurus. In this way, the electronic device can recommend candidate words that match the current input interface for the user, so that the user can recommend candidate words that are more in line with the user's input requirements on the current input interface, and improve the flexibility of recommending candidate words for the user. and accuracy.
附图说明Description of drawings
图1是本申请实施例提供的信息推荐方法的流程图;1 is a flowchart of an information recommendation method provided by an embodiment of the present application;
图2是本申请实施例提供的一种信息推荐装置的结构示意图之一;FIG. 2 is one of the schematic structural diagrams of an information recommendation apparatus provided by an embodiment of the present application;
图3是本申请实施例提供的一种电子设备的硬件结构示意图之一;3 is one of the schematic diagrams of the hardware structure of an electronic device provided by an embodiment of the present application;
图4是本申请实施例提供的一种电子设备的硬件结构示意图之二。FIG. 4 is a second schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between "first", "second", etc. The objects are usually of one type, and the number of objects is not limited. For example, the first object may be one or more than one. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the associated objects are in an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的信息推荐方法进行详细地说明。The information recommendation method provided by the embodiments of the present application will be described in detail below through specific embodiments and application scenarios with reference to the accompanying drawings.
本申请实施例提供的信息推荐方法可以应用于文字输入的场景中。The information recommendation method provided by the embodiment of the present application can be applied to the scenario of text input.
本申请实施例提供了一种信息推荐方法、装置及电子设备,由于用户通常会在输入的具备完整语义的文本内容(如,完整的语句或者词语)中,使用各种符号来表示文本内容的停顿和所要表达的语气。因此,信息推荐装置在检测到用户本次上屏的内容包括第一符号的情况下,可以基于用户已输入的文本中的目标字符和第一符号对用户已输入的文本进行文本拆分,从而可以从用户已输入的文本中,提取出包含用户想要输入的完整词语的目标文本,并将目标文本中包含的完整词语存储在词库中。以便于在用户再次输入该关键词的情况下,可以将该关键词作为候选词推荐给用户。Embodiments of the present application provide an information recommendation method, apparatus, and electronic device, because users usually use various symbols to represent text content in input text content with complete semantics (eg, complete sentences or words). Pause and tone of voice. Therefore, when detecting that the content on the screen by the user includes the first symbol, the information recommendation device can perform text splitting on the text entered by the user based on the target character and the first symbol in the text entered by the user, thereby The target text containing the complete words that the user wants to input can be extracted from the text that the user has input, and the complete words contained in the target text can be stored in the thesaurus. So that when the user inputs the keyword again, the keyword can be recommended to the user as a candidate word.
图1示出了本申请实施例提供的显示方法的流程图。FIG. 1 shows a flowchart of a display method provided by an embodiment of the present application.
如图1所示,本申请实施例提供的信息推荐方法可以包括如下步骤101和步骤102:As shown in FIG. 1 , the information recommendation method provided by this embodiment of the present application may include the following steps 101 and 102:
步骤101:接收用户在第一界面上的第一输入。Step 101: Receive a first input from a user on a first interface.
在本申请实施例中,上述第一界面可以包括一下任意一项:会话窗口界面,文字输入界面。In this embodiment of the present application, the above-mentioned first interface may include any one of the following: a conversation window interface, and a text input interface.
可选地,在本申请实施例中,上述第一界面包括信息输入区域和信息显示区域。示例 性的,上述信息输入区域用于输入字符串,例如,上述信息输入区域可以为输入法界面。示例性的,上述信息显示区域用于显示用户上屏的文本信息。Optionally, in this embodiment of the present application, the above-mentioned first interface includes an information input area and an information display area. Exemplarily, the above-mentioned information input area is used for inputting character strings, for example, the above-mentioned information input area may be an input method interface. Exemplarily, the above-mentioned information display area is used to display text information displayed on the screen by the user.
示例性的,上述第一输入可以为用户在上述信息输入区域输入字符串的输入。Exemplarily, the above-mentioned first input may be an input of a character string entered by the user in the above-mentioned information input area.
步骤102:响应于上述第一输入,基于第一输入对应的字符串与第一界面,从词库中匹配候选词,并显示上述候选词。Step 102 : In response to the above-mentioned first input, based on the character string corresponding to the first input and the first interface, match candidate words from the thesaurus, and display the above-mentioned candidate words.
其中,上述词库中存储关键词以及关键词与第一界面间的映射关系。可以理解,上述词库中会存储多个映射关系,一个映射关系为至少一个关键词与一个界面间的映射关系,和/或,一个映射关系可以为至少一个关键词与一个界面类型的间的映射关系。Wherein, the above-mentioned thesaurus stores keywords and a mapping relationship between the keywords and the first interface. It can be understood that a plurality of mapping relationships will be stored in the above thesaurus, one mapping relationship is the mapping relationship between at least one keyword and one interface, and/or one mapping relationship may be between at least one keyword and one interface type. Mapping relations.
在本申请实施例中,信息推荐装置可以在候选词显示区域显示候选词。In this embodiment of the present application, the information recommendation apparatus may display candidate words in the candidate word display area.
示例性的,上述候选词显示区域可以为输入法界面上的区域,或者,上述候选词显示区域为悬浮窗。Exemplarily, the above-mentioned candidate word display area may be an area on an input method interface, or the above-mentioned candidate word display area may be a floating window.
在本申请实施例中,用户在第一界面上输入字符串的情况下,信息推荐装置可以从词库中查找与第一界面存在映射关系的关键词(即,与第一界面关联的关键词),并将上述关键词作为备选关键词。然后,信息推荐装置可以基于用户输入的字符串,从上述与第一界面存在映射关系的关键词(即,上述备选关键词)中,查找与用户输入的字符串匹配的关键词作为候选词。In this embodiment of the present application, when the user inputs a character string on the first interface, the information recommendation device may search for keywords that have a mapping relationship with the first interface (that is, keywords associated with the first interface) from the thesaurus ), and use the above keywords as alternative keywords. Then, based on the character string input by the user, the information recommendation apparatus may, from the above keywords (ie, the above candidate keywords) that have a mapping relationship with the first interface, search for keywords that match the character string input by the user as candidate words .
举例说明,以上述第一界面为会话界面1为例,假如词库中保存了与第一界面存在映射关系的关键词A,关键词B,关键词C和关键词D,在用户在会话界面1中输入字符串1的情况下,可以从与会话界面1存在映射关系的上述4个关键词中,确定与字符串1匹配的关键词,并将该关键词作为候选词推荐给用户。For example, taking the above-mentioned first interface as the conversation interface 1 as an example, if the thesaurus stores the keyword A, the keyword B, the keyword C and the keyword D that have a mapping relationship with the first interface, the When the character string 1 is input in 1, the keyword matching the character string 1 can be determined from the above-mentioned four keywords that have a mapping relationship with the conversation interface 1, and the keyword can be recommended to the user as a candidate word.
可选地,在本申请实施例中,信息推荐装置从与第一界面关联的关键词中确定与用户输入的字符串相匹配的关键词的过程,至少包括如下三种方式:Optionally, in this embodiment of the present application, the process for the information recommendation apparatus to determine, from the keywords associated with the first interface, a keyword that matches the character string input by the user includes at least the following three ways:
方式一:记忆优先出词。即,词库中包括与用户在第一界面上键入的第一字符串(即,用户当前通过实体键盘或者虚拟键盘键入的字符串)相同的字符串,则信息推荐装置可以在候选词显示区域靠前的位置显示该字符串对应的文本(即,词库关联保存的关键词与关键词对应的字符串)。Method 1: Memory gives priority to words. That is, if the thesaurus includes the same character string as the first character string entered by the user on the first interface (that is, the character string currently entered by the user through the physical keyboard or the virtual keyboard), the information recommendation device can display the candidate words in the candidate word display area. The text corresponding to the character string (that is, the keyword stored in association with the thesaurus and the character string corresponding to the keyword) is displayed in the front position.
例如,用户在第一界面上键入的字符串为“hanyufei”,并且词库中关联存储有“韩 语菲”和“hanyufei”,则信息推荐装置获取词库中的“韩语菲”这一文本,并在候选词显示区域靠前的位置显示“韩语菲”,即,将“韩语菲”作为第一个候选词推荐给用户。For example, if the character string entered by the user on the first interface is "hanyufei", and "Korean Fei" and "hanyufei" are stored in the thesaurus, the information recommendation device obtains the text "Korean Fei" in the thesaurus, And "Korean Fei" is displayed at the front of the candidate word display area, that is, "Korean Fei" is recommended to the user as the first candidate word.
方式二:前缀结合记忆出词。即,在用户在第一界面上键入字符串的情况下,信息推荐装置检测到词库中存在与包括用户当前键入的第一字符串的字符串,则信息推荐装置可以在候选词显示区域靠前的位置显示该字符串对应的文本。Method 2: Prefix combined with memorized words. That is, when the user types a character string on the first interface, the information recommending device detects that there is a character string in the thesaurus that includes the first character string currently typed by the user, and the information recommending device can display The previous position displays the text corresponding to the string.
例如,用户在第一界面上键入的字符串为“hanyu”,并且词库中关联存储有“韩语菲”和“hanyufei”,则信息推荐装置获取词库中的“韩语菲”这一文本,并在候选词显示区域靠前的位置显示“韩语菲”,即,将“韩语菲”作为第一个候选词推荐给用户。For example, if the character string entered by the user on the first interface is "hanyu", and "Hanyufei" and "hanyufei" are associated and stored in the thesaurus, the information recommendation device obtains the text "Korean Fei" in the thesaurus, And "Korean Fei" is displayed at the front of the candidate word display area, that is, "Korean Fei" is recommended to the user as the first candidate word.
方式三:词前缀联想结合记忆出词。即,用户在第一界面上键入字符串,并选择该字符串上屏对应的候选词,将该候选词上屏至本输入界面后,词库中存在包括用户本次上屏至文本输入界面的第一字符的字符,则信息推荐装置获取词库中的该字符,并将该字符中除第一字符之外的字符显示在候选词显示区域靠前的位置。Method 3: Word prefix association combined with memorizing words. That is, the user types a character string on the first interface, selects a candidate word corresponding to the character string on the screen, and after the candidate word is displayed on the input interface, there is a word in the thesaurus including the text input interface that the user has screened this time. The information recommendation device obtains the character in the thesaurus, and displays the characters in the character except the first character in the front position of the candidate word display area.
例如,用户键入“han”,并选择上屏“韩”,当信息推荐装置检测到词库中存在包括“韩”这一字符的“韩语菲”时,则信息推荐装置可以获取词库中“韩语菲”这一文本,并在候选词显示区域靠前的位置显示“语菲”。For example, the user types in "han" and selects "Han" on the upper screen. When the information recommendation device detects that there is "Han Yufei" including the character "Han" in the thesaurus, the information recommendation device can obtain the "Han" in the thesaurus. The text "Korean Philip", and "Yu fei" is displayed at the front of the candidate word display area.
在本申请是实力提供的信息推荐方法中,电子设备通过在词库中存储关键词以及该关键词与第一界面的映射关系,使得用户在第一界面输入字符串时,可以基于该字符串和该第一界面,从词库中确定出与该字符串和第一界面匹配的候选词。如此,电子设备可以为用户推荐与当前的输入界面相匹配的候选词,从而可以为用户推荐更加符合用户在当前的输入界面上的输入需求的候选词,提高了为用户推荐候选词的灵活性和准确性。In the information recommendation method provided by this application, the electronic device stores the keyword and the mapping relationship between the keyword and the first interface in the thesaurus, so that when the user inputs a character string on the first interface, the user can input the character string based on the character string. With the first interface, candidate words matching the character string and the first interface are determined from the thesaurus. In this way, the electronic device can recommend candidate words that match the current input interface for the user, so that the user can recommend candidate words that are more in line with the user's input requirements on the current input interface, and improve the flexibility of recommending candidate words for the user. and accuracy.
可选地,在本申请实施例中,信息推荐装置可以从第一界面上显示的目标文本中,提取关键词,并将上述关键词以及上述关键词与第一界面之间的映射关系保存在词库中。Optionally, in this embodiment of the present application, the information recommendation device may extract keywords from the target text displayed on the first interface, and save the above keywords and the mapping relationship between the above keywords and the first interface in a in the thesaurus.
示例性的,上述步骤101之前,本申请实施例提供的信息推荐方法还包括如下步骤A1至步骤A3:Exemplarily, before the above step 101, the information recommendation method provided in this embodiment of the present application further includes the following steps A1 to A3:
步骤A1:在检测到第一界面输入的内容包括第一符号的情况下,获取目标文本。Step A1: Obtain the target text when it is detected that the content input on the first interface includes the first symbol.
步骤A2:提取上述目标文本中的关键词。Step A2: Extract the keywords in the above target text.
步骤A3:将上述关键词以及上述映射关系对应存储至词库中。Step A3: correspondingly store the above keywords and the above mapping relationships in the thesaurus.
可选地,在本申请实施例中,上述第一界面输入的内容为用户上屏的文本。Optionally, in this embodiment of the present application, the content input on the above-mentioned first interface is the text displayed on the screen by the user.
可选地,在本申请实施例中,上述目标文本包括:用户已输入的目标字符至第一符号间的字符;上述目标字符为:用户输入的第一个字符,或,上述第一符号的前一个在第一界面中显示的第二符号。Optionally, in the embodiment of the present application, the above-mentioned target text includes: a character between the target character input by the user and the first symbol; the above-mentioned target character is: the first character input by the user, or, the above-mentioned first symbol The previous second symbol displayed in the first interface.
在一种示例中,在目标字符为用户输入的第一个字符的情况下,目标文本为用户输入的第一个字符至当前输入的第一符号之间的文本。例如,用户输入的文本内容为“明天是蓝语非的生日。”,则目标文本为“明”字至“。”之间的文本。In an example, when the target character is the first character input by the user, the target text is the text between the first character input by the user and the first symbol currently input. For example, if the text content input by the user is "Tomorrow is Lan Yufei's birthday.", the target text is the text between the word "Ming" and ".".
在另一种示例中,在目标字符为本次用户输入的第一符号的前一个上屏的第二符号的情况下,目标文本为该第二符号至第一符号之间的文本。例如,用户输入的文本内容为“明天天气很好,我们要去帮蓝语非搬家。”,则目标文本为“,”至“。”之间的文本。In another example, when the target character is the second symbol on the screen preceding the first symbol input by the user this time, the target text is the text between the second symbol and the first symbol. For example, the text content entered by the user is "Tomorrow the weather is fine, we are going to help Lanyufei move.", the target text is the text between "," and ".".
需要说明的是,当信息推荐装置从已输入的文本中同时检测到用户输入的第一个字符以及上述第二字符的情况下,信息推荐装置会将第二符号确定为目标字符。It should be noted that, when the information recommendation apparatus detects the first character input by the user and the above-mentioned second character from the input text at the same time, the information recommendation apparatus will determine the second symbol as the target character.
可选地,在本申请实施例中,在用户进行文字输入的过程中,信息推荐装置可以对用户输入的内容(即,本次上屏的内容)进行实时或者周期性检测(如,每5s检测一次),判断其是否包含第一符号。Optionally, in this embodiment of the present application, during the process of text input by the user, the information recommendation apparatus may perform real-time or periodic detection (eg, every 5s) on the content input by the user (that is, the content on the screen this time). check once) to determine whether it contains the first symbol.
可选地,在本申请实施例中,信息推荐装置在检测到用户本次上屏的内容包括第一符号的情况下,可以从用户已输入的文本中确定第一文本,然后,在第一文本中检测目标字符,该目标字符为该第一文本中满足预定条件的字符。其中,上述第一文本包括:用户已输入的所有文本,用户在输入第一符号前的预定时间内输入的文本,用户在输入第一符号前输入的预定数量的字符组成的文本(例如,用户输入第一符号之前输入的30个字符)。Optionally, in this embodiment of the present application, the information recommendation apparatus may determine the first text from the text that the user has entered when it detects that the content on the screen by the user this time includes the first symbol, and then, in the first A target character is detected in the text, where the target character is a character in the first text that satisfies a predetermined condition. Wherein, the above-mentioned first text includes: all texts input by the user, text input by the user within a predetermined time before inputting the first symbol, text composed of a predetermined number of characters input by the user before inputting the first symbol (for example, the user 30 characters entered before the first symbol).
可选地,在本申请实施例中,信息推荐装置可以实时检测用户输入的文本中是否包含第一字符。因此,当用户在当前输入(上屏)一个符号的情况下,信息推荐装置便会获取一次目标文本,以保证用户输入的所有内容都能被检测到。Optionally, in this embodiment of the present application, the information recommendation apparatus may detect in real time whether the text input by the user contains the first character. Therefore, when the user currently inputs (on the screen) a symbol, the information recommendation device will acquire the target text once, so as to ensure that all the content input by the user can be detected.
可选地,在本申请实施例中,上述第一符号和上述第二符号均属于目标符号,其中,上述目标符号包括以下任一项:标点符号,分隔符。其中,分隔符包括:换行符,空格符。Optionally, in this embodiment of the present application, both the above-mentioned first symbol and the above-mentioned second symbol belong to target symbols, wherein the above-mentioned target symbols include any one of the following: punctuation marks and separators. Among them, the delimiter includes: newline character, space character.
通常情况下,用户会在输入的具备完整语义的文本(如,完整的语句或者词语)中,使用各种符号来表示文本内容的停顿和所要表达的语气。这样,在一个文本中,前后两个 标点符号之间的文本内容通常为一个语句或者包含完整的词语(如,人名或者地名)的文本。其中,不同的符号所表达的含义不同。Usually, in the input text with complete semantics (for example, complete sentences or words), the user uses various symbols to represent the pauses in the text content and the tone to be expressed. In this way, in a text, the text content between the two punctuation marks before and after is usually a sentence or a text containing complete words (such as a person's name or a place name). Among them, different symbols express different meanings.
示例1:针对标点符号,部分标点符号(如,“,”“、”“。”)通常用于表达文本内容的停顿,部分标点符号(如,“!”“?”)通常用户表达文本内容对应的用户想要表达的语气。Example 1: For punctuation, some punctuation marks (such as "," ", "".") are usually used to express pauses in text content, and some punctuation marks (such as "!" "?") are usually used by users to express text content The tone that the corresponding user wants to express.
示例2:针对分隔符,分隔符通常用于对文本内容进行分隔和拆分。例如,当检测到用户当前输入空格符时,说明用户已经输入了完整的一句话或者一个词语,此时,信息推荐装置可以基于该空格符和空格符之前的符号,获取用户已输入的文本中的目标文本,保证了获取的目标文本的完整性。Example 2: For delimiters, delimiters are often used to separate and split text content. For example, when it is detected that the user is currently inputting a space character, it means that the user has input a complete sentence or a word. The target text to ensure the integrity of the obtained target text.
举例说明,假设用户已输入的文本为“明天天气很好,我们10点在普君东路碰面后一起去桂公坊吃早茶。”由于文本中存在“,”和“。”,则说明在“,”和“。”之间有一个完整的语句,因此,信息推荐装置将“,”和“。”之间的文本作为目标文本,从而得到一个语句。For example, assuming that the text that the user has entered is "The weather will be fine tomorrow, we will meet at Pujun East Road at 10 o'clock and go to Guigongfang for morning tea together." Since there are "," and "." in the text, it means that in the There is a complete sentence between "," and ".", therefore, the information recommending apparatus regards the text between "," and "." as the target text, thereby obtaining a sentence.
可选地,在本申请实施例中,在得到用户已输入的文本中的目标文本的情况下,信息推荐装置可以对目标文本进行分词或者语义识别,提取目标文本中的关键词,得到目标文本中的至少一个关键词。Optionally, in the embodiment of the present application, in the case of obtaining the target text in the text input by the user, the information recommendation device may perform word segmentation or semantic recognition on the target text, extract keywords in the target text, and obtain the target text. at least one keyword in .
示例性的,上述关键词可以是目标文本中包含特定语义的词组或者短语,上述关键词包括以下至少一项:人名、地名、机构名、专有名词。Exemplarily, the above keywords may be phrases or phrases containing specific semantics in the target text, and the above keywords include at least one of the following: a person's name, a place name, an institution name, and a proper noun.
需要说明的是,信息推荐装置在目标文本中可以提取出一个或多个关键词,本申请实施例对此不做限定。It should be noted that, the information recommendation apparatus may extract one or more keywords from the target text, which is not limited in this embodiment of the present application.
如此,信息推荐装置可以基于用户在第一界面上输入的目标文本,从中提取具备完整语义的关键词。由于该关键词是从第一界面提取的,因此,其更加符合用户在第一界面上的输入意图。In this way, the information recommendation apparatus can extract keywords with complete semantics from the target text input by the user on the first interface. Since the keyword is extracted from the first interface, it is more in line with the user's input intention on the first interface.
可选地,在本申请实施例中,在从第一界面的目标文本中提取出关键词的情况下,信息推荐装置可以建立上述第一界面与关键词之间的映射关系。Optionally, in the embodiment of the present application, in the case where keywords are extracted from the target text of the first interface, the information recommendation apparatus may establish a mapping relationship between the above-mentioned first interface and keywords.
示例性的,信息推荐装置可以自动建立上述第一界面与关键词之间的映射关系,也可以由用户触发建立上述第一界面与关键词之间的映射关系。Exemplarily, the information recommendation apparatus may automatically establish a mapping relationship between the above-mentioned first interface and keywords, or may be triggered by a user to establish a mapping relationship between the above-mentioned first interface and keywords.
举例说明,以上述第一界面为会话界面为例,假如上述关键词包括关键词A,关键词B,关键词C和关键词B,则信息推荐装置可以将上述4个关键词存储至词库中,并生成上述4个关键词中的每个关键词与会话界面之间的映射关系,得到4个映射关系,并将上述4个映射关系分别存储至词库中。For example, taking the above-mentioned first interface as a conversation interface as an example, if the above-mentioned keywords include keyword A, keyword B, keyword C and keyword B, the information recommending device can store the above-mentioned 4 keywords in the thesaurus , and generate the mapping relationship between each of the above four keywords and the conversation interface, obtain four mapping relationships, and store the four mapping relationships in the thesaurus respectively.
如此,信息推荐装置可以将从第一界面的目标文本中提取的关键词,与第一界面的映射关系保存在词库中,当用户在第一界面上输入字符串时,信息推荐装置可以根据第一界面与关键词之间的映射关系,为用户推荐符合用户在该第一界面上的输入习惯的候选词。In this way, the information recommendation device can save the mapping relationship between the keywords extracted from the target text of the first interface and the first interface in the thesaurus. When the user inputs a character string on the first interface, the information recommendation device can The mapping relationship between the first interface and the keywords recommends candidate words for the user that conform to the user's input habit on the first interface.
进一步可选地,在本申请实施例中,上述步骤A3中将关键词存储至词库中,包括如下步骤B1:Further optionally, in the embodiment of the present application, in the above step A3, the keywords are stored in the thesaurus, including the following step B1:
步骤B1:将关键词与关键词对应的字符串关联存储至词库中。Step B1: Associate the keywords with the character strings corresponding to the keywords and store them in the thesaurus.
示例性的,信息推荐装置在从目标文本中提取出关键词后,可以获取关键词对应的字符串(如,拼音),然后,将该字符串与该关键词对应的字符串间的对应关系存储至该词库中。如此,信息推荐装置可以在该词库中基于该对应关系找到该字符串对应的关键词,从而将该关键词作为候选词展示给用户,提高了候选词的推荐效率。Exemplarily, after extracting the keyword from the target text, the information recommendation device may obtain the character string (eg, pinyin) corresponding to the keyword, and then, the corresponding relationship between the character string and the character string corresponding to the keyword. stored in the thesaurus. In this way, the information recommendation apparatus can find the keyword corresponding to the character string in the thesaurus based on the corresponding relationship, so as to display the keyword as a candidate word to the user, thereby improving the recommendation efficiency of the candidate word.
示例性的,上述关键词对应的字符串可以包括以下至少一项:关键词的拼音、与关键词的拼音相似性较大的拼音(如,如关键词的拼音为“lanyufei”,则与关键词的拼音接近的拼音可以为“hanyufei”或lanyuwei等)、关键词的外文翻译(如,关键词为“蓝语菲”,则可以获取并保存关键词的英文翻译,如,“Lanyufei”)。Exemplarily, the character string corresponding to the above keyword may include at least one of the following: the pinyin of the keyword, the pinyin that is more similar to the pinyin of the keyword (for example, if the pinyin of the keyword is "lanyufei", it is the same as the key word. The pinyin of the word close to the pinyin can be "hanyufei" or lanyuwei, etc.), the foreign language translation of the keyword (for example, the keyword is "Blue Yufei", the English translation of the keyword can be obtained and saved, for example, "Lanyufei") .
进一步可选地,在本申请实施例中,上述步骤A2包括如下步骤C1至步骤C3:Further optionally, in this embodiment of the present application, the foregoing step A2 includes the following steps C1 to C3:
步骤C1:将目标文本进行分词,得到N个候选分词。Step C1: Perform word segmentation on the target text to obtain N candidate word segmentations.
步骤C2:接收用户对N个候选分词中的目标候选分词的第二输入。Step C2: Receive a second input from the user for the target candidate word segmentation among the N candidate word segmentations.
步骤C3:响应于第二输入,将目标候选分词作为关键词。Step C3: In response to the second input, use the target candidate word segmentation as a keyword.
示例性的,上述第一输入包括:任意一种可行性输入,如,触控输入,手势输入,语音输入。Exemplarily, the above-mentioned first input includes: any feasible input, such as touch input, gesture input, and voice input.
示例性的,信息推荐装置可以采用字符匹配、理解法或者统计法等分词方法对目标文本进行分词操作,得到N个候选分词,并基于用户对N个候选分词中的目标候选分词的输入操作,将目标候选分词确定为关键词。Exemplarily, the information recommendation apparatus may perform word segmentation operations on the target text by using word segmentation methods such as character matching, comprehension method, or statistical method, to obtain N candidate word segmentations, and based on the user's input operation on the target candidate word segmentation among the N candidate word segmentations, The target candidate word segmentation is determined as a keyword.
进一步地,信息推荐装置可以在关键词显示区域显示上述N个候选分词,用户可以在该关键词选择区域选择(如,勾选)需要的候选分词,接着,信息推荐装置可以将用户选择的候选分词确定为关键词。Further, the information recommendation device can display the above N candidate word segmentations in the keyword display area, and the user can select (eg, check) the required candidate word segmentation in the keyword selection area, and then the information recommendation device can select the candidate word segmentation selected by the user. Participles are identified as keywords.
举例说明,假设目标文本为“韩语菲在A餐厅吃火锅”,信息推荐装置可以对目标文本进行句法理解分析,得到“韩语菲”“A餐厅”“火锅”这些候选分词,并在关键词显示区域显示这些候选分词,则用户可以对其中的“韩语菲”这一候选分词进行点击或勾选,将该候选分词确定为关键词。如此一来,信息推荐装置可以基于用户对候选分词的选择操作,确定关键词,从而可以得到用户需求的关键词。For example, assuming that the target text is "Han Yufei eats hot pot at restaurant A", the information recommendation device can perform a syntactic understanding analysis on the target text, and obtain candidate word segmentations such as "Korean Fei", "A restaurant" and "hot pot", and display them in the keywords. If these candidate word segments are displayed in the area, the user can click or tick the candidate word segment "Korean Philip" among them to determine the candidate word segment as a keyword. In this way, the information recommendation apparatus can determine the keywords based on the user's selection operation on the candidate word segmentation, so as to obtain the keywords required by the user.
示例性的,文字存储装置可以采用字符匹配、理解法或者统计法等分词方法对目标文本进行分词操作,获取该目标文本中的词语单元,然后基于机器学习算法建立机器学习模型,使用目标文本中的词语单元的词语特征以及语句特征,提取目标文本中的关键词。进一步地,文本存储装置可以获取该词语单元的词语特征、该词语单元在对应的目标文本中的语句特征,上述词语单元的词语特征是指词语单元的词性特征以及命名实体特征等。Exemplarily, the word storage device may perform word segmentation operations on the target text by using word segmentation methods such as character matching, comprehension, or statistical methods, obtain word units in the target text, and then establish a machine learning model based on a machine learning algorithm, and use the word units in the target text. The word features and sentence features of the word unit are extracted, and the keywords in the target text are extracted. Further, the text storage device can acquire the word feature of the word unit, the sentence feature of the word unit in the corresponding target text, and the word feature of the word unit refers to the part-of-speech feature and the named entity feature of the word unit.
需要说明的是,上述词语单元的词性特征是指词语单元的词性,如名词或动词等。可以理解的是,通常情况下,某些词性特征的词语单元更易成为关键词,例如,名词特征的词语单元。上述词语单元的命名实体特征是指词语单元是否为命名实体,通常情况下,一般为命名实体的词语单元更易成为关键词。It should be noted that the part-of-speech feature of the word unit above refers to the part-of-speech of the word unit, such as a noun or a verb. It can be understood that, under normal circumstances, word units of certain part-of-speech features are more likely to become keywords, for example, word units of noun features. The named entity feature of the word unit above refers to whether the word unit is a named entity. Generally, a word unit that is generally a named entity is more likely to become a keyword.
进一步地,上述词语单元在对应的目标文本中的语句特征是指词语单元在目标文本中的特征,例如,目标文本中词语单元的前组合词词性特征、后组合词的词性特征、语句位置特征以及依存关系特征等。Further, the sentence feature of the above-mentioned word unit in the corresponding target text refers to the feature of the word unit in the target text, for example, the part-of-speech feature of the front compound word, the part-of-speech feature of the rear compound word, and the sentence position feature of the word unit in the target text. and dependencies, etc.
举例说明,假设目标文本为“韩语菲在A餐厅吃火锅”,信息推荐装置可以对目标文本进行句法理解分析,得到“韩语菲”“在”“A餐厅”“吃”“火锅”这些词语单元,并根据词性分析和命名实体识别得到这些词语单元的词语特征(如,“韩语菲”为人名,“A餐厅”为地点名,“吃”为动词)以及语句特征(如,“火锅”为名词性宾语,“韩语菲”为主语,“韩语菲”和“吃”为主谓关系),然后基于建立的机器学习模型,使用词语单元的词语特征以及语句特征,提取目标文本中的关键词,即,“韩语菲”和“A餐厅”。如此一来,文本存储装置可以自动智能提取对目标文本中的关键词,提升了关键词 提取的效率。For example, assuming that the target text is "Korean Fei eats hot pot at restaurant A", the information recommendation device can perform a syntactic analysis on the target text, and obtain the word units "Korean Fei", "in", "restaurant A", "eat" and "hot pot" , and according to part-of-speech analysis and named entity recognition, the word features of these word units (for example, "Korean Fei" is a person's name, "A restaurant" is a place name, and "eat" is a verb) and sentence features (for example, "hot pot" is Noun object, "Korean Fei" as the subject, "Korean Fei" and "eat" as the subject-predicate relationship), and then based on the established machine learning model, using the word features and sentence features of the word unit to extract keywords in the target text , ie, "Korean Fei" and "A Restaurant". In this way, the text storage device can automatically and intelligently extract keywords in the target text, which improves the efficiency of keyword extraction.
进一步可选地,在本申请实施例中,上述步骤A2之后,本申请实施例提供的显示方法还包括如下步骤D1和步骤D2:Further optionally, in the embodiment of the present application, after the above step A2, the display method provided by the embodiment of the present application further includes the following steps D1 and D2:
步骤D1:显示关键词。Step D1: Display keywords.
步骤D2:接收用户对关键词的第三输入。Step D2: Receive the third input of the keyword by the user.
结合上述步骤D2,上述步骤A3中将上述关键词存储至词库中包括如下步骤D3:In conjunction with the above-mentioned step D2, in the above-mentioned step A3, storing the above-mentioned keywords in the thesaurus includes the following steps D3:
步骤D3:响应于上述第二输入,将关键词存储至词库中。Step D3: In response to the above-mentioned second input, the keywords are stored in the thesaurus.
示例性的,在从目标文本中提取出至少一个关键词之后,信息推荐装置可以按照预定显示方式显示上述至少一个关键词。其中,上述预定显示方式包括以下至少一项:在目标文本上方显示至少一个关键词,高亮或突出显示该目标文本中的至少一个关键词,在关键字显示界面中显示该至少一个关键词。Exemplarily, after extracting at least one keyword from the target text, the information recommending apparatus may display the at least one keyword in a predetermined display manner. The above predetermined display manner includes at least one of the following: displaying at least one keyword above the target text, highlighting or highlighting at least one keyword in the target text, and displaying the at least one keyword in the keyword display interface.
示例性的,信息推荐装置可以在显示上述至少一个关键词之后,用户可以对上述至少一个关键词中的任意关键词进行勾选或点击操作(即,第三输入),将上述至少一个关键词中的任意关键词存储至词库中。如此,用户可以根据需求,针对性的存储关键字,提升了存储关键词的灵活性,进一步保证了在词库中存储的关键词能够被有效使用,同时节省了词库的存储空间。Exemplarily, the information recommendation apparatus may, after displaying the above at least one keyword, the user may check or click on any keyword in the above at least one keyword (ie, the third input), and the above at least one keyword may be selected. Store any keywords in the thesaurus into the thesaurus. In this way, the user can store keywords in a targeted manner according to requirements, which improves the flexibility of storing keywords, further ensures that the keywords stored in the thesaurus can be effectively used, and at the same time saves the storage space of the thesaurus.
在本申请实施例提供的信息推荐方法中,由于用户通常会在输入的具备完整语义的文本内容(如,完整的语句或者词语)中,使用各种符号来表示文本内容的停顿和所要表达的语气。因此,信息推荐装置在检测到用户本次上屏的内容包括第一符号的情况下,可以基于用户已输入的文本中的目标字符和第一符号对用户已输入的文本进行文本拆分,从而可以从用户已输入的文本中,提取出包含用户想要输入的完整词语的目标文本,并将目标文本中包含的完整词语存储在词库中。以便于在用户再次输入该关键词的情况下,可以将该关键词作为候选词推荐给用户。In the information recommendation method provided by the embodiments of the present application, since the user usually uses various symbols in the input text content with complete semantics (for example, complete sentences or words) to indicate the pause of the text content and the desired expression tone. Therefore, when detecting that the content on the screen by the user includes the first symbol, the information recommendation device can perform text splitting on the text entered by the user based on the target character and the first symbol in the text entered by the user, thereby The target text containing the complete words that the user wants to input can be extracted from the text that the user has input, and the complete words contained in the target text can be stored in the thesaurus. So that when the user inputs the keyword again, the keyword can be recommended to the user as a candidate word.
需要说明的是,本申请实施例提供的信息推荐方法,执行主体可以为信息推荐装置,或者该信息推荐装置中的用于执行信息推荐方法的控制模块。本申请实施例中以信息推荐装置执行信息推荐方法为例,说明本申请实施例提供的信息推荐装置。It should be noted that, in the information recommendation method provided by the embodiments of the present application, the execution subject may be an information recommendation device, or a control module in the information recommendation device for executing the information recommendation method. In the embodiment of the present application, the information recommending device provided by the embodiment of the present application is described by taking the information recommending device executing the information recommending method as an example.
本申请实施例提供一种信息推荐装置,如图2所示,该信息推荐装置包括:接收模块 401、处理模块402和显示模块403,其中:上述接收模块401,用于接收用户在第一界面上的第一输入;上述处理模块402,用于响应于上述接收模块401接收的上述第一输入,基于上述第一输入对应的字符串与上述第一界面,从词库中匹配候选词;上述显示模块403,用于显示上述处理模块402从词库中匹配的上述候选词;其中,上述词库中存储关键词以及上述关键词与上述第一界面间的映射关系。An embodiment of the present application provides an information recommendation device. As shown in FIG. 2 , the information recommendation device includes: a receiving module 401 , a processing module 402 and a display module 403 , wherein: the above-mentioned receiving module 401 is used to receive the user's first interface The above-mentioned processing module 402, in response to the above-mentioned first input received by the above-mentioned receiving module 401, based on the character string corresponding to the above-mentioned first input and the above-mentioned first interface, matching candidate words from the vocabulary; the above-mentioned The display module 403 is configured to display the candidate words matched from the thesaurus by the processing module 402; wherein the thesaurus stores keywords and the mapping relationship between the keywords and the first interface.
在本申请实施例提供的信息推荐装置中,电子设备通过在词库中存储关键词以及该关键词与第一界面的映射关系,使得用户在第一界面输入字符串时,可以基于该字符串和该第一界面,从词库中确定出与该字符串和第一界面匹配的候选词。如此,电子设备可以为用户推荐与当前的输入界面相匹配的候选词,从而可以为用户推荐更加符合用户在当前的输入界面上的输入需求的候选词,提高了为用户推荐候选词的灵活性和准确性。In the information recommendation device provided by the embodiment of the present application, the electronic device stores the keyword and the mapping relationship between the keyword and the first interface in the thesaurus, so that when the user inputs a character string on the first interface, the user can input the character string based on the character string. With the first interface, candidate words matching the character string and the first interface are determined from the thesaurus. In this way, the electronic device can recommend candidate words that match the current input interface for the user, so that the user can recommend candidate words that are more in line with the user's input requirements on the current input interface, and improve the flexibility of recommending candidate words for the user. and accuracy.
可选地,在本申请实施例中,上述装置还包括:获取模块404和存储模块405,其中:上述获取模块404,用于在检测到上述第一界面输入的内容包括第一符号的情况下,获取目标文本;上述目标文本包括:用户已输入的目标字符至上述第一符号间的字符;上述目标字符为:用户输入的第一个字符,或,上述第一符号的前一个在上述第一界面中显示的第二符号;上述处理模块402,还用于提取上述获取模块404获取的上述目标文本中的关键词;上述存储模块405,用于将上述处理模块402提取的上述关键词以及上述映射关系对应存储至上述词库中。Optionally, in this embodiment of the present application, the above-mentioned apparatus further includes: an acquisition module 404 and a storage module 405, wherein: the above-mentioned acquisition module 404 is configured to detect that the content input on the above-mentioned first interface includes the first symbol , obtain the target text; the above target text includes: the character between the target character input by the user and the above-mentioned first symbol; the above-mentioned target character is: the first character input by the user, or, the previous one of the above-mentioned first symbol is in the above-mentioned first symbol The second symbol displayed in an interface; the above-mentioned processing module 402 is also used to extract the keywords in the above-mentioned target text obtained by the above-mentioned acquisition module 404; the above-mentioned storage module 405 is used to extract the above-mentioned keywords and The above-mentioned mapping relationship is correspondingly stored in the above-mentioned thesaurus.
可选地,在本申请实施例中,上述第一符号和上述第二符号均属于目标符号;其中,上述目标符号包括以下任一项:标点符号,分隔符。其中,分隔符包括:换行符,空格符。Optionally, in this embodiment of the present application, both the above-mentioned first symbol and the above-mentioned second symbol belong to target symbols; wherein, the above-mentioned target symbols include any one of the following: punctuation marks and separators. Among them, the delimiter includes: newline character, space character.
可选地,在本申请实施例中,上述存储模块405,具体用于将上述关键词与上述关键词对应的字符串关联存储至词库中。Optionally, in this embodiment of the present application, the above-mentioned storage module 405 is specifically configured to associate and store the above-mentioned keywords and the character strings corresponding to the above-mentioned keywords in the thesaurus.
可选地,在本申请实施例中,上述处理模块402,具体用于将上述目标文本进行分词,得到N个候选分词;上述接收模块401,还用于接收用户对上述处理模块402得到的上述N个候选分词中的目标候选分词的第二输入;上述处理模块402,具体用于响应于上述接收模块401接收的第二输入,将上述目标候选分词作为关键词。Optionally, in this embodiment of the present application, the above-mentioned processing module 402 is specifically configured to perform word segmentation on the above-mentioned target text to obtain N candidate word segmentations; the above-mentioned receiving module 401 is further configured to receive the above-mentioned information obtained by the above-mentioned processing module 402 from the user. The second input of the target candidate word segmentation in the N candidate word segmentations; the above-mentioned processing module 402 is specifically configured to use the above-mentioned target candidate word segmentation as a keyword in response to the second input received by the above-mentioned receiving module 401 .
可选地,在本申请实施例中,上述显示模块403,还用于显示上述关键词;上述接收模块401,还用于接收用户对上述显示模块403显示的关键词的第三输入;上述存储模块 405,具体用于响应于上述接收模块401接收的上述第三输入,将上述关键词存储至词库中。Optionally, in this embodiment of the present application, the above-mentioned display module 403 is further configured to display the above-mentioned keywords; the above-mentioned receiving module 401 is further configured to receive a third input from the user on the keywords displayed by the above-mentioned display module 403; the above-mentioned storage The module 405 is specifically configured to store the above-mentioned keywords in the thesaurus in response to the above-mentioned third input received by the above-mentioned receiving module 401 .
本申请实施例中的信息推荐装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The information recommendation device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The apparatus may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant). assistant, PDA), etc., non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
本申请实施例中的信息推荐装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The information recommendation device in the embodiment of the present application may be a device with an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
本申请实施例提供的信息推荐装置能够实现图1的方法实施例实现的各个过程,为避免重复,这里不再赘述。The information recommendation apparatus provided in this embodiment of the present application can implement each process implemented by the method embodiment in FIG. 1 , and to avoid repetition, details are not described here.
可选的,如图3所示,本申请实施例还提供一种电子设备500,包括处理器501,存储器502,存储在存储器502上并可在所述处理器501上运行的程序或指令,该程序或指令被处理器501执行时实现上述信息推荐方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 3 , an embodiment of the present application further provides an electronic device 500, including a processor 501, a memory 502, a program or instruction stored in the memory 502 and executable on the processor 501, When the program or instruction is executed by the processor 501, each process of the above-mentioned information recommendation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.
图4为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 4 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备100包括但不限于:射频单元101、网络模块102、音频输出单元103、输入单元104、传感器105、显示单元106、用户输入单元107、接口单元108、存储器109、以及处理器110等部件。The electronic device 100 includes but is not limited to: a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110, etc. part.
本领域技术人员可以理解,电子设备100还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器110逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图4中示出的电子设备结构并不构成对电子设备的 限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, so as to manage charging, discharging, and power management through the power management system. consumption management and other functions. The structure of the electronic device shown in FIG. 4 does not constitute a limitation to the electronic device. The electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .
其中,上述用户输入单元107,用于接收用户在第一界面上的第一输入;上述处理器110,用于响应于上述用户输入单元107接收的上述第一输入,基于上述第一输入对应的字符串与上述第一界面,从词库中匹配候选词;上述显示单元106,用于显示上述处理器110从词库中匹配的上述候选词;其中,上述词库中存储关键词以及上述关键词与上述第一界面间的映射关系。The above-mentioned user input unit 107 is used for receiving the first input of the user on the first interface; the above-mentioned processor 110 is used for responding to the above-mentioned first input received by the above-mentioned user input unit 107, based on the corresponding first input The character string and the above-mentioned first interface match candidate words from the thesaurus; the above-mentioned display unit 106 is used to display the above-mentioned candidate words matched by the above-mentioned processor 110 from the thesaurus; wherein, the above-mentioned thesaurus stores keywords and the above-mentioned key words The mapping relationship between the word and the above-mentioned first interface.
在本申请实施例提供的电子设备中,电子设备通过在词库中存储关键词以及该关键词与第一界面的映射关系,使得用户在第一界面输入字符串时,可以基于该字符串和该第一界面,从词库中确定出与该字符串和第一界面匹配的候选词。如此,电子设备可以为用户推荐与当前的输入界面相匹配的候选词,从而可以为用户推荐更加符合用户在当前的输入界面上的输入需求的候选词,提高了为用户推荐候选词的灵活性和准确性。In the electronic device provided in the embodiment of the present application, the electronic device stores the keyword and the mapping relationship between the keyword and the first interface in the thesaurus, so that when the user inputs a character string on the first interface, the user can In the first interface, candidate words matching the character string and the first interface are determined from the thesaurus. In this way, the electronic device can recommend candidate words that match the current input interface for the user, so that the user can recommend candidate words that are more in line with the user's input requirements on the current input interface, and improve the flexibility of recommending candidate words for the user. and accuracy.
可选地,在本申请实施例中,上述处理器110,用于在检测到上述第一界面输入的内容包括第一符号的情况下,获取目标文本;上述目标文本包括:用户已输入的目标字符至上述第一符号间的字符;上述目标字符为:用户输入的第一个字符,或,上述第一符号的前一个在上述第一界面中显示的第二符号;上述处理器110,还用于提取上述目标文本中的关键词;上述存储器109,用于将上述处理器110提取的上述关键词以及上述映射关系对应存储至上述词库中。Optionally, in this embodiment of the present application, the above-mentioned processor 110 is configured to obtain the target text when it is detected that the content input on the above-mentioned first interface includes the first symbol; the above-mentioned target text includes: the target entered by the user The character between the character and the above-mentioned first symbol; the above-mentioned target character is: the first character input by the user, or the second symbol displayed in the above-mentioned first interface before the above-mentioned first symbol; the above-mentioned processor 110, also is used to extract the keywords in the target text; the memory 109 is used to store the keywords extracted by the processor 110 and the mapping relationship in the thesaurus correspondingly.
可选地,在本申请实施例中,上述第一符号和上述第二符号均属于目标符号;其中,上述目标符号包括以下任一项:标点符号,分隔符。其中,分隔符包括:换行符,空格符。Optionally, in the embodiment of the present application, both the above-mentioned first symbol and the above-mentioned second symbol belong to target symbols; wherein, the above-mentioned target symbols include any one of the following: punctuation marks and separators. Among them, the delimiter includes: newline character, space character.
可选地,在本申请实施例中,上述存储器109,具体用于将上述关键词与上述关键词对应的字符串关联存储至词库中。Optionally, in this embodiment of the present application, the above-mentioned memory 109 is specifically configured to associate and store the above-mentioned keywords and the character strings corresponding to the above-mentioned keywords in the thesaurus.
可选地,在本申请实施例中,上述处理器110,具体用于将上述目标文本进行分词,得到N个候选分词;上述用户输入单元107,还用于接收用户对上述处理器110得到的上述N个候选分词中的目标候选分词的第二输入;上述处理器110,具体用于响应于上述用户输入单元107接收的第二输入,将上述目标候选分词作为关键词。Optionally, in this embodiment of the present application, the above-mentioned processor 110 is specifically configured to perform word segmentation on the above-mentioned target text to obtain N candidate word segmentations; the above-mentioned user input unit 107 is further configured to receive the user's input on the above-mentioned processor 110 obtained by the above-mentioned processor 110. The second input of the target candidate word segmentation in the above N candidate word segmentations; the processor 110 is specifically configured to use the above target candidate word segmentation as a keyword in response to the second input received by the user input unit 107 .
可选地,在本申请实施例中,上述显示单元106,还用于显示上述关键词;上述用户 输入单元107,还用于接收用户对上述显示单元106显示的关键词的第三输入;上述存储器109,具体用于响应于上述用户输入单元107接收的上述第三输入,将上述关键词存储至词库中。Optionally, in this embodiment of the present application, the above-mentioned display unit 106 is further configured to display the above-mentioned keywords; the above-mentioned user input unit 107 is also used to receive a third user input on the keywords displayed by the above-mentioned display unit 106; the above-mentioned The memory 109 is specifically configured to store the above-mentioned keywords in the thesaurus in response to the above-mentioned third input received by the above-mentioned user input unit 107 .
本实施例中各种实现方式具有的有益效果具体可以参见上述方法实施例中相应实现方式所具有的有益效果,为避免重复,此处不再赘述。应理解的是,本申请实施例中,输入单元104可以包括图形处理器(Graphics Processing Unit,GPU)1041和麦克风1042,图形处理器1041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元106可包括显示面板1061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板1061。用户输入单元107包括触控面板1071以及其他输入设备1072。触控面板1071,也称为触摸屏。触控面板1071可包括触摸检测装置和触摸控制器两个部分。其他输入设备1072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器109可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器110可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器110中。For the beneficial effects of the various implementations in this embodiment, reference may be made to the beneficial effects of the corresponding implementations in the above method embodiments, which are not repeated here to avoid repetition. It should be understood that, in this embodiment of the present application, the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042. Such as camera) to obtain still pictures or video image data for processing. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 107 includes a touch panel 1071 and other input devices 1072 . The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts, a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here. Memory 109 may be used to store software programs as well as various data including, but not limited to, application programs and operating systems. The processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the like, and the modem processor mainly processes wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 110 .
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述存储方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium. When the program or instruction is executed by a processor, each process of the foregoing storage method embodiment can be implemented, and the same can be achieved. The technical effect, in order to avoid repetition, will not be repeated here.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the foregoing embodiments. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述信息推荐方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the above information recommendation method embodiment. Each process can achieve the same technical effect. In order to avoid repetition, it will not be repeated here.
本申请实施例提供了一种计算机程序产品,该程序产品被存储在非易失的存储介质中,该程序产品被至少一个处理器执行以实现如第一方面所述的方法。An embodiment of the present application provides a computer program product, where the program product is stored in a non-volatile storage medium, and the program product is executed by at least one processor to implement the method according to the first aspect.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element. In addition, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in the reverse order depending on the functions involved. To perform functions, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course hardware can also be used, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.

Claims (17)

  1. 一种信息推荐方法,所述方法包括:An information recommendation method, the method comprising:
    接收用户在第一界面上的第一输入;receiving the first input from the user on the first interface;
    响应于所述第一输入,基于所述第一输入对应的字符串与所述第一界面,从词库中匹配候选词,并显示所述候选词;In response to the first input, based on the character string corresponding to the first input and the first interface, matching candidate words from the thesaurus, and displaying the candidate words;
    其中,所述词库中存储关键词以及所述关键词与所述第一界面间的映射关系。Wherein, the thesaurus stores keywords and the mapping relationship between the keywords and the first interface.
  2. 根据权利要求1所述的方法,其中,所述接收用户在第一界面上的第一输入之前,所述方法还包括:The method according to claim 1, wherein before the receiving the first input from the user on the first interface, the method further comprises:
    在检测到所述第一界面输入的内容包括第一符号的情况下,获取目标文本;所述目标文本包括:用户已输入的目标字符至所述第一符号间的字符;所述目标字符为:用户输入的第一个字符,或,所述第一符号的前一个在所述第一界面中显示的第二符号;In the case where it is detected that the content input on the first interface includes the first symbol, obtain the target text; the target text includes: the character between the target character input by the user and the first symbol; the target character is : the first character input by the user, or the second symbol displayed in the first interface before the first symbol;
    提取所述目标文本中的关键词;extracting keywords in the target text;
    将所述关键词以及所述映射关系对应存储至所述词库中。The keywords and the mapping relationship are correspondingly stored in the thesaurus.
  3. 根据权利要求2所述的方法,其中,所述第一符号和所述第二符号均属于目标符号;The method of claim 2, wherein both the first symbol and the second symbol belong to a target symbol;
    所述目标符号包括以下任一项:标点符号,分隔符;其中,分隔符包括:换行符,空格符。The target symbol includes any one of the following: punctuation, separator; wherein, the separator includes: newline, space character.
  4. 根据权利要求2所述的方法,其中,所述将所述关键词存储至所述词库中,包括:The method according to claim 2, wherein the storing the keywords in the thesaurus comprises:
    将所述关键词与所述关键词对应的字符串关联存储至词库中。The keyword and the character string corresponding to the keyword are associated and stored in the thesaurus.
  5. 根据权利要求2所述的方法,其中,所述提取所述目标文本中的关键词,包括:The method according to claim 2, wherein the extracting the keywords in the target text comprises:
    将所述目标文本进行分词,得到N个候选分词;Perform word segmentation on the target text to obtain N candidate word segmentations;
    接收用户对所述N个候选分词中的目标候选分词的第二输入;receiving a second input from the user to the target candidate word segmentation in the N candidate word segmentations;
    响应于所述第二输入,将所述目标候选分词作为关键词。In response to the second input, the target candidate word segmentation is used as a keyword.
  6. 根据权利要求2或4所述的方法,其中,所述提取所述目标文本中的关键词之后,所述方法还包括:The method according to claim 2 or 4, wherein after extracting the keywords in the target text, the method further comprises:
    显示所述关键词;displaying the keyword;
    接收用户对所述关键词的第三输入;receiving a third input of the keyword from the user;
    所述将所述关键词存储至词库中,包括:The storing of the keywords in the thesaurus includes:
    响应于所述第三输入,将所述关键词存储至词库中。In response to the third input, the keywords are stored in the thesaurus.
  7. 一种信息推荐装置,所述装置包括:接收模块、处理模块和显示模块,其中:An information recommendation device, the device includes: a receiving module, a processing module and a display module, wherein:
    所述接收模块,用于接收用户在第一界面上的第一输入;The receiving module is configured to receive the first input of the user on the first interface;
    所述处理模块,用于响应于所述接收模块接收的所述第一输入,基于所述第一输入对应的字符串与所述第一界面,从词库中匹配候选词;The processing module is configured to, in response to the first input received by the receiving module, match candidate words from the lexicon based on the character string corresponding to the first input and the first interface;
    所述显示模块,用于显示所述处理模块从词库中匹配的所述候选词;The display module is used to display the candidate words matched from the thesaurus by the processing module;
    其中,所述词库中存储关键词以及所述关键词与所述第一界面间的映射关系。Wherein, the thesaurus stores keywords and the mapping relationship between the keywords and the first interface.
  8. 根据权利要求7所述的装置,其中,所述装置还包括:获取模块和存储模块,其中:The apparatus according to claim 7, wherein the apparatus further comprises: an acquisition module and a storage module, wherein:
    所述获取模块,用于在检测到所述第一界面输入的内容包括第一符号的情况下,获取目标文本;所述目标文本包括:用户已输入的目标字符至所述第一符号间的字符;所述目标字符为:用户输入的第一个字符,或,所述第一符号的前一个在所述第一界面中显示的第二符号;The obtaining module is configured to obtain target text when it is detected that the content input on the first interface includes a first symbol; the target text includes: the target character that has been input by the user to the first symbol. character; the target character is: the first character input by the user, or the second symbol displayed in the first interface before the first symbol;
    所述处理模块,还用于提取所述获取模块获取的所述目标文本中的关键词;The processing module is further configured to extract keywords in the target text obtained by the obtaining module;
    所述存储模块,用于将所述处理模块提取的所述关键词以及所述映射关系对应存储至所述词库中。The storage module is configured to store the keywords and the mapping relationship extracted by the processing module in the thesaurus correspondingly.
  9. 根据权利要求8所述的装置,其中,所述第一符号和所述第二符号均属于目标符号;The apparatus of claim 8, wherein both the first symbol and the second symbol belong to a target symbol;
    所述目标符号包括以下任一项:标点符号,分隔符;其中,分隔符包括:换行符,空格符。The target symbol includes any one of the following: punctuation, separator; wherein, the separator includes: newline, space character.
  10. 根据权利要求8所述的装置,其中,The apparatus of claim 8, wherein,
    所述存储模块,具体用于将所述关键词与所述关键词对应的字符串关联存储至词库中。The storage module is specifically configured to associate and store the keyword and the character string corresponding to the keyword into the thesaurus.
  11. 根据权利要求8所述的装置,其中,The apparatus of claim 8, wherein,
    所述处理模块,具体用于将所述目标文本进行分词,得到N个候选分词;The processing module is specifically configured to perform word segmentation on the target text to obtain N candidate word segmentations;
    所述接收模块,还用于接收用户对所述处理模块得到的所述N个候选分词中的目标候选分词的第二输入;The receiving module is further configured to receive a second input from the user to the target candidate word segmentation in the N candidate word segmentations obtained by the processing module;
    所述处理模块,具体用于响应于所述接收模块接收的所述第二输入,将所述目标候选分词作为关键词。The processing module is specifically configured to use the target candidate word segmentation as a keyword in response to the second input received by the receiving module.
  12. 根据权利要求8或10所述的装置,其中,An apparatus according to claim 8 or 10, wherein,
    所述显示模块,还用于显示所述关键词;The display module is further configured to display the keyword;
    所述接收模块,还用于接收用户对所述显示模块显示的关键词的第三输入;The receiving module is further configured to receive a third input from the user to the keyword displayed by the display module;
    所述存储模块,具体用于响应于所述接收模块接收的所述第三输入,将所述关键词存储至词库中。The storage module is specifically configured to store the keyword in the thesaurus in response to the third input received by the receiving module.
  13. 一种电子设备,其特征在于,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1-6任一项所述的信息推荐方法的步骤。An electronic device, characterized in that it includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, and the program or instruction is executed by the processor to achieve the right Steps of the information recommendation method described in any one of requirements 1-6.
  14. 一种计算机可读存储介质,其特征在于,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-6任一项所述的信息推荐方法的步骤。A computer-readable storage medium, characterized in that a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the information recommendation method according to any one of claims 1-6 is implemented A step of.
  15. 一种信息推荐装置,其特征在于,包括所述装置被配置成用于执行如权利要求1至6中任一项所述的信息推荐方法。An information recommendation apparatus, characterized in that the apparatus is configured to execute the information recommendation method according to any one of claims 1 to 6.
  16. 一种计算机程序产品,其特征在于,所述程序产品被至少一个处理器执行以实现如权利要求1至6任一项所述的信息推荐方法。A computer program product, characterized in that, the program product is executed by at least one processor to implement the information recommendation method according to any one of claims 1 to 6.
  17. 一种芯片,其特征在于,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1至6中任一项所述的信息推荐方法。A chip, characterized in that the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run a program or an instruction to implement any one of claims 1 to 6 The described information recommendation method.
PCT/CN2021/140476 2020-12-25 2021-12-22 Information recommendation method and apparatus, and electronic device WO2022135474A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011565318.6 2020-12-25
CN202011565318.6A CN112631437A (en) 2020-12-25 2020-12-25 Information recommendation method and device and electronic equipment

Publications (1)

Publication Number Publication Date
WO2022135474A1 true WO2022135474A1 (en) 2022-06-30

Family

ID=75325021

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/140476 WO2022135474A1 (en) 2020-12-25 2021-12-22 Information recommendation method and apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN112631437A (en)
WO (1) WO2022135474A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115599890A (en) * 2022-11-29 2023-01-13 深圳市人马互动科技有限公司(Cn) Product recommendation method and related device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631437A (en) * 2020-12-25 2021-04-09 维沃移动通信有限公司 Information recommendation method and device and electronic equipment
CN113407092A (en) * 2021-06-17 2021-09-17 北京达佳互联信息技术有限公司 Text box information processing method and device, electronic equipment and storage medium
CN113641252B (en) * 2021-07-06 2024-03-29 维沃移动通信有限公司 Text input method and device and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090198691A1 (en) * 2008-02-05 2009-08-06 Nokia Corporation Device and method for providing fast phrase input
CN103488796A (en) * 2013-10-12 2014-01-01 惠州Tcl移动通信有限公司 Inputting method based on context and mobile terminal
CN104808808A (en) * 2015-03-23 2015-07-29 联想(北京)有限公司 Information processing method and electronic device
CN106066706A (en) * 2016-05-26 2016-11-02 珠海市魅族科技有限公司 A kind of data processing method and intelligent terminal
CN106445189A (en) * 2016-12-16 2017-02-22 北京小米移动软件有限公司 Candidate word display method and device
CN106933381A (en) * 2017-03-16 2017-07-07 联想(北京)有限公司 A kind of information processing method and device
CN107102744A (en) * 2017-05-26 2017-08-29 维沃移动通信有限公司 A kind of recommendation method and electronic equipment for inputting vocabulary
CN112416142A (en) * 2020-11-20 2021-02-26 维沃移动通信有限公司 Method and device for inputting characters and electronic equipment
CN112631437A (en) * 2020-12-25 2021-04-09 维沃移动通信有限公司 Information recommendation method and device and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045412A (en) * 2015-08-28 2015-11-11 百度在线网络技术(北京)有限公司 Method and system for generating candidate item of input method
CN107102746B (en) * 2016-02-19 2023-03-24 北京搜狗科技发展有限公司 Candidate word generation method and device and candidate word generation device
CN106896937A (en) * 2017-02-28 2017-06-27 百度在线网络技术(北京)有限公司 Method and apparatus for being input into information
CN108536480B (en) * 2017-12-28 2021-05-28 Oppo广东移动通信有限公司 Input method configuration method and related product

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090198691A1 (en) * 2008-02-05 2009-08-06 Nokia Corporation Device and method for providing fast phrase input
CN103488796A (en) * 2013-10-12 2014-01-01 惠州Tcl移动通信有限公司 Inputting method based on context and mobile terminal
CN104808808A (en) * 2015-03-23 2015-07-29 联想(北京)有限公司 Information processing method and electronic device
CN106066706A (en) * 2016-05-26 2016-11-02 珠海市魅族科技有限公司 A kind of data processing method and intelligent terminal
CN106445189A (en) * 2016-12-16 2017-02-22 北京小米移动软件有限公司 Candidate word display method and device
CN106933381A (en) * 2017-03-16 2017-07-07 联想(北京)有限公司 A kind of information processing method and device
CN107102744A (en) * 2017-05-26 2017-08-29 维沃移动通信有限公司 A kind of recommendation method and electronic equipment for inputting vocabulary
CN112416142A (en) * 2020-11-20 2021-02-26 维沃移动通信有限公司 Method and device for inputting characters and electronic equipment
CN112631437A (en) * 2020-12-25 2021-04-09 维沃移动通信有限公司 Information recommendation method and device and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115599890A (en) * 2022-11-29 2023-01-13 深圳市人马互动科技有限公司(Cn) Product recommendation method and related device

Also Published As

Publication number Publication date
CN112631437A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
WO2022135474A1 (en) Information recommendation method and apparatus, and electronic device
US9436918B2 (en) Smart selection of text spans
US9519641B2 (en) Photography recognition translation
US9053098B2 (en) Insertion of translation in displayed text consisting of grammatical variations pertaining to gender, number and tense
AU2014212844B2 (en) Character and word level language models for out-of-vocabulary text input
US20120297294A1 (en) Network search for writing assistance
EP2713255B1 (en) Method and electronic device for prompting character input
US9342233B1 (en) Dynamic dictionary based on context
WO2022083750A1 (en) Text display method and apparatus and electronic device
WO2015088669A1 (en) Multiple character input with a single selection
EP2909741A2 (en) Incremental multi-word recognition
CN107305438B (en) Method and device for sorting candidate items
US20150169537A1 (en) Using statistical language models to improve text input
WO2018076450A1 (en) Input method and apparatus, and apparatus for input
US11853689B1 (en) Computer-implemented presentation of synonyms based on syntactic dependency
US20170270092A1 (en) System and method for predictive text entry using n-gram language model
CN107092424B (en) Display method and device of error correction items and device for displaying error correction items
WO2022105754A1 (en) Character input method and apparatus, and electronic device
WO2022247789A1 (en) Candidate word update method and apparatus, and electronic device
CN107797676B (en) Single character input method and device
CN107132927B (en) Input character recognition method and device for recognizing input characters
CN112764734B (en) Auxiliary method and device for code editing and electronic equipment
WO2022143523A1 (en) Vocabulary display method and apparatus, and electronic device
WO2022188805A1 (en) Keyword search method and apparatus, and electronic device
CN113157966B (en) Display method and device and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21909469

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21909469

Country of ref document: EP

Kind code of ref document: A1