Data processing method, device and electronic equipment

The statistical model is used to predict long sentences based on the input sequence and input associated information, which solves the problem of insufficient sentence candidate prediction accuracy in the existing technology and achieves higher user input efficiency.

CN113589954BActive Publication Date: 2024-09-03BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010368472.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-30
Publication Date
2024-09-03
Estimated Expiration
2040-04-30

AI Technical Summary

Technical Problem

The prediction accuracy of sentence candidates in the existing technology is not high and cannot effectively improve user input efficiency.

Method used

A statistical model is used to predict long sentences based on the input sequence and input associated information, and generate sentence candidates. By collecting training data to count sentence frequencies and conditional probabilities, accurate sentence candidates are generated.

Benefits of technology

The accuracy of long sentence prediction is improved, thereby improving user input efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113589954B
    Figure CN113589954B
Patent Text Reader

Abstract

An embodiment of the present invention provides a data processing method, device and electronic device, wherein the method includes: obtaining an input sequence and input association information; using a statistical model to predict long sentences based on the input sequence and input association information to obtain sentence candidates output by the statistical model; and then using the statistical model to predict long sentences in combination with the input sequence and input association information to improve the accuracy of long sentence prediction, thereby improving user input efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, device and electronic equipment. Background Art

[0002] With the development of computer technology, electronic devices such as mobile phones and tablet computers are becoming more and more popular, bringing great convenience to people's life, study and work. These electronic devices are usually installed with input method applications (input methods for short), so that users can use the input methods to input information.

[0003] During the user input process, the input method can predict various types of candidates that match the input sequence, such as sentence candidates, name candidates, associations, etc., for the user to display on the screen, thereby improving the user input efficiency. However, in the prior art, the prediction accuracy of sentence candidates is not high, which cannot well meet the user's input needs, thereby failing to well improve the user input efficiency. Summary of the invention

[0004] An embodiment of the present invention provides a data processing method to improve the user input efficiency by improving the accuracy of long sentence prediction.

[0005] Correspondingly, an embodiment of the present invention further provides a data processing device and an electronic device to ensure the implementation and application of the above method.

[0006] In order to solve the above problems, an embodiment of the present invention discloses a data processing method, which specifically includes: obtaining an input sequence and input association information; using a statistical model to predict long sentences based on the input sequence and input association information, and obtaining sentence candidates output by the statistical model.

[0007] Optionally, the using of a statistical model to perform long sentence prediction based on the input sequence and input association information to obtain sentence candidates output by the statistical model includes: inputting the input sequence and input association information into the statistical model to obtain sentence candidates output by the statistical model.

[0008] Optionally, the input sequence includes a pinyin sequence, and the use of a statistical model to predict long sentences based on the input sequence and input association information to obtain sentence candidates output by the statistical model includes: parsing the pinyin sequence to obtain a corresponding target syllable network; inputting the target syllable network and input association information into the statistical model to obtain sentence candidates output by the statistical model.

[0009] Optionally, parsing the pinyin sequence to obtain a corresponding target syllable network includes: correcting the pinyin sequence to obtain a corresponding error correction sequence; parsing the pinyin sequence and the error correction sequence to obtain a corresponding target syllable network.

[0010] Optionally, parsing the pinyin sequence to obtain a corresponding target syllable network includes: parsing the pinyin sequence into multiple forms of pinyin; for the target form of pinyin, converting the target form of pinyin into a pinyin identifier that matches the target form of pinyin prefix to obtain a syllable path corresponding to the target form of pinyin; and using multiple syllable paths to generate a target syllable network.

[0011] Optionally, the method further includes the step of generating the statistical model: collecting multiple groups of training data, each group of training data including: historical input association information, historical input sequence, and sentences input by the user under the condition of the historical input association information and the historical input sequence; counting the frequency of each sentence under the condition of the same historical input association information and the same historical input sequence; determining the conditional probability of each sentence according to the frequency of each sentence, and generating a statistical model based on the conditional probability of each sentence.

[0012] Optionally, the method also includes the step of generating the statistical model: collecting multiple groups of training data, each group of training data including: historical input association information, a syllable network corresponding to a historical pinyin sequence, and sentences input by the user under the condition of the historical input association information and the syllable network corresponding to the historical pinyin sequence; counting the frequency of each sentence under the condition of the same historical input association information and the same syllable network; determining the conditional probability of each sentence according to the frequency of each sentence, and generating a statistical model based on the conditional probability of each sentence.

[0013] An embodiment of the present invention also discloses a data processing device, which specifically includes: an acquisition module, used to acquire an input sequence and input association information; a prediction module, used to use a statistical model to predict long sentences based on the input sequence and input association information, and obtain sentence candidates output by the statistical model.

[0014] Optionally, the prediction module includes: a first sentence candidate prediction submodule, used to input the input sequence and input association information into a statistical model to obtain sentence candidates output by the statistical model.

[0015] Optionally, the input sequence includes a pinyin sequence, and the prediction module includes: a parsing submodule, used to parse the pinyin sequence to obtain a corresponding target syllable network; a second sentence candidate prediction submodule, used to input the target syllable network and input association information into a statistical model to obtain sentence candidates output by the statistical model.

[0016] Optionally, the parsing submodule includes: an error correction parsing unit, which is used to correct the pinyin sequence to obtain a corresponding error correction sequence; and parse the pinyin sequence and the error correction sequence to obtain a corresponding target syllable network.

[0017] Optionally, the parsing submodule includes: a syllable network conversion unit, used to parse the pinyin sequence into multiple forms of pinyin; for the target form of pinyin, converting the target form of pinyin into a pinyin identifier that matches the target form of pinyin prefix to obtain a syllable path corresponding to the target form of pinyin; and using multiple syllable paths to generate a target syllable network.

[0018] Optionally, the device also includes: a first model generation module, used to collect multiple groups of training data, each group of training data includes: historical input association information, historical input sequence, and sentences input by the user under the conditions of the historical input association information and the historical input sequence; counting the frequency of each sentence under the conditions of the same historical input association information and the same historical input sequence; determining the conditional probability of each sentence according to the frequency of each sentence, and generating a statistical model based on the conditional probability of each sentence.

