Input method and terminal based on cloud platform

文档序号:1922147 发布日期:2021-12-03 浏览:16次 中文

阅读说明:本技术 一种基于云平台的输入方法及终端 (Input method and terminal based on cloud platform ) 是由 王威 于 2021-07-30 设计创作,主要内容包括:本申请实施例公开了一种基于云平台的输入方法及终端,用于提高用户的输入效率。本申请实施例方法包括:终端接收用户输入的目标文本,目标文本包括第一词组,第一词组为用户一次性输入的词组;当目标文本满足目标语句条件时,终端向云平台发送目标文本,以使得云平台检测第一词组在目标文本中是否存在语法错误;终端接收云平台发送的反馈信息;若在预设时间内未接收到有字符输入,则终端根据反馈信息将第一词组设置为可编辑状态;终端确定第二词组,第二词组为使得目标文本不存在语法错误的词组;终端显示第二词组;若接收到用户选中第二词组的操作指令,则终端根据操作指令将第一词组替换为第二词组。(The embodiment of the application discloses an input method and a terminal based on a cloud platform, which are used for improving the input efficiency of a user. The method in the embodiment of the application comprises the following steps: the terminal receives a target text input by a user, wherein the target text comprises a first phrase, and the first phrase is a phrase input by the user at one time; when the target text meets the target statement condition, the terminal sends the target text to the cloud platform, so that the cloud platform detects whether a grammar error exists in the target text for the first phrase; the terminal receives feedback information sent by the cloud platform; if no character input is received within the preset time, the terminal sets the first phrase to be in an editable state according to the feedback information; the terminal determines a second phrase, wherein the second phrase is a phrase which enables the target text not to have grammar errors; the terminal displays the second phrase; and if an operation instruction of selecting the second phrase by the user is received, the terminal replaces the first phrase with the second phrase according to the operation instruction.)

1. An input method based on a cloud platform is characterized by comprising the following steps:

a terminal receives a target text input by a user, wherein the target text comprises a first phrase, and the first phrase is a phrase input by the user at one time;

when the target text meets a target statement condition, the terminal sends the target text to a cloud platform, so that the cloud platform detects whether a grammar error exists in the target text for the first phrase;

the terminal receives feedback information sent by the cloud platform, wherein the feedback information is used for indicating that the first phrase has a grammar error in the target text;

if no character input is received within the preset time, the terminal sets the first phrase to be in an editable state according to the feedback information;

the terminal determines a second phrase, wherein the second phrase is a phrase which enables the target text not to have grammar errors;

the terminal displays the second phrase;

and if an operation instruction of selecting the second phrase by a user is received, the terminal replaces the first phrase with the second phrase according to the operation instruction.

2. The cloud platform-based input method according to claim 1, wherein when the feedback information further carries second phrase information, the determining, by the terminal, of the second phrase includes:

and the terminal determines a second phrase according to the second phrase information carried by the feedback information.

3. The cloud platform-based input method of claim 1, wherein after the terminal displays the second phrase, the input method further comprises:

and if an operation instruction of inputting a third phrase by the user is received, replacing the first phrase by the third phrase by the terminal according to the operation instruction.

4. The cloud platform-based input method according to claim 1, wherein when there are a plurality of second phrases, the displaying, by the terminal, the second phrases includes:

and the terminal displays a plurality of second phrases.

5. The cloud platform-based input method of claim 4, wherein the displaying, by the terminal, the plurality of second phrases comprises:

the terminal acquires an input history record of the user;

the terminal sorts the plurality of second phrases according to the input historical records;

and the terminal displays a plurality of second phrases according to the sequencing result.

6. The cloud platform-based input method according to any one of claims 1 to 5, wherein if an operation instruction that the user selects the second phrase is received, the replacing, by the terminal, the first phrase with the second phrase according to the operation instruction includes:

and if an operation instruction that a user selects the second phrase through a space key, a number key or a touch screen is received, the terminal replaces the first phrase with the second phrase according to the operation instruction.

7. The cloud platform-based input method of any one of claims 1 to 5, wherein the target sentence condition is that a last character of the target text is a punctuation mark.

8. An input method based on a cloud platform is characterized by comprising the following steps:

the method comprises the steps that a cloud platform receives a target text sent by a terminal, wherein the target text comprises a first phrase;

the cloud platform detects whether a grammar error exists in the target text for the first phrase;

and when the grammar error exists, the cloud platform sends feedback information to the terminal.

9. The cloud platform-based input method of claim 8, wherein the cloud platform detecting whether the first phrase has a grammatical error in the target text comprises:

the cloud platform determines whether a grammar error exists in the target text by comparing the target text and the first phrase with a preset database, wherein a plurality of grammar error samples are stored in the preset database.

10. A terminal, comprising:

the system comprises a first receiving unit, a second receiving unit and a third receiving unit, wherein the first receiving unit is used for receiving a target text input by a user, the target text comprises a first phrase, and the first phrase is a phrase input by the user at one time;

