Chinese character input method prediction method based on time series

Through the time series-based input method prediction method, a user-specific Chinese character time series model is established, and Chinese characters are recommended in combination with semantics, which solves the problems of slow Chinese character input speed and low accuracy in the existing technology, and achieves more efficient Chinese character input.

CN113190124BActive Publication Date: 2024-12-20ZHONGKE SHUGUANG (NANJING) COMPUTING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110107710.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-27
Publication Date
2024-12-20
Estimated Expiration
2041-01-27

AI Technical Summary

Technical Problem

The existing Chinese character input method has slow input speed and low accuracy because the pinyin of Chinese characters corresponds to multiple Chinese characters, which reduces the efficiency of the input method.

Method used

The time series-based input method is used to establish a time series model through user historical input, predict the number of Chinese characters, and recommend Chinese characters with higher number of occurrences in combination with semantics, and use the loss function to measure the accuracy of the prediction results and optimize the model.

Benefits of technology

It improves the input speed and accuracy of users, adapts to the input habits of different users, and improves the efficiency and accuracy of the input method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113190124B_ABST
    Figure CN113190124B_ABST
Patent Text Reader

Abstract

The present invention discloses a Chinese character input prediction method based on time series, comprising the following steps: step 100: selecting the user's historical input as a training set, training the user's time series model; step 200: using the time series model to predict the number of times each Chinese character appears at the input time to generate a prediction result; step 300: according to the Chinese characters or pinyin that the user has already typed, combined with semantics, select Chinese characters with a higher number of occurrences from the prediction results as recommended Chinese characters for display. According to the Chinese character input prediction method based on time series of the above technical solution, the Chinese characters that the user needs to input at the input time are predicted by the time series model, and combined with the user's input habits, the user's input speed and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a Chinese character input method prediction method based on time series. Background Art

[0002] At present, with the continuous development of information technology, electronic devices such as computers, mobile phones and tablet computers are increasingly widely used. People need to use soft and hard keyboards to input Chinese characters in order to achieve work, entertainment and communication purposes. For computers, input and output are the most basic functions. In recent years, the demand for electronic devices for inputting Chinese characters has also increased. Many input methods provide the function of inputting Chinese characters. However, due to the particularity of Chinese characters, inputting one pinyin often corresponds to multiple Chinese characters, resulting in problems such as slow input speed and low accuracy, which greatly reduces the efficiency of the input method. Summary of the invention

[0003] Purpose of the invention: The purpose of the present invention is to propose a Chinese character input method prediction method based on time series, which can make specific recommendations for users according to the input habits of different users, thereby improving the efficiency and accuracy of text input.

[0004] Technical solution: The Chinese character input method prediction method based on time series of the present invention comprises the following steps:

[0005] Step 100: Select the user's historical input as a training set to train the user's time series model;

[0006] Step 200: using the time series model to predict the number of times each Chinese character appears at the input time to generate a prediction result;

[0007] Step 300: Based on the Chinese characters or pinyin that the user has typed in and in combination with the semantics, select Chinese characters with a higher number of occurrences from the prediction results as recommended Chinese characters for display.

[0008] Furthermore, the step 300 further includes a step 400: using a loss function to measure the accuracy of the prediction result.

[0009] Furthermore, the loss function in step 400 is a quadratic loss function.

[0010] Furthermore, the step 100 includes:

[0011] Step 110: Select the user's historical input as a training set to establish the user's Chinese character time series;

[0012] Step 120: Verify the stability of the user's Chinese character time series. If the user's Chinese character time series is stable, proceed to step 130;

[0013] Step 130: determine whether the user Chinese character time series is a white noise sequence. If the user Chinese character time series is a non-white noise sequence, calculate the autocorrelation coefficient and partial correlation coefficient of the training set and obtain the autocorrelation graph and partial autocorrelation graph of the training set.

[0014] Step 140: Identify the user's Chinese character time series type according to the autocorrelation graph and the partial autocorrelation graph, and establish a model equation according to the sequence type;