[0019] Optionally, the device also includes: a second model generation module, used to collect multiple groups of training data, each group of training data includes: historical input association information, a syllable network corresponding to a historical pinyin sequence, and sentences input by the user under the condition that the historical input association information and the syllable network corresponding to the historical pinyin sequence are obtained; counting the frequency of each sentence under the condition that the historical input association information is the same and the syllable network is the same; determining the conditional probability of each sentence based on the frequency of each sentence, and generating a statistical model based on the conditional probability of each sentence.

[0020] An embodiment of the present invention further discloses a readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute a data processing method as described in any one of the embodiments of the present invention.

[0021] An embodiment of the present invention also discloses an electronic device, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: obtaining an input sequence and input association information; using a statistical model to predict long sentences based on the input sequence and input association information, and obtaining sentence candidates output by the statistical model.

[0022] Optionally, the using of a statistical model to perform long sentence prediction based on the input sequence and input association information to obtain sentence candidates output by the statistical model includes: inputting the input sequence and input association information into the statistical model to obtain sentence candidates output by the statistical model.

[0023] Optionally, the input sequence includes a pinyin sequence, and the use of a statistical model to predict long sentences based on the input sequence and input association information to obtain sentence candidates output by the statistical model includes: parsing the pinyin sequence to obtain a corresponding target syllable network; inputting the target syllable network and input association information into the statistical model to obtain sentence candidates output by the statistical model.

[0024] Optionally, parsing the pinyin sequence to obtain a corresponding target syllable network includes: correcting the pinyin sequence to obtain a corresponding error correction sequence; parsing the pinyin sequence and the error correction sequence to obtain a corresponding target syllable network.

[0025] Optionally, parsing the pinyin sequence to obtain a corresponding target syllable network includes: parsing the pinyin sequence into multiple forms of pinyin; for the target form of pinyin, converting the target form of pinyin into a pinyin identifier that matches the target form of pinyin prefix to obtain a syllable path corresponding to the target form of pinyin; and using multiple syllable paths to generate a target syllable network.

[0026] Optionally, the method further includes the following instructions for generating the statistical model: collecting multiple groups of training data, each group of training data including: historical input association information, historical input sequence, and sentences input by the user under the condition of the historical input association information and the historical input sequence; counting the frequency of each sentence under the condition of the same historical input association information and the same historical input sequence; determining the conditional probability of each sentence according to the frequency of each sentence, and generating a statistical model based on the conditional probability of each sentence.

[0027] Optionally, it also includes instructions for performing the following steps to generate the statistical model: collecting multiple groups of training data, each group of training data including: historical input association information, a syllable network corresponding to a historical pinyin sequence, and sentences input by a user under the conditions of the historical input association information and the syllable network corresponding to the historical pinyin sequence; counting the frequency of each sentence under the conditions of the same historical input association information and the same syllable network; determining the conditional probability of each sentence based on the frequency of each sentence, and generating a statistical model based on the conditional probability of each sentence.

[0028] The embodiments of the present invention include the following advantages:

[0029] In an embodiment of the present invention, an input sequence and input association information can be obtained, and then a statistical model is used to predict long sentences based on the input sequence and input association information to obtain sentence candidates output by the statistical model; and then the statistical model is used to predict long sentences in combination with the input sequence and input association information to improve the accuracy of long sentence prediction, thereby improving user input efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is a flow chart of steps of an embodiment of a data processing method of the present invention;

[0031] Figure 2 is a flowchart of steps of an embodiment of a model generation method of the present invention;

[0032] Figure 3 is a flowchart of steps of an optional embodiment of a data processing method of the present invention;

[0033] Figure 4 is a flowchart of steps of another embodiment of a model generation method of the present invention;

[0034] Figure 5 is a flowchart of steps of another optional embodiment of a data processing method of the present invention;

[0035] Figure 6 is a structural block diagram of an embodiment of a data processing device of the present invention;

[0036] Figure 7 is a structural block diagram of an optional embodiment of a data processing device of the present invention;

[0037] Figure 8 A structural block diagram of an electronic device for data processing according to an exemplary embodiment;

[0038] Fig. 9 It is a structural schematic diagram of an electronic device for data processing according to another exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0040] Reference Figure 1 , shows a flow chart of steps of a data processing method embodiment of the present invention, which may specifically include the following steps:

[0041] Step 102: Obtain input sequence and input association information.

[0042] In the embodiment of the present invention, long sentence prediction can be performed to generate corresponding sentence candidates during the process of the user inputting an input sequence.

[0043] The embodiments of the present invention can be applied to various input scenarios to predict long sentences. For example, it can be applied to stroke input scenarios to predict long sentences; it can also be applied to pinyin input scenarios to predict long sentences; it can also be applied to voice input scenarios to predict long sentences; etc., and the embodiments of the present invention are not limited to this.

[0044] In addition, the embodiments of the present invention can also be applied to predict long sentences in multiple language scenarios. For example, it can be applied to predict long sentences in Chinese input scenarios; for example, it can be applied to predict long sentences in English input scenarios; for example, it can be applied to predict long sentences in Korean input scenarios; and so on, which are not limited by the embodiments of the present invention.

[0045] Correspondingly, the input sequence may include a stroke sequence, a pinyin sequence, a foreign character string, etc., which is not limited in the embodiment of the present invention.

[0046] In which, during the process of the user using the input method to input, the input sequence and input association information of the user input can be obtained; then based on the obtained input sequence and input association information, the corresponding sentence candidates are predicted.

[0047] The input-related information may include information related to the input, such as the above information, input environment information, etc., which is not limited in the embodiment of the present invention.

[0048] In an example of the present invention, a method for predicting a long sentence based on the acquired input sequence and input association information may refer to the following step 104:

[0049] Step 104: Use a statistical model to predict long sentences based on the input sequence and input association information to obtain sentence candidates output by the statistical model.