a sending unit, configured to send the target text to a cloud platform when the target text meets a target sentence condition, so that the cloud platform detects whether a syntax error exists in the target text for the first phrase;

a second receiving unit, configured to receive feedback information of the cloud platform, where the feedback information is used to indicate that a syntax error exists in the target text for the first phrase;

the setting unit is used for setting the first phrase into an editable state according to the feedback information if no character input is received within preset time;

a determining unit, configured to determine a second phrase, where the second phrase is a phrase that makes the target text have no syntax error;

the display unit is used for displaying the second phrase;

and the first replacing unit is used for replacing the first phrase with the second phrase according to the operation instruction if the operation instruction that the user selects the second phrase is received.

Technical Field

The embodiment of the application relates to the field of communication, in particular to an input method and a terminal based on a cloud platform.

Background

The existing pinyin input method suitable for Chinese input is to convert a string of pinyin input by a user into a string of Chinese characters after the user inputs the string of pinyin. With the popularization of electronic devices and the improvement of input method technologies, when inputting pinyin characters, a user usually inputs Chinese characters in a way of inputting pinyin of a phrase at one time, for example, the user inputs the pinyin of the phrase "shide", then a plurality of phrases are displayed in corresponding input boxes according to the pinyin, including "1 is, 2 is, 3 is appropriate", and the like, and the user selects a desired phrase.

However, because a plurality of Chinese phrases with the same pinyin usually appear when the pinyin input method is used for inputting, when a user selects a phrase by selecting a number or by hitting a space key, a wrong phrase may be selected and the selected phrase is not intended by the user. Therefore, the user needs to spend more time to re-input or modify the phrase to obtain the desired phrase, which affects the input efficiency of the user.

Disclosure of Invention

The embodiment of the application provides an input method and a terminal based on a cloud platform, which are used for improving the input efficiency of a user.

A first aspect of an embodiment of the present application provides an input method based on a cloud platform, including:

a terminal receives a target text input by a user, wherein the target text comprises a first phrase, and the first phrase is a phrase input by the user at one time;

when the target text meets a target statement condition, the terminal sends the target text to a cloud platform, so that the cloud platform detects whether a grammar error exists in the target text for the first phrase;

the terminal receives feedback information sent by the cloud platform, wherein the feedback information is used for indicating that the first phrase has a grammar error in the target text;

if no character input is received within the preset time, the terminal sets the first phrase to be in an editable state according to the feedback information;

the terminal determines a second phrase, wherein the second phrase is a phrase which enables the target text not to have grammar errors;

the terminal displays the second phrase;

and if an operation instruction of selecting the second phrase by the user is received, the terminal replaces the first phrase with the second phrase according to the operation instruction.

Optionally, when the feedback information further carries second phrase information, the terminal determines that the second phrase includes:

and the terminal determines a second phrase according to the second phrase information carried by the feedback information.

Optionally, after the terminal displays the second phrase, the input method further includes:

and if an operation instruction of inputting a third phrase by the user is received, replacing the first phrase by the third phrase by the terminal according to the operation instruction.

Optionally, when there are a plurality of second phrases, the displaying, by the terminal, the second phrase includes:

and the terminal displays a plurality of second phrases.

Optionally, the displaying, by the terminal, a plurality of second phrases includes:

the terminal acquires an input history record of the user;

the terminal sorts the plurality of second phrases according to the input historical records;

and the terminal displays a plurality of second phrases according to the sequencing result.

Optionally, if an operation instruction that the user selects the second phrase is received, replacing, by the terminal, the first phrase with the second phrase according to the operation instruction includes:

and if receiving an operation instruction that the user selects the second phrase through a space key, a number key or a touch screen, replacing the first phrase with the second phrase by the terminal according to the operation instruction.

Optionally, the target sentence condition is that the last character of the target text is a punctuation mark.

A second aspect of the embodiments of the present application provides an input method based on a cloud platform, including:

the method comprises the steps that a cloud platform receives a target text sent by a terminal, wherein the target text comprises a first phrase;

the cloud platform detects whether a grammar error exists in the target text for the first phrase;

and when the grammar error exists, the cloud platform sends feedback information to the terminal.

Optionally, the detecting, by the cloud platform, whether a grammatical error of the first phrase exists in the target text includes:

the cloud platform determines whether a grammar error exists in the target text by comparing the target text and the first phrase with a preset database, wherein a plurality of grammar error samples are stored in the preset database.

A third aspect of the embodiments of the present application provides a terminal, including:

the system comprises a first receiving unit, a second receiving unit and a third receiving unit, wherein the first receiving unit is used for receiving a target text input by a user, the target text comprises a first phrase, and the first phrase is a phrase input by the user at one time;

a sending unit, configured to send the target text to a cloud platform when the target text meets a target sentence condition, so that the cloud platform detects whether a syntax error exists in the target text for the first phrase;

