[go: up one dir, main page]

WO2019184295A1 - Method and apparatus for word prediction with no preceding text, and electronic device - Google Patents

Method and apparatus for word prediction with no preceding text, and electronic device Download PDF

Info

Publication number
WO2019184295A1
WO2019184295A1 PCT/CN2018/109587 CN2018109587W WO2019184295A1 WO 2019184295 A1 WO2019184295 A1 WO 2019184295A1 CN 2018109587 W CN2018109587 W CN 2018109587W WO 2019184295 A1 WO2019184295 A1 WO 2019184295A1
Authority
WO
WIPO (PCT)
Prior art keywords
preset
prediction
word
strategy
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2018/109587
Other languages
French (fr)
Chinese (zh)
Inventor
王培娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Publication of WO2019184295A1 publication Critical patent/WO2019184295A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0237Character input methods using prediction or retrieval techniques

Definitions

  • the present application relates to the field of word prediction technology, and in particular, to a method, an apparatus, and an electronic device for predicting a word above.
  • the above prediction technique refers to: after the user adjusts the keyboard of the input method application software, the input method application software predicts the predicted word based on the historical input information and/or the currently operated application software, and presents it to the user for the user to select the input.
  • the input method application software predicts the predicted word based on the historical input information and/or the currently operated application software, and presents it to the user for the user to select the input.
  • the input method application software may first determine the high frequency word input by the user history, that is, the input frequency is higher than a certain threshold.
  • the input method application software displays the high frequency word determined above as a predictive word for the user to select input; or, after the user adjusts the keyboard of the input method application software, the input method application software may first determine the current operation.
  • the application software further determines a high frequency word input by the user history in the currently operated application software, that is, a word whose input frequency is higher than a certain threshold, and the input method application software displays the high frequency word determined above as a prediction word. For users to choose input, and so on.
  • the input method application software determines that the currently operating application software is the game application software and determines that the input frequency of the word “Run” is higher than a certain threshold, then the input method application software will “Run” above. "The words are displayed as predictive words.”
  • the input method application software determines that the currently operated application software is the chat application software and determines that the input frequency of the word “Hello” is higher than a certain threshold, then the input method application software will “ Words such as "Hello” are displayed as predictive words.
  • the prediction word is predicted only based on the historical input information and/or the currently operating application software, and the prediction mode is monotonous and not intelligent enough.
  • the purpose of the embodiments of the present application is to provide a method, an apparatus, and an electronic device for predicting a word above, so as to achieve more intelligent prediction of the above, and to improve the degree of attention and click rate of the user to a certain extent.
  • the specific technical solutions are as follows:
  • an embodiment of the present application provides a method for predicting a word above, the method comprising:
  • the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information;
  • the preset prediction policy includes: a policy for performing word prediction based on the first type of time information;
  • step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information including:
  • the preset correspondence relationship includes: each prediction candidate word and the first preset time Correspondence of segments;
  • the prediction candidate words corresponding to the target time period are determined as prediction words.
  • the preset prediction policy includes: a policy for performing word prediction based on the second type of time information;
  • step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information including:
  • the first holiday database stores a correspondence between each preset holiday candidate word and a holiday date
  • the preset holiday candidate words whose corresponding holiday date is the same as the current date are determined as the predicted words.
  • the preset prediction policy includes: a policy for performing word prediction based on user information;
  • step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information including:
  • the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;
  • the acquired identifier of the current chat object is determined as a predicted word.
  • the method further includes:
  • the setting information is output, where the setting information includes: prompting the user to open the path information of the preset auxiliary right.
  • the preset prediction policy includes: a policy for performing word prediction based on user information and first type time information;
  • step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information including:
  • the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;
  • the identifier of the current chat object is obtained;
  • the pre-stored historical input word includes: a word entered by the user for each second preset time period for the identifier of the current chat object.
  • the preset prediction policy includes: a policy for performing word prediction based on user information and second type time information;
  • step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information including:
  • the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;
  • the identifier of the current chat object is obtained;
  • the preset prediction policy includes at least: a policy for performing word prediction based on the first type of time information, a policy for performing word prediction based on the second type of time information, a policy for predicting words based on user information, based on user information, and
  • the first type of time information carries out a strategy of word prediction and at least two types of strategies for performing word prediction based on user information and second type of time information;
  • the method further includes: before the step of determining a predicted word based on the user-based and/or time information based on the acquired preset prediction policy, the method further includes:
  • step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information including:
  • the prediction words are determined based on each type of strategy included in the acquired preset prediction strategy according to the respective priorities of each type of the obtained strategy.
  • an embodiment of the present application provides an air word prediction apparatus, where the apparatus includes:
  • a first acquiring module configured to acquire a preset prediction policy after acquiring the foregoing prediction instruction, where the preset prediction policy includes at least: a policy for performing word prediction based on user information and/or time information;
  • a determining module configured to determine a predicted word based on a strategy for performing word prediction based on the user information and/or the time information included in the acquired preset prediction policy
  • a presentation module for presenting the determined predictive words.
  • the preset prediction policy includes: a policy for performing word prediction based on the first type of time information;
  • the determining module includes:
  • a first acquiring unit configured to acquire a current time of the electronic device
  • a first determining unit configured to determine, from the preset correspondence, a first preset time period that matches the current time, as a target time segment, where the preset correspondence includes: each prediction candidate Correspondence between the word and the first preset time period;
  • a second determining unit configured to determine, from the preset correspondence, a prediction candidate word corresponding to the target time segment as a predicted word.
  • the preset prediction policy includes: a policy for performing word prediction based on the second type of time information;
  • the determining module includes:
  • a second acquiring unit configured to acquire a current date of the electronic device
  • a first matching unit configured to match the current date with the first holiday database, wherein the first holiday database stores a correspondence between each preset holiday candidate word and a holiday date;
  • a third determining unit configured to, when the matching is successful, determine, from the first holiday database, a preset holiday candidate word whose corresponding holiday date is the same as the current date, as the predicted word.
  • the preset prediction policy includes: a policy for performing word prediction based on user information;
  • the determining module includes:
  • a third obtaining unit configured to acquire an identifier of the currently operated application
  • a first determining unit configured to determine, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, and determine whether the preset auxiliary permission of the electronic device is enabled
  • a fourth obtaining unit configured to acquire an identifier of the current chat object when determining that the preset auxiliary permission is enabled
  • a fourth determining unit configured to determine the acquired identifier of the current chat object as a predicted word.
  • the determining module further includes:
  • the output unit is configured to output setting information when the preset auxiliary permission is not turned on, where the setting information includes: prompting the user to open the path information of the preset auxiliary right.
  • the preset prediction policy includes: a policy for performing word prediction based on user information and first type time information;
  • the determining module includes:
  • a fifth obtaining unit configured to acquire an identifier of the currently operated application, and acquire a current time of the electronic device
  • a second determining unit configured to determine, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, and determine whether the preset auxiliary permission of the electronic device is enabled;
  • a sixth obtaining unit configured to acquire an identifier of the current chat object when determining that the preset auxiliary permission is enabled
  • a fifth determining unit configured to determine, from the pre-stored historical input words, a word corresponding to the identifier of the current chat object and corresponding to the current time, and the corresponding input number is higher than a predetermined input threshold,
  • the pre-stored historical input word includes: a word entered by the user for each second preset time period for the identifier of the current chat object.
  • the preset prediction policy includes: a policy for performing word prediction based on user information and second type time information;
  • the determining module includes:
  • a seventh obtaining unit configured to acquire an identifier of the currently operated application, and obtain a current date of the electronic device
  • a third determining unit configured to determine, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, and determine whether the preset auxiliary permission of the electronic device is enabled;
  • An eighth obtaining unit configured to acquire an identifier of the current chat object when determining that the preset auxiliary permission is enabled
  • a second matching unit configured to match the identifier of the current chat object and the current date with a second holiday database, wherein the second holiday database stores an identifier of each object, a preset reminder date, and Presetting the correspondence between candidate words;
  • a sixth determining unit configured to: when the matching is successful, determine, from the second holiday database, that the identifier of the corresponding object is the same as the identifier of the current chat object, and the corresponding preset reminder date is the same as the current date The preset reminds the candidate as a predictive word.
  • the preset prediction policy includes at least: a policy for performing word prediction based on the first type of time information, a policy for performing word prediction based on the second type of time information, a policy for predicting words based on user information, based on user information, and
  • the first type of time information carries out a strategy of word prediction and at least two types of strategies for performing word prediction based on user information and second type of time information;
  • the device also includes:
  • a second acquiring module configured to perform a word prediction based on the user information and/or the time information based on the acquired preset prediction policy, and obtain the preset prediction strategy before determining the predicted word The corresponding priority of each type of strategy included;
  • the determining module is specifically configured to
  • the prediction words are determined based on each type of strategy included in the acquired preset prediction strategy according to the respective priorities of each type of the obtained strategy.
  • an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
  • a memory for storing a computer program
  • the processor when used to execute the computer program stored in the memory, implements the steps of the above-mentioned empty word prediction method provided by the embodiments of the present application.
  • the embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the foregoing An empty word prediction method step as described above.
  • the embodiment of the present application provides a computer program product, when it is run on a computer, causing the computer to execute the step of the above-mentioned word prediction method according to any of the above embodiments.
  • the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information; and based on the acquired preset Predicting the strategy, determining the predictive words; presenting the determined predictive words.
  • the word prediction can be performed based on the user information and/or the time information, so that the determined predicted words are more related to the user and/or the time, and the user's attention and the click rate are improved to some extent, and It is no longer a single application based on historical input information and/or currently operating applications, which increases the prediction of word prediction and enables more intelligent predictions.
  • implementing any of the products or methods of the present application necessarily does not necessarily require all of the advantages described above to be achieved at the same time.
  • FIG. 1 is a schematic flowchart diagram of a method for predicting an empty word provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of determining a predicted word according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of another process for determining a predicted word according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of another process for determining a predicted word according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of another process for determining a predicted word according to an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of another process for determining a predicted word according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another process for determining a predicted word according to an embodiment of the present application.
  • FIG. 8 is another schematic flowchart of a method for predicting a word in the air according to an embodiment of the present disclosure
  • FIG. 9 is a schematic structural diagram of an air word prediction apparatus according to an embodiment of the present disclosure.
  • FIG. 10 is another schematic structural diagram of a determining module according to an embodiment of the present disclosure.
  • FIG. 11 is another schematic structural diagram of a determining module according to an embodiment of the present disclosure.
  • FIG. 12 is another schematic structural diagram of a determining module according to an embodiment of the present disclosure.
  • FIG. 13 is another schematic structural diagram of a determining module according to an embodiment of the present disclosure.
  • FIG. 14 is another schematic structural diagram of a determining module according to an embodiment of the present disclosure.
  • 15 is another schematic structural diagram of a determining module according to an embodiment of the present application.
  • FIG. 16 is another schematic structural diagram of an air word prediction apparatus according to an embodiment of the present application.
  • FIG. 17 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the embodiment of the present application provides a method, a device, and an electronic device for predicting a word above, so as to achieve more intelligent prediction of the above, and to improve the degree of attention and click rate of the user to a certain extent.
  • an embodiment of the present application provides a method for predicting a word above, which may include the following steps:
  • S101 After obtaining the upper prediction instruction, acquiring a preset prediction policy, where the preset prediction policy at least includes: a policy for performing word prediction based on user information and/or time information;
  • the method for predicting the vocabulary provided by the embodiment of the present application can be applied to a first application, where the first application is installed on an electronic device, and the electronic device can be a computer, a smart phone, a game machine, or the like.
  • the first application may exist in the form of dedicated client software, such as a special input method application software, or may be in the form of a plug-in of related client software, for example: related Plugin for input method application software.
  • the foregoing empty prediction instruction may be an instruction automatically generated by the first application when the user manually raises or the electronic device automatically raises the keyboard of the first application.
  • the preset prediction strategy is obtained, and the preset prediction strategy may be preset by the user according to his own needs, or may be set by default for the first application, which is all possible.
  • the default setting mentioned in the embodiment of the present application may refer to a setting when the first application is installed on the electronic device.
  • the foregoing preset prediction strategy includes at least a policy of performing word prediction based on user information and/or time information.
  • the user information may include information of the user itself, and may include information of an object that communicates with the user, for example, an identifier of the current chat object of the user, and information set by the user for the current chat object, for example, the current chat object. Nickname, reminder content and remarks.
  • the above time information may include a date and/or a specific time, such as x, y, z, and the like.
  • S102 Determine, according to the acquired preset prediction policy, a policy for performing word prediction based on user information and/or time information, and determine a predicted word;
  • the first application may continue to determine the predicted word based on the at least one of the preset prediction policies that performs word prediction based on the user information and/or the time information. For example, when the preset prediction strategy includes a policy for performing word prediction based on user information, that is, determining a predicted word based on user information; when the preset predicted policy includes a policy for predicting words based on time information, that is, based on time The information is used to determine a predicted word; when the preset prediction strategy includes a policy for performing word prediction based on user information and time information, that is, based on user information and time information, the predicted word is determined.
  • the predicted word determined above is displayed.
  • the first application can present the determined predictive words in a preset predictive word display area. In an implementation manner, the first application determines that there are multiple predicted words. In one case, the first application may display the determined predicted words in a random order; in another case, An application can present the determined predictive words based on a pre-set display order.
  • the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information; In the prediction strategy, at least a strategy for word prediction based on user information and/or time information is included; and the determined prediction words are displayed.
  • the word prediction can be performed based on the user information and/or the time information, so that the determined predicted words are more related to the user and/or the time, and the user's attention and the click rate are improved to some extent, and It is no longer a single application based on historical input information and/or currently operating applications, which increases the prediction of word prediction and enables more intelligent predictions.
  • the preset prediction strategy includes: a strategy for performing word prediction based on the first type of time information;
  • the step of performing the word prediction based on the user information and/or the time information based on the obtained preset prediction policy may include:
  • S202 Determine, from the preset correspondence, a first preset time period that matches the current time, as the target time segment, where the preset correspondence includes: each predicted candidate word and the first preset time period.
  • S203 Determine, from the preset correspondence, a prediction candidate word corresponding to the target time segment as a prediction word.
  • the preset correspondence is pre-stored in the local device or the connected storage device of the electronic device where the first application is located.
  • the preset correspondence includes: each prediction candidate word and the first The correspondence of preset time periods.
  • the first preset time period may be: a time period obtained by being divided in advance 24 hours a day.
  • the first preset time period may be divided by the user according to his own needs, or may be determined by the first application based on the experience value. For example, 24 hours a day is divided into three time segments, which are: a first preset time period of 6:00-12:00, a first preset time period of 12:00-18:00, and a first preset time period. 18:00-24:00.
  • the preset correspondence may include: the first preset time period 6:00-12:00 corresponds to the prediction candidate word “Good morning”, and the first preset time period 12:00-18:00 corresponds to the prediction candidate.
  • the first application acquires the current time of the electronic device where the device is located, and associates the current time with the preset relationship. Performing a matching, determining a first preset time period that includes the current time, as a first preset time period that matches the current time, that is, as a target time segment, and further, determining a preset correspondence relationship, where the target time segment corresponds to a candidate for prediction as a predictive term.
  • the electronic device determines, in the preset correspondence, that the prediction candidate word corresponding to the target time period 6:00-12:00 is “Good morning”,
  • the predicted candidate word "Good morning” is used as a predictive word.
  • the word prediction is performed by the first type of time information described above, so that the word prediction method of the above-mentioned word prediction process is more and more intelligent. And closely related to time information, it can attract users' attention and click rate to a certain extent.
  • the preset prediction strategy includes: a strategy for performing word prediction based on the second type of time information;
  • the step of performing the word prediction based on the user information and/or the time information based on the obtained preset prediction policy may include:
  • S302 Match the current date with the first holiday database, where the first holiday database stores a correspondence between each preset holiday candidate word and the holiday date;
  • a first holiday database is pre-stored in the local or connected storage device of the electronic device where the first application is located, where each preset holiday candidate word and holiday is stored in the first holiday database.
  • the correspondence of dates For example, the preset holiday candidate "Happy Valentine's Day” corresponds to the holiday date February 14th, and the preset holiday candidate "International Labor Day” or "May Day” corresponds to the holiday date May 1st.
  • the first application acquires the current date of the electronic device in which it is located, and matches the current date with the first holiday database. That is, matching with the correspondence between each preset holiday candidate word stored in the first holiday database and the holiday date.
  • the matching is successful, that is, when there is a corresponding relationship including the current date
  • the first holiday database is determined from the first holiday database.
  • the preset holiday candidate words corresponding to the holiday date and the current date are used as prediction words.
  • the current date of the electronic device that the first application acquires is February 14th
  • the holiday date stored in the first holiday database is successfully matched on February 14th
  • the first application is from the first holiday database.
  • a predetermined holiday candidate word "Happy Valentine's Day” having the same holiday date as the current date of February 14 is determined as a predictive word.
  • Word prediction by the second type of time information described above makes the word prediction method of the above-mentioned word prediction process more and more intelligent.
  • the predicted holiday candidate words for the holiday are predicted, which can attract more attention of the user, thereby improving the user's click rate and saving the time taken by the user to manually play the preset holiday candidate words.
  • the preset prediction strategy includes: a strategy for performing word prediction based on user information;
  • the step of performing the word prediction based on the user information and/or the time information based on the obtained preset prediction policy may include:
  • S402 Determine, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, determine whether the preset auxiliary permission of the electronic device is enabled;
  • S404 Determine the acquired identifier of the current chat object as a predicted word.
  • the local or connected storage device of the electronic device where the first application is located may pre-store the identifiers of the plurality of preset chat application applications.
  • the preset prediction strategy acquired by the first application includes: a policy for performing word prediction based on the user information
  • the first application acquires an identifier of the currently operated application, and respectively obtains the acquired identifier of the currently operated application.
  • the stored identifier of the preset chat application is compared; when the identifier of the stored preset chat application has the same identifier as the acquired currently operated application, the first application determines that The currently acquired application obtained is the default chat class application.
  • the first application determines that the acquired currently operated application is a preset chat type application, the first application continues to execute the subsequent empty word prediction process.
  • the first application may acquire information about the interface of the electronic device and the change of the interface content.
  • the preset auxiliary permission of the electronic device may be an auxiliary permission Accessibility.
  • the first application may continue to obtain the identifier of the current chat object, and the first application may determine the identifier of the current chat object obtained as the prediction. word.
  • the identifier of the current chat object may be: a nickname or an account number or a note of the current chat object.
  • the first application when the first application has the right to obtain the chat information of the current chat object in the currently operated application, in the embodiment of the present application, the first application may further be based on the current chat object. Chat information, word prediction, this is also possible. For example, when the latest chat information of the current chat object is obtained as a problem, in the embodiment of the present application, the first application may use the answer of the above question as a predictive word and display it.
  • the method may include the following steps:
  • S501 After obtaining the above prediction instruction, acquiring a preset prediction strategy, where the preset prediction strategy includes: a policy for performing word prediction based on user information;
  • S502 Obtain an identifier of an currently operated application.
  • S503 determining, according to the identifier of the currently operated application, that the currently operated application is a preset chat application, determining whether the preset auxiliary permission of the electronic device is enabled; and when determining that the preset auxiliary permission is enabled, executing S504, When it is determined that the preset auxiliary authority is not turned on, executing S507;
  • S504 Acquire an identifier of a current chat object.
  • S507 Output setting information, where the setting information includes: prompting the user to open path information of the preset auxiliary authority.
  • S501 is the same as S101 shown in FIG. 1
  • S502 is the same as S401 shown in FIG. 4
  • S503 is the same as S402 shown in FIG. 4
  • S504 is the same as S403 shown in FIG. 4
  • S505 is the same as FIG.
  • the S404 shown is the same, and the above S506 is the same as S103 shown in FIG.
  • the first application may output the prompting user.
  • the setting information of the path information of the preset auxiliary authority is turned on to prompt the user to open the preset auxiliary authority, and the prediction mode of the above prediction is increased. Increasing the user's attention to the predicted words predicted by the first application, and improving the user's click rate on the predicted words.
  • the first application may output the above setting information in the form of a pop-up window, or may output the above-mentioned setting information in the form of a page jump, which is all possible.
  • the preset prediction strategy includes: a policy for performing word prediction based on user information and first type time information;
  • the step of determining a predicted word according to the at least one of the obtained preset prediction strategies based on the user information and/or the time information, and the determining the predicted word may include:
  • S601 Obtain an identifier of the currently operated application, and obtain a current time of the electronic device.
  • S602 determining, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, determining whether the preset auxiliary permission of the electronic device is enabled;
  • S602 is the same as S402 shown in FIG. 4
  • S603 is the same as S403 shown in FIG.
  • S604 Determine, from the pre-stored historical input words, a word corresponding to the current chat object and corresponding to the current time, and the corresponding input number is higher than a predetermined input threshold, as a predictive word.
  • the pre-stored historical input word includes: a word entered by the user in the second preset time period for the identifier of the current chat object.
  • the first application when the preset prediction policy includes a policy for performing word prediction based on the user information and the first type of time information, after the keyboard of the first application is revoked, the first application acquires the currently operated application. Identify and obtain the current time of the electronic device, and then determine whether the preset auxiliary permission of the electronic device is turned on. When the preset auxiliary permission is enabled, the first application may continue to obtain the identifier of the current chat object, and the first application may determine the predicted word based on the acquired identifier of the current chat object and the current time.
  • the historical chat information of the user and the current chat object, and the second preset corresponding to the sending time or the receiving time corresponding to each information in the historical chat information are pre-stored in the local or connected storage device of the electronic device. period.
  • the information input by the user in the historical chat information is referred to as a historical input word.
  • the acquired current chat object identifier and the current time are matched with the pre-stored historical input words, that is, from the pre-stored historical input words.
  • a word corresponding to the current chat object and corresponding to the current time, and the corresponding number of input times is higher than a predetermined input threshold, as a predictive word.
  • the second preset time period may be divided by the user according to the user's needs, or may be determined by the first application based on the experience value.
  • the second preset time period is divided based on twenty-four hours a day.
  • the word corresponding to the current time may be: a word corresponding to the second preset time period including the current time in the pre-stored historical input word;
  • the predetermined input threshold may be set by the user according to his own needs, or may be set by the first application by default.
  • the current time that the first application obtains is 17:00, and it is determined that the currently operated application is a preset chat application, and the preset auxiliary permission is determined to be opened, and the identifier of the current chat object obtained is “ Husband"
  • the pre-stored historical input word includes: the identifier for the object "husband” is input in the second preset time period from 17:00 to 17:30, and the corresponding input number is higher than the predetermined input threshold, including "husband, I am off work. "The identification of the object "husband” is entered in the second preset time period from 17:30 to 18:00, and the corresponding input number is higher than the predetermined input threshold including "I am home”;
  • the first application determines, from the pre-stored historical input words, the word corresponding to the current husband's identifier "husband” and corresponding to the current time 17:00, and the corresponding number of input times is higher than the predetermined input threshold is "husband” I am off work," as a predictive term.
  • the foregoing preset prediction strategy includes: a policy for performing word prediction based on user information and second type time information;
  • the step of determining a predicted word according to the at least one of the obtained preset prediction strategies based on the user information and/or the time information, and the determining the predicted word may include:
  • S701 Obtain an identifier of the currently operated application, and obtain a current date of the electronic device;
  • S702 determining, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, determining whether the preset auxiliary permission of the electronic device is enabled;
  • S702 is the same as S402 shown in FIG. 4, and S703 is the same as S403 shown in FIG.
  • the second holiday database stores an identifier of each object, a correspondence between a preset reminder date and a preset reminder candidate word;
  • the second holiday database is stored in the local or connected storage device of the electronic device, and the second holiday database includes: an identifier of each object, a preset reminder date, and a preset reminder candidate word. Correspondence. The above correspondence may be set by the user, for example, the user sets according to the birthday date of the object he is chatting with; or the user sets according to the special date agreed between the user and the chat object.
  • the preset reminder date may be: a birthday date of the object corresponding to the identifier of the object.
  • the preset reminder candidate may include “Happy Birthday” or “ID of the object + happy birthday”; or
  • the preset reminder date may be: the above special date, and the preset reminder candidate words may be set by the user.
  • the method may include the following steps:
  • S801 After obtaining the above prediction instruction, acquiring a preset prediction strategy, where the preset prediction strategy includes at least: a strategy for performing word prediction based on the first type of time information, and a policy strategy for performing word prediction based on the second type of time information. a strategy for word prediction based on user information and first type of time information, and at least two types of strategies for word prediction based on user information and second type of time information;
  • S802 Acquire a priority corresponding to each type of policy included in the preset prediction policy.
  • S803 Determine a prediction term according to each type of policy included in the acquired preset prediction policy according to the corresponding priority of each type of the obtained strategy.
  • the foregoing preset prediction strategy includes at least: a strategy for performing word prediction based on the first type of time information, and a word prediction based on the second type of time information.
  • a policy strategy, a strategy for word prediction based on user information and first type of time information, and at least two types of strategies for word prediction based on user information and second type of time information may preset a priority for each type of policy. Levels, according to the respective priorities of each type of policy, determine the predicted words based on each type of strategy included in the obtained preset prediction strategy.
  • the preset prediction strategy includes: a strategy for word prediction based on the first type of time information, a strategy for word prediction based on the second type of time information, and a strategy for word prediction based on user information
  • the obtained priority is:
  • the priority of the strategy for word prediction based on the first type of time information is 1, the priority of the strategy for word prediction based on the second type of time information is 2, and the priority of the strategy for word prediction based on user information is 3
  • the greater the value, the higher the priority at this time, the first application first performs a word prediction strategy based on the user information, and performs word prediction; and then performs a word prediction strategy based on the second type of time information to perform word prediction;
  • the first type of time information is used to perform word prediction strategies for word prediction.
  • the priority corresponding to each type of the foregoing policy may be set by the user or may be set by the first application by default.
  • the foregoing policy for performing word prediction based on the first type of time information, the strategy for performing word prediction based on the second type of time information, and the strategy for performing word prediction based on user information may also be used.
  • At least one type of strategy in combination with related technologies, based on historical input information and/or currently operating application software, performs a policy of predicting words above, and jointly provides the user with the above-mentioned word prediction function.
  • the preset prediction strategy includes: a policy for performing word prediction based on the first type of time information, a strategy for performing word prediction based on the second type of time information, a policy for predicting words based on user information, based on user information, and the first
  • the time-information-based strategy for word prediction and at least one of the strategies for word prediction based on user information and second-class time information may also include application software based on historical input information and/or current operation in related technologies. Conduct a strategy for empty word prediction.
  • the priority of the above-mentioned policy for predicting words based on user information and/or time information provided in the embodiments of the present application is higher than the strategy for predicting words in the related art.
  • the first application After acquiring the above prediction instruction, acquires a preset prediction strategy, where the preset prediction strategy includes at least: a strategy for performing word prediction based on the first type of time information, and a word prediction based on the second type of time information. Strategies, strategies for word prediction based on user information, and strategies for predicting words based on historical input information and/or current operations;
  • the first application obtains a priority corresponding to each type of policy included in the preset prediction policy, where the policy for performing word prediction based on the second type of time information corresponds to a priority of 4, and the word is based on the first type of time information.
  • the predicted policy has a priority of 3, the policy based on the user information for the word prediction is 2, and the policy based on the historical input information and/or the currently operated application software for performing the above-mentioned word prediction is 1;
  • the first application acquires the current date of the electronic device in which it is located based on the acquired priority, and matches the current date with the first holiday database. When the matching is successful, and the first holiday database is determined, the corresponding holiday date and current are determined. When the default holiday candidate with the same date is "Happy Valentine's Day”, "Happy Valentine's Day” is used as the predictive word;
  • the first application obtains the current time of the electronic device in which it is located, and determines a first preset time period that matches the current time from the preset correspondence, as the target time segment, and determines the target time from the preset correspondence relationship.
  • the prediction candidate word corresponding to the segment is “Good morning”, and “Good morning” is used as the prediction word;
  • the first application acquires an identifier of the currently operated application, and determines, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, determining whether the preset auxiliary permission of the electronic device is enabled;
  • the preset auxiliary permission is enabled, the identifier of the current chat object is obtained as “Ellie”; the obtained “Ellie” is determined as the predicted word;
  • the first application displays the above-defined predicted words "Happy Valentine's Day, Good morning, Ellie";
  • the policy of performing the above-mentioned word prediction based on the historical input information and/or the currently operated application software may be continued, and the word prediction is performed to obtain the predicted word, which is “The At this time, the first application displays the above-predicted predicted words "Happy Valentine's Day, Good morning, The”.
  • the embodiment of the present application provides an empty word prediction device.
  • the device includes:
  • the first obtaining module 910 is configured to obtain a preset prediction policy after acquiring the foregoing prediction instruction, where the preset prediction policy includes at least: a policy for performing word prediction based on user information and/or time information;
  • the determining module 920 is configured to determine a predicted word based on a strategy for performing word prediction based on the user information and/or the time information included in the acquired preset prediction policy;
  • the display module 930 is configured to display the determined prediction words.
  • the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information;
  • the prediction strategy includes at least a policy of performing word prediction based on user information and/or time information, determining a predicted word, and displaying the determined predicted word.
  • the word prediction can be performed based on the user information and/or the time information, so that the determined predicted words are more related to the user and/or the time, and the user's attention and the click rate are improved to some extent, and It is no longer a single application based on historical input information and/or currently operating applications, which increases the prediction of word prediction and enables more intelligent predictions.
  • the preset prediction strategy includes: a policy for performing word prediction based on the first type of time information;
  • the determining module 920 includes:
  • the first obtaining unit 1001 is configured to acquire a current time of the electronic device.
  • the first determining unit 1002 is configured to determine, from the preset correspondence, a first preset time period that matches the current time, as the target time segment, where the preset correspondence includes: each prediction Correspondence between the candidate word and the first preset time period;
  • the second determining unit 1003 is configured to determine, from the preset correspondence, a prediction candidate word corresponding to the target time segment as a prediction word.
  • the preset prediction strategy includes: a strategy for performing word prediction based on the second type of time information;
  • the determining module 920 includes:
  • the second obtaining unit 1101 is configured to acquire a current date of the electronic device.
  • the first matching unit 1102 is configured to match the current date with the first holiday database, wherein the first holiday database stores a correspondence between each preset holiday candidate word and a holiday date;
  • the third determining unit 1103 is configured to, when the matching is successful, determine, from the first holiday database, a preset holiday candidate word whose corresponding holiday date is the same as the current date, as the predicted word.
  • the preset prediction strategy includes: a policy for performing word prediction based on user information;
  • the determining module 920 includes:
  • the third obtaining unit 1201 is configured to acquire an identifier of the currently operated application.
  • the first determining unit 1202 is configured to determine, according to the identifier of the currently operated application, that the currently operated application is a preset chat application, determine whether the preset auxiliary permission of the electronic device is enabled;
  • the fourth obtaining unit 1203 is configured to acquire an identifier of the current chat object when determining that the preset auxiliary right is turned on;
  • the fourth determining unit 1204 is configured to determine the acquired identifier of the current chat object as a predicted word.
  • the determining module 920 further includes:
  • the output unit 1301 is configured to output setting information when the preset auxiliary permission is not turned on, where the setting information includes: prompting the user to open the path information of the preset auxiliary right.
  • the preset prediction strategy includes: a policy for performing word prediction based on user information and first type time information;
  • the determining module 920 includes:
  • the fifth obtaining unit 1401 is configured to acquire an identifier of the currently operated application, and acquire a current time of the electronic device.
  • the second determining unit 1402 is configured to determine, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, and determine whether the preset auxiliary permission of the electronic device is enabled;
  • the sixth obtaining unit 1403 is configured to acquire an identifier of the current chat object when determining that the preset auxiliary permission is enabled;
  • a fifth determining unit 1404 configured to determine, from the pre-stored historical input words, a word corresponding to the identifier of the current chat object and corresponding to the current time, and the corresponding input times are higher than a predetermined input threshold
  • the pre-stored historical input word includes: a word entered by the user for each second preset time period for the identifier of the current chat object.
  • the preset prediction strategy includes: a policy for performing word prediction based on user information and second type time information;
  • the determining module 920 includes:
  • the seventh obtaining unit 1501 is configured to acquire an identifier of the currently operated application, and acquire a current date of the electronic device.
  • the third determining unit 1502 is configured to determine, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, and determine whether the preset auxiliary permission of the electronic device is enabled;
  • the eighth obtaining unit 1503 is configured to acquire an identifier of the current chat object when determining that the preset auxiliary permission is enabled;
  • the second matching unit 1504 is configured to match the identifier of the current chat object and the current date with a second holiday database, where the identifier of each object and the preset reminder date are stored in the second holiday database. Correspondence with preset reminder candidates;
  • the sixth determining unit 1505 is configured to: when the matching is successful, determine, from the second holiday database, that the identifier of the corresponding object is the same as the identifier of the current chat object, and the preset preset reminding date and the current date The same preset reminder candidate is used as the predictive word.
  • the preset prediction strategy includes at least: a policy for performing word prediction based on the first type of time information, a policy for performing word prediction based on the second type of time information, a strategy for performing word prediction based on the user information, based on The user information and the first type of time information perform a word prediction strategy and at least two types of strategies for word prediction based on the user information and the second type of time information;
  • the device further includes:
  • the second obtaining module 1610 is configured to: perform a word prediction based on the user information and/or the time information based on the acquired preset prediction policy, and obtain the preset prediction strategy before determining the predicted word. The priority of each type of strategy included;
  • the determining module 920 is specifically configured to be used
  • the prediction words are determined based on each type of strategy included in the acquired preset prediction strategy according to the respective priorities of each type of the obtained strategy.
  • the embodiment of the present application further provides an electronic device, as shown in FIG. 17, including a processor 171, a communication interface 172, a memory 173, and a communication bus 174, wherein the processor 171, the communication interface 172 The memory 173 completes communication with each other through the communication bus 174.
  • the storage unit 173 is configured to store a computer program; wherein the computer program is the first application program mentioned in the embodiment of the present application;
  • the processor 171 when used to execute the computer program stored in the memory 173, implements the above-mentioned method for predicting the above-mentioned words provided by the embodiment of the present application, and may include the following steps:
  • the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information;
  • the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information;
  • the prediction strategy includes at least a policy of performing word prediction based on user information and/or time information, determining a predicted word, and displaying the determined predicted word.
  • the word prediction can be performed based on the user information and/or the time information, so that the determined predicted words are more related to the user and/or the time, and the user's attention and the click rate are improved to some extent, and It is no longer a single application based on historical input information and/or currently operating applications, which increases the prediction of word prediction and enables more intelligent predictions.
  • the preset prediction strategy includes: a policy for performing word prediction based on the first type of time information;
  • the preset correspondence relationship includes: each prediction candidate word and the first preset time Correspondence of segments;
  • the prediction candidate words corresponding to the target time period are determined as prediction words.
  • the preset prediction strategy includes: a strategy for performing word prediction based on the second type of time information;
  • determining, according to the acquired preset prediction strategy, a policy for performing word prediction based on the user information and/or the time information, and determining the predicted word including:
  • the first holiday database stores a correspondence between each preset holiday candidate word and a holiday date
  • the preset holiday candidate words whose corresponding holiday date is the same as the current date are determined as the predicted words.
  • the preset prediction strategy includes: a policy for performing word prediction based on user information;
  • the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;
  • the acquired identifier of the current chat object is determined as a predicted word.
  • the method further includes:
  • the setting information is output, where the setting information includes: prompting the user to open the path information of the preset auxiliary right.
  • the preset prediction strategy includes: a policy for performing word prediction based on user information and first type time information;
  • the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;
  • the identifier of the current chat object is obtained;
  • the pre-stored historical input word includes: a word entered by the user for each second preset time period for the identifier of the current chat object.
  • the preset prediction strategy includes: a policy for performing word prediction based on user information and second type time information;
  • the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;
  • the identifier of the current chat object is obtained;
  • the preset prediction strategy includes at least: a policy for performing word prediction based on the first type of time information, a policy for performing word prediction based on the second type of time information, a strategy for performing word prediction based on the user information, based on The user information and the first type of time information perform a word prediction strategy and at least two types of strategies for word prediction based on the user information and the second type of time information;
  • the method for performing word prediction based on the user information and/or the time information based on the acquired preset prediction policy includes: before determining the predicted word, the method further includes:
  • step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information including:
  • the prediction words are determined based on each type of strategy included in the acquired preset prediction strategy according to the respective priorities of each type of the obtained strategy.
  • the communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the above electronic device and other devices.
  • the memory may include a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
  • RAM random access memory
  • NVM non-volatile memory
  • the memory may also be at least one storage device located away from the aforementioned processor.
  • the above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; or may be a digital signal processing (DSP), dedicated integration.
  • CPU central processing unit
  • NP network processor
  • DSP digital signal processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the embodiment of the present application is provided.
  • the method for predicting an empty word according to any of the above may include the steps of:
  • the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information;
  • the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information;
  • the prediction strategy includes at least a policy of performing word prediction based on user information and/or time information, determining a predicted word, and displaying the determined predicted word.
  • the word prediction can be performed based on the user information and/or the time information, so that the determined predicted words are more related to the user and/or the time, and the user's attention and the click rate are improved to some extent, and It is no longer a single application based on historical input information and/or currently operating applications, which increases the prediction of word prediction and enables more intelligent predictions.
  • the preset prediction strategy includes: a policy for performing word prediction based on the first type of time information;
  • the preset correspondence relationship includes: each prediction candidate word and the first preset time Correspondence of segments;
  • the prediction candidate words corresponding to the target time period are determined as prediction words.
  • the preset prediction strategy includes: a strategy for performing word prediction based on the second type of time information;
  • the first holiday database stores a correspondence between each preset holiday candidate word and a holiday date
  • the preset holiday candidate words whose corresponding holiday date is the same as the current date are determined as the predicted words.
  • the preset prediction strategy includes: a policy for performing word prediction based on user information;
  • the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;
  • the acquired identifier of the current chat object is determined as a predicted word.
  • the method further includes:
  • the setting information is output, where the setting information includes: prompting the user to open the path information of the preset auxiliary right.
  • the preset prediction strategy includes: a policy for performing word prediction based on user information and first type time information;
  • the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;
  • the identifier of the current chat object is obtained;
  • the pre-stored historical input word includes: a word entered by the user for each second preset time period for the identifier of the current chat object.
  • the preset prediction strategy includes: a policy for performing word prediction based on user information and second type time information;
  • the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;
  • the identifier of the current chat object is obtained;
  • the preset prediction strategy includes at least: a policy for performing word prediction based on the first type of time information, a policy for performing word prediction based on the second type of time information, a strategy for performing word prediction based on the user information, based on The user information and the first type of time information perform a word prediction strategy and at least two types of strategies for word prediction based on the user information and the second type of time information;
  • the method for performing word prediction based on the user information and/or the time information based on the acquired preset prediction policy includes: before determining the predicted word, the method further includes:
  • step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information including:
  • the prediction words are determined based on each type of strategy included in the acquired preset prediction strategy according to the respective priorities of each type of the obtained strategy.
  • the embodiment of the present application provides a computer program product, when it is run on a computer, causing the computer to perform the information reminding method step of any one of the foregoing embodiments:
  • the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information;
  • the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information;
  • the prediction strategy includes at least a policy of performing word prediction based on user information and/or time information, determining a predicted word, and displaying the determined predicted word.
  • the word prediction can be performed based on the user information and/or the time information, so that the determined predicted words are more related to the user and/or the time, and the user's attention and the click rate are improved to some extent, and It is no longer a single application based on historical input information and/or currently operating applications, which increases the prediction of word prediction and enables more intelligent predictions.
  • the preset prediction strategy includes: a policy for performing word prediction based on the first type of time information;
  • the preset correspondence relationship includes: each prediction candidate word and the first preset time Correspondence of segments;
  • the prediction candidate words corresponding to the target time period are determined as prediction words.
  • the preset prediction strategy includes: a strategy for performing word prediction based on the second type of time information;
  • the first holiday database stores a correspondence between each preset holiday candidate word and a holiday date
  • the preset holiday candidate words whose corresponding holiday date is the same as the current date are determined as the predicted words.
  • the preset prediction strategy includes: a policy for performing word prediction based on user information;
  • the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;
  • the acquired identifier of the current chat object is determined as a predicted word.
  • the method further includes:
  • the setting information is output, where the setting information includes: prompting the user to open the path information of the preset auxiliary right.
  • the preset prediction strategy includes: a policy for performing word prediction based on user information and first type time information;
  • the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;
  • the identifier of the current chat object is obtained;
  • the pre-stored historical input word includes: a word entered by the user for each second preset time period for the identifier of the current chat object.
  • the preset prediction strategy includes: a policy for performing word prediction based on user information and second type time information;
  • the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;
  • the identifier of the current chat object is obtained;
  • the preset prediction strategy includes at least: a policy for performing word prediction based on the first type of time information, a policy for performing word prediction based on the second type of time information, a strategy for performing word prediction based on the user information, based on The user information and the first type of time information perform a word prediction strategy and at least two types of strategies for word prediction based on the user information and the second type of time information;
  • the method for performing word prediction based on the user information and/or the time information based on the acquired preset prediction policy includes: before determining the predicted word, the method further includes:
  • step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information including:
  • the prediction words are determined based on each type of strategy included in the acquired preset prediction strategy according to the respective priorities of each type of the obtained strategy.

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)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