[0050] In an embodiment of the present invention, statistics can be performed in advance to generate a statistical model; then, the pre-generated statistical model is used to predict long sentences. The generation process of the statistical model is described in subsequent embodiments. The statistical model can score each sentence based on the input association information and the input sequence; then, based on the score of each sentence, sentence candidates are output. The sentence candidates output by the statistical model can be sentences with a score greater than a first preset threshold, or can be the top X sentences with the largest scores, and the embodiment of the present invention does not limit this. The first preset threshold can be set as required, and X can be a positive integer and can also be set as required, and the embodiment of the present invention does not limit this.

[0051] In summary, in an embodiment of the present invention, an input sequence and input association information can be obtained, and then a statistical model is used to predict long sentences based on the input sequence and input association information to obtain sentence candidates output by the statistical model; and then, through the statistical model, long sentence prediction is performed in combination with the input sequence and input association information to improve the accuracy of long sentence prediction, thereby improving user input efficiency.

[0052] In the embodiment of the present invention, there are multiple ways to generate a statistical model, one of which may be as follows:

[0053] Reference Figure 2 , showing a step flow chart of an embodiment of a model generation method of the present invention.

[0054] Step 202: Collect multiple sets of training data, each set of training data includes: historical input association information, historical input sequence, and sentences input by the user under the conditions of the historical input association information and the historical input sequence.

[0055] In the embodiment of the present invention, the input sequence of the user's historical input, the input association information when the user inputs the input sequence, and the sentence input by the user after inputting the input sequence under the condition of the input association information can be collected.

[0056] For the convenience of subsequent explanation, the input sequence of the user's historical input may be referred to as a historical input sequence, and the input association information when the user inputs the historical input sequence may be referred to as historical input association information. A historical input sequence, the historical input association information corresponding to the historical input sequence, and the sentence input by the user under the conditions of the historical input association information and the historical input sequence may be used as a set of training data.

[0057] Step 204: Count the frequency of each sentence under the conditions that the historical input association information is the same and the historical input sequence is the same.

[0058] Step 206: determine the conditional probability of each sentence according to the frequency of each sentence, and generate a statistical model based on the conditional probability of each sentence.

[0059] In the embodiment of the present invention, among the multiple sets of training data collected, there may be multiple sets of training data with the same historical input association information, historical input sequence, and sentences input by the user; there may also be multiple sets of training data with the same historical input association information and the same historical input sequence, but different sentences input by the user. Of course, there may also be multiple sets of training data with different historical input association information, historical input sequence, and sentences input by the user.

[0060] Since the input habits of most users are similar, in the long sentence prediction process, sentences whose user input frequency meets the preset conditions under the conditions of a certain historical input sequence and corresponding historical input association information can be predicted as sentences that the user may input under the conditions of the historical input sequence and the corresponding historical input association information. In an embodiment of the present invention, the frequency of each sentence under the conditions of the same historical input association information and the same historical input sequence can be counted. Then, for each sentence, the conditional probability of the sentence can be determined based on the frequency of the sentence; and then a statistical model is generated based on the conditional probability of each sentence.

[0061] Among them, conditional probability refers to the probability of event A occurring under the condition that another event B has already occurred. Conditional probability is expressed as: P(A|B). In the embodiment of the present invention, conditional probability refers to the probability P(sentence|historical input association information, historical input sequence) of the sentence input by the user under the condition of historical input association information and historical input sequence.

[0062] In one example, sentences whose conditional probabilities are greater than a second preset threshold can be determined, and then sentences whose conditional probabilities are less than or equal to the second preset threshold can be filtered; sentences whose conditional probabilities are greater than the threshold are then used to generate a statistical model. Among them, sentences whose conditional probabilities are greater than the second preset threshold, conditional probabilities corresponding to sentences whose conditional probabilities are greater than the second preset threshold, and conditions corresponding to sentences whose conditional probabilities are greater than the second preset threshold (i.e., historical input association information and historical input sequences corresponding to sentences whose conditional probabilities are greater than the second preset threshold) can be stored in the statistical model. Among them, the second preset threshold can be set as required, and the embodiments of the present invention are not limited to this.

[0063] In another example, the top N sentences with the largest conditional probabilities can be determined, and then other sentences can be filtered; the top N sentences with the largest conditional probabilities are then used to generate a statistical model. Among them, the top N sentences with the largest conditional probabilities, the conditional probabilities corresponding to each sentence in the top N sentences with the largest conditional probabilities, and the conditions corresponding to each sentence in the top N sentences with the largest conditional probabilities (i.e., the historical input association information and historical input sequence corresponding to each sentence in the top N sentences with the largest conditional probabilities) can be stored in the statistical model. Among them, N is a positive integer, which can be set specifically according to needs, and the embodiments of the present invention are not limited to this.

[0064] For example, under the condition that the historical input association information is: "You to me", and the historical input sequence is the pinyin sequence: "h", the three sentences input by the user are: "You are very good to me", "You are very important to me", and "You are very good to me"; the conditional probabilities of these three sentences are: 0.02, 0.15, and 0.1. If the second preset threshold is 0.015, the three sentences, the corresponding conditions, and the corresponding conditional probabilities can be stored in the statistical model.

[0065] The following is an example of using the statistical model generated in steps 202 to 206 to predict long sentences and output sentence candidates.

[0066] Reference Figure 3 , shows a flow chart of steps of an optional embodiment of a data processing method of the present invention, which may specifically include the following steps:

[0067] Step 302: Obtain input sequence and input association information.

[0068] The input sequence may include a single code or multiple codes, which is not limited in the embodiment of the present invention. The input associated information may include: the above information and input environment information, and of course may include other information, which is not limited in the embodiment of the present invention; the above information may include interactive information and / or content in the edit box.

[0069] In an embodiment of the present invention, a method of using a statistical model to predict long sentences based on the input sequence and input association information to obtain sentence candidates output by the statistical model can refer to step 304:

[0070] Step 304: input the input sequence and input association information into a statistical model to obtain sentence candidates output by the statistical model.

[0071] In the embodiment of the present invention, the acquired input sequence and input association information can be directly input into the statistical model generated according to steps 202 to 206; the statistical model calculates the conditional probability of each sentence input by the user under the condition of the input sequence and input association information. Then, the sentences whose conditional probability is greater than the first preset probability threshold can be output as sentence candidates; the first X sentences with the largest conditional probability can also be output as sentence candidates, which is not limited in the embodiment of the present invention.