a second receiving unit, configured to receive feedback information of the cloud platform, where the feedback information is used to indicate that a syntax error exists in the target text for the first phrase;

the setting unit is used for setting the first phrase into an editable state according to the feedback information if no character input is received within preset time;

a determining unit, configured to determine a second phrase, where the second phrase is a phrase that makes the target text have no syntax error;

the display unit is used for displaying the second phrase;

and the first replacing unit is used for replacing the first phrase with the second phrase according to the operation instruction if the operation instruction of selecting the second phrase by the user is received.

Optionally, when the feedback information further carries second phrase information, the determining unit is specifically configured to determine a second phrase according to the second phrase information carried by the feedback information.

Optionally, the terminal further includes:

and the second replacing unit is used for replacing the first phrase with the third phrase according to the operation instruction if the operation instruction of inputting the third phrase by the user is received.

Optionally, when there are a plurality of second phrases, the display unit is specifically configured to display the plurality of second phrases.

Optionally, the display unit is specifically configured to obtain an input history of the user;

sequencing the plurality of second phrases according to the input historical records;

and displaying a plurality of second phrases according to the sequencing result.

Optionally, the first replacing unit is specifically configured to replace, by the terminal, the first phrase with the second phrase according to an operation instruction if the operation instruction that the user selects the second phrase through a space key, a numeric key, or a touch screen is received.

A fourth aspect of the present embodiment provides a cloud platform, including:

the receiving unit is used for receiving a target text sent by a terminal, wherein the target text comprises a first phrase;

the detection unit is used for detecting whether the first phrase has grammar errors in the target text;

a transmitting unit for transmitting feedback information to the terminal when there is a syntax error.

Optionally, the detecting unit is specifically configured to determine whether a grammatical error of the first phrase exists in the target text by comparing the target text and the first phrase with a preset database, where a plurality of grammatical error samples are stored in the preset database.

A fifth aspect of an embodiment of the present application provides a terminal, including:

the system comprises a central processing unit, a memory, an input/output interface, a wired or wireless network interface and a power supply;

the memory is a transient memory or a persistent memory;

the central processor is configured to communicate with the memory and execute the instructions in the memory to perform the method of any of the preceding first aspects.

A sixth aspect of an embodiment of the present application provides a cloud platform, including:

the system comprises a central processing unit, a memory, an input/output interface, a wired or wireless network interface and a power supply;

the memory is a transient memory or a persistent memory;

the central processor is configured to communicate with the memory and execute the instructions in the memory to perform the method of any of the foregoing second aspects.

A seventh aspect of embodiments of the present application provides a computer-readable storage medium, including instructions that, when executed on a computer, cause the computer to perform the method of any one of the first or second aspects.

An eighth aspect of the embodiments of the present application provides an input method, including:

receiving a target text input by a user, wherein the target text comprises a first phrase, and the first phrase is a phrase input by the user at one time;

when the target text meets a target sentence condition, detecting whether a grammar error exists in the target text by the first phrase;

if no character input is received within the preset time and the first phrase is determined to have a grammar error, setting the first phrase to be in an editable state;

determining a second phrase, wherein the second phrase is a phrase which enables the target text not to have grammar errors;

displaying the second phrase;

and if an operation instruction of selecting the second phrase by the user is received, replacing the first phrase with the second phrase according to the operation instruction.

Optionally, if an operation instruction of inputting a third phrase by the user is received, replacing the first phrase with the third phrase according to the operation instruction.

A ninth aspect of an embodiment of the present application provides an input device, including:

the receiving unit is used for receiving a target text input by a user, wherein the target text comprises a first phrase, and the first phrase is a phrase input by the user at one time;

the detection unit is used for detecting whether the first phrase has grammar errors in the target text or not when the target text meets a target sentence condition;

the setting unit is used for setting the first phrase into an editable state if no character input is received within preset time and the first phrase is determined to have a grammar error;

a determining unit, configured to determine a second phrase, where the second phrase is a phrase that makes the target text have no syntax error;

the display unit is used for displaying the second phrase;

and the first replacing unit is used for replacing the first phrase with the second phrase according to the operation instruction if the operation instruction of selecting the second phrase by the user is received.

Optionally, the input device further comprises:

and the second replacing unit is used for replacing the first phrase with the second phrase according to the operation instruction if the operation instruction of inputting a third phrase by the user is received.

According to the technical scheme, the embodiment of the application has the following advantages:

by adopting the scheme, after the user inputs the target text formed by the first phrase and other characters, the terminal sends the target text to the cloud platform, so that the cloud platform detects whether the first phrase has obvious grammatical errors in the target text, when the feedback that the grammatical errors exist is received, the terminal can set the first phrase into an editable state and display the second phrase which enables the target text not to have the grammatical errors to the user for the user to select, the first phrase is replaced after the user selects the second phrase, the time for the user to re-input or modify the phrases is reduced, and the input efficiency of the user is improved.

Drawings

Fig. 1 is a schematic flowchart of an input method based on a cloud platform in an embodiment of the present application;