[0015] Step 150: determining the order of the model equation;

[0016] Step 160: Estimate the parameters of the model equation using the observed data to obtain a time series model.

[0017] Furthermore, the step 120 further includes:

[0018] Step 121: If the user Chinese character time series is not stationary, perform differential processing on the user Chinese character time series and return to step 120.

[0019] Furthermore, in step 120, the unit root verification method is used to verify the stationarity of the user's Chinese character time series.

[0020] Furthermore, in step 150, the maximum likelihood method is used to estimate the parameters of the model equation.

[0021] Furthermore, in step 160, the Akaike information criterion is used to determine the order of the model equation.

[0022] Beneficial effects: Compared with the prior art, the present invention has the following advantages: by predicting the Chinese characters that the user needs to input at the time of input through the time series model, and combining the user's input habits, the user's input speed and accuracy are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 is a flow chart of a prediction method according to a first embodiment of the present invention;

[0024] Figure 2 is a flow chart of a prediction method according to a second embodiment of the present invention;

[0025] Figure 3 is a flow chart of a prediction method according to a third embodiment of the present invention;

[0026] Figure 4 The ACF diagram of the user Chinese character time series of the present invention;

[0027] Figure 5 It is the PACF diagram of the user Chinese character time series of the present invention;

[0028] Figure 6 It is an implementation effect diagram of the present invention. DETAILED DESCRIPTION

[0029] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0030] Reference Figure 1 According to an embodiment of the present invention, the Chinese character input method prediction method based on time series includes the following steps:

[0031] Step 100: Select the user's historical input as a training set to train the user's time series model;

[0032] Step 200: using the time series model to predict the number of times each Chinese character appears at the input time to generate a prediction result;

[0033] Step 300: Based on the Chinese characters or pinyin that the user has typed in and in combination with the semantics, select Chinese characters with a higher number of occurrences from the prediction results as recommended Chinese characters for display.

[0034] According to the time series-based Chinese character input prediction method of the above technical solution, a time series model is established based on the user's historical input to predict the frequency of Chinese characters in the future. The input time and the semantics of the Chinese characters that have been input or the pinyin that have been input are combined to first match the Chinese characters that can form words with the previously input Chinese characters or all the Chinese characters corresponding to the pinyin that have been input from the vocabulary, and then the time series model is combined with the predicted values ​​of the frequency of occurrence of these Chinese characters to generate a recommendation list, such as Figure 6 As shown in the figure, the user can directly select the required Chinese characters from the list. The time series model is established based on the user's historical input and matches the user's input habits, which can improve the user's input speed and accuracy.

[0035] Reference Figure 2 In some embodiments, step 300 is followed by step 400: using a loss function to measure the accuracy of the prediction results. The loss function maps the value of a random time or its related random variables to a non-negative real number to represent the "risk" or "loss" of the random time. It is usually associated with the optimization problem as a learning criterion, that is, solving and evaluating the model by minimizing the loss function. The accuracy of the prediction results evaluated by the loss function can provide a data basis for the subsequent optimization of the time series model. In this embodiment, a quadratic loss function is used to measure the accuracy of the prediction results, that is, The smaller the quadratic loss function, the higher the accuracy, so we can find a certain make To minimize, we can optimize the time series model.

[0036] Reference Figure 3 In some embodiments, step 100 includes:

[0037] Step 110: Select user historical input as a training set and establish a user Chinese character time series; it can be understood that the user Chinese character time series can be represented by plotting the Chinese characters in the training set in chronological order and the number of times they appear in a time period into a user Chinese character time series curve.

[0038] Step 120: Verify the stability of the user's Chinese character time series. If the user's Chinese character time series is stable, proceed to step 130;