Provided are a method and apparatus for word prediction with no preceding text, and an electronic device. The method comprises: acquiring a preset prediction strategy after obtaining an instruction for prediction with no preceding text, wherein the preset prediction strategy at least comprises a strategy for word prediction based on user information and/or time information; determining a predicted word according to the strategy, at least comprised in the acquired preset prediction strategy, for word prediction based on user information and/or time information; and displaying the determined predicted word. It can be seen that in the embodiments of the present application, word prediction can be conducted based on user information and/time information, so that the correlation between a determined predicted word and a user and/or time is increased, and the user's attention and clicking rate are increased to a certain extent; and prediction with no preceding text is no longer carried out only based on historical input information and/or application software which is operated at present. A prediction approach for word prediction is added, and prediction with no preceding text is carried out more intelligently.

Description

一种空上文词预测方法、装置及电子设备Method, device and electronic device for predicting empty words

本申请要求于2018年3月30日提交中国专利局、申请号为201810277087.5发明名称为“一种空上文词预测方法、装置及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 20181027708, filed on March 30, 2018, the entire disclosure of which is hereby incorporated by reference. In this application.

技术领域Technical field

本申请涉及词预测技术领域,特别是涉及一种空上文词预测方法、装置及电子设备。The present application relates to the field of word prediction technology, and in particular, to a method, an apparatus, and an electronic device for predicting a word above.