fig. 2 is another schematic flow chart of an input method based on a cloud platform in the embodiment of the present application;

fig. 3 is a schematic structural diagram of a terminal in the embodiment of the present application;

fig. 4 is a schematic structural diagram of another terminal in the embodiment of the present application;

FIG. 5 is a schematic structural diagram of a cloud platform according to an embodiment of the present application;

fig. 6 is a schematic structural diagram of another terminal in the embodiment of the present application;

FIG. 7 is another schematic structural diagram of a cloud platform according to an embodiment of the present application;

FIG. 8 is a schematic flow chart of an input method according to an embodiment of the present application;

fig. 9 is a schematic structural diagram of an input device according to an embodiment of the present application.

Detailed Description

The embodiment of the application provides an input method and a terminal based on a cloud platform, which are used for improving the input efficiency of a user.

The input method based on the cloud platform provided by the embodiment of the application can be applied to text input on terminal equipment, the terminal equipment can be a mobile phone, a tablet computer, a notebook computer, a personal computer and the like, and the specific type of the terminal is not limited.

Referring to fig. 1, an input method based on a cloud platform in an embodiment of the present application includes:

101. a terminal receives a target text input by a user, wherein the target text comprises a first phrase, and the first phrase is a phrase input by the user at one time;

in this embodiment, the target text may be chinese, english, japanese, or the like, the specific text type is not limited, and for convenience of description, the embodiment uses a chinese text for example description.

In this embodiment, the receiving, by the terminal, of the target text input by the user may be receiving a pinyin character string input by the user, then selecting a corresponding chinese character according to the pinyin character string, and outputting the selected chinese character to the currently running application, that is, displaying the selected chinese character on a display interface of the application, for example, when the user is editing a document, the receiving, by the terminal, of the pinyin character string "shideyonghudeyanjiaogao" input by the user, selecting a corresponding target text as "making user experience higher" according to the pinyin character string, and outputting the target text "making user experience higher" to the display interface of the current document.

In order to improve the input efficiency, when a user inputs a pinyin character string corresponding to a target text with phrases, the user usually directly inputs the phrases in a way of inputting the pinyin character string of a group of phrases at one time instead of inputting the pinyin character string of a single word, and the terminal can segment the target text to obtain the first phrase and other characters input at one time. For example, when the target text for receiving the user input is "make the user experience higher", the first phrase "make" input by the user at one time may be received, and then the other characters "the user experience is higher" may be input.

102. When the target text meets a target statement condition, the terminal sends the target text to a cloud platform, so that the cloud platform detects whether a grammar error exists in the target text for the first phrase;

in this embodiment, after receiving a target text input by a user, a terminal determines whether the target text meets a target sentence condition, where the target text may be a short sentence, a long sentence, or a phrase. When the target text meets the target statement condition, the target text is sent to a cloud platform, so that the cloud platform detects whether a first phrase in the target text has a grammar error in the target text, and when the target text is the first phrase, detects whether the first phrase itself has the grammar error. For example, a user's experience is higher when receiving the user input with the target text "yes". And then, judging whether the target text meets the target statement condition, if so, sending the target text to the cloud platform, so that the cloud platform detects that the first phrase ' yes ' is better in user experience of the target text '. "whether there is a syntax error.

It should be noted that the target sentence condition may be that the last character of the target text is a punctuation mark, and when the terminal detects that the character received by the user input is a punctuation mark, it is determined that the target text satisfies the target sentence condition. Meanwhile, the cloud platform can perform semantic detection after segmenting the target text, and detect whether grammar errors exist, such as predicate errors, modifier errors, tense inconsistency and the like.

103. The terminal receives feedback information sent by the cloud platform, wherein the feedback information is used for indicating that the first phrase has a grammar error in the target text;

in this embodiment, the terminal receives feedback information about whether a grammar error exists after the target text is subjected to grammar detection by the cloud platform, and determines that the grammar error exists in the target text for the first phrase according to the feedback information. For example, the user experience is higher for the target text "yes". "then, it can be determined from the feedback information that the user whose first phrase" is "in the target text" is experienced better. "use the error.

104. If no character input is received within the preset time, the terminal sets the first phrase to be in an editable state according to the feedback information;

in this embodiment, a preset time may be set, for example, 3 seconds, when the terminal detects that there is no character input within 3 seconds, if it is determined that there is a syntax error in the target text for the first phrase according to the feedback information, the first phrase is set to an editable state, so that the terminal can write a new phrase or modify an original phrase at the position of the first phrase, in addition, the terminal may highlight the first phrase after setting the first phrase to the editable state, which is convenient for a user to determine that there is an error in the first phrase according to the highlight, for example, a wavy line is set below the first phrase.

It is understood that the preset time may also be 5 seconds or 10 seconds, and the preset time may be set according to actual needs, and is not limited herein.

105. The terminal determines a second phrase, wherein the second phrase is a phrase which enables the target text not to have grammar errors;