[0039] Step 130: Determine whether the user Chinese character time series is a white noise sequence. If the user Chinese character time series is a non-white noise sequence, calculate the autocorrelation coefficient and partial correlation coefficient of the training set and obtain the autocorrelation diagram and partial autocorrelation diagram of the training set. Since there is no correlation before and after the white noise sequence, even if there is historical observation sequence information, it is meaningless for prediction. Therefore, if the user Chinese character time series is determined to be a white noise sequence at this time, the modeling is completed, and it is necessary to reselect the user historical input of another period of time as the training set to restart the training of the time series model. The autocorrelation function compares an ordered random variable with itself, reflecting the correlation between the values ​​of the same sequence in different time series. The partial correlation function calculates the strict correlation between two variables, which is the degree of correlation between the two variables after eliminating the interference of the intermediate variables. Calculate the autocorrelation coefficient and partial correlation coefficient of the user Chinese character time series and draw the autocorrelation diagram (ACF diagram) and partial autocorrelation diagram (PACF diagram), as shown in Figure 4 and Figure 5 shown.

[0040] Among them, the correlation coefficient ,in is the characteristic root of the difference equation, is an arbitrary constant; the partial autocorrelation coefficient ,in and Indicates expected conditions.

[0041] Step 140: Identify the user's Chinese character time series type according to the autocorrelation graph and the partial autocorrelation graph, and establish a model equation according to the sequence type;

[0042] Step 150: determining the order of the model equation;

[0043] Step 160: Estimate the parameters of the model equation using the observed data to obtain a time series model.

[0044] Reference Figure 2 In some embodiments, step 120 further includes:

[0045] Step 121: If the user Chinese character time series is not stationary, perform differential processing on the user Chinese character time series and return to step 120.

[0046] The stationarity of a time series requires that its mean, variance and covariance must be constants. It is understandable that the stationarity test can be tested by methods such as the time series diagram judgment method, the sample autocorrelation coefficient test method, and the unit root test method. Judging the stationarity of a sequence by the time series diagram judgment method has a certain degree of subjectivity, so in this embodiment, the unit root test method is used to test the stationarity of the user Chinese character time series, that is, if all the characteristic roots of the sequence are within the unit circle, the sequence is stationary; if the sequence has a characteristic root on the unit circle or outside the unit circle, the sequence is non-stationary. If the user Chinese character time series is non-stationary, it is necessary to perform differential processing on the user Chinese character time series, and perform a stationarity test on the sequence after differential processing until a stable user Chinese character time series is obtained.

[0047] In this embodiment, the Q statistic method is used to test whether the user's Chinese character time series is a white noise sequence. It is known that the Q statistic approximately obeys the degree of freedom The chi-square distribution of ,in is the observation period, is the number of delay periods specified, The degrees of freedom are The chi-square distribution of . When the Q statistic is greater than the degrees of freedom The chi-square distribution of (generally or ) quantile or the P value of the statistic is less than When If the confidence level is , the null hypothesis is rejected and the sequence is considered to be a non-white noise sequence; otherwise, the sequence is a white noise sequence.

[0048] In step 140, the prediction model is determined by whether the autocorrelation graph and the partial correlation graph are tailing or truncated. If the autocorrelation graph is tailing and the partial correlation graph is p-order truncated, it is an autoregressive model, that is, an AR (p) model. The autoregressive model describes the relationship between the current value and the historical value, and uses the historical time data of the variable itself to predict itself. The autoregressive model must meet the requirements of stationarity. The autoregressive model first needs to determine an order , which means using several periods of historical values ​​to predict the current value. The formula of the order autoregressive model is defined as: ,in is the current value, is a constant term, is the order, is the autocorrelation coefficient, It's an error.

[0049] If the autocorrelation graph is q-order truncated and the partial correlation graph is tailed, it is a moving average model, that is, MA (q) model. The moving average model focuses on the accumulation of error terms in the autoregressive model. The formula for q-order autoregression is defined as: ,in is the current value, is a constant term, q is the order, is the autocorrelation coefficient, It's an error.