[0072] In summary, in an embodiment of the present invention, after obtaining an input sequence and input association information, the input sequence and input association information can be directly input into a statistical model to obtain sentence candidates output by the statistical model; and sentence candidates can be quickly obtained without processing the information input into the statistical model.

[0073] In an optional embodiment of the present invention, the input sequence can also be corrected to obtain an error correction sequence; then the input sequence, the error correction sequence and the input association information are input into a statistical model to obtain sentence candidates output by the statistical model; and further, in the event of a user input error, sentence candidates that meet the user's needs can also be given.

[0074] Another method of generating a statistical model according to an embodiment of the present invention is described below by taking a pinyin sequence as an input sequence as an example.

[0075] Reference Figure 4 , shows a step flow chart of another model generation method embodiment of the present invention.

[0076] Step 402, collecting multiple groups of training data, each group of training data includes: historical input association information, a syllable network corresponding to a historical pinyin sequence, and a sentence input by a user under the conditions of the historical input association information and the syllable network corresponding to the historical pinyin sequence.

[0077] In the embodiment of the present invention, the pinyin sequence inputted by the user in the past, the input association information when the user inputs the pinyin sequence, and the sentence inputted by the user after inputting the pinyin sequence under the condition of the input association information can be collected.

[0078] For the convenience of subsequent explanation, the pinyin sequence input by the user in history may be referred to as a historical pinyin sequence, and the input association information when the user inputs the historical pinyin sequence may be referred to as historical input association information. The historical pinyin sequence may be converted into a corresponding syllable network, and then a syllable network corresponding to a historical pinyin sequence, the historical input association information corresponding to the historical pinyin sequence, and a sentence input by the user under the conditions of the syllable network corresponding to the historical pinyin sequence and the historical input association information may be used as a set of training data.

[0079] In an example of an embodiment of the present invention, a method of converting a historical pinyin sequence into a corresponding syllable network can refer to sub-steps 22 to 26:

[0080] Sub-step 22, parsing the historical pinyin sequence into multiple forms of pinyin.

[0081] In an embodiment of the present invention, the same Pinyin sequence may correspond to multiple forms of Pinyin. For example, the Pinyin sequence: "fangan" may correspond to forms of Pinyin including: "fang'an", "fan'gan", "fa'n'gan", etc. Therefore, the historical Pinyin sequence may be parsed into multiple forms of Pinyin; wherein each form of Pinyin may include Pinyin of at least M syllables, where M is a positive integer. For example: one form of Pinyin is "fang'an", corresponding to Pinyin including two syllables: "fang" and "an"; one form of Pinyin is "fan'gan", corresponding to Pinyin including two syllables: "fan" and "gan"; one form of Pinyin is "fa'n'gan", corresponding to Pinyin including two syllables: "fa", "n" and "gan".

[0082] Sub-step 24, for the pinyin in the target form, convert the pinyin in the target form into a pinyin identifier that matches the pinyin prefix in the target form, and obtain a syllable path corresponding to the pinyin in the target form.

[0083] In the embodiment of the present invention, one form of Pinyin can be selected from multiple forms of Pinyin as the target form of Pinyin, and then the target form of Pinyin is converted into a corresponding syllable path, wherein one form of Pinyin can include Pinyin of M syllables, where M is a positive integer.

[0084] Since most users are accustomed to only entering the first pinyin character or the first few pinyin characters of the target text when inputting a pinyin sequence, in order to provide users with sentence candidates related to their target input when they have not input a complete pinyin sequence, thereby improving user input efficiency, the embodiments of the present invention can convert the pinyin in the target form into a pinyin identifier that matches the pinyin prefix of the target form when converting the pinyin in the target form into a corresponding syllable path, thereby obtaining the syllable path corresponding to the pinyin in the target form, so as to increase the comprehensiveness of the training data, thereby improving the comprehensiveness of the subsequent predicted sentence candidates.

[0085] Among them, one way to convert the pinyin of the target form into a pinyin identifier that matches the pinyin prefix of the target form is: convert the pinyin of the Mth syllable in the pinyin of the target form into a pinyin identifier that matches the pinyin prefix of the Mth syllable. Among them, prefix matching can mean that the pinyin corresponding to the pinyin identifier contains the pinyin corresponding to the syllable in the pinyin of the target form. And determine the syllables whose corresponding pinyin contains initial consonants and finals and the syllables whose pinyin only contains initial consonants in the first M-1 syllables in the pinyin sequence of the target form; convert the syllables whose corresponding pinyin contains initial consonants and finals in the first M-1 syllables in the pinyin sequence of the target form into a pinyin identifier that completely matches the corresponding pinyin. And convert the syllables whose corresponding pinyin only contains initial consonants in the first M-1 syllables in the pinyin sequence of the target form into a pinyin identifier that matches the corresponding initial consonant.

[0086] Among them, the pinyin of the target form can be converted into a pinyin identifier that matches the pinyin prefix of the target form by querying the mapping relationship between the pinyin and the pinyin identifier (such as the pinyin ID). For example, the pinyin of the Mth syllable in the pinyin of the target form is "h", and the pinyins that match the prefix of "h" are "h", "hen", "he", "heng" and "ha", etc.; then the pinyin identifier 99 corresponding to "h", the pinyin identifier 120 corresponding to "hen", the pinyin identifier 110 corresponding to "he", the pinyin identifier 122 corresponding to "heng" and the pinyin identifier 105 corresponding to "ha" are determined as the pinyin identifiers that match the pinyin prefix corresponding to the Mth syllable. For another example, if there is a pinyin of "he" in the first M-1 syllables of the pinyin of the target form, then only the identifier 110 corresponding to "he" can be used as the pinyin identifier of the pinyin corresponding to the syllable.