in this embodiment, the terminal determines a specific grammar error and a second phrase according to the pinyin character string of the first phrase according to the feedback information sent by the cloud platform, and the second phrase can enable the target text to have no grammar error. For example, the user experience is higher when the target text is "yes". And determining that the second phrase is 'enable' according to the feedback information and the pinyin 'shide' of the first phrase.

106. The terminal displays the second phrase;

in this embodiment, after the terminal determines the second phrase, a candidate frame of the input method pops up on a display interface of the terminal, and the second phrase is displayed in the candidate frame. For example, when the second phrase is determined to be "so", so is displayed in the candidate box.

It will be appreciated that when there are multiple second phrases that cause no grammatical errors in the target text, multiple second phrases may be displayed in the candidate box.

107. And if an operation instruction of selecting the second phrase by the user is received, the terminal replaces the first phrase with the second phrase according to the operation instruction.

In this embodiment, a user may see the displayed second phrase on a display interface of the terminal, and after the user selects the second phrase, the terminal receives an operation instruction of selecting the second phrase by the user, and replaces the first phrase in the editable state at this moment with the second phrase according to the operation instruction.

In this embodiment, after the terminal receives a target text input by a user and determines that the target text meets a target sentence condition, the target text is sent to the cloud platform to detect whether a grammar error exists in the target text for a first phrase in the target text. When receiving the feedback information with grammar error, the terminal can set the first phrase into an editable state and display a second phrase which enables the target text not to have grammar error for the user to select. And then, the first phrase is replaced after the user selects the second phrase, so that the time for re-inputting or modifying the phrases by the user can be reduced, and the input efficiency of the user is improved.

In order to make the input method of the embodiment of the present application more comprehensible, the following is described in more detail:

referring to fig. 2, an input method based on a cloud platform according to an embodiment of the present application includes:

201. a terminal receives a target text input by a user, wherein the target text comprises a first phrase;

202. when the target text meets the target statement condition, the terminal sends the target text to the cloud platform;

steps 201 and 202 in this embodiment are similar to steps 101 and 102 in the embodiment shown in fig. 1, and detailed description thereof is omitted here.

203. The cloud platform detects whether the first phrase has a grammar error in the target text;

in this embodiment, the cloud platform is provided with a preset database, and syntax errors are detected through the preset database. The preset database can store a plurality of grammar error samples, the cloud platform receives the target text and then segments the target text to determine a first phrase, and the first phrase and the target text are compared with the error samples in the preset database to determine whether the first phrase has grammar errors in the target text. For example, the user experience is higher when the received target text is "yes". "the experience of the user is higher by comparing the target text with the error sample in the preset database". The comparison is made to determine if the first phrase "yes" in the target text is an error in the target text.

Optionally, the preset database may also store a plurality of grammatical correct samples, and compare the first phrase and the target text with the correct samples to determine whether the first phrase has a grammatical error in the target text. For example, the experience of the user who has the target text "yes is high. "and correct sample" make the user experience high. The comparison is made to determine if the first phrase "yes" in the target text is an error in the target text.

204. When the grammar error is determined to exist, the cloud platform sends feedback information to the terminal;

in this embodiment, after determining that the first phrase has a syntax error in the target text according to the detection result of the target text and the preset database, the cloud platform sends feedback information about the target text, where the feedback information is used to indicate that the first phrase has the syntax error in the target text, and the feedback information may also carry second phrase information, and is used to prompt the terminal to modify the first phrase according to the second phrase information, so that the target text does not have the syntax error, for example, it may be determined that the user's experience of the first phrase "is" in the target text "is higher according to the feedback information. The feedback information may also carry second phrase information, for example, the feedback information may be that the user who is the first phrase "yes" in the target text "is experienced higher. "use error in," recommend use the second phrase "make".

205. If no character input is received within the preset time, the terminal sets the first phrase to be in an editable state according to the feedback information;

step 205 in this embodiment is similar to step 104 in the embodiment shown in fig. 1, and detailed description thereof is omitted here.

206. The terminal determines a second phrase;

in this embodiment, the terminal determines a specific grammar error and a second phrase according to the pinyin character string of the first phrase according to the feedback information sent by the cloud platform, and the second phrase can enable the target text to have no grammar error.

Optionally, when the feedback information carries second phrase information, the terminal may determine the second phrase according to the second phrase information, for example, when the feedback information is that the user's experience is higher when the first phrase "is" in the target text ". When "so" is used in the case where a syntax error is present, the second phrase is determined to be "so" based on the feedback information.

207. The terminal displays the second phrase;

in this embodiment, after the terminal determines the second phrase, a candidate box pops up on a display interface of the terminal, the second phrase is displayed in the candidate box, and the position of the candidate box may be set around the first phrase, for example, below or above the first phrase, without covering the target text content, or the floating window is displayed at any position of the display interface of the terminal, and the specific position is not limited. For example, when the second phrase is determined to be "so", a pop-up candidate box may be disposed below the first phrase and "so" is displayed in the candidate box.