背景技术Background technique

空上文预测技术指:用户在调起输入法应用软件的键盘后,输入法应用软件即基于历史输入信息和/或当前操作的应用软件预测预测词,并展示给用户,以供用户选择输入的技术。The above prediction technique refers to: after the user adjusts the keyboard of the input method application software, the input method application software predicts the predicted word based on the historical input information and/or the currently operated application software, and presents it to the user for the user to select the input. Technology.

相关的输入法应用软件的空上文预测流程中,用户在调起输入法应用软件的键盘后,输入法应用软件可以首先确定用户历史输入的高频词,即输入频率高于一定阈值的词,输入法应用软件将上述所确定的高频词,作为预测词,进行展示,以供用户选择输入;或者,用户在调起输入法应用软件的键盘后,输入法应用软件可以首先确定当前操作的应用软件,进而确定在当前操作的应用软件内用户历史输入的高频词,即输入频率高于一定阈值的词,输入法应用软件将上述所确定的高频词,作为预测词,进行展示,以供用户选择输入,等等。例如:用户在刚调起键盘时,输入法应用软件确定当前操作的应用软件为游戏类应用软件且确定出“Run”等词的输入频率高于一定阈值,则输入法应用软件将上述“Run”等词作为预测词进行展示。又例如,用户在刚调起键盘时,输入法应用软件确定当前操作的应用软件为聊天类应用软件且确定出“Hello”等词的输入频率高于一定阈值,则输入法应用软件将上述“Hello”等词作为预测词进行展示。In the above prediction process of the input method application software, after the user adjusts the keyboard of the input method application software, the input method application software may first determine the high frequency word input by the user history, that is, the input frequency is higher than a certain threshold. The input method application software displays the high frequency word determined above as a predictive word for the user to select input; or, after the user adjusts the keyboard of the input method application software, the input method application software may first determine the current operation. The application software further determines a high frequency word input by the user history in the currently operated application software, that is, a word whose input frequency is higher than a certain threshold, and the input method application software displays the high frequency word determined above as a prediction word. For users to choose input, and so on. For example, when the user just adjusts the keyboard, the input method application software determines that the currently operating application software is the game application software and determines that the input frequency of the word “Run” is higher than a certain threshold, then the input method application software will “Run” above. "The words are displayed as predictive words." For another example, when the user just adjusts the keyboard, the input method application software determines that the currently operated application software is the chat application software and determines that the input frequency of the word “Hello” is higher than a certain threshold, then the input method application software will “ Words such as "Hello" are displayed as predictive words.

相关的输入法应用软件的空上文预测流程中,仅基于历史输入信息和/或当前操作的应用软件预测预测词,预测方式单调,且不够智能。In the above-mentioned prediction process of the relevant input method application software, the prediction word is predicted only based on the historical input information and/or the currently operating application software, and the prediction mode is monotonous and not intelligent enough.

发明内容Summary of the invention

本申请实施例的目的在于提供一种空上文词预测方法、装置及电子设备,以实现更智能地进行空上文预测,在一定程度上提高用户的关注度以及点击 率。具体技术方案如下:The purpose of the embodiments of the present application is to provide a method, an apparatus, and an electronic device for predicting a word above, so as to achieve more intelligent prediction of the above, and to improve the degree of attention and click rate of the user to a certain extent. The specific technical solutions are as follows:

一方面,本申请实施例提供了一种空上文词预测方法,所述方法包括:In one aspect, an embodiment of the present application provides a method for predicting a word above, the method comprising:

在获取空上文预测指令后,获取预设预测策略,其中,所述预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的策略;After acquiring the above prediction instruction, acquiring a preset prediction policy, where the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information;

基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词;Determining a predicted word based on a strategy for performing word prediction based on user information and/or time information, based on the acquired preset prediction strategy;

展示所确定的预测词。Show the predicted words determined.

可选地,所述预设预测策略包括:基于第一类时间信息进行词预测的策略;Optionally, the preset prediction policy includes: a policy for performing word prediction based on the first type of time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,包括:And the step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information, including:

获取电子设备的当前时间;Get the current time of the electronic device;

从预设的对应关系中,确定与所述当前时间匹配的第一预设时间段,作为目标时间段,其中,所述预设的对应关系包括:每一预测候选词与第一预设时间段的对应关系;Determining, by the preset correspondence, a first preset time period that matches the current time, as the target time segment, where the preset correspondence relationship includes: each prediction candidate word and the first preset time Correspondence of segments;

从所述预设的对应关系中,确定所述目标时间段对应的预测候选词,作为预测词。From the preset correspondence, the prediction candidate words corresponding to the target time period are determined as prediction words.

可选地,所述预设预测策略包括:基于第二类时间信息进行词预测的策略;Optionally, the preset prediction policy includes: a policy for performing word prediction based on the second type of time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,包括:And the step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information, including:

获取电子设备的当前日期;Get the current date of the electronic device;

将所述当前日期与第一节日数据库进行匹配,其中,所述第一节日数据库中存储有每一预设节日候选词与节日日期的对应关系;Matching the current date with the first holiday database, wherein the first holiday database stores a correspondence between each preset holiday candidate word and a holiday date;

当匹配成功时,从所述第一节日数据库中,确定所对应节日日期与所述当前日期相同的预设节日候选词,作为预测词。When the matching is successful, from the first holiday database, the preset holiday candidate words whose corresponding holiday date is the same as the current date are determined as the predicted words.

可选地,所述预设预测策略包括:基于用户信息进行词预测的策略;Optionally, the preset prediction policy includes: a policy for performing word prediction based on user information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,包括:And the step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information, including:

获取当前操作的应用程序的标识;Get the ID of the application that is currently operating;

当基于所述当前操作的应用程序的标识,确定所述当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;When it is determined that the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;

当判断所述预设辅助权限开启时,获取当前聊天对象的标识;Obtaining an identifier of the current chat object when determining that the preset auxiliary permission is enabled;

将所获取的当前聊天对象的标识确定为预测词。The acquired identifier of the current chat object is determined as a predicted word.

可选地,所述方法还包括:Optionally, the method further includes:

当判断所述预设辅助权限未开启时,输出设置信息,其中,所述设置信息包括:提示用户开启所述预设辅助权限的路径信息。When it is determined that the preset auxiliary permission is not enabled, the setting information is output, where the setting information includes: prompting the user to open the path information of the preset auxiliary right.

可选地,所述预设预测策略包括:基于用户信息和第一类时间信息进行词预测的策略;Optionally, the preset prediction policy includes: a policy for performing word prediction based on user information and first type time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,包括:And the step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information, including:

获取当前操作的应用程序的标识,并获取电子设备的当前时间;Get the ID of the currently operating application and obtain the current time of the electronic device;

当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;When it is determined that the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;

当判断预设辅助权限开启时,获取当前聊天对象的标识;When it is determined that the preset auxiliary permission is enabled, the identifier of the current chat object is obtained;

从预存的历史输入词中,确定出与所述当前聊天对象的标识对应的、且与所述当前时间对应的、且所对应输入次数高于预定输入阈值的词,作为预测词,其中,所述预存的历史输入词中包含:用户针对所述当前聊天对象的标识,在各第二预设时间段内历史输入的词。Determining, from the pre-stored historical input words, a word corresponding to the current chat object and corresponding to the current time, and the corresponding input number is higher than a predetermined input threshold, as a predictive word, where The pre-stored historical input word includes: a word entered by the user for each second preset time period for the identifier of the current chat object.

可选地,所述预设预测策略包括:基于用户信息和第二类时间信息进行词预测的策略;Optionally, the preset prediction policy includes: a policy for performing word prediction based on user information and second type time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,包括:And the step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information, including:

获取当前操作的应用程序的标识,并获取电子设备的当前日期;Get the ID of the currently operating application and get the current date of the electronic device;

当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;When it is determined that the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;

当判断预设辅助权限开启时,获取当前聊天对象的标识;When it is determined that the preset auxiliary permission is enabled, the identifier of the current chat object is obtained;

将所述当前聊天对象的标识及所述当前日期与第二节日数据库进行匹配,其中,所述第二节日数据库中存储有每一对象的标识、预设提醒日期与预设提醒候选词之间的对应关系;Matching the identifier of the current chat object and the current date with a second holiday database, wherein the second holiday database stores an identifier of each object, a preset reminder date, and a preset reminder candidate word. Correspondence relationship;

当匹配成功时,从所述第二节日数据库中,确定所对应对象的标识与所述当前聊天对象的标识相同,且所对应预设提醒日期与所述当前日期相同的预设提醒候选词,作为预测词。When the matching is successful, determining, from the second holiday database, that the identifier of the corresponding object is the same as the identifier of the current chat object, and the preset reminder candidate date corresponding to the preset date is the same as the current date. As a predictive word.

可选地,所述预设预测策略至少包括:基于第一类时间信息进行词预测的策略、基于第二类时间信息进行词预测的策略、基于用户信息进行词预测的策略、基于用户信息和第一类时间信息进行词预测的策略以及基于用户信息和第二类时间信息进行词预测的策略中的至少两类策略;Optionally, the preset prediction policy includes at least: a policy for performing word prediction based on the first type of time information, a policy for performing word prediction based on the second type of time information, a policy for predicting words based on user information, based on user information, and The first type of time information carries out a strategy of word prediction and at least two types of strategies for performing word prediction based on user information and second type of time information;

在所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤之前,所述方法还包括:And the method further includes: before the step of determining a predicted word based on the user-based and/or time information based on the acquired preset prediction policy, the method further includes:

获取所述预设预测策略所包括的每一类策略各自对应的优先级;Obtaining a priority corresponding to each type of policy included in the preset prediction policy;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,包括:And the step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information, including:

按照所获取的每一类策略各自对应的优先级,基于所获取的预设预测策略所包括的每一类策略,确定预测词。The prediction words are determined based on each type of strategy included in the acquired preset prediction strategy according to the respective priorities of each type of the obtained strategy.

另一方面,本申请实施例提供了一种空上文词预测装置,所述装置包括:On the other hand, an embodiment of the present application provides an air word prediction apparatus, where the apparatus includes:

第一获取模块,用于在获取空上文预测指令后,获取预设预测策略,其中,所述预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的 策略;a first acquiring module, configured to acquire a preset prediction policy after acquiring the foregoing prediction instruction, where the preset prediction policy includes at least: a policy for performing word prediction based on user information and/or time information;

确定模块,用于基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词;a determining module, configured to determine a predicted word based on a strategy for performing word prediction based on the user information and/or the time information included in the acquired preset prediction policy;

展示模块,用于展示所确定的预测词。A presentation module for presenting the determined predictive words.

可选地,所述预设预测策略包括:基于第一类时间信息进行词预测的策略;Optionally, the preset prediction policy includes: a policy for performing word prediction based on the first type of time information;

所述确定模块包括:The determining module includes:

第一获取单元,用于获取电子设备的当前时间;a first acquiring unit, configured to acquire a current time of the electronic device;

第一确定单元,用于从预设的对应关系中,确定与所述当前时间匹配的第一预设时间段,作为目标时间段,其中,所述预设的对应关系包括:每一预测候选词与第一预设时间段的对应关系;a first determining unit, configured to determine, from the preset correspondence, a first preset time period that matches the current time, as a target time segment, where the preset correspondence includes: each prediction candidate Correspondence between the word and the first preset time period;

第二确定单元,用于从所述预设的对应关系中,确定所述目标时间段对应的预测候选词,作为预测词。a second determining unit, configured to determine, from the preset correspondence, a prediction candidate word corresponding to the target time segment as a predicted word.

可选地,所述预设预测策略包括:基于第二类时间信息进行词预测的策略;Optionally, the preset prediction policy includes: a policy for performing word prediction based on the second type of time information;

所述确定模块包括:The determining module includes:

第二获取单元,用于获取电子设备的当前日期;a second acquiring unit, configured to acquire a current date of the electronic device;

第一匹配单元,用于将所述当前日期与第一节日数据库进行匹配,其中,所述第一节日数据库中存储有每一预设节日候选词与节日日期的对应关系;a first matching unit, configured to match the current date with the first holiday database, wherein the first holiday database stores a correspondence between each preset holiday candidate word and a holiday date;

第三确定单元,用于当匹配成功时,从所述第一节日数据库中,确定所对应节日日期与所述当前日期相同的预设节日候选词,作为预测词。And a third determining unit, configured to, when the matching is successful, determine, from the first holiday database, a preset holiday candidate word whose corresponding holiday date is the same as the current date, as the predicted word.

可选地,所述预设预测策略包括:基于用户信息进行词预测的策略;Optionally, the preset prediction policy includes: a policy for performing word prediction based on user information;

所述确定模块包括:The determining module includes:

第三获取单元,用于获取当前操作的应用程序的标识;a third obtaining unit, configured to acquire an identifier of the currently operated application;

第一判断单元,用于当基于所述当前操作的应用程序的标识,确定所述 当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;a first determining unit, configured to determine, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, and determine whether the preset auxiliary permission of the electronic device is enabled;

第四获取单元,用于当判断所述预设辅助权限开启时,获取当前聊天对象的标识;a fourth obtaining unit, configured to acquire an identifier of the current chat object when determining that the preset auxiliary permission is enabled;

第四确定单元,用于将所获取的当前聊天对象的标识确定为预测词。And a fourth determining unit, configured to determine the acquired identifier of the current chat object as a predicted word.

可选地,所述确定模块还包括:Optionally, the determining module further includes:

输出单元,用于当判断所述预设辅助权限未开启时,输出设置信息,其中,所述设置信息包括:提示用户开启所述预设辅助权限的路径信息。The output unit is configured to output setting information when the preset auxiliary permission is not turned on, where the setting information includes: prompting the user to open the path information of the preset auxiliary right.

可选地,所述预设预测策略包括:基于用户信息和第一类时间信息进行词预测的策略;Optionally, the preset prediction policy includes: a policy for performing word prediction based on user information and first type time information;

所述确定模块包括:The determining module includes:

第五获取单元,用于获取当前操作的应用程序的标识,并获取电子设备的当前时间;a fifth obtaining unit, configured to acquire an identifier of the currently operated application, and acquire a current time of the electronic device;

第二判断单元,用于当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;a second determining unit, configured to determine, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, and determine whether the preset auxiliary permission of the electronic device is enabled;

第六获取单元,用于当判断预设辅助权限开启时,获取当前聊天对象的标识;a sixth obtaining unit, configured to acquire an identifier of the current chat object when determining that the preset auxiliary permission is enabled;

第五确定单元,用于从预存的历史输入词中,确定出与所述当前聊天对象的标识对应的、且与所述当前时间对应的、且所对应输入次数高于预定输入阈值的词,作为预测词,其中,所述预存的历史输入词中包含:用户针对所述当前聊天对象的标识,在各第二预设时间段内历史输入的词。a fifth determining unit, configured to determine, from the pre-stored historical input words, a word corresponding to the identifier of the current chat object and corresponding to the current time, and the corresponding input number is higher than a predetermined input threshold, As a predictive word, the pre-stored historical input word includes: a word entered by the user for each second preset time period for the identifier of the current chat object.

可选地,所述预设预测策略包括:基于用户信息和第二类时间信息进行词预测的策略;Optionally, the preset prediction policy includes: a policy for performing word prediction based on user information and second type time information;

所述确定模块包括:The determining module includes:

第七获取单元,用于获取当前操作的应用程序的标识,并获取电子设备 的当前日期;a seventh obtaining unit, configured to acquire an identifier of the currently operated application, and obtain a current date of the electronic device;

第三判断单元,用于当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;a third determining unit, configured to determine, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, and determine whether the preset auxiliary permission of the electronic device is enabled;

第八获取单元,用于当判断预设辅助权限开启时,获取当前聊天对象的标识;An eighth obtaining unit, configured to acquire an identifier of the current chat object when determining that the preset auxiliary permission is enabled;

第二匹配单元,用于将所述当前聊天对象的标识及所述当前日期与第二节日数据库进行匹配,其中,所述第二节日数据库中存储有每一对象的标识、预设提醒日期与预设提醒候选词之间的对应关系;a second matching unit, configured to match the identifier of the current chat object and the current date with a second holiday database, wherein the second holiday database stores an identifier of each object, a preset reminder date, and Presetting the correspondence between candidate words;

第六确定单元,用于当匹配成功时,从所述第二节日数据库中,确定所对应对象的标识与所述当前聊天对象的标识相同,且所对应预设提醒日期与所述当前日期相同的预设提醒候选词,作为预测词。a sixth determining unit, configured to: when the matching is successful, determine, from the second holiday database, that the identifier of the corresponding object is the same as the identifier of the current chat object, and the corresponding preset reminder date is the same as the current date The preset reminds the candidate as a predictive word.

可选地,所述预设预测策略至少包括:基于第一类时间信息进行词预测的策略、基于第二类时间信息进行词预测的策略、基于用户信息进行词预测的策略、基于用户信息和第一类时间信息进行词预测的策略以及基于用户信息和第二类时间信息进行词预测的策略中的至少两类策略;Optionally, the preset prediction policy includes at least: a policy for performing word prediction based on the first type of time information, a policy for performing word prediction based on the second type of time information, a policy for predicting words based on user information, based on user information, and The first type of time information carries out a strategy of word prediction and at least two types of strategies for performing word prediction based on user information and second type of time information;

所述装置还包括:The device also includes:

第二获取模块,用于在所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词之前,获取所述预设预测策略所包括的每一类策略各自对应的优先级;a second acquiring module, configured to perform a word prediction based on the user information and/or the time information based on the acquired preset prediction policy, and obtain the preset prediction strategy before determining the predicted word The corresponding priority of each type of strategy included;

所述确定模块,具体用于The determining module is specifically configured to

按照所获取的每一类策略各自对应的优先级,基于所获取的预设预测策略所包括的每一类策略,确定预测词。The prediction words are determined based on each type of strategy included in the acquired preset prediction strategy according to the respective priorities of each type of the obtained strategy.

另一方面,本申请实施例提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;On the other hand, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;

存储器,用于存放计算机程序;a memory for storing a computer program;

处理器,用于执行存储器上所存放的计算机程序时,实现本申请实施例所提供的上述任一所述的空上文词预测方法步骤。The processor, when used to execute the computer program stored in the memory, implements the steps of the above-mentioned empty word prediction method provided by the embodiments of the present application.

另一方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现本申请实施例所提供的上述任一所述的空上文词预测方法步骤。On the other hand, the embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the foregoing An empty word prediction method step as described above.

另一方面,本申请实施例提供一种计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的空上文词预测方法步骤。On the other hand, the embodiment of the present application provides a computer program product, when it is run on a computer, causing the computer to execute the step of the above-mentioned word prediction method according to any of the above embodiments.

本申请实施例中,在获得空上文预测指令后,获取预设预测策略,其中,预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的策略;基于所获取的预设预测策略,确定预测词;展示所确定的预测词。可见,本申请实施例中,可以基于用户信息和/或时间信息进行词预测,使得所确定的预测词与用户和/或时间更加相关,在一定程度上提高用户的关注度以及点击率,并且不再单一的仅基于历史输入信息和/或当前操作的应用软件进行空上文预测,增加了词预测的预测方式,实现更智能地进行空上文预测。当然,实施本申请的任一产品或方法必不一定需要同时达到以上所述的所有优点。In the embodiment of the present application, after obtaining the above prediction instruction, the preset prediction strategy is obtained, where the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information; and based on the acquired preset Predicting the strategy, determining the predictive words; presenting the determined predictive words. It can be seen that, in the embodiment of the present application, the word prediction can be performed based on the user information and/or the time information, so that the determined predicted words are more related to the user and/or the time, and the user's attention and the click rate are improved to some extent, and It is no longer a single application based on historical input information and/or currently operating applications, which increases the prediction of word prediction and enables more intelligent predictions. Of course, implementing any of the products or methods of the present application necessarily does not necessarily require all of the advantages described above to be achieved at the same time.

附图说明DRAWINGS

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present application, and other drawings can be obtained according to the drawings without any creative work for those skilled in the art.

图1为本申请实施例所提供的一种空上文词预测方法的流程示意图;FIG. 1 is a schematic flowchart diagram of a method for predicting an empty word provided by an embodiment of the present application;

图2为本申请实施例所提供的一种确定预测词的流程示意图;2 is a schematic flowchart of determining a predicted word according to an embodiment of the present application;

图3为本申请实施例所提供的一种确定预测词的另一流程示意图;FIG. 3 is a schematic diagram of another process for determining a predicted word according to an embodiment of the present disclosure;

图4为本申请实施例所提供的一种确定预测词的另一流程示意图;FIG. 4 is a schematic diagram of another process for determining a predicted word according to an embodiment of the present application;

图5为本申请实施例所提供的一种确定预测词的另一流程示意图;FIG. 5 is a schematic diagram of another process for determining a predicted word according to an embodiment of the present disclosure;

图6为本申请实施例所提供的一种确定预测词的另一流程示意图;FIG. 6 is a schematic diagram of another process for determining a predicted word according to an embodiment of the present application;

图7为本申请实施例所提供的一种确定预测词的另一流程示意图;FIG. 7 is a schematic diagram of another process for determining a predicted word according to an embodiment of the present application;

图8为本申请实施例所提供的一种空上文词预测方法的另一流程示意图;FIG. 8 is another schematic flowchart of a method for predicting a word in the air according to an embodiment of the present disclosure;

图9为本申请实施例所提供的一种空上文词预测装置的结构示意图;FIG. 9 is a schematic structural diagram of an air word prediction apparatus according to an embodiment of the present disclosure;

图10为本申请实施例所提供的一种确定模块的另一结构示意图;FIG. 10 is another schematic structural diagram of a determining module according to an embodiment of the present disclosure;

图11为本申请实施例所提供的一种确定模块的另一结构示意图;FIG. 11 is another schematic structural diagram of a determining module according to an embodiment of the present disclosure;

图12为本申请实施例所提供的一种确定模块的另一结构示意图;FIG. 12 is another schematic structural diagram of a determining module according to an embodiment of the present disclosure;

图13为本申请实施例所提供的一种确定模块的另一结构示意图;FIG. 13 is another schematic structural diagram of a determining module according to an embodiment of the present disclosure;

图14为本申请实施例所提供的一种确定模块的另一结构示意图;FIG. 14 is another schematic structural diagram of a determining module according to an embodiment of the present disclosure;

图15为本申请实施例所提供的一种确定模块的另一结构示意图;15 is another schematic structural diagram of a determining module according to an embodiment of the present application;

图16为本申请实施例所提供的一种空上文词预测装置的另一结构示意图;16 is another schematic structural diagram of an air word prediction apparatus according to an embodiment of the present application;

图17为本申请实施例所提供的一种电子设备的结构示意图。FIG. 17 is a schematic structural diagram of an electronic device according to an embodiment of the present application.

具体实施方式detailed description

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获取的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.

本申请实施例提供了一种空上文词预测方法、装置及电子设备,以实现更智能地进行空上文预测,在一定程度上提高用户的关注度以及点击率。The embodiment of the present application provides a method, a device, and an electronic device for predicting a word above, so as to achieve more intelligent prediction of the above, and to improve the degree of attention and click rate of the user to a certain extent.

如图1所示,本申请实施例提供了一种空上文词预测方法,可以包括如下步骤:As shown in FIG. 1 , an embodiment of the present application provides a method for predicting a word above, which may include the following steps:

S101:在获取空上文预测指令后,获取预设预测策略,其中,预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的策略;S101: After obtaining the upper prediction instruction, acquiring a preset prediction policy, where the preset prediction policy at least includes: a policy for performing word prediction based on user information and/or time information;

可以理解的是,本申请实施例所提供的空上文词预测方法,可以应用于第一应用程序,该第一应用程序安装于电子设备,该电子设备可以为电脑、智能手机和游戏机等等。在一种情况中,上述第一应用程序,可以以专门的客户端软件的形式存在,例如:专门的输入法应用软件;也可以以相关的客户端软件的插件的形式存在,例如:相关的输入法应用软件的插件。It can be understood that the method for predicting the vocabulary provided by the embodiment of the present application can be applied to a first application, where the first application is installed on an electronic device, and the electronic device can be a computer, a smart phone, a game machine, or the like. . In one case, the first application may exist in the form of dedicated client software, such as a special input method application software, or may be in the form of a plug-in of related client software, for example: related Plugin for input method application software.

本申请实施例中,上述空上文预测指令可以是:在用户手动调起或电子设备自动调起第一应用程序的键盘时,第一应用程序自动生成的指令。第一应用程序获取上述空上文预测指令后,获取预设预测策略,上述预设预测策略可以为用户基于自身需求预先设置的,也可以为第一应用程序默认设置的,这都是可以的。其中,本申请实施例中所提的默认设置可以指:第一应用程序被安装于电子设备时的设置。In the embodiment of the present application, the foregoing empty prediction instruction may be an instruction automatically generated by the first application when the user manually raises or the electronic device automatically raises the keyboard of the first application. After the first application obtains the above-mentioned empty prediction instruction, the preset prediction strategy is obtained, and the preset prediction strategy may be preset by the user according to his own needs, or may be set by default for the first application, which is all possible. . The default setting mentioned in the embodiment of the present application may refer to a setting when the first application is installed on the electronic device.

上述预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的策略。其中,上述用户信息可以包括用户自身的信息,也可以包括与用户进行信息交流的对象的信息,例如:用户当前聊天对象的标识、用户针对当前聊天对象所设置的信息,如:对当前聊天对象的昵称、提醒内容和备注信息等。上述时间信息可以包括日期和/或具体时间,如,x时y分z秒等等。The foregoing preset prediction strategy includes at least a policy of performing word prediction based on user information and/or time information. The user information may include information of the user itself, and may include information of an object that communicates with the user, for example, an identifier of the current chat object of the user, and information set by the user for the current chat object, for example, the current chat object. Nickname, reminder content and remarks. The above time information may include a date and/or a specific time, such as x, y, z, and the like.

S102:基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词;S102: Determine, according to the acquired preset prediction policy, a policy for performing word prediction based on user information and/or time information, and determine a predicted word;

其中,第一应用程序获取上述预设预测策略后,可以继续基于上述预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词。例如:当上述预设预测策略中包括基于用户信息进行词预测的策略时,即基于用户信息,确定预测词;当上述预设预测策略中包括基于时间信息进行词预测的策略时,即基于时间信息,确定预测词;当上述预设预测策略中包括基于用户信息和时间信息进行词预测的策略时,即基于用户信息和时间信息,确定预测词。After the first application obtains the preset prediction policy, the first application may continue to determine the predicted word based on the at least one of the preset prediction policies that performs word prediction based on the user information and/or the time information. For example, when the preset prediction strategy includes a policy for performing word prediction based on user information, that is, determining a predicted word based on user information; when the preset predicted policy includes a policy for predicting words based on time information, that is, based on time The information is used to determine a predicted word; when the preset prediction strategy includes a policy for performing word prediction based on user information and time information, that is, based on user information and time information, the predicted word is determined.

S103:展示所确定的预测词。S103: Display the determined prediction words.

第一应用程序确定出预测词之后,展示上述所确定的预测词。在一种情况中,第一应用程序可以在预设的预测词展示区域,展示所确定的预测词。在一种实现方式中,第一应用程序所确定出的预测词存在多个,一种情况中,上述第一应用程序可以以随机顺序展示所确定出的预测词;另一种情况中,第一应用程序可以基于预先设置的展示顺序,展示所确定的预测词。After the first application determines the predicted word, the predicted word determined above is displayed. In one case, the first application can present the determined predictive words in a preset predictive word display area. In an implementation manner, the first application determines that there are multiple predicted words. In one case, the first application may display the determined predicted words in a random order; in another case, An application can present the determined predictive words based on a pre-set display order.

本申请实施例中,在获取空上文预测指令后,获取预设预测策略,其中,预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的策略;基 于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略;展示所确定的预测词。可见,本申请实施例中,可以基于用户信息和/或时间信息进行词预测,使得所确定的预测词与用户和/或时间更加相关,在一定程度上提高用户的关注度以及点击率,并且不再单一的仅基于历史输入信息和/或当前操作的应用软件进行空上文预测,增加了词预测的预测方式,实现更智能地进行空上文预测。In the embodiment of the present application, after acquiring the above prediction instruction, acquiring a preset prediction policy, where the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information; In the prediction strategy, at least a strategy for word prediction based on user information and/or time information is included; and the determined prediction words are displayed. It can be seen that, in the embodiment of the present application, the word prediction can be performed based on the user information and/or the time information, so that the determined predicted words are more related to the user and/or the time, and the user's attention and the click rate are improved to some extent, and It is no longer a single application based on historical input information and/or currently operating applications, which increases the prediction of word prediction and enables more intelligent predictions.

在一种实现方式中,预设预测策略包括:基于第一类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a strategy for performing word prediction based on the first type of time information;

如图2所示,上述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略的步骤,可以包括:As shown in FIG. 2, the step of performing the word prediction based on the user information and/or the time information based on the obtained preset prediction policy may include:

S201:获取电子设备的当前时间;S201: Acquire a current time of the electronic device.

S202:从预设的对应关系中,确定与当前时间匹配的第一预设时间段,作为目标时间段,其中,预设的对应关系包括:每一预测候选词与第一预设时间段的对应关系;S202: Determine, from the preset correspondence, a first preset time period that matches the current time, as the target time segment, where the preset correspondence includes: each predicted candidate word and the first preset time period. Correspondence relationship

S203:从预设的对应关系中,确定目标时间段对应的预测候选词,作为预测词。S203: Determine, from the preset correspondence, a prediction candidate word corresponding to the target time segment as a prediction word.

本申请实施例中,第一应用程序所在电子设备的本地或所连接的存储设备中,预先存储有预设的对应关系,具体为,预设的对应关系包括:每一预测候选词与第一预设时间段的对应关系。其中,上述第一预设时间段可以为:一天24小时被预先划分所得到的时间段。上述第一预设时间段可以是用户根据自身需求所划分的,也可以是第一应用程序基于经验值划分的。例如:一天24小时被划分为三个时间段,分别为:第一预设时间段6:00-12:00、第一预设时间段12:00-18:00和第一预设时间段18:00-24:00。此时,上述预设的对应关系可以包括:第一预设时间段6:00-12:00对应预测候选词“Good morning”,第一预设时间段12:00-18:00对应预测候选词“Good afternoon”,第一预设时间段18:00-24:00对应预测候选词“Good evening”和/或“Good night”。In the embodiment of the present application, the preset correspondence is pre-stored in the local device or the connected storage device of the electronic device where the first application is located. Specifically, the preset correspondence includes: each prediction candidate word and the first The correspondence of preset time periods. The first preset time period may be: a time period obtained by being divided in advance 24 hours a day. The first preset time period may be divided by the user according to his own needs, or may be determined by the first application based on the experience value. For example, 24 hours a day is divided into three time segments, which are: a first preset time period of 6:00-12:00, a first preset time period of 12:00-18:00, and a first preset time period. 18:00-24:00. In this case, the preset correspondence may include: the first preset time period 6:00-12:00 corresponds to the prediction candidate word “Good morning”, and the first preset time period 12:00-18:00 corresponds to the prediction candidate. The word "Good afternoon", the first preset time period 18:00-24:00 corresponds to the prediction candidate words "Good evening" and/or "Good night".

当第一应用程序获取到的预设预测策略包括:基于第一类时间信息进行 词预测的策略时,第一应用程序获取其所在电子设备的当前时间,并将当前时间与预设的对应关系进行匹配,确定包含该当前时间的第一预设时间段,作为与该当前时间匹配的第一预设时间段,即作为目标时间段,进而,确定预设的对应关系中,目标时间段对应的预测候选词,作为预测词。When the preset prediction policy acquired by the first application includes: a policy for performing word prediction based on the first type of time information, the first application acquires the current time of the electronic device where the device is located, and associates the current time with the preset relationship. Performing a matching, determining a first preset time period that includes the current time, as a first preset time period that matches the current time, that is, as a target time segment, and further, determining a preset correspondence relationship, where the target time segment corresponds to a candidate for prediction as a predictive term.

承接上述例子,当第一应用程序获取的其所在电子设备的当前时间为7:00时,预设的对应关系中,与当前时间7:00匹配的第一预设时间段为6:00-12:00,即目标时间段为6:00-12:00,电子设备在预设的对应关系中,确定出目标时间段6:00-12:00对应的预测候选词为“Good morning”,将预测候选词“Good morning”作为预测词。According to the above example, when the current time of the electronic device that the first application acquires is 7:00, in the preset correspondence, the first preset time period matching the current time 7:00 is 6:00- 12:00, that is, the target time period is 6:00-12:00, and the electronic device determines, in the preset correspondence, that the prediction candidate word corresponding to the target time period 6:00-12:00 is “Good morning”, The predicted candidate word "Good morning" is used as a predictive word.

通过上述第一类时间信息进行词预测,使得空上文词预测流程的词预测方式更多、更智能。且与时间信息息息相关,可以在一定程度上更吸引用户的关注以及点击率。The word prediction is performed by the first type of time information described above, so that the word prediction method of the above-mentioned word prediction process is more and more intelligent. And closely related to time information, it can attract users' attention and click rate to a certain extent.

在一种实现方式中,预设预测策略包括:基于第二类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a strategy for performing word prediction based on the second type of time information;

如图3所示,上述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略的步骤,可以包括:As shown in FIG. 3, the step of performing the word prediction based on the user information and/or the time information based on the obtained preset prediction policy may include:

S301:获取电子设备的当前日期;S301: Acquire a current date of the electronic device;

S302:将当前日期与第一节日数据库进行匹配,其中,第一节日数据库中存储有每一预设节日候选词与节日日期的对应关系;S302: Match the current date with the first holiday database, where the first holiday database stores a correspondence between each preset holiday candidate word and the holiday date;

S303:当匹配成功时,从第一节日数据库中,确定所对应节日日期与当前日期相同的预设节日候选词,作为预测词。S303: When the matching is successful, determining, from the first holiday database, the preset holiday candidate words whose corresponding holiday date is the same as the current date, as the predicted word.

本申请实施例中,第一应用程序所在电子设备的本地或所连接的存储设备中,预先存储有第一节日数据库,其中,该第一节日数据库中存储有每一预设节日候选词与节日日期的对应关系。例如:预设节日候选词“Happy Valentine’s Day”对应节日日期2月14日,预设节日候选词“International Labor Day”或者“May Day”对应节日日期5月1日等。In the embodiment of the present application, a first holiday database is pre-stored in the local or connected storage device of the electronic device where the first application is located, where each preset holiday candidate word and holiday is stored in the first holiday database. The correspondence of dates. For example, the preset holiday candidate "Happy Valentine's Day" corresponds to the holiday date February 14th, and the preset holiday candidate "International Labor Day" or "May Day" corresponds to the holiday date May 1st.

当第一应用程序获取到的预设预测策略包括:基于第二类时间信息进行 词预测的策略时,第一应用程序获取其所在电子设备的当前日期,将当前日期与第一节日数据库进行匹配,即与第一节日数据库中存储的每一预设节日候选词与节日日期的对应关系进行匹配,当匹配成功,即确定存在包含当前日期的对应关系时,从第一节日数据库中,确定所对应节日日期与当前日期相同的预设节日候选词,作为预测词。When the preset prediction strategy acquired by the first application includes: a policy for performing word prediction based on the second type of time information, the first application acquires the current date of the electronic device in which it is located, and matches the current date with the first holiday database. That is, matching with the correspondence between each preset holiday candidate word stored in the first holiday database and the holiday date. When the matching is successful, that is, when there is a corresponding relationship including the current date, the first holiday database is determined from the first holiday database. The preset holiday candidate words corresponding to the holiday date and the current date are used as prediction words.

承接上述例子,第一应用程序获取的其所在电子设备的当前日期为2月14日,与第一节日数据库中存储的节日日期2月14日匹配成功,第一应用程序从第一节日数据库中,确定所对应节日日期与当前日期2月14日相同的预设节日候选词“Happy Valentine’s Day”,作为预测词。According to the above example, the current date of the electronic device that the first application acquires is February 14th, and the holiday date stored in the first holiday database is successfully matched on February 14th, and the first application is from the first holiday database. A predetermined holiday candidate word "Happy Valentine's Day" having the same holiday date as the current date of February 14 is determined as a predictive word.

通过上述第二类时间信息进行词预测,使得空上文词预测流程的词预测方式更多、更智能。且在当前日期为节日日期时,预测出关于节日的预设节日候选词,可以更吸引用户的关注,进而提高用户的点击率,节省用户手动打出上述预设节日候选词所花费的时间。Word prediction by the second type of time information described above makes the word prediction method of the above-mentioned word prediction process more and more intelligent. When the current date is a holiday date, the predicted holiday candidate words for the holiday are predicted, which can attract more attention of the user, thereby improving the user's click rate and saving the time taken by the user to manually play the preset holiday candidate words.

在一种实现方式中,预设预测策略包括:基于用户信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a strategy for performing word prediction based on user information;

如图4所示,上述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略的步骤,可以包括:As shown in FIG. 4, the step of performing the word prediction based on the user information and/or the time information based on the obtained preset prediction policy may include:

S401:获取当前操作的应用程序的标识;S401: Obtain an identifier of an application currently operated;

S402:当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;S402: Determine, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, determine whether the preset auxiliary permission of the electronic device is enabled;