[0087] Then, the pinyin identifier corresponding to each syllable in the target pinyin can be used as a syllable node; the pinyin identifier corresponding to the Mth syllable in the target pinyin can include Y, where Y is a positive integer. Then, the first M-1 syllable nodes in the target pinyin are combined with the Y syllable nodes corresponding to the Mth syllable to form a syllable path; thus, Y syllable paths corresponding to the target pinyin can be obtained.

[0088] Sub-step 26, using multiple syllable paths to generate a target syllable network.

[0089] Then, the syllable paths corresponding to various forms of pinyin are used to generate the syllable network corresponding to the historical pinyin sequence; and the syllable network of the historical pinyin sequence may include multiple syllable paths.

[0090] In another example of the embodiment of the present invention, another way of converting the historical input sequence into the corresponding syllable network can refer to the following sub-steps 42 to 44:

[0091] Sub-step 42, correcting the historical pinyin sequence to obtain a corresponding historical error correction sequence.

[0092] Sub-step 44, parses the historical pinyin sequence and the historical error correction sequence to obtain a corresponding syllable network.

[0093] Since users may make mistakes in input during the input process, after obtaining the historical pinyin sequence, the historical pinyin sequence can be corrected to determine the corresponding historical error correction sequence. Then the historical pinyin sequence and the historical error correction sequence can be parsed respectively to obtain the corresponding syllable network; and in the case of user mistakes, the correct historical pinyin sequence can also be used to convert it into the corresponding syllable network. Among them, the syllable network obtained by parsing the historical error correction sequence and the syllable network obtained by parsing the historical pinyin sequence are both referred to as target syllable networks. Among them, the method of parsing the historical error correction sequence to obtain the corresponding syllable network is similar to the above-mentioned method of parsing the historical pinyin sequence to obtain the corresponding syllable network, which will not be repeated here.

[0094] Step 404: Count the frequency of each sentence under the conditions of the same historical input association information and the same syllable network.

[0095] Step 406: Determine the conditional probability of each sentence according to the frequency of each sentence, and generate a statistical model based on the conditional probability of each sentence.

[0096] Among them, step 404 to step 406 are similar to the above-mentioned step 204 to step 206, and will not be repeated here.

[0097] Among them, the conditional probability in the embodiment of the present invention refers to the probability P (sentence|historical input association information, syllable network corresponding to historical pinyin sequence) of the sentence under the conditions of historical input association information and the syllable network corresponding to the historical pinyin sequence.

[0098] In one example, sentences whose conditional probabilities are greater than a second preset threshold, conditional probabilities corresponding to sentences whose conditional probabilities are greater than the second preset threshold, and conditions corresponding to sentences whose conditional probabilities are greater than the second preset threshold (i.e., historical input association information and syllable networks corresponding to sentences whose conditional probabilities are greater than the second preset threshold) can be stored in a statistical model.

[0099] In another example, the top N sentences with the largest conditional probabilities, the conditional probabilities corresponding to each sentence in the top N sentences with the largest conditional probabilities, and the conditions corresponding to each sentence in the top N sentences with the largest conditional probabilities (i.e., the historical input association information and syllable network corresponding to each sentence in the top N sentences with the largest conditional probabilities) can be stored in the statistical model.

[0100] Compared with the statistical model generated according to steps 202 to 206, the statistical model generated according to steps 402 to 406 requires less storage space and can also perform error correction during long sentence prediction.

[0101] The following is an example of using the statistical model generated in steps 402 to 406 to predict long sentences and output sentence candidates.

[0102] Reference Figure 5 , shows a flow chart of steps of another optional embodiment of a data processing method of the present invention, which may specifically include the following steps:

[0103] Step 502: Obtain the pinyin sequence and input associated information.

[0104] Step 502 is similar to the above step 302 and will not be described again.

[0105] In an embodiment of the present invention, a method of using a statistical model to predict long sentences based on the pinyin sequence and input association information to obtain sentence candidates output by the statistical model can refer to steps 504 to 506:

[0106] Step 504: parse the pinyin sequence to obtain a corresponding target syllable network.

[0107] In an example of an embodiment of the present invention, step 504 may include the following sub-steps 62 to 66:

[0108] Sub-step 62, parsing the pinyin sequence into multiple forms of pinyin.

[0109] Sub-step 64, converting the pinyin of the target form into a pinyin identifier that matches the pinyin prefix of the target form, and obtaining a syllable path corresponding to the pinyin of the target form.

[0110] Sub-step 66, using multiple syllable paths to generate a target syllable network.

[0111] Among them, sub-step 62 to sub-step 66 are similar to the above-mentioned sub-step 22 to sub-step 26, and will not be repeated here.

[0112] In an example of an embodiment of the present invention, step 504 may include the following sub-steps 82 to 84:

[0113] Sub-step 82, performing error correction on the pinyin sequence to obtain a corresponding error correction sequence;

[0114] Sub-step 84, parsing the pinyin sequence and the error correction sequence to obtain a corresponding target syllable network.

[0115] Among them, sub-steps 82 to 84 are similar to the above-mentioned sub-steps 42 to 44 and will not be repeated here.

[0116] Step 506: Input the target syllable network and input association information into a statistical model to obtain sentence candidates output by the statistical model.

[0117] In an embodiment of the present invention, the syllable network and input association information of the pinyin sequence can be input into the statistical model generated according to steps 402-406; the statistical model calculates the conditional probability of predicting each sentence input by the user under the condition that the acquired pinyin sequence corresponds to the target network syllable and input association information. Then, the sentences with conditional probabilities greater than the first preset threshold can be output as sentence candidates; the first X sentences with the largest conditional probabilities can also be output as sentence candidates, which is not limited in the embodiment of the present invention.

[0118] In summary, in an embodiment of the present invention, after obtaining a pinyin sequence and input association information, the pinyin sequence can be parsed to obtain a corresponding target syllable network; then the target syllable network and the input association information are input into a statistical model to obtain sentence candidates output by the statistical model; compared with predicting long sentences based on the pinyin sequence and input association information, the statistical model of an embodiment of the present invention is more efficient in predicting long sentences.