It will be appreciated that when a plurality of determined second phrases are present, a plurality of second phrases may be displayed in the candidate box and numerical labels may be used, such as when the target text is "make ten RMB! "the first phrase is" such that "when it is determined that there are" true "and" good "in the second phrase, the second phrase can be displayed in the candidate box according to" 1. true, 2. good ".

Optionally, when it is determined that a plurality of second phrases exist, an input history of the user may be determined, the plurality of second phrases are sorted according to the input history, and the plurality of second phrases are displayed according to a sorting result. Specifically, the sorting may be performed according to the frequency number of the plurality of second phrases in the user input history, for example, when the frequency of occurrence of the second phrases "found" and "picked" in the input history of the user is obtained as 5 times and 10 times, respectively, the sorting is performed from large to small according to the frequency, and the second phrases are displayed in the candidate box according to the sorting result and should be "1, found, 2, found".

Optionally, when a plurality of second phrases are determined, the word frequency of the second phrase in the word stock may also be obtained for sorting, and the second phrases with higher occurrence frequency in the word stock are displayed in the candidate box according to the sorting result. The word stock can be a word stock in an input method, the word stock records the word frequency corresponding to the word group, and the word frequency can be determined according to the use times of all users using the word stock.

In this embodiment, the plurality of second phrases are sorted and then displayed in the candidate frame, and the number labels are performed, so that phrases possibly selected by the user can be displayed more forward, the user can directly select a first phrase in the candidate frame by default, or the user can select the phrase more forward in the candidate frame by using the number keys, and the phrase required by the user is not required to be searched by turning pages of the phrases in the candidate frame, thereby reducing the input operation of the user and improving the input efficiency.

208. If the terminal receives an operation instruction of selecting a second phrase by a user, replacing the first phrase with the second phrase;

step 208 in this embodiment is similar to step 107 in the embodiment shown in fig. 1, and detailed description thereof is omitted here.

Optionally, in this embodiment, the user may select the second phrase by selecting the second phrase through a space key, a numeric key, or a touch screen, which is not limited herein.

209. And if the terminal receives an operation instruction of inputting the third phrase by the user, replacing the first phrase with the third phrase.

Optionally, in this embodiment, if the second phrase displayed by the terminal is not the phrase that the user wants to select, the user may re-input the third phrase, the terminal receives an operation instruction of the third phrase input by the user, and replaces the first phrase with the third phrase according to the operation instruction. For example, when the target text is "we go to eat dry. When the terminal determines that the first phrase 'eat dry' has grammar error and displays the determined second phrase 'eat' in the candidate box, if the user is dissatisfied with the second phrase possibly caused by inputting wrong pinyin character strings, the terminal can directly input the third phrase 'kitchen' again, and the terminal receives the third phrase and replaces the first phrase 'eat dry' with the third phrase 'kitchen'.

In this embodiment, after a user inputs a target text, a terminal detects that the target text reaches a target sentence condition, and sends the target text to a cloud platform, the cloud platform performs syntax detection on the target text after receiving the target text, and sends feedback information to the terminal when determining that there is a syntax error, the terminal can set a first phrase to an editable state according to the feedback information and determine a second phrase for the user to select, and then replace the first phrase with the second phrase, or receive a third phrase re-typed by the user, and replace the first phrase with the second phrase, so that modification operations of the user are reduced, and the input efficiency of the user is improved.

In the foregoing description of the input method based on the cloud platform in the embodiment of the present application, the following describes the apparatus in the embodiment of the present application:

referring to fig. 3, a terminal according to an embodiment of the present application includes:

a first receiving unit 301, configured to receive a target text input by a user, where the target text includes a first phrase, and the first phrase is a phrase input by the user at one time;

a sending unit 302, configured to send the target text to a cloud platform when the target text meets a target sentence condition, so that the cloud platform detects whether a syntax error exists in the target text for the first phrase;

a second receiving unit 303, configured to receive feedback information of the cloud platform, where the feedback information is used to indicate that a syntax error exists in the target text for the first phrase;

a setting unit 304, configured to set the first phrase to an editable state according to the feedback information if no character input is received within a preset time;

a determining unit 305, configured to determine a second phrase, where the second phrase is a phrase that makes the target text have no grammatical error;

a display unit 306, configured to display the second phrase;

the first replacing unit 307 is configured to replace the first phrase with the second phrase according to an operation instruction if the operation instruction that the user selects the second phrase is received.

In this embodiment, the first receiving unit 301 receives a target text, the sending unit 302 sends the target text to the cloud platform, so that the cloud platform detects whether a grammatical error of the first phrase exists in the target text, when the second receiving unit 303 receives feedback information, if no character is input within a preset time, the setting unit 304 sets the first phrase to be in an editable state and determines the second phrase through the determining unit 305, the display unit 306 displays the second phrase to a user, and when the second phrase selected by the user is received, the first replacing unit 307 replaces the first phrase with the second phrase, so that input operations of the user are reduced, and the input efficiency of the user is improved.