S403:当判断预设辅助权限开启时,获取当前聊天对象的标识;S403: When determining that the preset auxiliary permission is enabled, obtaining an identifier of the current chat object;

S404:将所获取的当前聊天对象的标识确定为预测词。S404: Determine the acquired identifier of the current chat object as a predicted word.

本申请实施例中,第一应用程序所在电子设备的本地或所连接的存储设备,可以预先存储有多个预设聊天类应用程序的标识。当第一应用程序获取的预设预测策略包括:基于用户信息进行词预测的策略时,第一应用程序获取当前操作的应用程序的标识,将该获取的当前操作的应用程序的标识,分别与存储的预设聊天类应用程序的标识进行比对;当存储的预设聊天类应用 程序的标识中,存在与该获取的当前操作的应用程序的标识相同的标识时,第一应用程序确定该获取的当前操作的应用程序为预设聊天类应用程序。当第一应用程序确定该获取的当前操作的应用程序为预设聊天类应用程序时,第一应用程序继续执行后续的空上文词预测流程。In the embodiment of the present application, the local or connected storage device of the electronic device where the first application is located may pre-store the identifiers of the plurality of preset chat application applications. When the preset prediction strategy acquired by the first application includes: a policy for performing word prediction based on the user information, the first application acquires an identifier of the currently operated application, and respectively obtains the acquired identifier of the currently operated application. The stored identifier of the preset chat application is compared; when the identifier of the stored preset chat application has the same identifier as the acquired currently operated application, the first application determines that The currently acquired application obtained is the default chat class application. When the first application determines that the acquired currently operated application is a preset chat type application, the first application continues to execute the subsequent empty word prediction process.

当电子设备的预设辅助权限处于开启状态时,第一应用程序可以获取到关于电子设备的界面以及界面内容变化的信息。在一种实现方式中,当上述第一应用程序所在电子设备的操作系统为安卓系统时,上述电子设备的预设辅助权限可以为辅助权限Accessibility。当上述辅助权限Accessibility处于开启状态,即上述预设辅助权限开启时,第一应用程序可以继续获取当前聊天对象的标识,进而第一应用程序可以将上述所获取的当前聊天对象的标识确定为预测词。在一种情况中,上述当前聊天对象的标识可以为:上述当前聊天对象的昵称或账号或备注等。通过上述用户信息进行词预测,使得空上文词预测流程的词预测方式更多、更智能,在一定程度上更吸引用户的关注,提高用户的点击率。When the preset auxiliary authority of the electronic device is in an on state, the first application may acquire information about the interface of the electronic device and the change of the interface content. In an implementation manner, when the operating system of the electronic device where the first application is located is an Android system, the preset auxiliary permission of the electronic device may be an auxiliary permission Accessibility. When the auxiliary accessibility is enabled, that is, the preset auxiliary permission is enabled, the first application may continue to obtain the identifier of the current chat object, and the first application may determine the identifier of the current chat object obtained as the prediction. word. In one case, the identifier of the current chat object may be: a nickname or an account number or a note of the current chat object. Through the above-mentioned user information for word prediction, the word prediction method of the above-mentioned word prediction process is more and more intelligent, which attracts the user's attention to a certain extent and improves the user's click rate.

在一种情况中,当第一应用程序具有获得当前操作的应用程序中与该当前聊天对象的聊天信息的权限时,本申请实施例中,第一应用程序还可以基于与该当前聊天对象的聊天信息,进行词预测,这也是可以的。例如,当获得该当前聊天对象的最近的聊天信息为一个问题,本申请实施例中,第一应用程序可以将上述问题的答案作为预测词,并展示。In one embodiment, when the first application has the right to obtain the chat information of the current chat object in the currently operated application, in the embodiment of the present application, the first application may further be based on the current chat object. Chat information, word prediction, this is also possible. For example, when the latest chat information of the current chat object is obtained as a problem, in the embodiment of the present application, the first application may use the answer of the above question as a predictive word and display it.

在一种实现方式中,如图5所示,所述方法可以包括如下步骤:In an implementation manner, as shown in FIG. 5, the method may include the following steps:

S501:在获取空上文预测指令后,获取预设预测策略,其中,预设预测策略包括:基于用户信息进行词预测的策略;S501: After obtaining the above prediction instruction, acquiring a preset prediction strategy, where the preset prediction strategy includes: a policy for performing word prediction based on user information;

S502:获取当前操作的应用程序的标识;S502: Obtain an identifier of an currently operated application.

S503:当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;当判断预设辅助权限开启时,执行S504,当判断预设辅助权限未开启时,执行S507;S503: determining, according to the identifier of the currently operated application, that the currently operated application is a preset chat application, determining whether the preset auxiliary permission of the electronic device is enabled; and when determining that the preset auxiliary permission is enabled, executing S504, When it is determined that the preset auxiliary authority is not turned on, executing S507;

S504:获取当前聊天对象的标识;S504: Acquire an identifier of a current chat object.

S505:将所获取的当前聊天对象的标识作为预测词;S505: The acquired identifier of the current chat object is used as a prediction word;

S506:展示所确定的预测词;S506: displaying the determined prediction words;

S507:输出设置信息,其中,设置信息包括:提示用户开启预设辅助权限的路径信息。S507: Output setting information, where the setting information includes: prompting the user to open path information of the preset auxiliary authority.

其中,S501与图1所示的S101相同,S502与图4中所示的S401相同,S503与图4中所示的S402相同,S504与图4中所示的S403相同,S505与图4中所示的S404相同,上述S506与图1中所示的S103相同。S501 is the same as S101 shown in FIG. 1, S502 is the same as S401 shown in FIG. 4, S503 is the same as S402 shown in FIG. 4, S504 is the same as S403 shown in FIG. 4, S505 is the same as FIG. The S404 shown is the same, and the above S506 is the same as S103 shown in FIG.

为了实现更好的为用户提供空上文预测功能,当第一应用程序判断出电子设备的预设辅助权限未开启,即预设辅助权限处于关闭状态时,第一应用程序可以输出包括提示用户开启预设辅助权限的路径信息的设置信息,以提示用户开启预设辅助权限,增多空上文预测的预测方式。提高用户对第一应用程序所预测的预测词的关注,提高用户对预测词的点击率。In order to achieve a better prediction function for the user, when the first application determines that the preset auxiliary permission of the electronic device is not enabled, that is, the preset auxiliary permission is in the closed state, the first application may output the prompting user. The setting information of the path information of the preset auxiliary authority is turned on to prompt the user to open the preset auxiliary authority, and the prediction mode of the above prediction is increased. Increasing the user's attention to the predicted words predicted by the first application, and improving the user's click rate on the predicted words.

在一种情况中,第一应用程序可以以弹窗的形式输出上述设置信息,也可以以页面跳转的形式输出上述设置信息,这都是可以的。In one case, the first application may output the above setting information in the form of a pop-up window, or may output the above-mentioned setting information in the form of a page jump, which is all possible.

在一种实现方式中,如图6所示,预设预测策略包括:基于用户信息和第一类时间信息进行词预测的策略;In an implementation manner, as shown in FIG. 6, the preset prediction strategy includes: a policy for performing word prediction based on user information and first type time information;

上述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,可以包括:And the step of determining a predicted word according to the at least one of the obtained preset prediction strategies based on the user information and/or the time information, and the determining the predicted word may include:

S601:获取当前操作的应用程序的标识,并获取电子设备的当前时间;S601: Obtain an identifier of the currently operated application, and obtain a current time of the electronic device.

S602:当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;S602: determining, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, determining whether the preset auxiliary permission of the electronic device is enabled;

S603:当判断预设辅助权限开启时,获取当前聊天对象的标识;S603: When determining that the preset auxiliary permission is enabled, obtaining an identifier of the current chat object;

其中,S602与图4所示的S402相同,S603与图4所示的S403相同。Here, S602 is the same as S402 shown in FIG. 4, and S603 is the same as S403 shown in FIG.

S604:从预存的历史输入词中,确定出与当前聊天对象的标识对应的、且与当前时间对应的、且所对应输入次数高于预定输入阈值的词,作为预测词。S604: Determine, from the pre-stored historical input words, a word corresponding to the current chat object and corresponding to the current time, and the corresponding input number is higher than a predetermined input threshold, as a predictive word.

其中,预存的历史输入词中包含:用户针对当前聊天对象的标识,在各 第二预设时间段内历史输入的词。The pre-stored historical input word includes: a word entered by the user in the second preset time period for the identifier of the current chat object.

本申请实施例中,当预设预测策略包括基于用户信息和第一类时间信息进行词预测的策略时,第一应用程序的键盘被调起后,第一应用程序获取当前操作的应用程序的标识,并获取电子设备的当前时间,进而判断电子设备的预设辅助权限是否开启。当上述预设辅助权限开启时,第一应用程序可以继续获取当前聊天对象的标识,进而第一应用程序可以基于上述所获取的当前聊天对象的标识与当前时间,确定预测词。In the embodiment of the present application, when the preset prediction policy includes a policy for performing word prediction based on the user information and the first type of time information, after the keyboard of the first application is revoked, the first application acquires the currently operated application. Identify and obtain the current time of the electronic device, and then determine whether the preset auxiliary permission of the electronic device is turned on. When the preset auxiliary permission is enabled, the first application may continue to obtain the identifier of the current chat object, and the first application may determine the predicted word based on the acquired identifier of the current chat object and the current time.

在一种情况中,电子设备本地或所连接的存储设备中,预存有用户与当前聊天对象的历史聊天信息,以及历史聊天信息中每一信息对应的发送时间或接收时间所属的第二预设时间段。本申请实施例中,将上述历史聊天信息中,用户输入的信息称为历史输入词。当第一应用程序获取到当前聊天对象的标识以及当前时间后,将所获取的当前聊天对象的标识以及当前时间,与预存的历史输入词进行匹配,即从预存的历史输入词中,确定出与当前聊天对象的标识对应的、且与当前时间对应的、且所对应输入次数高于预定输入阈值的词,作为预测词。In one case, the historical chat information of the user and the current chat object, and the second preset corresponding to the sending time or the receiving time corresponding to each information in the historical chat information are pre-stored in the local or connected storage device of the electronic device. period. In the embodiment of the present application, the information input by the user in the historical chat information is referred to as a historical input word. After the first application obtains the identifier of the current chat object and the current time, the acquired current chat object identifier and the current time are matched with the pre-stored historical input words, that is, from the pre-stored historical input words. A word corresponding to the current chat object and corresponding to the current time, and the corresponding number of input times is higher than a predetermined input threshold, as a predictive word.

其中,上述第二预设时间段可以是用户根据自身需求所划分的,也可以是第一应用程序基于经验值划分的。上述第二预设时间段是基于一天二十四个小时进行划分的。其中,与当前时间对应的词可以是:预存的历史输入词中,与包含当前时间的第二预设时间段对应的词;The second preset time period may be divided by the user according to the user's needs, or may be determined by the first application based on the experience value. The second preset time period is divided based on twenty-four hours a day. The word corresponding to the current time may be: a word corresponding to the second preset time period including the current time in the pre-stored historical input word;

上述预定输入阈值可以是用户根据自身需求设置的,也可以是第一应用程序默认设置的。The predetermined input threshold may be set by the user according to his own needs, or may be set by the first application by default.

举例而言,第一应用程序获取的当前时间为17:00,且确定当前操作的应用程序为预设聊天类应用程序,且判断预设辅助权限开启,所获取的当前聊天对象的标识为“老公”;For example, the current time that the first application obtains is 17:00, and it is determined that the currently operated application is a preset chat application, and the preset auxiliary permission is determined to be opened, and the identifier of the current chat object obtained is “ Husband"

预存的历史输入词中包含:针对对象的标识“老公”在第二预设时间段17:00~17:30内历史输入的,且所对应输入次数高于预定输入阈值包括“老公,我下班了”;针对对象的标识“老公”在第二预设时间段17:30~18:00内历史输入的,且所对应输入次数高于预定输入阈值包括“我到家了”;The pre-stored historical input word includes: the identifier for the object "husband" is input in the second preset time period from 17:00 to 17:30, and the corresponding input number is higher than the predetermined input threshold, including "husband, I am off work. "The identification of the object "husband" is entered in the second preset time period from 17:30 to 18:00, and the corresponding input number is higher than the predetermined input threshold including "I am home";

第一应用程序从预存的历史输入词中,确定出当前聊天对象的标识“老公”对应的、且与当前时间17:00对应的、且所对应输入次数高于预定输入阈值的词为“老公,我下班了”,作为预测词。The first application determines, from the pre-stored historical input words, the word corresponding to the current husband's identifier "husband" and corresponding to the current time 17:00, and the corresponding number of input times is higher than the predetermined input threshold is "husband" I am off work," as a predictive term.

在一种实现方式中,如图7所示,上述预设预测策略包括:基于用户信息和第二类时间信息进行词预测的策略;In an implementation manner, as shown in FIG. 7, the foregoing preset prediction strategy includes: a policy for performing word prediction based on user information and second type time information;

上述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,可以包括:And the step of determining a predicted word according to the at least one of the obtained preset prediction strategies based on the user information and/or the time information, and the determining the predicted word may include:

S701:获取当前操作的应用程序的标识,并获取电子设备的当前日期;S701: Obtain an identifier of the currently operated application, and obtain a current date of the electronic device;

S702:当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;S702: determining, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, determining whether the preset auxiliary permission of the electronic device is enabled;

S703:当判断预设辅助权限开启时,获取当前聊天对象的标识;S703: When determining that the preset auxiliary permission is enabled, obtaining an identifier of the current chat object;

其中,上述S702与图4所示的S402相同,S703与图4所示的S403相同。The above S702 is the same as S402 shown in FIG. 4, and S703 is the same as S403 shown in FIG.

S704:将当前聊天对象的标识及当前日期与第二节日数据库进行匹配;S704: Match the identifier of the current chat object and the current date with the second holiday database;

其中,第二节日数据库中存储有每一对象的标识、预设提醒日期与预设提醒候选词之间的对应关系;The second holiday database stores an identifier of each object, a correspondence between a preset reminder date and a preset reminder candidate word;

S705:当匹配成功时,从第二节日数据库中,确定所对应对象的标识与当前聊天对象的标识相同,且所对应预设提醒日期与当前日期相同的预设提醒候选词,作为预测词。S705: When the matching is successful, determining, from the second holiday database, that the identifier of the corresponding object is the same as the identifier of the current chat object, and the preset preset reminder candidate whose preset reminding date is the same as the current date is used as the predicted word.

本申请实施例中,电子设备本地或所连接的存储设备中,存储有第二节日数据库,上述第二节日数据库中包含:每一对象的标识、预设提醒日期与预设提醒候选词之间的对应关系。其中,上述对应关系可以是用户设置的,例如:用户根据其聊天的对象的生日日期所设置的;或者,用户根据其与聊天的对象之间所约定的特殊日期所设置的。In the embodiment of the present application, the second holiday database is stored in the local or connected storage device of the electronic device, and the second holiday database includes: an identifier of each object, a preset reminder date, and a preset reminder candidate word. Correspondence. The above correspondence may be set by the user, for example, the user sets according to the birthday date of the object he is chatting with; or the user sets according to the special date agreed between the user and the chat object.

举例而言,上述预设提醒日期可以为:对象的标识对应的对象的生日日期,此时,上述预设提醒候选词可以包括“生日快乐”,或“对象的标识+生日快乐”;或者,上述预设提醒日期可以为:上述特殊日期,上述预设提醒候选词可以是用户自主设置的。For example, the preset reminder date may be: a birthday date of the object corresponding to the identifier of the object. At this time, the preset reminder candidate may include “Happy Birthday” or “ID of the object + happy birthday”; or The preset reminder date may be: the above special date, and the preset reminder candidate words may be set by the user.

在一种实现方式中,如图8所示,所述方法可以包括如下步骤:In one implementation, as shown in FIG. 8, the method may include the following steps:

S801:在获取空上文预测指令后,获取预设预测策略,其中,预设预测策略至少包括:基于第一类时间信息进行词预测的策略、基于第二类时间信息进行词预测的策略策略、基于用户信息和第一类时间信息进行词预测的策略以及基于用户信息和第二类时间信息进行词预测的策略中的至少两类策略;S801: After obtaining the above prediction instruction, acquiring a preset prediction strategy, where the preset prediction strategy includes at least: a strategy for performing word prediction based on the first type of time information, and a policy strategy for performing word prediction based on the second type of time information. a strategy for word prediction based on user information and first type of time information, and at least two types of strategies for word prediction based on user information and second type of time information;

S802:获取预设预测策略所包括的每一类策略各自对应的优先级;S802: Acquire a priority corresponding to each type of policy included in the preset prediction policy.

S803:按照所获取的每一类策略各自对应的优先级,基于所获取的预设预测策略所包括的每一类策略,确定预测词。S803: Determine a prediction term according to each type of policy included in the acquired preset prediction policy according to the corresponding priority of each type of the obtained strategy.

S804:展示所确定的预测词。S804: Display the determined prediction words.

本申请实施例中,为了更好的为用户提供空上文词预测功能,当上述预设预测策略至少包括:基于第一类时间信息进行词预测的策略、基于第二类时间信息进行词预测的策略策略、基于用户信息和第一类时间信息进行词预测的策略以及基于用户信息和第二类时间信息进行词预测的策略中的至少两类策略时,可以为每一类策略预设一个优先级,按照每一类策略各自对应的优先级,基于所获取的预设预测策略所包括的每一类策略,确定预测词。In the embodiment of the present application, in order to better provide the user with the above-mentioned word prediction function, the foregoing preset prediction strategy includes at least: a strategy for performing word prediction based on the first type of time information, and a word prediction based on the second type of time information. A policy strategy, a strategy for word prediction based on user information and first type of time information, and at least two types of strategies for word prediction based on user information and second type of time information may preset a priority for each type of policy. Levels, according to the respective priorities of each type of policy, determine the predicted words based on each type of strategy included in the obtained preset prediction strategy.

例如:当预设预测策略包括:基于第一类时间信息进行词预测的策略、基于第二类时间信息进行词预测的策略和基于用户信息进行词预测的策略时,所获取的优先级为:基于第一类时间信息进行词预测的策略对应的优先级为1,基于第二类时间信息进行词预测的策略对应的优先级为2,基于用户信息进行词预测的策略对应的优先级为3,其中,数值越大优先级越高;此时第一应用程序先基于用户信息进行词预测的策略,进行词预测;再基于第二类时间信息进行词预测的策略,进行词预测;最后基于第一类时间信息进行词预测的策略,进行词预测。For example, when the preset prediction strategy includes: a strategy for word prediction based on the first type of time information, a strategy for word prediction based on the second type of time information, and a strategy for word prediction based on user information, the obtained priority is: The priority of the strategy for word prediction based on the first type of time information is 1, the priority of the strategy for word prediction based on the second type of time information is 2, and the priority of the strategy for word prediction based on user information is 3 Wherein, the greater the value, the higher the priority; at this time, the first application first performs a word prediction strategy based on the user information, and performs word prediction; and then performs a word prediction strategy based on the second type of time information to perform word prediction; The first type of time information is used to perform word prediction strategies for word prediction.

本申请实施例中,上述每一类策略各自对应的优先级可以由用户自主设置,也可以由第一应用程序默认设置。In the embodiment of the present application, the priority corresponding to each type of the foregoing policy may be set by the user or may be set by the first application by default.