[0119] Secondly, in an embodiment of the present invention, in the process of parsing the pinyin sequence to obtain the corresponding target syllable network, the pinyin sequence can be corrected to obtain the corresponding error correction sequence; then the pinyin sequence and the error correction sequence are parsed to obtain the corresponding target syllable network; and then the statistical model can be converted based on the accurate pinyin sequence to obtain accurate word candidates; thereby, in the case of incorrect input by the user, accurate sentence candidates can be predicted for the user, further improving the accuracy of the sentence candidates.

[0120] Furthermore, in an embodiment of the present invention, the pinyin sequence can be parsed into multiple forms of pinyin; then the target form of pinyin is converted into a pinyin identifier that matches the pinyin prefix of the target form to obtain a syllable path corresponding to the target form of pinyin; and then multiple syllable paths are used to generate a target syllable network, thereby obtaining a more comprehensive syllable network, thereby improving the comprehensiveness and accuracy of sentence candidates.

[0121] In addition, the statistical model can output the conditional probability of each sentence candidate while outputting each sentence candidate; so as to facilitate subsequent sorting according to the conditional probability of each sentence candidate, and display each sentence candidate based on the sorted results.

[0122] In an embodiment of the present invention, when there is a lot of input association information, the input sequence and part of the input association information can be input into the statistical model, or the syllable network of the input sequence and part of the input association information can be input into the statistical model to obtain sentence candidates output by the statistical model; so as to reduce the amount of calculation of the statistical model. Therefore, after obtaining the sentence candidates, in the process of sorting the sentence candidates, the sentence candidates can be sorted based on the complete input information and the probability conditions of the sentence candidates; thereby improving the accuracy of sorting the sentence candidates. Of course, the sentence candidates can also be sorted based on the complete input association information, and the embodiment of the present invention does not limit this.

[0123] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0124] Reference Figure 6 , shows a structural block diagram of a data processing device embodiment of the present invention, which may specifically include the following modules:

[0125] An acquisition module 602 is used to acquire an input sequence and input association information;

[0126] The prediction module 604 is used to use a statistical model to predict long sentences based on the input sequence and input association information to obtain sentence candidates output by the statistical model.

[0127] Reference Figure 7 , showing a structural block diagram of an optional embodiment of a data processing device of the present invention.

[0128] In an optional embodiment of the present invention, the prediction module 604 includes:

[0129] The first sentence candidate prediction submodule 6042 is used to input the input sequence and input association information into the statistical model to obtain sentence candidates output by the statistical model.

[0130] In an optional embodiment of the present invention, the input sequence includes a pinyin sequence, and the prediction module 604 includes:

[0131] The parsing submodule 6044 is used to parse the pinyin sequence to obtain a corresponding target syllable network;

[0132] The second sentence candidate prediction submodule 6046 is used to input the target syllable network and input association information into the statistical model to obtain the sentence candidates output by the statistical model.

[0133] In an optional embodiment of the present invention, the parsing submodule 6044 includes:

[0134] The error correction and parsing unit 60442 is used to correct the pinyin sequence to obtain a corresponding error correction sequence; and parse the pinyin sequence and the error correction sequence to obtain a corresponding target syllable network.

[0135] In an optional embodiment of the present invention, the parsing submodule 6044 includes:

[0136] The syllable network conversion unit 60444 is used to parse the pinyin sequence into multiple forms of pinyin; for the target form of pinyin, convert the target form of pinyin into a pinyin identifier that matches the pinyin prefix of the target form to obtain the syllable path corresponding to the target form of pinyin; and use multiple syllable paths to generate a target syllable network.

[0137] In an optional embodiment of the present invention, the device further comprises:

[0138] The first model generation module 606 is used to collect multiple groups of training data, each group of training data includes: historical input association information, historical input sequence, and sentences input by the user under the conditions of the historical input association information and the historical input sequence; counting the frequency of each sentence under the conditions of the same historical input association information and the same historical input sequence; determining the conditional probability of each sentence according to the frequency of each sentence, and generating a statistical model based on the conditional probability of each sentence.

[0139] In an optional embodiment of the present invention, the device further comprises:

[0140] The second model generation module 608 is used to collect multiple groups of training data, each group of training data includes: historical input association information, syllable networks corresponding to historical pinyin sequences, and sentences input by users under the conditions of the historical input association information and the syllable networks corresponding to the historical pinyin sequences; counting the frequency of each sentence under the conditions of the same historical input association information and the same syllable networks; determining the conditional probability of each sentence based on the frequency of each sentence, and generating a statistical model based on the conditional probability of each sentence.

[0141] In summary, in an embodiment of the present invention, an input sequence and input association information can be obtained, and then a statistical model is used to predict long sentences based on the input sequence and input association information to obtain sentence candidates output by the statistical model; and then, through the statistical model, long sentence prediction is performed in combination with the input sequence and input association information to improve the accuracy of long sentence prediction, thereby improving user input efficiency.

[0142] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0143] Figure 8 8 is a block diagram of an electronic device 800 for data processing according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0144] Reference Figure 8 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0145] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0146] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0147] The power component 806 provides power to the various components of the electronic device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.

[0148] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0149] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0150] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0151] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0152] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 814 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 814 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0153] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0154] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0155] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a data processing method, the method comprising: obtaining an input sequence and input association information; using a statistical model to predict long sentences based on the input sequence and input association information, and obtaining sentence candidates output by the statistical model.

[0156] Optionally, the using of a statistical model to perform long sentence prediction based on the input sequence and input association information to obtain sentence candidates output by the statistical model includes: inputting the input sequence and input association information into the statistical model to obtain sentence candidates output by the statistical model.

[0157] Optionally, the input sequence includes a pinyin sequence, and the use of a statistical model to predict long sentences based on the input sequence and input association information to obtain sentence candidates output by the statistical model includes: parsing the pinyin sequence to obtain a corresponding target syllable network; inputting the target syllable network and input association information into the statistical model to obtain sentence candidates output by the statistical model.

[0158] Optionally, parsing the pinyin sequence to obtain a corresponding target syllable network includes: correcting the pinyin sequence to obtain a corresponding error correction sequence; parsing the pinyin sequence and the error correction sequence to obtain a corresponding target syllable network.