In order to make the embodiment of the terminal more obvious and understandable in the embodiments of the present application, the following detailed description is provided:

referring to fig. 4, a terminal according to an embodiment of the present application includes:

a first receiving unit 401, configured to receive a target text input by a user, where the target text includes a first phrase, and the first phrase is a phrase input by the user at one time;

a sending unit 402, configured to send the target text to the cloud platform when the target text meets a target sentence condition, so that the cloud platform detects whether a syntax error exists in the target text for the first phrase;

a second receiving unit 403, configured to receive feedback information of the cloud platform, where the feedback information is used to indicate that a syntax error exists in the target text for the first phrase;

a setting unit 404, configured to set the first phrase to an editable state according to the feedback information if no character input is received within a preset time;

a determining unit 405, configured to determine a second phrase, where the second phrase is a phrase that makes the target text have no syntax error;

a display unit 406, configured to display the second phrase;

the first replacing unit 407 is configured to replace the first phrase with the second phrase according to an operation instruction if the operation instruction that the user selects the second phrase is received.

Optionally, when the feedback information further carries second phrase information, the determining unit 405 is specifically configured to determine a second phrase according to the second phrase information carried by the feedback information.

Optionally, the terminal further includes:

the second replacing unit 408 is configured to replace the first phrase with the third phrase according to an operation instruction if the operation instruction of inputting the third phrase by the user is received.

Optionally, when there are a plurality of second phrases, the display unit 406 is specifically configured to display the plurality of second phrases.

Optionally, the display unit 406 is specifically configured to obtain an input history of the user;

sequencing the plurality of second phrases according to the input historical records;

and displaying a plurality of second phrases according to the sequencing result.

Optionally, the first replacing unit 407 is specifically configured to, if an operation instruction that the user selects the second phrase through a space key, a numeric key, or a touch screen is received, replace, by the terminal, the first phrase with the second phrase according to the operation instruction.

The functions executed by each unit of the terminal in this embodiment correspond to the steps described in the embodiments shown in fig. 1 or fig. 2, and are not described herein again in detail.

In this embodiment, after the setting unit 404 sets the first phrase to be in an editable state, if the first replacing unit 407 receives an operation instruction for selecting the second phrase by a user, the first phrase is replaced by the second phrase according to the operation instruction, if the user is not satisfied with the second phrase displayed by the terminal, a third phrase may be input, and the second replacing unit 408 replaces the first phrase by the third phrase according to the third phrase input by the user. The first replacing unit 407 and the second replacing unit 408 complement each other, so that the time for the user to modify the phrase is reduced, and the user experience is improved.

Referring to fig. 5, in an embodiment of the present application, a cloud platform includes:

a receiving unit 501, configured to receive a target text sent by a terminal, where the target text includes a first phrase;

a detecting unit 502, configured to detect whether a syntax error exists in the target text for the first phrase;

a sending unit 503, configured to send feedback information to the terminal when there is a syntax error.

Optionally, the detecting unit 502 is specifically configured to determine whether a grammatical error of the first phrase exists in the target text by comparing the target text and the first phrase with a preset database, where a plurality of grammatical error samples are stored in the preset database.

The functions executed by each unit of the cloud platform in this embodiment correspond to the steps described in the embodiment shown in fig. 2, and are not described here again.

In this embodiment, after the receiving unit 501 receives a target text sent by a terminal, the detecting unit 502 detects whether a grammar error exists in the target text for a first phrase, and if it is determined that the grammar error exists, the sending unit 503 sends a feedback message to the terminal, so that the terminal determines a second phrase according to the feedback message, thereby allowing a user to select a corresponding second phrase, reducing input operations of the user, and improving input efficiency.

Referring to fig. 6, a terminal according to an embodiment of the present application includes:

a memory 601, a central processing unit 602, an input/output interface 603, a wired or wireless network interface 604 and a power supply 605;

the memory 601 is a transient storage memory or a persistent storage memory;

the central processor 602 is configured to communicate with the memory 601 and execute the instructions in the memory 601 to perform the method corresponding to the steps in the embodiment shown in fig. 1 or fig. 2.

Referring to fig. 7, in an embodiment of the present application, a cloud platform includes:

a memory 701, a central processing unit 702, an input/output interface 703, a wired or wireless network interface 704 and a power supply 705;

memory 701 is a transient storage memory or a persistent storage memory;

the central processing unit 702 is configured to communicate with the memory 701 and execute the instructions in the memory 701 to perform the method corresponding to the steps in the embodiment shown in fig. 2.

The embodiment of the application provides a computer-readable storage medium, which comprises instructions, and when the instructions are executed on a computer, the instructions cause the computer to execute a method corresponding to the steps of the embodiment shown in fig. 1 or fig. 2.