在一种情况中,本申请实施例中,还可以将上述的基于第一类时间信息进行词预测的策略、基于第二类时间信息进行词预测的策略和基于用户信息进行词预测的策略中的至少一类策略,结合相关技术中,基于历史输入信息 和/或当前操作的应用软件进行空上文词预测的策略,共同为用户提供空上文词预测功能。即,上述预设预测策略中除了包括:基于第一类时间信息进行词预测的策略、基于第二类时间信息进行词预测的策略、基于用户信息进行词预测的策略、基于用户信息和第一类时间信息进行词预测的策略以及基于用户信息和第二类时间信息进行词预测的策略中的至少一类策略外,还可以包括相关技术中,基于历史输入信息和/或当前操作的应用软件进行空上文词预测的策略。In one case, in the embodiment of the present application, the foregoing policy for performing word prediction based on the first type of time information, the strategy for performing word prediction based on the second type of time information, and the strategy for performing word prediction based on user information may also be used. At least one type of strategy, in combination with related technologies, based on historical input information and/or currently operating application software, performs a policy of predicting words above, and jointly provides the user with the above-mentioned word prediction function. That is, the preset prediction strategy includes: a policy for performing word prediction based on the first type of time information, a strategy for performing word prediction based on the second type of time information, a policy for predicting words based on user information, based on user information, and the first The time-information-based strategy for word prediction and at least one of the strategies for word prediction based on user information and second-class time information may also include application software based on historical input information and/or current operation in related technologies. Conduct a strategy for empty word prediction.

其中,本申请实施例中所提供的上述基于用户信息和/或时间信息进行词预测的策略的优先级,要高于相关技术中的空上文词预测的策略。The priority of the above-mentioned policy for predicting words based on user information and/or time information provided in the embodiments of the present application is higher than the strategy for predicting words in the related art.

下面以一具体实施例对本申请实施例所提供的空上文词预测方法进行说明:The method for predicting the above-mentioned words provided by the embodiments of the present application is described below with reference to a specific embodiment:

第一应用程序在获取空上文预测指令后,获取预设预测策略,其中,预设预测策略至少包括:基于第一类时间信息进行词预测的策略、基于第二类时间信息进行词预测的策略、基于用户信息进行词预测的策略以及基于历史输入信息和/或当前操作的应用软件进行空上文词预测的策略;After acquiring the above prediction instruction, the first application acquires a preset prediction strategy, where the preset prediction strategy includes at least: a strategy for performing word prediction based on the first type of time information, and a word prediction based on the second type of time information. Strategies, strategies for word prediction based on user information, and strategies for predicting words based on historical input information and/or current operations;

第一应用程序获取预设预测策略所包括的每一类策略各自对应的优先级,其中,基于第二类时间信息进行词预测的策略对应的优先级为4,基于第一类时间信息进行词预测的策略对应的优先级为3,基于用户信息进行词预测的策略为2,基于历史输入信息和/或当前操作的应用软件进行空上文词预测的策略为1;The first application obtains a priority corresponding to each type of policy included in the preset prediction policy, where the policy for performing word prediction based on the second type of time information corresponds to a priority of 4, and the word is based on the first type of time information. The predicted policy has a priority of 3, the policy based on the user information for the word prediction is 2, and the policy based on the historical input information and/or the currently operated application software for performing the above-mentioned word prediction is 1;

第一应用程序基于所获取的优先级,获取其所在电子设备的当前日期,将当前日期与第一节日数据库进行匹配,当匹配成功,且从第一节日数据库中,确定所对应节日日期与当前日期相同的预设节日候选词为“Happy Valentine’s Day”时,将“Happy Valentine’s Day”作为预测词;The first application acquires the current date of the electronic device in which it is located based on the acquired priority, and matches the current date with the first holiday database. When the matching is successful, and the first holiday database is determined, the corresponding holiday date and current are determined. When the default holiday candidate with the same date is "Happy Valentine's Day", "Happy Valentine's Day" is used as the predictive word;

第一应用程序获取其所在电子设备的当前时间,从预设的对应关系中,确定与当前时间匹配的第一预设时间段,作为目标时间段,从预设的对应关系中,确定目标时间段对应的预测候选词为“Good morning”,将“Good morning”作为预测词;The first application obtains the current time of the electronic device in which it is located, and determines a first preset time period that matches the current time from the preset correspondence, as the target time segment, and determines the target time from the preset correspondence relationship. The prediction candidate word corresponding to the segment is “Good morning”, and “Good morning” is used as the prediction word;

第一应用程序获取当前操作的应用程序的标识,当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;当判断预设辅助权限开启时,获取当前聊天对象的标识,为“Ellie”;将所获取的“Ellie”确定为预测词;The first application acquires an identifier of the currently operated application, and determines, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, determining whether the preset auxiliary permission of the electronic device is enabled; When the preset auxiliary permission is enabled, the identifier of the current chat object is obtained as “Ellie”; the obtained “Ellie” is determined as the predicted word;

第一应用程序展示上述所确定的预测词“Happy Valentine’s Day、Good morning、Ellie”;The first application displays the above-defined predicted words "Happy Valentine's Day, Good morning, Ellie";

当第一应用程序判断电子设备的预设辅助权限未开启时,可以继续基于历史输入信息和/或当前操作的应用软件进行空上文词预测的策略,进行词预测,得到预测词,为“The”;此时,第一应用程序展示上述所确定的预测词“Happy Valentine’s Day、Good morning、The”。When the first application determines that the preset auxiliary permission of the electronic device is not turned on, the policy of performing the above-mentioned word prediction based on the historical input information and/or the currently operated application software may be continued, and the word prediction is performed to obtain the predicted word, which is “The At this time, the first application displays the above-predicted predicted words "Happy Valentine's Day, Good morning, The".

相应于上述方法实施例,本申请实施例提供了一种空上文词预测装置,如图9所示,所述装置包括:Corresponding to the above method embodiment, the embodiment of the present application provides an empty word prediction device. As shown in FIG. 9, the device includes:

第一获取模块910,用于在获取空上文预测指令后,获取预设预测策略,其中,所述预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的策略;The first obtaining module 910 is configured to obtain a preset prediction policy after acquiring the foregoing prediction instruction, where the preset prediction policy includes at least: a policy for performing word prediction based on user information and/or time information;

确定模块920,用于基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词;The determining module 920 is configured to determine a predicted word based on a strategy for performing word prediction based on the user information and/or the time information included in the acquired preset prediction policy;

展示模块930,用于展示所确定的预测词。The display module 930 is configured to display the determined prediction words.

本申请实施例中,在获取空上文预测指令后,获取预设预测策略,其中,预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的策略;基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词;展示所确定的预测词。可见,本申请实施例中,可以基于用户信息和/或时间信息进行词预测,使得所确定的预测词与用户和/或时间更加相关,在一定程度上提高用户的关注度以及点击率,并且不再单一的仅基于历史输入信息和/或当前操作的应用软件进行空上文预测,增加了词预测的预测方式,实现更智能地进行空上文预测。In the embodiment of the present application, after acquiring the above prediction instruction, acquiring a preset prediction policy, where the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information; The prediction strategy includes at least a policy of performing word prediction based on user information and/or time information, determining a predicted word, and displaying the determined predicted word. It can be seen that, in the embodiment of the present application, the word prediction can be performed based on the user information and/or the time information, so that the determined predicted words are more related to the user and/or the time, and the user's attention and the click rate are improved to some extent, and It is no longer a single application based on historical input information and/or currently operating applications, which increases the prediction of word prediction and enables more intelligent predictions.

在一种实现方式中,所述预设预测策略包括:基于第一类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on the first type of time information;

如图10所示,所述确定模块920包括:As shown in FIG. 10, the determining module 920 includes:

第一获取单元1001,用于获取电子设备的当前时间;The first obtaining unit 1001 is configured to acquire a current time of the electronic device.

第一确定单元1002,用于从预设的对应关系中,确定与所述当前时间匹配的第一预设时间段,作为目标时间段,其中,所述预设的对应关系包括:每一预测候选词与第一预设时间段的对应关系;The first determining unit 1002 is configured to determine, from the preset correspondence, a first preset time period that matches the current time, as the target time segment, where the preset correspondence includes: each prediction Correspondence between the candidate word and the first preset time period;

第二确定单元1003,用于从所述预设的对应关系中,确定所述目标时间段对应的预测候选词,作为预测词。The second determining unit 1003 is configured to determine, from the preset correspondence, a prediction candidate word corresponding to the target time segment as a prediction word.

在一种实现方式中,所述预设预测策略包括:基于第二类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a strategy for performing word prediction based on the second type of time information;

如图11所示,所述确定模块920包括:As shown in FIG. 11, the determining module 920 includes:

第二获取单元1101,用于获取电子设备的当前日期;The second obtaining unit 1101 is configured to acquire a current date of the electronic device.

第一匹配单元1102,用于将所述当前日期与第一节日数据库进行匹配,其中,所述第一节日数据库中存储有每一预设节日候选词与节日日期的对应关系;The first matching unit 1102 is configured to match the current date with the first holiday database, wherein the first holiday database stores a correspondence between each preset holiday candidate word and a holiday date;

第三确定单元1103,用于当匹配成功时,从所述第一节日数据库中,确定所对应节日日期与所述当前日期相同的预设节日候选词,作为预测词。The third determining unit 1103 is configured to, when the matching is successful, determine, from the first holiday database, a preset holiday candidate word whose corresponding holiday date is the same as the current date, as the predicted word.

在一种实现方式中,所述预设预测策略包括:基于用户信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on user information;

如图12所示,所述确定模块920包括:As shown in FIG. 12, the determining module 920 includes:

第三获取单元1201,用于获取当前操作的应用程序的标识;The third obtaining unit 1201 is configured to acquire an identifier of the currently operated application.

第一判断单元1202,用于当基于所述当前操作的应用程序的标识,确定所述当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;The first determining unit 1202 is configured to determine, according to the identifier of the currently operated application, that the currently operated application is a preset chat application, determine whether the preset auxiliary permission of the electronic device is enabled;

第四获取单元1203,用于当判断所述预设辅助权限开启时,获取当前聊 天对象的标识;The fourth obtaining unit 1203 is configured to acquire an identifier of the current chat object when determining that the preset auxiliary right is turned on;

第四确定单元1204,用于将所获取的当前聊天对象的标识确定为预测词。The fourth determining unit 1204 is configured to determine the acquired identifier of the current chat object as a predicted word.

在一种实现方式中,基于图9和图12所示结构,如图13所示,所述确定模块920还包括:In an implementation manner, based on the structures shown in FIG. 9 and FIG. 12, as shown in FIG. 13, the determining module 920 further includes:

输出单元1301,用于当判断所述预设辅助权限未开启时,输出设置信息,其中,所述设置信息包括:提示用户开启所述预设辅助权限的路径信息。The output unit 1301 is configured to output setting information when the preset auxiliary permission is not turned on, where the setting information includes: prompting the user to open the path information of the preset auxiliary right.

在一种实现方式中,所述预设预测策略包括:基于用户信息和第一类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on user information and first type time information;

如图14所示,所述确定模块920包括:As shown in FIG. 14, the determining module 920 includes:

第五获取单元1401,用于获取当前操作的应用程序的标识,并获取电子设备的当前时间;The fifth obtaining unit 1401 is configured to acquire an identifier of the currently operated application, and acquire a current time of the electronic device.

第二判断单元1402,用于当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;The second determining unit 1402 is configured to determine, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, and determine whether the preset auxiliary permission of the electronic device is enabled;

第六获取单元1403,用于当判断预设辅助权限开启时,获取当前聊天对象的标识;The sixth obtaining unit 1403 is configured to acquire an identifier of the current chat object when determining that the preset auxiliary permission is enabled;

第五确定单元1404,用于从预存的历史输入词中,确定出与所述当前聊天对象的标识对应的、且与所述当前时间对应的、且所对应输入次数高于预定输入阈值的词,作为预测词,其中,所述预存的历史输入词中包含:用户针对所述当前聊天对象的标识,在各第二预设时间段内历史输入的词。a fifth determining unit 1404, configured to determine, from the pre-stored historical input words, a word corresponding to the identifier of the current chat object and corresponding to the current time, and the corresponding input times are higher than a predetermined input threshold As a predictive word, the pre-stored historical input word includes: a word entered by the user for each second preset time period for the identifier of the current chat object.

在一种实现方式中,所述预设预测策略包括:基于用户信息和第二类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on user information and second type time information;

如图15所示,所述确定模块920包括:As shown in FIG. 15, the determining module 920 includes:

第七获取单元1501,用于获取当前操作的应用程序的标识,并获取电子设备的当前日期;The seventh obtaining unit 1501 is configured to acquire an identifier of the currently operated application, and acquire a current date of the electronic device.

第三判断单元1502,用于当基于当前操作的应用程序的标识,确定当前 操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;The third determining unit 1502 is configured to determine, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, and determine whether the preset auxiliary permission of the electronic device is enabled;

第八获取单元1503,用于当判断预设辅助权限开启时,获取当前聊天对象的标识;The eighth obtaining unit 1503 is configured to acquire an identifier of the current chat object when determining that the preset auxiliary permission is enabled;

第二匹配单元1504,用于将所述当前聊天对象的标识及所述当前日期与第二节日数据库进行匹配,其中,所述第二节日数据库中存储有每一对象的标识、预设提醒日期与预设提醒候选词之间的对应关系;The second matching unit 1504 is configured to match the identifier of the current chat object and the current date with a second holiday database, where the identifier of each object and the preset reminder date are stored in the second holiday database. Correspondence with preset reminder candidates;

第六确定单元1505,用于当匹配成功时,从所述第二节日数据库中,确定所对应对象的标识与所述当前聊天对象的标识相同,且所对应预设提醒日期与所述当前日期相同的预设提醒候选词,作为预测词。The sixth determining unit 1505 is configured to: when the matching is successful, determine, from the second holiday database, that the identifier of the corresponding object is the same as the identifier of the current chat object, and the preset preset reminding date and the current date The same preset reminder candidate is used as the predictive word.

在一种实现方式中,所述预设预测策略至少包括:基于第一类时间信息进行词预测的策略、基于第二类时间信息进行词预测的策略、基于用户信息进行词预测的策略、基于用户信息和第一类时间信息进行词预测的策略以及基于用户信息和第二类时间信息进行词预测的策略中的至少两类策略;In an implementation manner, the preset prediction strategy includes at least: a policy for performing word prediction based on the first type of time information, a policy for performing word prediction based on the second type of time information, a strategy for performing word prediction based on the user information, based on The user information and the first type of time information perform a word prediction strategy and at least two types of strategies for word prediction based on the user information and the second type of time information;

如图16所示,所述装置还包括:As shown in FIG. 16, the device further includes:

第二获取模块1610,用于在所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词之前,获取所述预设预测策略所包括的每一类策略各自对应的优先级;The second obtaining module 1610 is configured to: perform a word prediction based on the user information and/or the time information based on the acquired preset prediction policy, and obtain the preset prediction strategy before determining the predicted word. The priority of each type of strategy included;

所述确定模块920,具体用于The determining module 920 is specifically configured to be used

按照所获取的每一类策略各自对应的优先级,基于所获取的预设预测策略所包括的每一类策略,确定预测词。The prediction words are determined based on each type of strategy included in the acquired preset prediction strategy according to the respective priorities of each type of the obtained strategy.

相应于上述方法实施例,本申请实施例还提供了一种电子设备,如图17所示,包括处理器171、通信接口172、存储器173和通信总线174,其中,处理器171,通信接口172,存储器173通过通信总线174完成相互间的通信,Corresponding to the above method embodiment, the embodiment of the present application further provides an electronic device, as shown in FIG. 17, including a processor 171, a communication interface 172, a memory 173, and a communication bus 174, wherein the processor 171, the communication interface 172 The memory 173 completes communication with each other through the communication bus 174.

存储器173,用于存放计算机程序;其中,该计算机程序为本申请实施例所提的第一应用程序;The storage unit 173 is configured to store a computer program; wherein the computer program is the first application program mentioned in the embodiment of the present application;

处理器171,用于执行存储器173上所存放的计算机程序时,实现本申请实施例所提供的上述任一所述的空上文词预测方法,可以包括步骤:The processor 171, when used to execute the computer program stored in the memory 173, implements the above-mentioned method for predicting the above-mentioned words provided by the embodiment of the present application, and may include the following steps:

在获取空上文预测指令后,获取预设预测策略,其中,所述预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的策略;After acquiring the above prediction instruction, acquiring a preset prediction policy, where the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information;

基于所获取的预设预测策略,确定预测词;Determining the predicted word based on the acquired preset prediction strategy;

展示所确定的预测词。Show the predicted words determined.

本申请实施例中,在获取空上文预测指令后,获取预设预测策略,其中,预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的策略;基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词;展示所确定的预测词。可见,本申请实施例中,可以基于用户信息和/或时间信息进行词预测,使得所确定的预测词与用户和/或时间更加相关,在一定程度上提高用户的关注度以及点击率,并且不再单一的仅基于历史输入信息和/或当前操作的应用软件进行空上文预测,增加了词预测的预测方式,实现更智能地进行空上文预测。In the embodiment of the present application, after acquiring the above prediction instruction, acquiring a preset prediction policy, where the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information; The prediction strategy includes at least a policy of performing word prediction based on user information and/or time information, determining a predicted word, and displaying the determined predicted word. It can be seen that, in the embodiment of the present application, the word prediction can be performed based on the user information and/or the time information, so that the determined predicted words are more related to the user and/or the time, and the user's attention and the click rate are improved to some extent, and It is no longer a single application based on historical input information and/or currently operating applications, which increases the prediction of word prediction and enables more intelligent predictions.

在一种实现方式中,所述预设预测策略包括:基于第一类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on the first type of time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词,包括:And determining, according to the acquired preset prediction strategy, a strategy for performing word prediction based on user information and/or time information, including determining a predicted word, including:

获取电子设备的当前时间;Get the current time of the electronic device;

从预设的对应关系中,确定与所述当前时间匹配的第一预设时间段,作为目标时间段,其中,所述预设的对应关系包括:每一预测候选词与第一预设时间段的对应关系;Determining, by the preset correspondence, a first preset time period that matches the current time, as the target time segment, where the preset correspondence relationship includes: each prediction candidate word and the first preset time Correspondence of segments;

从所述预设的对应关系中,确定所述目标时间段对应的预测候选词,作为预测词。From the preset correspondence, the prediction candidate words corresponding to the target time period are determined as prediction words.

在一种实现方式中,所述预设预测策略包括:基于第二类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a strategy for performing word prediction based on the second type of time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间 信息进行词预测的策略,确定预测词,包括:And determining, according to the acquired preset prediction strategy, a policy for performing word prediction based on the user information and/or the time information, and determining the predicted word, including:

获取电子设备的当前日期;Get the current date of the electronic device;

将所述当前日期与第一节日数据库进行匹配,其中,所述第一节日数据库中存储有每一预设节日候选词与节日日期的对应关系;Matching the current date with the first holiday database, wherein the first holiday database stores a correspondence between each preset holiday candidate word and a holiday date;

当匹配成功时,从所述第一节日数据库中,确定所对应节日日期与所述当前日期相同的预设节日候选词,作为预测词。When the matching is successful, from the first holiday database, the preset holiday candidate words whose corresponding holiday date is the same as the current date are determined as the predicted words.

在一种实现方式中,所述预设预测策略包括:基于用户信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on user information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词,包括:And determining, according to the acquired preset prediction strategy, a strategy for performing word prediction based on user information and/or time information, including determining a predicted word, including:

获取当前操作的应用程序的标识;Get the ID of the application that is currently operating;

当基于所述当前操作的应用程序的标识,确定所述当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;When it is determined that the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;

当判断所述预设辅助权限开启时,获取当前聊天对象的标识;Obtaining an identifier of the current chat object when determining that the preset auxiliary permission is enabled;

将所获取的当前聊天对象的标识确定为预测词。The acquired identifier of the current chat object is determined as a predicted word.

在一种实现方式中,还包括:In an implementation manner, the method further includes:

当判断所述预设辅助权限未开启时,输出设置信息,其中,所述设置信息包括:提示用户开启所述预设辅助权限的路径信息。When it is determined that the preset auxiliary permission is not enabled, the setting information is output, where the setting information includes: prompting the user to open the path information of the preset auxiliary right.

在一种实现方式中,所述预设预测策略包括:基于用户信息和第一类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on user information and first type time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词,包括:And determining, according to the acquired preset prediction strategy, a strategy for performing word prediction based on user information and/or time information, including determining a predicted word, including:

获取当前操作的应用程序的标识,并获取电子设备的当前时间;Get the ID of the currently operating application and obtain the current time of the electronic device;

当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;When it is determined that the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;

当判断预设辅助权限开启时,获取当前聊天对象的标识;When it is determined that the preset auxiliary permission is enabled, the identifier of the current chat object is obtained;