[0159] Optionally, parsing the pinyin sequence to obtain a corresponding target syllable network includes: parsing the pinyin sequence into multiple forms of pinyin; for the target form of pinyin, converting the target form of pinyin into a pinyin identifier that matches the target form of pinyin prefix to obtain a syllable path corresponding to the target form of pinyin; and using multiple syllable paths to generate a target syllable network.

[0160] Optionally, the method further includes the step of generating the statistical model: collecting multiple groups of training data, each group of training data including: historical input association information, historical input sequence, and sentences input by the user under the condition of the historical input association information and the historical input sequence; counting the frequency of each sentence under the condition of the same historical input association information and the same historical input sequence; determining the conditional probability of each sentence according to the frequency of each sentence, and generating a statistical model based on the conditional probability of each sentence.

[0161] Optionally, the method also includes the step of generating the statistical model: collecting multiple groups of training data, each group of training data including: historical input association information, a syllable network corresponding to a historical pinyin sequence, and sentences input by the user under the condition of the historical input association information and the syllable network corresponding to the historical pinyin sequence; counting the frequency of each sentence under the condition of the same historical input association information and the same syllable network; determining the conditional probability of each sentence according to the frequency of each sentence, and generating a statistical model based on the conditional probability of each sentence.

[0162] Fig. 9 : is a structural diagram of an electronic device 900 for data processing according to another exemplary embodiment of the present invention. The electronic device 900 may be a server, which may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 922 (for example, one or more processors) and a memory 932, and one or more storage media 930 (for example, one or more mass storage devices) storing application programs 942 or data 944. Among them, the memory 932 and the storage medium 930 may be temporary storage or permanent storage. The program stored in the storage medium 930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 922 may be configured to communicate with the storage medium 930 and execute a series of instruction operations in the storage medium 930 on the server.

[0163] The server may also include one or more power supplies 926, one or more wired or wireless network interfaces 950, one or more input and output interfaces 958, one or more keyboards 956, and / or, one or more operating systems 941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0164] An electronic device includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations: obtaining an input sequence and input association information; using a statistical model to predict long sentences based on the input sequence and input association information, and obtaining sentence candidates output by the statistical model.

[0165] Optionally, the using of a statistical model to perform long sentence prediction based on the input sequence and input association information to obtain sentence candidates output by the statistical model includes: inputting the input sequence and input association information into the statistical model to obtain sentence candidates output by the statistical model.

[0166] Optionally, the input sequence includes a pinyin sequence, and the use of a statistical model to predict long sentences based on the input sequence and input association information to obtain sentence candidates output by the statistical model includes: parsing the pinyin sequence to obtain a corresponding target syllable network; inputting the target syllable network and input association information into the statistical model to obtain sentence candidates output by the statistical model.

[0167] Optionally, parsing the pinyin sequence to obtain a corresponding target syllable network includes: correcting the pinyin sequence to obtain a corresponding error correction sequence; parsing the pinyin sequence and the error correction sequence to obtain a corresponding target syllable network.

[0168] Optionally, parsing the pinyin sequence to obtain a corresponding target syllable network includes: parsing the pinyin sequence into multiple forms of pinyin; for the target form of pinyin, converting the target form of pinyin into a pinyin identifier that matches the target form of pinyin prefix to obtain a syllable path corresponding to the target form of pinyin; and using multiple syllable paths to generate a target syllable network.

[0169] Optionally, the method further includes the following instructions for generating the statistical model: collecting multiple groups of training data, each group of training data including: historical input association information, historical input sequence, and sentences input by the user under the condition of the historical input association information and the historical input sequence; counting the frequency of each sentence under the condition of the same historical input association information and the same historical input sequence; determining the conditional probability of each sentence according to the frequency of each sentence, and generating a statistical model based on the conditional probability of each sentence.

[0170] Optionally, it also includes instructions for performing the following steps to generate the statistical model: collecting multiple groups of training data, each group of training data including: historical input association information, a syllable network corresponding to a historical pinyin sequence, and sentences input by a user under the conditions of the historical input association information and the syllable network corresponding to the historical pinyin sequence; counting the frequency of each sentence under the conditions of the same historical input association information and the same syllable network; determining the conditional probability of each sentence based on the frequency of each sentence, and generating a statistical model based on the conditional probability of each sentence.

[0171] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0172] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0173] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0174] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0175] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0176] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0177] The data processing method, the data processing device and the electronic device provided by the present invention are introduced in detail above. The principle and implementation mode of the present invention are explained by using specific examples in this article. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation mode and the scope of application. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A data processing method, It is characterized in that include: Collect multiple sets of training data, each set of training data includes: historical input association information, a syllable network corresponding to a historical pinyin sequence, and a sentence input by a user under the condition of the historical input association information and the syllable network corresponding to the historical pinyin sequence; Count the frequency of each sentence under the conditions of the same historical input association information and the same syllable network; Determine the conditional probability of each sentence according to the frequency of each sentence, and generate a statistical model based on the conditional probability of each sentence; The step of determining the conditional probability of each sentence according to the frequency of each sentence and generating a statistical model based on the conditional probability of each sentence includes: The historical input association information and the historical input sequence corresponding to the sentences whose conditional probabilities are greater than the second preset threshold are stored in the statistical model; the historical input association information and the historical input sequence corresponding to each sentence in the top N sentences with the largest conditional probabilities are stored in the statistical model; Get input sequence and input association information; Using a statistical model to predict long sentences based on the input sequence and input association information, and obtaining sentence candidates output by the statistical model; The input sequence includes a pinyin sequence, and the long sentence prediction is performed based on the input sequence and input association information using a statistical model to obtain sentence candidates output by the statistical model, including: Parsing the pinyin sequence into multiple forms of pinyin; Among the first M-1 syllables in the pinyin sequence of the target form, the syllables whose corresponding pinyin contains initial consonants and finals are converted into pinyin identifiers that completely match the corresponding pinyin, and the syllables whose corresponding pinyin contains only initial consonants are converted into pinyin identifiers that match the corresponding initial consonants; the pinyin of the Mth syllable in the pinyin of the target form is converted into a pinyin identifier that matches the pinyin prefix of the Mth syllable; the pinyin identifier corresponding to each syllable in the pinyin of the target form is taken as a syllable node; wherein the pinyin of the target form includes the pinyin of M syllables, M is a positive integer; the pinyin corresponding to the pinyin identifier matched with the prefix contains the pinyin corresponding to the syllable in the pinyin of the target form; The first M-1 syllable nodes in the pinyin of the target form are respectively combined with a plurality of syllable nodes corresponding to the Mth syllable to form a plurality of syllable paths; Multiple syllable paths are used to generate the target syllable network; The target syllable network and input association information are input into a statistical model to obtain sentence candidates output by the statistical model.