The embodiment of the application also provides an input method, which can be applied to various devices capable of inputting texts for operation, and the following device is taken as a terminal for illustration:

referring to fig. 8, an input method in an embodiment of the present application includes:

801. a terminal receives a target text input by a user, wherein the target text comprises a first phrase, and the first phrase is a phrase input by the user at one time;

step 801 in this embodiment is similar to step 201 in the embodiment shown in fig. 2, and details are not described here.

802. When the target text meets the target sentence condition, the terminal detects whether the first phrase has a grammar error in the target text;

in this embodiment, the target sentence condition may be that the last character of the target text is a punctuation mark, when the terminal detects that the character input by the user is the punctuation mark, it is determined that the target text satisfies the target sentence condition, the target text is segmented to determine a first phrase, and it is detected whether a grammatical error exists in the target text for the first phrase.

803. If the terminal does not receive character input within the preset time and determines that the first phrase has a grammar error, setting the first phrase to be in an editable state;

in this embodiment, the preset time may be 3 seconds or 5 seconds, and is not limited herein. And when the user input characters are not received within the preset time, if the first phrase is determined to have grammar errors in the target text, setting the first phrase to be in an editable state.

Optionally, the first phrase may be highlighted after being set to an editable state, for example, a wavy line is set below the first phrase, so that the user can clearly see that the first phrase has a grammatical error for the user to correct.

804. The terminal determines a second phrase, wherein the second phrase is a phrase which enables the target text not to have grammar errors;

805. the terminal displays the second phrase;

806. if an operation instruction of selecting the second phrase by a user is received, the terminal replaces the first phrase with the second phrase according to the operation instruction;

steps 804 to 806 in this embodiment are similar to steps 206 to 208 in the embodiment shown in fig. 2, and are not described herein again.

807. And if an operation instruction of inputting a third phrase by a user is received, the terminal replaces the first phrase with the third phrase according to the operation instruction.

Optionally, in this embodiment, if the second phrase displayed by the terminal is not the phrase that the user wants to select, the user may re-input the third phrase, the terminal receives an operation instruction of the third phrase input by the user, and replaces the first phrase with the third phrase according to the operation instruction.

Optionally, in this embodiment, after the terminal sets the first phrase to the editable state, if the first phrase is highlighted on the display interface of the terminal so that the user can determine that the first phrase has a syntax error according to the highlighted display, the second phrase may not be determined and may not be displayed to the user, the third phrase input by the user is directly received, and the first phrase is replaced with the third phrase.

In this embodiment, after a terminal receives a target text input by a user, syntax detection is performed on a first phrase and the target text in the target text, if it is detected that a syntax error exists in the target text for the first phrase, when it is determined that no character input is received within a preset time, the first phrase is set to be in an editable state, a second phrase which makes the target text have no syntax error is displayed to the user, and when the user selects the second phrase or re-inputs a third phrase, the first phrase is replaced according to the phrase selected or input by the user. By adopting the scheme, error detection can be carried out on the target text input by the user, and when the phrase needs to be modified when the grammar error exists, the input operation of the user can be reduced, and the input efficiency of the user is improved.

In the above description, an input method in the embodiment of the present application is described, and an input device in the embodiment of the present application is described below:

referring to fig. 9, an input device according to an embodiment of the present application includes:

a receiving unit 901, configured to receive a target text input by a user, where the target text includes a first phrase, and the first phrase is a phrase input by the user at one time;

a detecting unit 902, configured to detect whether a grammar error exists in the target text for the first phrase when the target text meets a target sentence condition;

a setting unit 903, configured to set the first phrase to an editable state if no character input is received within a preset time and it is determined that the first phrase has a syntax error;

a determining unit 904, configured to determine a second phrase, where the second phrase is a phrase that makes the target text have no syntax error;

a display unit 905, configured to display the second phrase;

a first replacing unit 906, configured to replace the first phrase with the second phrase according to the operation instruction if the operation instruction that the user selects the second phrase is received.

Optionally, the input device further comprises:

the second replacing unit 907 is configured to replace the first phrase with the second phrase according to an operation instruction if the operation instruction that the user inputs the third phrase is received.

The functions performed by the units of the input device in this embodiment correspond to the steps described in the embodiment shown in fig. 8, and are not described herein again.

In this embodiment, after the receiving unit 901 receives a target text input by a user, whether a grammar error exists in the target text is detected according to the detecting unit 902, if no user input character is received within a preset time and it is determined that a grammar error exists in a first phrase in the target text, the setting unit 903 sets the first phrase to an editable state, the determining unit 904 determines a second phrase, the display unit 905 displays the second phrase to the user, when the second phrase selected by the user is received, the first phrase is replaced by the second phrase through the first replacing unit 906, or when a third phrase input by the user is received, the first phrase is replaced by the third phrase through the second replacing unit 907, so that input operations of the user can be reduced, and user experience can be improved.

It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.

23页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于自注意力机制方面术语提取系统、方法、介质、终端

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!