[0050] If the autocorrelation graph is tailing and the partial correlation graph is also tailing, it is an autoregressive moving average model, that is, the ARMA (p, q) model. The autoregressive moving average model is a combination of the autoregressive model and the moving average model, and its formula is defined as: .

[0051] Since in most cases, the user Chinese character time series is a non-stationary series, it cannot be directly characterized by the autoregressive moving average model, so it is necessary to obtain a stable new user Chinese character time series after the user Chinese character time series is processed by d-order difference in step 121. The autoregressive moving average model is used to characterize the user Chinese character time series after d-order difference, that is, the differential integrated moving average autoregressive model, that is, the ARIMA (p, q, d) model. And the method of determining the order of the obtained prediction model by tailing and truncation is highly subjective, and the ARIMA (p, q, d) model obtained by the autocorrelation diagram and partial correlation diagram may not be the optimal. In addition, the model identification in step 140 may obtain more than one model, so it is necessary to compare and select the most suitable model, or determine the order of the model equation to obtain the optimal time series model.

[0052] In this embodiment, the Akaike Information Criterion (AIC Criterion) is used in step 150 to determine the order of the model equation. Wherein, AIC(p) ,in is the variance of the fitted residual, which is a function of the model order p.

[0053] In step 160, the parameters of the determined model equation are estimated using the maximum likelihood method. Under the maximum likelihood criterion, the sample is considered to come from the population with the highest probability of using the sample. Therefore, the maximum likelihood estimation of the unknown parameters is to make the likelihood function reach the maximum parameter value. The maximum likelihood estimation fully utilizes the information provided by each observation value and has the advantage of high estimation accuracy. The maximum likelihood function is ,make Get the maximum value is a parameter The maximum likelihood number.

Claims

1. A Chinese character input method prediction method based on time series, It is characterized in that The following steps are involved: Step 100: Selecting user historical input as a training set to train the user's time series model; including the following steps: Step 110: Select the user's historical input as a training set to establish the user's Chinese character time series; Step 120: verify the stability of the user Chinese character time series. If the user Chinese character time series is stable, proceed to step 130; Step 121: if the user Chinese character time series is not stable, perform differential processing on the user Chinese character time series and return to step 120; use the unit root verification method to verify the stability of the user Chinese character time series; Step 130: Determine whether the user Chinese character time series is a white noise sequence. If the user Chinese character time series is a non-white noise sequence, calculate the autocorrelation coefficient and partial correlation coefficient of the training set and obtain the autocorrelation graph and partial autocorrelation graph of the training set; use the Q statistic method to test whether the user Chinese character time series is a white noise sequence; specifically as follows: It is known that the Q statistic approximately obeys the chi-square distribution with m degrees of freedom, that is, ,in is the observation period, is the number of delay periods specified, The degrees of freedom are Chi-square distribution; when the Q statistic is greater than the degrees of freedom The chi-square distribution of ,in or ; The quantile or the P value of the statistic is less than When If the confidence level is , the null hypothesis is rejected and the sequence is considered to be a non-white noise sequence; otherwise, the sequence is a white noise sequence. Step 140: Identify the user's Chinese character time series type according to the autocorrelation graph and the partial autocorrelation graph, and establish a model equation according to the sequence type; Step 150: determining the order of the model equation to obtain a time series model; using the Akaike information criterion to determine the order of the model equation; Step 160: Estimate the parameters of the model equation using the observed data; use the maximum likelihood method to estimate the parameters of the model equation; where the maximum likelihood function is ; make Get the maximum value is a parameter The maximum likelihood number of ; Step 200: using the time series model to predict the number of times each Chinese character appears at the input time to generate a prediction result; Step 300: Based on the Chinese characters or pinyin that the user has typed in, the Chinese characters with a higher number of occurrences are selected from the prediction results in combination with the semantics as recommended Chinese characters for display; Step 400: using a loss function to measure the accuracy of the prediction result; the loss function is a quadratic loss function.