从预存的历史输入词中,确定出与所述当前聊天对象的标识对应的、且与所述当前时间对应的、且所对应输入次数高于预定输入阈值的词,作为预测词,其中,所述预存的历史输入词中包含:用户针对所述当前聊天对象的标识,在各第二预设时间段内历史输入的词。Determining, from the pre-stored historical input words, a word corresponding to the current chat object and corresponding to the current time, and the corresponding input number is higher than a predetermined input threshold, as a predictive word, where The pre-stored historical input word includes: a word entered by the user for each second preset time period for the identifier of the current chat object.

在一种实现方式中,所述预设预测策略包括:基于用户信息和第二类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on user information and second type time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词,包括:And determining, according to the acquired preset prediction strategy, a strategy for performing word prediction based on user information and/or time information, including determining a predicted word, including:

获取当前操作的应用程序的标识,并获取电子设备的当前日期;Get the ID of the currently operating application and get the current date of the electronic device;

当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;When it is determined that the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;

当判断预设辅助权限开启时,获取当前聊天对象的标识;When it is determined that the preset auxiliary permission is enabled, the identifier of the current chat object is obtained;

将所述当前聊天对象的标识及所述当前日期与第二节日数据库进行匹配,其中,所述第二节日数据库中存储有每一对象的标识、预设提醒日期与预设提醒候选词之间的对应关系;Matching the identifier of the current chat object and the current date with a second holiday database, wherein the second holiday database stores an identifier of each object, a preset reminder date, and a preset reminder candidate word. Correspondence relationship;

当匹配成功时,从所述第二节日数据库中,确定所对应对象的标识与所述当前聊天对象的标识相同,且所对应预设提醒日期与所述当前日期相同的预设提醒候选词,作为预测词。When the matching is successful, determining, from the second holiday database, that the identifier of the corresponding object is the same as the identifier of the current chat object, and the preset reminder candidate date corresponding to the preset date is the same as the current date. As a predictive word.

在一种实现方式中,所述预设预测策略至少包括:基于第一类时间信息进行词预测的策略、基于第二类时间信息进行词预测的策略、基于用户信息进行词预测的策略、基于用户信息和第一类时间信息进行词预测的策略以及基于用户信息和第二类时间信息进行词预测的策略中的至少两类策略;In an implementation manner, the preset prediction strategy includes at least: a policy for performing word prediction based on the first type of time information, a policy for performing word prediction based on the second type of time information, a strategy for performing word prediction based on the user information, based on The user information and the first type of time information perform a word prediction strategy and at least two types of strategies for word prediction based on the user information and the second type of time information;

在所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词之前,还包括:The method for performing word prediction based on the user information and/or the time information based on the acquired preset prediction policy includes: before determining the predicted word, the method further includes:

获取所述预设预测策略所包括的每一类策略各自对应的优先级;Obtaining a priority corresponding to each type of policy included in the preset prediction policy;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,包括:And the step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information, including:

按照所获取的每一类策略各自对应的优先级,基于所获取的预设预测策略所包括的每一类策略,确定预测词。The prediction words are determined based on each type of strategy included in the acquired preset prediction strategy according to the respective priorities of each type of the obtained strategy.

上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus.

通信接口用于上述电子设备与其他设备之间的通信。The communication interface is used for communication between the above electronic device and other devices.

存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; or may be a digital signal processing (DSP), dedicated integration. Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.

相应于上述方法实施例,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现本申请实施例所提供的上述任一所述的空上文词预测方法,可以包括步骤:Corresponding to the foregoing method embodiments, the embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the embodiment of the present application is provided. The method for predicting an empty word according to any of the above, may include the steps of:

在获取空上文预测指令后,获取预设预测策略,其中,所述预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的策略;After acquiring the above prediction instruction, acquiring a preset prediction policy, where the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information;

基于所获取的预设预测策略,确定预测词;Determining the predicted word based on the acquired preset prediction strategy;

展示所确定的预测词。Show the predicted words determined.

本申请实施例中,在获取空上文预测指令后,获取预设预测策略,其中,预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的策略;基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词;展示所确定的预测词。可见,本申请实施例中,可以基于用户信息和/或时间信息进行词预测,使得所确定的预测词与用户和/或时间更加相关,在一定程度上提高用户的关注度以及点击率,并且不再单一的仅基于历史输入信息和/或当前操作的应用软件进行空上文预测,增加了词预测的预测方式,实现更智能地进行空上文预测。In the embodiment of the present application, after acquiring the above prediction instruction, acquiring a preset prediction policy, where the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information; The prediction strategy includes at least a policy of performing word prediction based on user information and/or time information, determining a predicted word, and displaying the determined predicted word. It can be seen that, in the embodiment of the present application, the word prediction can be performed based on the user information and/or the time information, so that the determined predicted words are more related to the user and/or the time, and the user's attention and the click rate are improved to some extent, and It is no longer a single application based on historical input information and/or currently operating applications, which increases the prediction of word prediction and enables more intelligent predictions.

在一种实现方式中,所述预设预测策略包括:基于第一类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on the first type of time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词,包括:And determining, according to the acquired preset prediction strategy, a strategy for performing word prediction based on user information and/or time information, including determining a predicted word, including:

获取电子设备的当前时间;Get the current time of the electronic device;

从预设的对应关系中,确定与所述当前时间匹配的第一预设时间段,作为目标时间段,其中,所述预设的对应关系包括:每一预测候选词与第一预设时间段的对应关系;Determining, by the preset correspondence, a first preset time period that matches the current time, as the target time segment, where the preset correspondence relationship includes: each prediction candidate word and the first preset time Correspondence of segments;

从所述预设的对应关系中,确定所述目标时间段对应的预测候选词,作为预测词。From the preset correspondence, the prediction candidate words corresponding to the target time period are determined as prediction words.

在一种实现方式中,所述预设预测策略包括:基于第二类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a strategy for performing word prediction based on the second type of time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词,包括:And determining, according to the acquired preset prediction strategy, a strategy for performing word prediction based on user information and/or time information, including determining a predicted word, including:

获取电子设备的当前日期;Get the current date of the electronic device;

将所述当前日期与第一节日数据库进行匹配,其中,所述第一节日数据库中存储有每一预设节日候选词与节日日期的对应关系;Matching the current date with the first holiday database, wherein the first holiday database stores a correspondence between each preset holiday candidate word and a holiday date;

当匹配成功时,从所述第一节日数据库中,确定所对应节日日期与所述当前日期相同的预设节日候选词,作为预测词。When the matching is successful, from the first holiday database, the preset holiday candidate words whose corresponding holiday date is the same as the current date are determined as the predicted words.

在一种实现方式中,所述预设预测策略包括:基于用户信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on user information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词,包括:And determining, according to the acquired preset prediction strategy, a strategy for performing word prediction based on user information and/or time information, including determining a predicted word, including:

获取当前操作的应用程序的标识;Get the ID of the application that is currently operating;

当基于所述当前操作的应用程序的标识,确定所述当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;When it is determined that the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;

当判断所述预设辅助权限开启时,获取当前聊天对象的标识;Obtaining an identifier of the current chat object when determining that the preset auxiliary permission is enabled;

将所获取的当前聊天对象的标识确定为预测词。The acquired identifier of the current chat object is determined as a predicted word.

在一种实现方式中,还包括:In an implementation manner, the method further includes:

当判断所述预设辅助权限未开启时,输出设置信息,其中,所述设置信息包括:提示用户开启所述预设辅助权限的路径信息。When it is determined that the preset auxiliary permission is not enabled, the setting information is output, where the setting information includes: prompting the user to open the path information of the preset auxiliary right.

在一种实现方式中,所述预设预测策略包括:基于用户信息和第一类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on user information and first type time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词,包括:And determining, according to the acquired preset prediction strategy, a strategy for performing word prediction based on user information and/or time information, including determining a predicted word, including:

获取当前操作的应用程序的标识,并获取电子设备的当前时间;Get the ID of the currently operating application and obtain the current time of the electronic device;

当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;When it is determined that the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;

当判断预设辅助权限开启时,获取当前聊天对象的标识;When it is determined that the preset auxiliary permission is enabled, the identifier of the current chat object is obtained;

从预存的历史输入词中,确定出与所述当前聊天对象的标识对应的、且与所述当前时间对应的、且所对应输入次数高于预定输入阈值的词,作为预测词,其中,所述预存的历史输入词中包含:用户针对所述当前聊天对象的标识,在各第二预设时间段内历史输入的词。Determining, from the pre-stored historical input words, a word corresponding to the current chat object and corresponding to the current time, and the corresponding input number is higher than a predetermined input threshold, as a predictive word, where The pre-stored historical input word includes: a word entered by the user for each second preset time period for the identifier of the current chat object.

在一种实现方式中,所述预设预测策略包括:基于用户信息和第二类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on user information and second type time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词,包括:And determining, according to the acquired preset prediction strategy, a strategy for performing word prediction based on user information and/or time information, including determining a predicted word, including:

获取当前操作的应用程序的标识,并获取电子设备的当前日期;Get the ID of the currently operating application and get the current date of the electronic device;

当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;When it is determined that the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;

当判断预设辅助权限开启时,获取当前聊天对象的标识;When it is determined that the preset auxiliary permission is enabled, the identifier of the current chat object is obtained;

将所述当前聊天对象的标识及所述当前日期与第二节日数据库进行匹配,其中,所述第二节日数据库中存储有每一对象的标识、预设提醒日期与预设提醒候选词之间的对应关系;Matching the identifier of the current chat object and the current date with a second holiday database, wherein the second holiday database stores an identifier of each object, a preset reminder date, and a preset reminder candidate word. Correspondence relationship;

当匹配成功时,从所述第二节日数据库中,确定所对应对象的标识与所述当前聊天对象的标识相同,且所对应预设提醒日期与所述当前日期相同的预设提醒候选词,作为预测词。When the matching is successful, determining, from the second holiday database, that the identifier of the corresponding object is the same as the identifier of the current chat object, and the preset reminder candidate date corresponding to the preset date is the same as the current date. As a predictive word.

在一种实现方式中,所述预设预测策略至少包括:基于第一类时间信息进行词预测的策略、基于第二类时间信息进行词预测的策略、基于用户信息进行词预测的策略、基于用户信息和第一类时间信息进行词预测的策略以及基于用户信息和第二类时间信息进行词预测的策略中的至少两类策略;In an implementation manner, the preset prediction strategy includes at least: a policy for performing word prediction based on the first type of time information, a policy for performing word prediction based on the second type of time information, a strategy for performing word prediction based on the user information, based on The user information and the first type of time information perform a word prediction strategy and at least two types of strategies for word prediction based on the user information and the second type of time information;

在所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词之前,还包括:The method for performing word prediction based on the user information and/or the time information based on the acquired preset prediction policy includes: before determining the predicted word, the method further includes:

获取所述预设预测策略所包括的每一类策略各自对应的优先级;Obtaining a priority corresponding to each type of policy included in the preset prediction policy;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,包括:And the step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information, including:

按照所获取的每一类策略各自对应的优先级,基于所获取的预设预测策略所包括的每一类策略,确定预测词。The prediction words are determined based on each type of strategy included in the acquired preset prediction strategy according to the respective priorities of each type of the obtained strategy.

相应于上述方法实施例,本申请实施例提供了一种计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的信息提醒方 法步骤:Corresponding to the above method embodiment, the embodiment of the present application provides a computer program product, when it is run on a computer, causing the computer to perform the information reminding method step of any one of the foregoing embodiments:

在获取空上文预测指令后,获取预设预测策略,其中,所述预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的策略;After acquiring the above prediction instruction, acquiring a preset prediction policy, where the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information;

基于所获取的预设预测策略,确定预测词;Determining the predicted word based on the acquired preset prediction strategy;

展示所确定的预测词。Show the predicted words determined.

本申请实施例中,在获取空上文预测指令后,获取预设预测策略,其中,预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的策略;基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词;展示所确定的预测词。可见,本申请实施例中,可以基于用户信息和/或时间信息进行词预测,使得所确定的预测词与用户和/或时间更加相关,在一定程度上提高用户的关注度以及点击率,并且不再单一的仅基于历史输入信息和/或当前操作的应用软件进行空上文预测,增加了词预测的预测方式,实现更智能地进行空上文预测。In the embodiment of the present application, after acquiring the above prediction instruction, acquiring a preset prediction policy, where the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information; The prediction strategy includes at least a policy of performing word prediction based on user information and/or time information, determining a predicted word, and displaying the determined predicted word. It can be seen that, in the embodiment of the present application, the word prediction can be performed based on the user information and/or the time information, so that the determined predicted words are more related to the user and/or the time, and the user's attention and the click rate are improved to some extent, and It is no longer a single application based on historical input information and/or currently operating applications, which increases the prediction of word prediction and enables more intelligent predictions.

在一种实现方式中,所述预设预测策略包括:基于第一类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on the first type of time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词,包括:And determining, according to the acquired preset prediction strategy, a strategy for performing word prediction based on user information and/or time information, including determining a predicted word, including:

获取电子设备的当前时间;Get the current time of the electronic device;

从预设的对应关系中,确定与所述当前时间匹配的第一预设时间段,作为目标时间段,其中,所述预设的对应关系包括:每一预测候选词与第一预设时间段的对应关系;Determining, by the preset correspondence, a first preset time period that matches the current time, as the target time segment, where the preset correspondence relationship includes: each prediction candidate word and the first preset time Correspondence of segments;

从所述预设的对应关系中,确定所述目标时间段对应的预测候选词,作为预测词。From the preset correspondence, the prediction candidate words corresponding to the target time period are determined as prediction words.

在一种实现方式中,所述预设预测策略包括:基于第二类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a strategy for performing word prediction based on the second type of time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词,包括:And determining, according to the acquired preset prediction strategy, a strategy for performing word prediction based on user information and/or time information, including determining a predicted word, including:

获取电子设备的当前日期;Get the current date of the electronic device;

将所述当前日期与第一节日数据库进行匹配,其中,所述第一节日数据库中存储有每一预设节日候选词与节日日期的对应关系;Matching the current date with the first holiday database, wherein the first holiday database stores a correspondence between each preset holiday candidate word and a holiday date;

当匹配成功时,从所述第一节日数据库中,确定所对应节日日期与所述当前日期相同的预设节日候选词,作为预测词。When the matching is successful, from the first holiday database, the preset holiday candidate words whose corresponding holiday date is the same as the current date are determined as the predicted words.

在一种实现方式中,所述预设预测策略包括:基于用户信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on user information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词,包括:And determining, according to the acquired preset prediction strategy, a strategy for performing word prediction based on user information and/or time information, including determining a predicted word, including:

获取当前操作的应用程序的标识;Get the ID of the application that is currently operating;

当基于所述当前操作的应用程序的标识,确定所述当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;When it is determined that the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;

当判断所述预设辅助权限开启时,获取当前聊天对象的标识;Obtaining an identifier of the current chat object when determining that the preset auxiliary permission is enabled;

将所获取的当前聊天对象的标识确定为预测词。The acquired identifier of the current chat object is determined as a predicted word.

在一种实现方式中,还包括:In an implementation manner, the method further includes:

当判断所述预设辅助权限未开启时,输出设置信息,其中,所述设置信息包括:提示用户开启所述预设辅助权限的路径信息。When it is determined that the preset auxiliary permission is not enabled, the setting information is output, where the setting information includes: prompting the user to open the path information of the preset auxiliary right.

在一种实现方式中,所述预设预测策略包括:基于用户信息和第一类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on user information and first type time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词,包括:And determining, according to the acquired preset prediction strategy, a strategy for performing word prediction based on user information and/or time information, including determining a predicted word, including:

获取当前操作的应用程序的标识,并获取电子设备的当前时间;Get the ID of the currently operating application and obtain the current time of the electronic device;

当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;When it is determined that the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;

当判断预设辅助权限开启时,获取当前聊天对象的标识;When it is determined that the preset auxiliary permission is enabled, the identifier of the current chat object is obtained;

从预存的历史输入词中,确定出与所述当前聊天对象的标识对应的、且与所述当前时间对应的、且所对应输入次数高于预定输入阈值的词,作为预测词,其中,所述预存的历史输入词中包含:用户针对所述当前聊天对象的标识,在各第二预设时间段内历史输入的词。Determining, from the pre-stored historical input words, a word corresponding to the current chat object and corresponding to the current time, and the corresponding input number is higher than a predetermined input threshold, as a predictive word, where The pre-stored historical input word includes: a word entered by the user for each second preset time period for the identifier of the current chat object.

在一种实现方式中,所述预设预测策略包括:基于用户信息和第二类时间信息进行词预测的策略;In an implementation manner, the preset prediction strategy includes: a policy for performing word prediction based on user information and second type time information;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词,包括:And determining, according to the acquired preset prediction strategy, a strategy for performing word prediction based on user information and/or time information, including determining a predicted word, including:

获取当前操作的应用程序的标识,并获取电子设备的当前日期;Get the ID of the currently operating application and get the current date of the electronic device;

当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;When it is determined that the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled;

当判断预设辅助权限开启时,获取当前聊天对象的标识;When it is determined that the preset auxiliary permission is enabled, the identifier of the current chat object is obtained;

将所述当前聊天对象的标识及所述当前日期与第二节日数据库进行匹配,其中,所述第二节日数据库中存储有每一对象的标识、预设提醒日期与预设提醒候选词之间的对应关系;Matching the identifier of the current chat object and the current date with a second holiday database, wherein the second holiday database stores an identifier of each object, a preset reminder date, and a preset reminder candidate word. Correspondence relationship;

当匹配成功时,从所述第二节日数据库中,确定所对应对象的标识与所述当前聊天对象的标识相同,且所对应预设提醒日期与所述当前日期相同的预设提醒候选词,作为预测词。When the matching is successful, determining, from the second holiday database, that the identifier of the corresponding object is the same as the identifier of the current chat object, and the preset reminder candidate date corresponding to the preset date is the same as the current date. As a predictive word.

在一种实现方式中,所述预设预测策略至少包括:基于第一类时间信息进行词预测的策略、基于第二类时间信息进行词预测的策略、基于用户信息进行词预测的策略、基于用户信息和第一类时间信息进行词预测的策略以及基于用户信息和第二类时间信息进行词预测的策略中的至少两类策略;In an implementation manner, the preset prediction strategy includes at least: a policy for performing word prediction based on the first type of time information, a policy for performing word prediction based on the second type of time information, a strategy for performing word prediction based on the user information, based on The user information and the first type of time information perform a word prediction strategy and at least two types of strategies for word prediction based on the user information and the second type of time information;

在所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词之前,还包括:The method for performing word prediction based on the user information and/or the time information based on the acquired preset prediction policy includes: before determining the predicted word, the method further includes:

获取所述预设预测策略所包括的每一类策略各自对应的优先级;Obtaining a priority corresponding to each type of policy included in the preset prediction policy;

所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,包括:And the step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information, including:

按照所获取的每一类策略各自对应的优先级,基于所获取的预设预测策略所包括的每一类策略,确定预测词。The prediction words are determined based on each type of strategy included in the acquired preset prediction strategy according to the respective priorities of each type of the obtained strategy.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply such entities or operations. There is any such actual relationship or order between them. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, item, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.

本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in the present specification are described in a related manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。The above description is only the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application are included in the scope of the present application.

Claims (19)

