An input method, device, electronic equipment and computer storage medium
By adjusting the prediction distribution of the language recognition model based on the distribution of user preference languages, the problems of non-standard user input and multilingual ambiguity in e-commerce platforms are solved, and more accurate language recognition is achieved.
Patent Information
- Application Number
- CN202110786275.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-12
- Publication Date
- 2026-07-14
- Estimated Expiration
- 2041-07-12
AI Technical Summary
In e-commerce scenarios where multiple languages are used, the search terms entered by users are often non-standard and have multiple ambiguities, leading to inaccurate language recognition.
By obtaining the user's identifier to determine their preferred language distribution, a first prediction distribution is generated using a pre-trained language recognition model, and then adjusted to a second prediction distribution based on the preferred language distribution to determine the predicted language of the input text.
It improves the personalization and accuracy of language recognition, and enhances the language recognition effect at the user level.
Smart Images

Figure CN115618853B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an input method, apparatus, electronic device, and computer storage medium. Background Technology
[0002] With globalization and the development of interconnectedness, the use of multiple languages in text is becoming increasingly common, and users of services are using a wider variety of languages. For example, in e-commerce scenarios, users may use multiple languages such as English, French, or German. Furthermore, user-entered search terms often suffer from non-standardization and linguistic ambiguity. For instance, "basket" means "basketball shoes" in French, but "basket hoop" in English, making accurate language identification difficult based solely on the keywords themselves.
[0003] Therefore, a more accurate input method is needed. Summary of the Invention
[0004] In view of this, embodiments of this application provide an input scheme to at least partially solve the above-mentioned problems. According to a first aspect of embodiments of this application, an input method is provided, comprising:
[0005] The system acquires user input text and determines the user's preferred language distribution based on the user's identifier. It then uses a pre-trained language recognition model to determine a first predicted language distribution for the input text. Based on the first predicted distribution and the preferred language distribution, it generates a second predicted language distribution for the input text. Finally, it determines the predicted language of the input text based on the second predicted distribution.
[0006] According to a second aspect of the embodiments of this application, an input device is provided, the device comprising:
[0007] The user preference determination module acquires the user's input text and determines the user's preferred language distribution based on the user's identifier; the first prediction module uses a pre-trained language recognition model to determine a first predicted distribution of the language of the input text; the second prediction module generates a second predicted distribution of the language of the input text based on the first predicted distribution and the preferred language distribution; and the input language determination module determines the language whose score in the second predicted distribution meets a preset condition as the predicted language of the input text.
[0008] According to a third aspect of the present application, an electronic device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, wherein the executable instruction causes the processor to perform an operation corresponding to the input method described in the first aspect.
[0009] According to a fourth aspect of the embodiments of this application, a computer storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the operation corresponding to the input method described in the first aspect.
[0010] According to the input scheme provided in this application embodiment, user input text is obtained, and the user's preferred language distribution is determined based on the user's identifier; a pre-trained language recognition model is used to determine a first predicted distribution of the language of the input text; a second predicted distribution of the language of the input text is generated based on the first predicted distribution and the preferred language distribution; and the predicted language of the input text is determined based on the second predicted distribution. By utilizing the user's preferred language distribution to correct the first predicted distribution of the language recognition model, the personalization and accuracy of language recognition are enhanced at the user level. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0012] Figure 1 This is a schematic diagram of the architecture for multilingual data storage in current technologies;
[0013] Figure 2 A flowchart illustrating an input method provided in an embodiment of this application;
[0014] Figure 3 A schematic diagram of an input logic framework provided in an embodiment of this application;
[0015] Figure 4 This is a schematic diagram of the structure of an input device provided in an embodiment of this application;
[0016] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0017] To enable those skilled in the art to better understand the technical solutions in the embodiments of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art should fall within the protection scope of the embodiments of this application.
[0018] Language identification is fundamental for text translation, data filtering, and text preprocessing. For example, in practical applications, data related to different languages are not stored together, but rather in their respective databases. Figure 1 As shown, Figure 1 This is a schematic diagram of the architecture for multilingual data storage in current technologies. In relevant scenarios, without prior language identification, searching for data may actually require cross-domain searches or processing, which is very inefficient.
[0019] With the globalization of e-commerce, the user base is constantly expanding, and the number of languages users use is also increasing. Therefore, accurate language identification is crucial for providing services to users. When shopping on e-commerce platforms, users typically enter several keywords to search for products. However, keywords often suffer from issues such as spelling errors, inconsistent word order, and ambiguity, including generic expressions (the same word in different languages) and homonyms (the same word with different meanings in different languages).
[0020] For example, a user might enter the search term "basket" to search for products. While "basket" means "basketball shoes" in French, it means "basket hoop" in English, potentially leading to inaccurate language recognition. Similarly, for Russian speakers, the intonation marks they input are silent, and users often omit some of these marks, easily causing language recognition errors during input and resulting in subsequent services failing to meet the user's actual needs.
[0021] Based on this, embodiments of this application provide an input scheme, such as... Figure 2 As shown, Figure 2 This is a flowchart illustrating an input method provided in an embodiment of this application. The method includes:
[0022] S201, Obtain the user's input text, and determine the user's preferred language distribution based on the user's identifier.
[0023] Users can speak any language. In certain scenarios where user login is required (e.g., when a user shops by logging into an e-commerce platform), the client or server can also obtain the user's identifier.
[0024] The server can query a user's historical information to obtain the user's preferred language usage information (including the frequency of use of each language, the location of use, the usage scenario, the probability of use, etc.), and then obtain the user's preferred language distribution. The preferred language distribution can be the specific frequency of use of each language, or the distribution of the probability of use of each language.
[0025] For example, the server can query and statistically analyze the language categories actively selected by the user when logging into the platform within a certain window period (e.g., 180 days), or it can statistically analyze the language categories selected by the user when purchasing goods, thereby obtaining the distribution of the frequency of use of each language by the user.
[0026] In another implementation, the server can pre-build user language preference data (e.g., storing user language preference data in the form of relational tables or key-value pairs) to store the usage information of each user in each language. For example, the server can perform historical statistics based on the language used by the user when communicating with other parties (including such as communicating with merchants or customer service, or posting text comments on the platform) or when searching for products, thereby obtaining the usage frequency of each language used by the user. Then, based on the usage frequency of each language, the server can statistically obtain the probability of each language used by the user, and write the usage frequency and probability together into the user language preference data.
[0027] User language preference data can take various forms, such as relational tables or non-relational tables like key-value pairs. Taking key-value pairs as an example, a key-value pair in the user language preference data uses the user identifier as the key and the user's language usage information within a certain window period as the value. As shown in Table 1, Table 1 presents a type of user language preference data provided in an embodiment of this application.
[0028] Table 1 User Language Preference Data
[0029] User ID Language preference distribution USER1 (French, 90 times, 90%), (English, 9 times, 9%), (Spanish, 1 time, 1%) USER2 (German, 3 times, 30%), (English, 6 times, 60%), (Spanish, 1 time, 10%) …… ……
[0030] The user language preference data may not explicitly include the probability of each language, but only the frequency of each language and other related usage information. Thus, the probability distribution of the user's preferred language can be obtained based on the frequency of each language and other related usage information stored in the table.
[0031] Furthermore, it should be noted that user language preference data can also store other information. For example, user language preference data can store language indication information generated by users on e-commerce platforms. This language indication information can be used to actively or passively assist in indicating the language used by the user. The language indication information may include things such as the platform language selection, nationality information, current address, and delivery address, etc.
[0032] S203, a first predicted distribution of the language of the input text is determined using a pre-trained language recognition model.
[0033] User input text is typically composed of several keywords, or it may contain several keywords. Therefore, the user input text can be extracted to obtain several keywords. Furthermore, based on a pre-trained language recognition model, the keywords can be used to identify the language, thus determining a first predicted distribution of the language of the input text. Specific language recognition models are already mature in current technology, and this application does not impose specific limitations on them.
[0034] The first prediction distribution obtained is determined to include multiple languages, and the corresponding prediction scores or prediction probabilities for each language. For example, for a certain text input by a user, the first prediction distribution obtained by the language recognition model may be the following probability distribution: (French 48%, English 3%, Spanish 49%), or the first prediction distribution may be the following score distribution: (French 10, English 1, Spanish 12).
[0035] S205, Based on the first prediction distribution and the preferred language distribution, generate a second prediction distribution for the language of the input text.
[0036] As mentioned earlier, the first prediction distribution includes multiple languages, and corresponding prediction scores or probabilities for each language. Based on this, the first prediction distribution can be adjusted according to the previously obtained preferred language distribution.
[0037] Specifically, in one implementation, the preferred language distribution can be determined as the language distribution weight, and then the product of the language distribution weight and the first predicted distribution of the corresponding language can be determined as the second predicted distribution.
[0038] For example, the first prediction distribution can be iterated over for each language included in the first prediction distribution. For any language selected from the first prediction distribution, the usage information of that language can be retrieved from the user's preferred language distribution and used as the language distribution weight. The adjusted usage information or usage score of that language can be obtained by multiplying the results. After the traversal is completed, the second prediction distribution of the language of the input text is obtained.
[0039] For example, if the first predicted distribution of a user's input text is (French 40%, English 10%, Spanish 40%, Russian 10%), and the user's preferred language distribution is (French 90%, English 9%, Spanish 1%), then the first predicted distribution and the preferred language distribution can be multiplied by the same language to obtain the adjusted usage score for each language: (French 40% * 90%, English 10% * English 9%, Spanish 40% * 1%, Russian 10% * 0), that is, the second predicted distribution is (French 0.36, English 0.09, Spanish 0.004, Russian 0).
[0040] Furthermore, the adjusted usage scores can be normalized, and the normalized values can be used as the second predicted distribution of the language of the input text. For example, for the French score of 0.36 in the aforementioned second predicted distribution, after normalization, the value obtained is 0.36 / (0.36+0.09+0.004)=0.793, while English is 0.198 and Spanish is 0.009. That is, the normalized second predicted distribution of the language of the input text is (French 0.793, English 0.198, Spanish 0.009).
[0041] In another implementation, user language indication information can be obtained from the aforementioned user language preference data. Based on the language indication information, the user's preferred language coefficient for different languages can be determined, and then the language distribution weight can be determined based on the preferred language coefficient and the preferred language distribution. Specifically, each user's language indication information can be associated with one or more languages, and then the associated language indication information under a certain language can be statistically analyzed to obtain the preferred language coefficient corresponding to that language.
[0042] For example, a user's language indication information includes (platform language selection, nationality information, current address, and delivery address). Each indication information corresponds to a specific preference coefficient. For instance, the coefficient for platform language selection is 5, the coefficient for nationality information is 5, the coefficient for current address (Wei Ying) is 1, and the coefficient for delivery address is 1. Suppose a user A's language indication information is (English, French, American, American), meaning the corresponding languages are (English, French, English, English). Then, the corresponding preference language coefficients are 5 for French and 5 + 1 + 1 = 7 for English.
[0043] Furthermore, the language distribution weights can be determined based on the preferred language coefficient and the preferred language distribution. Since the preferred language coefficient can be preset, an appropriate value can be selected, and the preferred language coefficient and the preferred language distribution can be multiplied to obtain the language distribution weights. Alternatively, the preferred language coefficient and the preferred language distribution can be added together to obtain the language distribution weights.
[0044] By adjusting the language distribution weights using the user's preferred language coefficient, the system fully considers other relevant language information beyond the user's input text, thereby enhancing personalization and accuracy at the user level during language recognition.
[0045] S207, determine the predicted language of the input text based on the second prediction distribution.
[0046] For example, the language whose branch in the second prediction distribution meets a preset condition can be determined as the predicted language of the input text. The preset condition can be a high score or a score exceeding a preset value. Generally, the language with the highest score in the second prediction distribution can be determined as the predicted language of the input text. For example, in the case where the second prediction distribution is (French 0.793, English 0.198, Spanish 0.009), French can be determined as the predicted language of the input text.
[0047] According to the input scheme provided in this application embodiment, user input text is obtained, and the user's preferred language distribution is determined based on the user's identifier; a pre-trained language recognition model is used to determine a first predicted distribution of the language of the input text; a second predicted distribution of the language of the input text is generated based on the first predicted distribution and the preferred language distribution; and the predicted language of the input text is determined based on the second predicted distribution. By utilizing the user's preferred language distribution to correct the first predicted distribution of the language recognition model, the personalization and accuracy of language recognition are enhanced at the user level.
[0048] In one implementation, the values of the key-value pairs corresponding to the user in the user language preference data can also be adjusted based on the second predicted distribution obtained in this study. One adjustment method is to add the second predicted distribution to the language usage frequency values of the key-value pairs corresponding to the user in the user language preference data (French, 90 times), (English, 9 times), (Spanish, 1 time), while the second predicted distribution is (French 0.793, English 0.198, Spanish 0.009).
[0049] Therefore, the second prediction distribution can be directly added to this value, thus revising the user's value to (French, 90.793 times), (English, 9.198 times), and (Spanish, 1.009 times); or, the predicted language corresponding to the second prediction distribution (i.e., French 1 time) can be added to this value, thus revising the user's value in the user language preference data to (French, 91 times), (English, 9 times), and (Spanish, 1 time).
[0050] Furthermore, in one embodiment, a time decay coefficient can also be obtained, and the product of the second prediction distribution and the time decay coefficient can be accumulated and added to the value of the key-value pair corresponding to the user in the user language preference data. The time decay coefficient is a coefficient that decreases as time increases.
[0051] For example, the time decay coefficient k is set to exponential decay, i.e., k = (t / ΔT). 1 / 2 , where ΔT is the interval between the generation time of the predicted language and the current time (ΔT can also be assigned a value accordingly, for example, when ΔT does not exceed t, it is assigned the value t, when ΔT is greater than t but does not exceed 2t, it is assigned the value 2, and so on), and t is a preset fixed constant (for example, 30 days). Thus, it can be seen that as ΔT increases, k will gradually decrease.
[0052] In this cumulative approach, the user language preference data actually stores a cumulative sequence of language preferences for each language. For example, assuming a prediction that a user used French N times, then the actual number of times the grammar was used in the user language preference data would be... where k i =(t / ΔT) i ) 1 / 2 ΔT i This is the time interval between the generation time of the i-th prediction using French and the current time.
[0053] In this implementation, when performing language identification on user input, prediction results with longer time intervals will have less impact, while being more sensitive to the latest keyword model prediction results for the user. This makes the prediction results closer to the user's actual language usage and improves the user experience.
[0054] like Figure 3 As shown, Figure 3 This diagram illustrates a logical framework for language recognition provided in an embodiment of this application. In this diagram, the user's input text is predicted by a model to obtain a first, indistinguishable prediction distribution (i.e., it could be French or Spanish). Then, based on pre-established user language preference data, the user's preferred language distribution is retrieved, and the first prediction result is corrected to obtain a second prediction distribution, thus ultimately outputting the predicted language. Furthermore, the user language preference data can be adjusted based on the second prediction distribution to strengthen its influence on the final predicted language.
[0055] Furthermore, it should be noted that if the first prediction distribution is inaccurate due to non-standard user input or multilingual ambiguity, this scheme can accurately correct the first prediction distribution based on the user's preferred language. However, when the user input is standard and free of multilingual ambiguity, correction based on the user's preferred language is still possible. However, since the language prediction model itself has good predictive ability (i.e., the prediction scores for each language of the input text will differ significantly), even after adjusting the user's preferred language, it will not affect the correct predicted language output (i.e., the prediction scores for each language after adjustment will still be significant, without affecting the determination of the predicted language). In other words, regardless of whether the user's input text is standard or ambiguous, the scheme of this application can be used to correct the output of the language prediction model to obtain an accurate predicted language.
[0056] The input method of this embodiment can be executed by any suitable electronic device with data processing capabilities, including mobile terminals (such as mobile phones, tablets, etc.) and PCs.
[0057] Regarding the second aspect of this application, an input device is provided, such as... Figure 4 As shown, Figure 4 This is a schematic diagram of an input device provided in an embodiment of this application. The input device includes:
[0058] User preference determination module 401 acquires the user's input text and determines the user's preferred language distribution based on the user's identifier;
[0059] The first prediction module 403 uses a pre-trained language recognition model to determine the first prediction distribution of the language of the input text;
[0060] The second prediction module 405 generates a second prediction distribution for the language of the input text based on the first prediction distribution and the preferred language distribution.
[0061] The input language determination module 407 determines the language whose score in the second prediction distribution meets the preset conditions as the predicted language of the input text.
[0062] Further, the user preference determination module 401 obtains user language preference data based on the user's identifier, the user language preference data including key-value pairs with the user's identifier as the key and usage information of different languages as the value; queries the user's usage information of different languages from the user language preference data; and determines the user's preferred language distribution based on the user's usage information of different languages.
[0063] Furthermore, the second prediction module 405 determines the language distribution weights based on the preferred language distribution; and determines the second prediction distribution based on the language distribution weights and the first prediction distribution of the corresponding language.
[0064] Furthermore, the second prediction module 405 determines the preferred language distribution as the language distribution weight; or, it obtains the user's language indication information, determines the preferred language coefficient based on the language indication information, and determines the language distribution weight based on the preferred language coefficient and the preferred language distribution.
[0065] Furthermore, the device also includes an adjustment module 409, which adjusts the value of the key-value pair corresponding to the user in the user language preference data according to the second prediction distribution.
[0066] Furthermore, the adjustment module 409 adds the second predicted distribution to the value of the key-value pair corresponding to the user in the user language preference data.
[0067] Further, the adjustment module 409 obtains the time decay coefficient, and adds the product of the second prediction distribution and the time decay coefficient to the value of the key-value pair corresponding to the user in the user language preference data, wherein the time decay coefficient decreases as time increases.
[0068] The input device of this embodiment is used to implement the corresponding input methods in the foregoing method embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. Furthermore, the functional implementation of each module in the input device of this embodiment can be referred to the description of the corresponding part in the foregoing method embodiments, which will also not be repeated here.
[0069] A third aspect of the embodiments of this application, referring to... Figure 5 , Figure 5 The diagram shows a structural schematic of an electronic device according to an embodiment of this application. The specific embodiments of the present invention do not limit the specific implementation of the electronic device.
[0070] like Figure 5 As shown, the electronic device may include: a processor (702), a communications interface (704), a memory (706), and a communications bus (708).
[0071] in:
[0072] The processor 702, communication interface 704, and memory 706 communicate with each other via communication bus 708.
[0073] Communication interface 704 is used to communicate with other electronic devices or servers.
[0074] The processor 702 is used to execute program 710, specifically to perform the relevant steps in the above-described input method embodiment.
[0075] Specifically, program 710 may include program code that includes computer operation instructions.
[0076] The processor 702 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The smart device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0077] Memory 706 is used to store program 710. Memory 706 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0078] Specifically, program 710 can be used to cause processor 702 to perform the following operations:
[0079] Obtain the user's input text and determine the user's preferred language distribution based on the user's identifier;
[0080] A pre-trained language recognition model is used to determine the first predicted distribution of the language of the input text;
[0081] Based on the first prediction distribution and the preferred language distribution, a second prediction distribution for the language of the input text is generated;
[0082] The predicted language of the input text is determined based on the second prediction distribution.
[0083] The specific implementation of each step in program 710 can be found in the corresponding steps and units described in the above-mentioned input method embodiments, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the aforementioned method embodiments, and will not be repeated here.
[0084] A fourth aspect of the embodiments of this application also provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements as follows: Figure 2 The operations corresponding to each step in the input method described above.
[0085] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of this application can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of this application.
[0086] The methods described in the embodiments of this application can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored on a remote recording medium or a non-transitory machine-readable medium and subsequently stored on a local recording medium, downloaded over a network. Thus, the methods described herein can be stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA) for such software processing. It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the input methods described herein. Furthermore, when a general-purpose computer accesses code used to implement the input methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the input methods shown herein.
[0087] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application.
[0088] The above embodiments are only used to illustrate the embodiments of this application, and are not intended to limit the embodiments of this application. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of this application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of this application, and the patent protection scope of the embodiments of this application should be defined by the claims.
Claims
1. An input method, comprising: Obtain the user's input text and determine the user's preferred language distribution based on the user's identifier; A pre-trained language recognition model is used to identify the language of the keywords corresponding to the input text, and a first predicted distribution of the language of the input text is determined. Based on the first prediction distribution and the preferred language distribution, a second prediction distribution for the language of the input text is generated; The predicted language of the input text is determined based on the second prediction distribution; The method further includes: The preferred language distribution is adjusted based on the generation time of the second predicted distribution.
2. The method as described in claim 1, wherein, Determining the user's preferred language distribution based on the user's identifier includes: User language preference data is obtained based on the user's identifier, and the user language preference data includes key-value pairs with the user's identifier as the key and the usage information of different languages as the value; Query the user's usage information for different languages from the user's language preference data; The user's preferred language distribution is determined based on the user's usage information of different languages.
3. The method as described in claim 1, wherein, Based on the first prediction distribution and the preferred language distribution, a second prediction distribution for the language of the input text is generated, including: The language distribution weights are determined based on the preferred language distribution. The second prediction distribution is determined based on the language distribution weights and the first prediction distribution of the corresponding language.
4. The method of claim 3, wherein, The corresponding language distribution weights are determined based on the preferred language distribution. include: The preferred language distribution is determined as the language distribution weight; or... Obtain the user's language indication information, determine the preferred language coefficient based on the language indication information, and determine the language distribution weight based on the preferred language coefficient and the preferred language distribution.
5. The method of claim 2, further comprising: Adjust the value of the key-value pair corresponding to the user in the user language preference data according to the second prediction distribution.
6. The method of claim 5, wherein, Adjusting the values of the key-value pairs corresponding to the user in the user language preference data according to the second prediction distribution includes: The second predicted distribution is accumulated into the value of the key-value pair corresponding to the user in the user language preference data.
7. The method of claim 6, wherein the second predicted distribution is accumulated into the user's language preference data. The values of the corresponding key-value pairs include: Obtain the time decay coefficient, and add the product of the second prediction distribution and the time decay coefficient to the value of the key-value pair corresponding to the user in the user language preference data, wherein the time decay coefficient decreases as time increases.
8. An input device, the device comprising: The user preference determination module is used to acquire the user's input text and determine the user's preferred language distribution based on the user's identifier. The first prediction module is used to identify the language of the keywords corresponding to the input text using a pre-trained language recognition model, and to determine the first prediction distribution of the language of the input text. The second prediction module is used to generate a second prediction distribution for the language of the input text based on the first prediction distribution and the preferred language distribution. The input language determination module is used to determine the language whose score in the second prediction distribution meets the preset conditions as the predicted language of the input text; The device further includes an adjustment module for adjusting the preferred language distribution based on the generation time of the second predicted distribution.
9. An electronic device, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform an operation corresponding to the input method as described in any one of claims 1-7.
10. A computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the input method as described in any one of claims 1-7.
Citation Information
Patent Citations
Language profiling service
US20200401657A1