2. The method according to claim 1, It is characterized in that The adopting of the statistical model to perform long sentence prediction based on the input sequence and the input association information to obtain sentence candidates output by the statistical model includes: The input sequence and input association information are input into a statistical model to obtain sentence candidates output by the statistical model.

3. The method according to claim 1, It is characterized in that The pinyin sequence is parsed to obtain a corresponding target syllable network, including: Correcting the pinyin sequence to obtain a corresponding error correction sequence; The pinyin sequence and the error correction sequence are parsed to obtain a corresponding target syllable network.

4. The method according to claim 2, It is characterized in that The method further comprises the step of generating the statistical model: Collecting multiple sets of training data, each set of training data includes: historical input association information, historical input sequence, and sentences input by the user under the condition of the historical input association information and the historical input sequence; Count the frequency of each sentence under the conditions of the same historical input association information and the same historical input sequence; The conditional probability of each sentence is determined according to the frequency of each sentence, and a statistical model is generated based on the conditional probability of each sentence.

5. A data processing device, It is characterized in that include: The first model generation module is used to collect multiple sets of training data, each set of training data includes: historical input association information, historical input sequence, and sentences input by the user under the condition of the historical input association information and the historical input sequence; counting the frequency of each sentence under the condition of the same historical input association information and the same historical input sequence; determining the conditional probability of each sentence according to the frequency of each sentence, and generating a statistical model based on the conditional probability of each sentence; The first model generation module comprises: A statistical model generation submodule, used to store historical input association information and historical input sequences corresponding to sentences whose conditional probabilities are greater than a second preset threshold value into the statistical model; and store historical input association information and historical input sequences corresponding to each sentence in the top N sentences with the largest conditional probabilities into the statistical model; An acquisition module, used to acquire input sequence and input association information; A prediction module, configured to use a statistical model to perform long sentence prediction based on the input sequence and input association information, and obtain sentence candidates output by the statistical model; Prediction module, including: A syllable network conversion unit is used to parse a pinyin sequence into pinyin in multiple forms; convert the syllables whose corresponding pinyins contain initial consonants and finals in the first M-1 syllables in the pinyin sequence in the target form into pinyin identifiers that fully match the corresponding pinyins, and convert the syllables whose corresponding pinyins contain only initial consonants into pinyin identifiers that match the corresponding initial consonants; convert the pinyin of the Mth syllable in the pinyin in the target form into a pinyin identifier that matches the pinyin prefix of the Mth syllable; use the pinyin identifier corresponding to each syllable in the pinyin in the target form as a syllable node; wherein the pinyin in the target form includes the pinyin of M syllables, and M is a positive integer; the pinyin corresponding to the pinyin identifier matched with the prefix includes the pinyin corresponding to the syllable in the pinyin in the target form; form multiple syllable paths with the first M-1 syllable nodes in the pinyin in the target form and several syllable nodes corresponding to the Mth syllable respectively; Multiple syllable paths are used to generate the target syllable network; The second sentence candidate prediction submodule is used to input the target syllable network and input association information into the statistical model to obtain the sentence candidates output by the statistical model.

6. An electronic device, It is characterized in that The system comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: Collect multiple sets of training data, each set of training data includes: historical input association information, a syllable network corresponding to a historical pinyin sequence, and a sentence input by a user under the condition of the historical input association information and the syllable network corresponding to the historical pinyin sequence; Count the frequency of each sentence under the conditions of the same historical input association information and the same syllable network; Determine the conditional probability of each sentence according to the frequency of each sentence, and generate a statistical model based on the conditional probability of each sentence; The step of determining the conditional probability of each sentence according to the frequency of each sentence and generating a statistical model based on the conditional probability of each sentence includes: The historical input association information and the historical input sequence corresponding to the sentences whose conditional probabilities are greater than the second preset threshold are stored in the statistical model; the historical input association information and the historical input sequence corresponding to each sentence in the top N sentences with the largest conditional probabilities are stored in the statistical model; Get input sequence and input association information; Using a statistical model to predict long sentences based on the input sequence and input association information, and obtaining sentence candidates output by the statistical model; The input sequence includes a pinyin sequence, and the long sentence prediction is performed based on the input sequence and input association information using a statistical model to obtain sentence candidates output by the statistical model, including: Parsing the pinyin sequence into multiple forms of pinyin; Among the first M-1 syllables in the pinyin sequence of the target form, the syllables whose corresponding pinyin contains initial consonants and finals are converted into pinyin identifiers that completely match the corresponding pinyin, and the syllables whose corresponding pinyin contains only initial consonants are converted into pinyin identifiers that match the corresponding initial consonants; the pinyin of the Mth syllable in the pinyin of the target form is converted into a pinyin identifier that matches the pinyin prefix of the Mth syllable; the pinyin identifier corresponding to each syllable in the pinyin of the target form is taken as a syllable node; wherein the pinyin of the target form includes the pinyin of M syllables, M is a positive integer; the pinyin corresponding to the pinyin identifier matched with the prefix contains the pinyin corresponding to the syllable in the pinyin of the target form; The first M-1 syllable nodes in the pinyin of the target form are respectively combined with a plurality of syllable nodes corresponding to the Mth syllable to form a plurality of syllable paths; Multiple syllable paths are used to generate the target syllable network; The target syllable network and input association information are input into a statistical model to obtain sentence candidates output by the statistical model.

7. A readable storage medium, It is characterized in that When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data processing method as described in any one of method claims 1-4.