一种空上文词预测方法,其特征在于,所述方法包括:An empty word prediction method, characterized in that the method comprises: 在获取空上文预测指令后,获取预设预测策略,其中,所述预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的策略;After acquiring the above prediction instruction, acquiring a preset prediction policy, where the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information; 基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词;Determining a predicted word based on a strategy for performing word prediction based on user information and/or time information, based on the acquired preset prediction strategy; 展示所确定的预测词。Show the predicted words determined. 根据权利要求1所述的方法,其特征在于,所述预设预测策略包括:基于第一类时间信息进行词预测的策略;The method according to claim 1, wherein the preset prediction strategy comprises: a strategy for performing word prediction based on the first type of time information; 所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,包括:And the step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information, including: 获取电子设备的当前时间;Get the current time of the electronic device; 从预设的对应关系中,确定与所述当前时间匹配的第一预设时间段,作为目标时间段,其中,所述预设的对应关系包括:每一预测候选词与第一预设时间段的对应关系;Determining, by the preset correspondence, a first preset time period that matches the current time, as the target time segment, where the preset correspondence relationship includes: each prediction candidate word and the first preset time Correspondence of segments; 从所述预设的对应关系中,确定所述目标时间段对应的预测候选词,作为预测词。From the preset correspondence, the prediction candidate words corresponding to the target time period are determined as prediction words. 根据权利要求1所述的方法,其特征在于,所述预设预测策略包括:基于第二类时间信息进行词预测的策略;The method according to claim 1, wherein the preset prediction strategy comprises: a strategy for word prediction based on the second type of time information; 所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,包括:And the step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information, including: 获取电子设备的当前日期;Get the current date of the electronic device; 将所述当前日期与第一节日数据库进行匹配,其中,所述第一节日数据库中存储有每一预设节日候选词与节日日期的对应关系;Matching the current date with the first holiday database, wherein the first holiday database stores a correspondence between each preset holiday candidate word and a holiday date; 当匹配成功时,从所述第一节日数据库中,确定所对应节日日期与所述当前日期相同的预设节日候选词,作为预测词。When the matching is successful, from the first holiday database, the preset holiday candidate words whose corresponding holiday date is the same as the current date are determined as the predicted words. 根据权利要求1所述的方法,其特征在于,所述预设预测策略包括:基于用户信息进行词预测的策略;The method according to claim 1, wherein the preset prediction strategy comprises: a policy for word prediction based on user information; 所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,包括:And the step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information, including: 获取当前操作的应用程序的标识;Get the ID of the application that is currently operating; 当基于所述当前操作的应用程序的标识,确定所述当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;When it is determined that the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled; 当判断所述预设辅助权限开启时,获取当前聊天对象的标识;Obtaining an identifier of the current chat object when determining that the preset auxiliary permission is enabled; 将所获取的当前聊天对象的标识确定为预测词。The acquired identifier of the current chat object is determined as a predicted word. 根据权利要求4所述的方法,其特征在于,所述方法还包括:The method of claim 4, wherein the method further comprises: 当判断所述预设辅助权限未开启时,输出设置信息,其中,所述设置信息包括:提示用户开启所述预设辅助权限的路径信息。When it is determined that the preset auxiliary permission is not enabled, the setting information is output, where the setting information includes: prompting the user to open the path information of the preset auxiliary right. 根据权利要求1所述的方法,其特征在于,所述预设预测策略包括:基于用户信息和第一类时间信息进行词预测的策略;The method according to claim 1, wherein the preset prediction strategy comprises: a policy for word prediction based on user information and first type of time information; 所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,包括:And the step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information, including: 获取当前操作的应用程序的标识,并获取电子设备的当前时间;Get the ID of the currently operating application and obtain the current time of the electronic device; 当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;When it is determined that the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled; 当判断预设辅助权限开启时,获取当前聊天对象的标识;When it is determined that the preset auxiliary permission is enabled, the identifier of the current chat object is obtained; 从预存的历史输入词中,确定出与所述当前聊天对象的标识对应的、且与所述当前时间对应的、且所对应输入次数高于预定输入阈值的词,作为预测词,其中,所述预存的历史输入词中包含:用户针对所述当前聊天对象的标识,在各第二预设时间段内历史输入的词。Determining, from the pre-stored historical input words, a word corresponding to the current chat object and corresponding to the current time, and the corresponding input number is higher than a predetermined input threshold, as a predictive word, where The pre-stored historical input word includes: a word entered by the user for each second preset time period for the identifier of the current chat object. 根据权利要求1所述的方法,其特征在于,所述预设预测策略包括:基于用户信息和第二类时间信息进行词预测的策略;The method according to claim 1, wherein the preset prediction strategy comprises: a strategy for word prediction based on user information and second type of time information; 所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,包括:And the step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information, including: 获取当前操作的应用程序的标识,并获取电子设备的当前日期;Get the ID of the currently operating application and get the current date of the electronic device; 当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;When it is determined that the currently operated application is a preset chat application based on the identifier of the currently operated application, determining whether the preset auxiliary permission of the electronic device is enabled; 当判断预设辅助权限开启时,获取当前聊天对象的标识;When it is determined that the preset auxiliary permission is enabled, the identifier of the current chat object is obtained; 将所述当前聊天对象的标识及所述当前日期与第二节日数据库进行匹配,其中,所述第二节日数据库中存储有每一对象的标识、预设提醒日期与预设提醒候选词之间的对应关系;Matching the identifier of the current chat object and the current date with a second holiday database, wherein the second holiday database stores an identifier of each object, a preset reminder date, and a preset reminder candidate word. Correspondence relationship; 当匹配成功时,从所述第二节日数据库中,确定所对应对象的标识与所述当前聊天对象的标识相同,且所对应预设提醒日期与所述当前日期相同的预设提醒候选词,作为预测词。When the matching is successful, determining, from the second holiday database, that the identifier of the corresponding object is the same as the identifier of the current chat object, and the preset reminder candidate date corresponding to the preset date is the same as the current date. As a predictive word. 根据权利要求1-7任一项所述的方法,其特征在于,所述预设预测策略至少包括:基于第一类时间信息进行词预测的策略、基于第二类时间信息进行词预测的策略、基于用户信息进行词预测的策略、基于用户信息和第一类时间信息进行词预测的策略以及基于用户信息和第二类时间信息进行词预测的策略中的至少两类策略;The method according to any one of claims 1 to 7, wherein the preset prediction strategy comprises at least a strategy for performing word prediction based on the first type of time information, and a strategy for predicting words based on the second type of time information. a strategy for word prediction based on user information, a strategy for word prediction based on user information and first type of time information, and at least two types of strategies for word prediction based on user information and second type of time information; 在所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤之前,所述方法还包括:And the method further includes: before the step of determining a predicted word based on the user-based and/or time information based on the acquired preset prediction policy, the method further includes: 获取所述预设预测策略所包括的每一类策略各自对应的优先级;Obtaining a priority corresponding to each type of policy included in the preset prediction policy; 所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词的步骤,包括:And the step of determining a predicted word based on the at least included policy for performing word prediction based on the user information and/or the time information, including: 按照所获取的每一类策略各自对应的优先级,基于所获取的预设预测策略所包括的每一类策略,确定预测词。The prediction words are determined based on each type of strategy included in the acquired preset prediction strategy according to the respective priorities of each type of the obtained strategy. 一种空上文词预测装置,其特征在于,所述装置包括:An empty word prediction device, characterized in that the device comprises: 第一获取模块,用于在获取空上文预测指令后,获取预设预测策略,其 中,所述预设预测策略至少包括:基于用户信息和/或时间信息进行词预测的策略;a first obtaining module, configured to acquire a preset prediction policy after acquiring the foregoing prediction instruction, where the preset prediction strategy includes at least: a policy for performing word prediction based on user information and/or time information; 确定模块,用于基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词;a determining module, configured to determine a predicted word based on a strategy for performing word prediction based on the user information and/or the time information included in the acquired preset prediction policy; 展示模块,用于展示所确定的预测词。A presentation module for presenting the determined predictive words. 根据权利要求9所述的装置,其特征在于,所述预设预测策略包括:基于第一类时间信息进行词预测的策略;The apparatus according to claim 9, wherein the preset prediction strategy comprises: a policy for performing word prediction based on the first type of time information; 所述确定模块包括:The determining module includes: 第一获取单元,用于获取电子设备的当前时间;a first acquiring unit, configured to acquire a current time of the electronic device; 第一确定单元,用于从预设的对应关系中,确定与所述当前时间匹配的第一预设时间段,作为目标时间段,其中,所述预设的对应关系包括:每一预测候选词与第一预设时间段的对应关系;a first determining unit, configured to determine, from the preset correspondence, a first preset time period that matches the current time, as a target time segment, where the preset correspondence includes: each prediction candidate Correspondence between the word and the first preset time period; 第二确定单元,用于从所述预设的对应关系中,确定所述目标时间段对应的预测候选词,作为预测词。a second determining unit, configured to determine, from the preset correspondence, a prediction candidate word corresponding to the target time segment as a predicted word. 根据权利要求9所述的装置,其特征在于,所述预设预测策略包括:基于第二类时间信息进行词预测的策略;The apparatus according to claim 9, wherein the preset prediction strategy comprises: a policy for performing word prediction based on the second type of time information; 所述确定模块包括:The determining module includes: 第二获取单元,用于获取电子设备的当前日期;a second acquiring unit, configured to acquire a current date of the electronic device; 第一匹配单元,用于将所述当前日期与第一节日数据库进行匹配,其中,所述第一节日数据库中存储有每一预设节日候选词与节日日期的对应关系;a first matching unit, configured to match the current date with the first holiday database, wherein the first holiday database stores a correspondence between each preset holiday candidate word and a holiday date; 第三确定单元,用于当匹配成功时,从所述第一节日数据库中,确定所对应节日日期与所述当前日期相同的预设节日候选词,作为预测词。And a third determining unit, configured to, when the matching is successful, determine, from the first holiday database, a preset holiday candidate word whose corresponding holiday date is the same as the current date, as the predicted word. 根据权利要求9所述的装置,其特征在于,所述预设预测策略包括:基于用户信息进行词预测的策略;The apparatus according to claim 9, wherein the preset prediction strategy comprises: a policy for performing word prediction based on user information; 所述确定模块包括:The determining module includes: 第三获取单元,用于获取当前操作的应用程序的标识;a third obtaining unit, configured to acquire an identifier of the currently operated application; 第一判断单元,用于当基于所述当前操作的应用程序的标识,确定所述当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;a first determining unit, configured to determine, according to the identifier of the currently operated application, that the currently operated application is a preset chat application, determine whether the preset auxiliary permission of the electronic device is enabled; 第四获取单元,用于当判断所述预设辅助权限开启时,获取当前聊天对象的标识;a fourth obtaining unit, configured to acquire an identifier of the current chat object when determining that the preset auxiliary permission is enabled; 第四确定单元,用于将所获取的当前聊天对象的标识确定为预测词。And a fourth determining unit, configured to determine the acquired identifier of the current chat object as a predicted word. 根据权利要求12所述的装置,其特征在于,所述确定模块还包括:The device according to claim 12, wherein the determining module further comprises: 输出单元,用于当判断所述预设辅助权限未开启时,输出设置信息,其中,所述设置信息包括:提示用户开启所述预设辅助权限的路径信息。The output unit is configured to output setting information when the preset auxiliary permission is not turned on, where the setting information includes: prompting the user to open the path information of the preset auxiliary right. 根据权利要求9所述的装置,其特征在于,所述预设预测策略包括:基于用户信息和第一类时间信息进行词预测的策略;The apparatus according to claim 9, wherein the preset prediction strategy comprises: a policy for word prediction based on user information and first type of time information; 所述确定模块包括:The determining module includes: 第五获取单元,用于获取当前操作的应用程序的标识,并获取电子设备的当前时间;a fifth obtaining unit, configured to acquire an identifier of the currently operated application, and acquire a current time of the electronic device; 第二判断单元,用于当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;a second determining unit, configured to determine, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, and determine whether the preset auxiliary permission of the electronic device is enabled; 第六获取单元,用于当判断预设辅助权限开启时,获取当前聊天对象的标识;a sixth obtaining unit, configured to acquire an identifier of the current chat object when determining that the preset auxiliary permission is enabled; 第五确定单元,用于从预存的历史输入词中,确定出与所述当前聊天对象的标识对应的、且与所述当前时间对应的、且所对应输入次数高于预定输入阈值的词,作为预测词,其中,所述预存的历史输入词中包含:用户针对所述当前聊天对象的标识,在各第二预设时间段内历史输入的词。a fifth determining unit, configured to determine, from the pre-stored historical input words, a word corresponding to the identifier of the current chat object and corresponding to the current time, and the corresponding input number is higher than a predetermined input threshold, As a predictive word, the pre-stored historical input word includes: a word entered by the user for each second preset time period for the identifier of the current chat object. 根据权利要求9所述的装置,其特征在于,所述预设预测策略包括:基于用户信息和第二类时间信息进行词预测的策略;The apparatus according to claim 9, wherein the preset prediction strategy comprises: a policy for word prediction based on user information and second type of time information; 所述确定模块包括:The determining module includes: 第七获取单元,用于获取当前操作的应用程序的标识,并获取电子设备的当前日期;a seventh obtaining unit, configured to acquire an identifier of the currently operated application, and acquire a current date of the electronic device; 第三判断单元,用于当基于当前操作的应用程序的标识,确定当前操作的应用程序为预设聊天类应用程序时,判断电子设备的预设辅助权限是否开启;a third determining unit, configured to determine, according to the identifier of the currently operated application, whether the currently operated application is a preset chat application, and determine whether the preset auxiliary permission of the electronic device is enabled; 第八获取单元,用于当判断预设辅助权限开启时,获取当前聊天对象的标识;An eighth obtaining unit, configured to acquire an identifier of the current chat object when determining that the preset auxiliary permission is enabled; 第二匹配单元,用于将所述当前聊天对象的标识及所述当前日期与第二节日数据库进行匹配,其中,所述第二节日数据库中存储有每一对象的标识、预设提醒日期与预设提醒候选词之间的对应关系;a second matching unit, configured to match the identifier of the current chat object and the current date with a second holiday database, wherein the second holiday database stores an identifier of each object, a preset reminder date, and Presetting the correspondence between candidate words; 第六确定单元,用于当匹配成功时,从所述第二节日数据库中,确定所对应对象的标识与所述当前聊天对象的标识相同,且所对应预设提醒日期与所述当前日期相同的预设提醒候选词,作为预测词。a sixth determining unit, configured to: when the matching is successful, determine, from the second holiday database, that the identifier of the corresponding object is the same as the identifier of the current chat object, and the corresponding preset reminder date is the same as the current date The preset reminds the candidate as a predictive word. 根据权利要求9-15任一项所述的装置,其特征在于,所述预设预测策略至少包括:基于第一类时间信息进行词预测的策略、基于第二类时间信息进行词预测的策略、基于用户信息进行词预测的策略、基于用户信息和第一类时间信息进行词预测的策略以及基于用户信息和第二类时间信息进行词预测的策略中的至少两类策略;所述装置还包括:The device according to any one of claims 9-15, wherein the preset prediction strategy comprises at least a strategy for performing word prediction based on first type of time information, and a strategy for word prediction based on second type of time information. a strategy for word prediction based on user information, a strategy for word prediction based on user information and first type of time information, and at least two types of strategies for word prediction based on user information and second type of time information; include: 第二获取模块,用于在所述基于所获取的预设预测策略中,至少包括的基于用户信息和/或时间信息进行词预测的策略,确定预测词之前,获取所述预设预测策略所包括的每一类策略各自对应的优先级;a second acquiring module, configured to perform a word prediction based on the user information and/or the time information based on the acquired preset prediction policy, and obtain the preset prediction strategy before determining the predicted word The corresponding priority of each type of strategy included; 所述确定模块,具体用于The determining module is specifically configured to 按照所获取的每一类策略各自对应的优先级,基于所获取的预设预测策略所包括的每一类策略,确定预测词。The prediction words are determined based on each type of strategy included in the acquired preset prediction strategy according to the respective priorities of each type of the obtained strategy. 一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;An electronic device, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; 存储器,用于存放计算机程序;a memory for storing a computer program; 处理器,用于执行存储器上所存放的计算机程序时,实现权利要求1-8任一所述的空上文词预测方法步骤。The processor, when used to execute a computer program stored on a memory, implements the steps of the method for predicting a word according to any one of claims 1-8. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-8任一所述的空上文词预测方法步骤。A computer readable storage medium, wherein the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for predicting an empty word according to any one of claims 1-8 is implemented step. 一种计算机程序产品,其特征在于,当其在计算机上运行时,使得计算机执行权利要求1-8任一所述的空上文词预测方法步骤。A computer program product, characterized in that, when run on a computer, the computer is caused to perform the steps of the above-described method of predicting words in any of claims 1-8.
PCT/CN2018/109587 2018-03-30 2018-10-10 Method and apparatus for word prediction with no preceding text, and electronic device Ceased WO2019184295A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810277087.5 2018-03-30
CN201810277087.5A CN110321012A (en) 2018-03-30 2018-03-30 Method and device for predicting aerial Chinese words and electronic equipment

Publications (1)

Publication Number Publication Date
WO2019184295A1 true WO2019184295A1 (en) 2019-10-03

Family

ID=68062375

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/109587 Ceased WO2019184295A1 (en) 2018-03-30 2018-10-10 Method and apparatus for word prediction with no preceding text, and electronic device

Country Status (2)

Country Link
CN (1) CN110321012A (en)
WO (1) WO2019184295A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078854B (en) * 2019-12-13 2023-10-27 北京金山数字娱乐科技有限公司 Training method and device of question-answer prediction model, and question-answer prediction method and device
CN114791769A (en) * 2022-06-24 2022-07-26 湖北云享客数字智能科技有限公司 Big database establishment method for user behavior prediction result
CN116009709A (en) * 2023-01-10 2023-04-25 中国民航信息网络股份有限公司 Input prediction method, device, electronic equipment and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1707409A (en) * 2003-09-19 2005-12-14 美国在线服务公司 Contextual prediction of user words and user actions
CN104268166A (en) * 2014-09-09 2015-01-07 北京搜狗科技发展有限公司 Input method, device and electronic device
WO2016190972A1 (en) * 2015-05-26 2016-12-01 Google Inc. Predicting user needs for a particular context
CN107704100A (en) * 2017-09-27 2018-02-16 北京金山安全软件有限公司 Display method and device of predicted words and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8775400B2 (en) * 2010-06-30 2014-07-08 Microsoft Corporation Extracting facts from social network messages
US20140267045A1 (en) * 2013-03-14 2014-09-18 Microsoft Corporation Adaptive Language Models for Text Predictions
CN106708282B (en) * 2015-12-02 2019-03-19 北京搜狗科技发展有限公司 A kind of recommended method and device, a kind of device for recommendation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1707409A (en) * 2003-09-19 2005-12-14 美国在线服务公司 Contextual prediction of user words and user actions
CN104268166A (en) * 2014-09-09 2015-01-07 北京搜狗科技发展有限公司 Input method, device and electronic device
WO2016190972A1 (en) * 2015-05-26 2016-12-01 Google Inc. Predicting user needs for a particular context
CN107704100A (en) * 2017-09-27 2018-02-16 北京金山安全软件有限公司 Display method and device of predicted words and electronic equipment

Also Published As

Publication number Publication date
CN110321012A (en) 2019-10-11

Similar Documents

Publication Publication Date Title
US11570590B1 (en) Techniques for enhancing group communication on a mobile device
CN107257983B (en) Selective alerting to complete interrupted tasks
US11570275B2 (en) Intent-based calendar updating via digital personal assistant
JP6994559B2 (en) Systems and methods for proactively identifying relevant content and surface it on touch-sensitive devices
US12513100B2 (en) Computerized systems and methods for an electronic inbox digest
EP3433729B1 (en) Contextual task shortcuts
US20160104094A1 (en) Future meeting evaluation using implicit device feedback
CN110472941A (en) Schedule creation method and device, terminal, storage medium based on notification message
WO2019184295A1 (en) Method and apparatus for word prediction with no preceding text, and electronic device
US20190025939A1 (en) Cognition Enabled Predictive Keyword Dictionary for Smart Devices
CN107748697A (en) Using method for closing, device, storage medium and electronic equipment
CN115394295A (en) Segmentation processing method, device, equipment and storage medium
CN107870809A (en) Application closing method, device, storage medium and electronic equipment
US11625545B2 (en) Systems and methods for improved conversation translation
US11271884B2 (en) Providing social insight in email
CN109491264B (en) Household equipment control method and device
CN111221710B (en) A method, device and apparatus for identifying user type
CN117493584A (en) Label system construction method and device
KR20210001628A (en) Method, apparatus for managing an order using mobile terminal

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: 18912686

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 18912686

Country of ref document: EP

Kind code of ref document: A1