Information processing method, device, equipment and storage medium
Through the combination of text and pinyin information, it automatically identifies and corrects erroneous text in the pinyin input method, solving the problem of difficulty in correcting errors after inputting information with the pinyin input method, improving information entry efficiency, and is especially suitable for input optimization in medical scenarios.
Patent Information
- Application Number
- CN202111591845.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-12-23
AI Technical Summary
After users enter information using the Pinyin input method, it is difficult to automatically correct erroneous text, resulting in the need to manually delete and re-enter, which reduces the efficiency of information entry. Especially in medical scenarios, incorrect entry is frequent and affects work efficiency.
By converting the entered text information and pinyin information into a randomly selected sequence, calculating the matching value with the preset text features, automatically replacing erroneous text information, and realizing the combination of text and pinyin to identify errors and correct them.
It reduces the user's manual operations of deleting and re-entering information, improves the efficiency of information entry, especially optimizes the input process in medical scenarios, and reduces the frequency of incorrect entry.
Smart Images

Figure CN114357980B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an information processing method, apparatus, device and storage medium. Background Art
[0002] With the development of computer technology, users can enter information through devices such as mobile phones and tablets. However, once the user confirms the entry, the user can only correct it by deleting the erroneous text entered, which increases the user's operations of deleting and re-entering information, reducing the efficiency of information entry. Summary of the invention
[0003] The embodiments of the present application provide an information processing method, apparatus, device and storage medium, which can reduce the number of operations of users deleting and re-entering information and improve the efficiency of information entry.
[0004] According to a first aspect of an embodiment of the present application, there is provided an information processing method, including:
[0005] Get the text information and pinyin information of the input sentence;
[0006] Converting the text information and the pinyin information into a randomly selected sequence, where the randomly selected sequence includes a first text feature and a first pinyin feature;
[0007] Determine a character feature sequence corresponding to the first pinyin feature from a preset text set, wherein the character feature sequence includes a second text feature;
[0008] Calculating a matching value between a first text feature and a second text feature of a randomly selected sequence;
[0009] Obtain target text features according to target matching values that meet preset conditions in the matching values;
[0010] In the case where the revised text information corresponding to the target text feature does not match the text information of the input sentence, the replacement text information is the revised text information.
[0011] According to a second aspect of an embodiment of the present application, a method for correcting medical text information is provided, comprising:
[0012] Upon receiving text information of a medical sentence input by a user, obtaining pinyin information of the medical sentence;
[0013] Converting the text information and the pinyin information into a randomly selected sequence, where the randomly selected sequence includes a first text feature and a first pinyin feature;
[0014] Determine, from a preset medical text set, a character feature sequence corresponding to the first pinyin feature, the character feature sequence including the second text feature;
[0015] Calculating a matching value between a first text feature and a second text feature of a randomly selected sequence;
[0016] Obtain target text features according to target matching values that meet preset conditions in the matching values;
[0017] When the revised text information corresponding to the target text feature does not match the text information of the medical statement, the text information of the medical statement entered by the user is replaced and displayed with the revised text information.
[0018] According to a third aspect of an embodiment of the present application, there is provided an information processing device, including:
[0019] The acquisition module is used to obtain the text information and pinyin information of the input sentence;
[0020] A conversion module, used for converting text information and pinyin information into a randomly selected sequence, wherein the randomly selected sequence includes a first text feature and a first pinyin feature;
[0021] A first determination module is used to determine a character feature sequence corresponding to the first pinyin feature from a preset text set, wherein the character feature sequence includes a second text feature;
[0022] A calculation module, used for calculating a matching value between a first text feature and a second text feature of a randomly selected sequence;
[0023] The acquisition module is also used to acquire target text features according to target matching values that meet preset conditions in the matching values;
[0024] The replacement module is used to replace the text information with the revised text information when the revised text information corresponding to the target text feature does not match the text information of the input sentence.
[0025] According to a fourth aspect of an embodiment of the present application, a medical text information correction device is provided, comprising:
[0026] An acquisition module, used to acquire the pinyin information of the medical sentence when receiving the text information of the medical sentence entered by the user;
[0027] A conversion module, used for converting text information and pinyin information into a randomly selected sequence, wherein the randomly selected sequence includes a first text feature and a first pinyin feature;
[0028] A first determination module is used to determine a character feature sequence corresponding to the first pinyin feature from a preset medical text set, wherein the character feature sequence includes a second text feature;
[0029] A calculation module, used for calculating a matching value between a first text feature and a second text feature of a randomly selected sequence;
[0030] The acquisition module is also used to acquire target text features according to target matching values that meet preset conditions in the matching values;
[0031] The display module is used to replace the medical information with the revised text information when the revised text information corresponding to the target text feature does not match the text information of the medical sentence.
[0032] According to a fifth aspect of an embodiment of the present application, there is provided a computer device, including: a memory and a processor;
[0033] A memory for storing a computer program;
[0034] The processor is used to execute the computer program stored in the memory. When the computer program is running, the processor executes the steps of the information processing method shown in the first aspect, or executes the steps of the medical text information correction method shown in the second aspect.
[0035] According to the sixth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a computer device, the computer device executes the steps of the information processing method shown in the first aspect, or executes the steps of the medical text information correction method shown in the second aspect.
[0036] According to the seventh aspect of the embodiment of the present application, a computer program product is provided, including a computer program, which, when executed by a computer device, enables the computer device to execute the steps of the information processing method shown in the first aspect, or execute the steps of the medical text information correction method shown in the second aspect.
[0037] According to the information processing method, device, equipment and storage medium in the embodiment of the present application, by converting the text information and pinyin information of the input sentence, a sequence of marks including a first text feature and a first pinyin feature is obtained, then, from the preset text set, a character feature sequence corresponding to the first pinyin feature is determined, the character feature sequence includes a second text feature, and then, according to the matching value of the first text feature and the second text feature of the randomly selected sequence, the target text feature is obtained, so that when the corrected text information corresponding to the target text feature does not match the text information of the input sentence, the text information is replaced with the corrected text information. Thus, after the user enters the text, the combination of text and pinyin can be used as a means of identifying the erroneous text, so as to modify the identified erroneous text, and automatically correct the erroneous text, so that the user does not need to delete the erroneous text and re-enter the information, so as to reduce the user's deletion and re-entry operations and improve the efficiency of information entry. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The present application may be better understood from the following description of specific embodiments of the present application in conjunction with the accompanying drawings, wherein the same or similar figure numbers represent the same or similar features.
[0039] Figure 1 is a schematic diagram showing an information processing architecture according to an embodiment;
[0040] Figure 2 is a schematic diagram showing an information processing interface interaction according to an embodiment;
[0041] Figure 3 is a flow chart showing an information processing method according to one embodiment;
[0042] Figure 4 is a flow chart showing a method of determining text information and pinyin information according to one embodiment;
[0043] Figure 5 is a flow chart illustrating a method of determining a random selection sequence according to one embodiment;
[0044] Figure 6 is a schematic diagram showing a flow chart of determining a character feature sequence according to an embodiment;
[0045] Figure 7 is a flow chart illustrating a method of determining a natural language processing deep learning model according to one embodiment;
[0046] Figure 8 is a schematic diagram showing a process of determining a recall text according to an embodiment;
[0047] Fig. 9 is a flow chart showing a method of determining target text features according to one embodiment;
[0048] Fig.10 is a flow chart showing a method for correcting medical text information according to one embodiment;
[0049] Fig.11 is a schematic diagram showing the structure of an information processing device according to an embodiment;
[0050] Fig.12 is a schematic diagram showing the structure of a medical text information correction device according to an embodiment;
[0051] Fig.13 FIG. 4 is a schematic diagram showing the hardware structure of a computer device according to an embodiment. DETAILED DESCRIPTION
[0052] The features and exemplary embodiments of various aspects of the present application will be described in detail below. To make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present application and are not configured to limit the present application. For those skilled in the art, the present application can be implemented without some of these specific details. The following description of the embodiments is only provided to provide a better understanding of the present application by showing examples of the present application.
[0053] It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0054] In the related art, when a user enters information, the user can enter the information through the pinyin input method in the input method. Once the entry is confirmed, the user can only correct the error by deleting the wrongly entered text, which will increase the operations of the user to delete and re-enter the information and reduce the information entry efficiency. Combining with a specific scenario, such as in a medical scenario, medical staff usually use the pinyin input method to enter text information such as the patient's chief complaint and current medical history into the medical system. Since the pinyin input method has the characteristic of many homophonic characters, for example, when entering "asipinlin", wrong texts such as "阿斯匹林 (aspirin)" and "阿斯毗邻" will appear. Or, when the user does not enter the complete pinyin, it will also increase the probability of errors in the entered information. Thus, the work efficiency of medical staff is reduced.
[0055] Based on this, the embodiments of the present application provide an information processing method, which can, when the user enters text through the pinyin input method, use the combination of text and pinyin as a means to identify wrong texts, modify the wrongly entered texts identified, and automatically correct the wrong texts, so that the user does not need to manually delete the wrongly entered characters or re-enter the information, reducing the operations of the user to delete and re-enter the information and improving the information entry efficiency.
[0056] Based on this, the following combines the attached Figure 1The information processing architecture in the embodiment of the present application is shown to explain in detail the information processing method provided by the embodiment of the present application.
[0057] In one or more possible embodiments, Figure 1 As shown, the information processing architecture proposed in the embodiment of the present application may include an electronic device 10. For example, the electronic device 10 may be a mobile phone, a tablet computer, a laptop computer, a PDA, a wearable device, or other device that has the function of inputting information (using the pinyin input method), and the embodiment of the present application does not specifically limit the electronic device.
[0058] Based on the above display architecture, combined with Figure 2 The information processing method provided in the embodiment of the present application is described in detail.
[0059] like Figure 2 As shown, when the user enters a sentence based on the pinyin input method, the electronic device 10 obtains text information such as ####*#### and pinyin information of the entered sentence.
[0060] Next, the electronic device 10 converts the text information and pinyin information of the input sentence to obtain a sequence of tags including a first text feature and a first pinyin feature. Then, from the preset text set, a character feature sequence corresponding to the first pinyin feature is determined, the character feature sequence includes a second text feature, and a matching value between the first text feature and the second text feature of the randomly selected sequence is calculated. Then, according to a target matching value in the matching value that meets a preset condition, a target text feature is obtained. In this way, when the corrected text information corresponding to the target text feature does not match the text information of the input sentence, the text information is replaced with the corrected text information such as #########.
[0061] Therefore, when a user enters text through the Pinyin input method, the combination of text and Pinyin can be used as a means to identify erroneous text, so as to modify the identified erroneous text and automatically correct the erroneous text, so that the user does not need to manually delete the erroneously entered text or re-enter the information, thereby reducing the user's operations of deleting and re-entering information and improving the efficiency of information entry.
[0062] In combination with specific scenarios such as medical scenarios, when the user enters a medical sentence based on the pinyin input method, the electronic device 10 obtains text information and pinyin information of the entered sentence.
[0063] Next, the electronic device 10 converts the text information and pinyin information into a randomly selected sequence, the randomly selected sequence includes a first text feature and a first pinyin feature, and determines a character feature sequence corresponding to the first pinyin feature from a preset medical text set, the character feature sequence includes a second text feature.
[0064] Then, the electronic device 10 calculates the matching value between the first text feature and the second text feature of the randomly selected sequence, and obtains the target text feature according to the target matching value that satisfies the preset condition in the matching value. In this way, when the electronic device 10 detects that the revised text information corresponding to the target text feature does not match the text information of the medical statement, the text information of the medical statement entered by the user is replaced and displayed with the revised text information.
[0065] Therefore, when the user enters medical text through the Pinyin input method, the combination of text and Pinyin can be used as a means to identify erroneous text, so that the identified erroneously entered medical text can be modified, and the erroneous medical text can be automatically corrected, so that users such as medical personnel do not need to manually delete erroneously entered text or re-enter the information, thereby reducing the operations of medical personnel deleting and re-entering information, improving the efficiency of information entry, and providing input optimization for the medical profession.
[0066] It should be noted that the embodiments of the present application are illustrated by using information processing methods in medical scenarios. In actual applications, legal professional texts in the legal field can also be identified and modified. Of course, it is also possible to obtain scenarios in other professional fields where automatic correction of input text is required to provide input optimization for specific professional directions.
[0067] According to the above architecture and application scenarios, the following are combined Figure 3 The information processing method provided in the embodiments of the present application is described in detail.
[0068] Figure 3 is a flow chart showing an information processing method according to one embodiment.
[0069] like Figure 3 As shown, the information processing method can be applied to an information processing device, and the information processing device may include (such as Figure 1 Or Figure 2 The electronic device shown in the figure may specifically include:
[0070] Step 310, obtaining text information and pinyin information of the input sentence; Step 320, converting the text information and pinyin information into a randomly selected sequence, the randomly selected sequence including a first text feature and a first pinyin feature; Step 330, determining a character feature sequence corresponding to the first pinyin feature from a preset text set, the character feature sequence including a second text feature; Step 340, calculating a matching value between the first text feature and the second text feature of the randomly selected sequence; Step 350, obtaining a target text feature according to a target matching value in the matching value that meets a preset condition; Step 360, replacing the text information with the modified text information when the modified text information corresponding to the target text feature does not match the text information of the input sentence.
[0071] The above steps are described in detail below, as shown below.
[0072] In step 310, for example, the text information and pinyin information of the sentence can be obtained according to the pinyin input method used by the user to enter the sentence.
[0073] In one or more possible examples, such as Figure 4 As shown, step 310 may specifically include steps 3101 to 3103.
[0074] Step 3101, obtaining an input sentence, where the input sentence includes at least one character.
[0075] Here, a sentence in the embodiments of the present application may refer to a grammatically self-contained unit, which is composed of a word or a group of syntactically related words.
[0076] Step 3102, determining the character category of each character in at least one character respectively, where the character category includes a text character category and an English character category.
[0077] Based on this, in step 3103, when the character category of the character is a text character category, the character is determined as text information, and the pinyin of the character is determined as pinyin information.
[0078] When the character category of the character is an English character category, the target pinyin matching the character is determined as the pinyin information, and the text corresponding to the target pinyin is determined as the text information, wherein the target pinyin is a pinyin whose number of initials and finals for the character splicing meets the preset number of digits.
[0079] Exemplarily, let the input sentence be x, the text information be y, the pinyin information be z, and the position of the character be i. Here, x, y and z can be expressed in the form of a sequence.
[0080] Based on this, when judging the character category to which the current character x[i] belongs, if x[i] is a text character category, that is, a Chinese character, then add x[i] to the end of y, and extract the first letter of the pinyin of x[i] (or the full pinyin, or the birth letter) and add it to the end of z. At this time, the marked position of the character becomes i+1.
[0081] If x[i] is an English character, that is, an English letter, then match the longest span x[i:j] in the pinyin table, and add x[i] to the end of y and z respectively. At this time, the marked position of the character jumps to j+1.
[0082] It should be noted that span x[i:j] can be a pinyin whose number of digits of the consonants and finals of the English letters x[i] satisfies the preset number of digits. For example, if the English letter is s, a single-digit letter will be added after s to obtain a pinyin such as si, sa, etc. Then, a two-digit letter will be added after s to obtain a pinyin such as shi, sha, etc. Three-digit letters will be added after s in sequence until the longest number of digits is added after s. In the embodiment of the present application, five-digit letters can be added after s to obtain a pinyin with a preset number of digits, such as shuang.
[0083] In step 320, in one or more possible examples, such as Figure 5 As shown, step 320 may specifically include steps 3201 to 3202.
[0084] Step 3201, alternately splice each text element in the text information and each pinyin element in the pinyin information to obtain mixed element information.
[0085] Step 3202, converting the mixed element information into a randomly selected sequence, wherein the sequence length of the randomly selected sequence is the same as the sequence length of the mixed element information.
[0086] For example, Figure 6 As shown, each text element "sugar", "urine" and "disease" in the text information and each pinyin element "T", "N" and "B" in the pinyin information are alternately spliced to obtain the mixed element information "sugar", "T", "urine", "N", "disease", "B".
[0087] Then, the mixed element information "sugar", "T", "urine", "N", "disease", "B" is converted into a randomly selected sequence such as "w1", "c1", "w2", "c2", "w3", "c3".
[0088] In another or more possible examples, the randomly selected sequence also includes a marking sequence. Thus, before step 3202, the information processing method may further include:
[0089] A tag sequence is generated according to a first position of the text element in the mixed element information and a second position of the pinyin element in the mixed element information.
[0090] For example, Figure 6 As shown, a mark (mask) sequence of the same length as the mixed element information is produced, wherein the first position of the text elements "w1", "w2" and "w3" in the mask sequence is marked as 0, and the second position of the pinyin elements "c1", "c2" and "c3" in the mask sequence is marked as 1.
[0091] Based on this, in combination with step 3202, the mixed element sequence and the mask sequence of the mixed element information can be input into a tokenizer to obtain a random selection sequence and a mask sequence corresponding to the random selection sequence.
[0092] In step 330, in one or more possible examples, the character feature sequence further includes a second pinyin feature. Based on this, step 330 may specifically include:
[0093] The randomly selected sequence and the marked sequence are input into the natural language processing deep learning model. The natural language processing deep learning model is used to determine the second text feature and the second pinyin feature corresponding to the first pinyin feature from a preset text set, and obtain the character feature sequence output from the natural language processing deep learning model.
[0094] For example, still referring to Figure 6 As shown, the natural language processing deep learning model can be a natural language processing deep learning pre-training model based on a bidirectional encoder (Bidirectional Encoder Representations from Transformers, BERT), a natural language processing model (Transformer), a long short-term memory network (Long Short-Term Memory, LSTM), and other mechanism-based training models, which are not specifically limited here.
[0095] Based on this, taking the natural language processing deep learning model as the Bert model as an example, the randomly selected sequence and the labeled sequence are input into the Bert model to obtain a word feature sequence with the same length as the sequence length of the randomly selected sequence, such as "R1", "R2", "R3", "R4", "R5", and "R6".
[0096] Furthermore, in order to facilitate step 350 to determine the target text feature and reduce the amount of calculation, the characters at the positions marked as 0 by the mask sequence in the word feature sequence can be extracted, that is, the second text feature of the sequence is randomly selected, and these characters are spliced into a spliced word feature sequence such as "R1", "R3", and "R5".
[0097] It should be noted that before executing step 330, the information processing method provided in the embodiment of the present application may also include obtaining a natural language processing deep learning model, such as Figure 7 As shown, it may specifically include steps 3301 to 3304.
[0098] Step 3301, obtain a corpus sample set, the corpus sample set includes sample text information of multiple groups of sample sentences, each group of sample sentences includes a first number of original texts, a second number of random texts and a third number of replacement texts, the random text is the text after the original text is changed according to preset characters, the replacement text is the corresponding text after the pinyin of the original text is replaced according to the same initial consonant, and the percentages of the first number, the second number and the third number are set according to the principle of uniform distribution.
[0099] Step 3302: alternately concatenate each sample text element in the sample text information and each sample pinyin element in the sample pinyin information of the plurality of groups of sample sentences to obtain sample mixed element information.
[0100] Step 3303: Generate a sample tag sequence according to the third position of the sample text element in the sample mixed element information and the fourth position of the sample pinyin element in the sample mixed element information.
[0101] Step 3304, training the initial natural language processing deep learning model based on the sample random selection sequence and sample labeling sequence after the sample mixed element information is converted to obtain a natural language processing deep learning model, and the sequence length of the sample random selection sequence is the same as the sequence length of the sample mixed element information.
[0102] Exemplarily, in a medical scenario, the natural language processing deep learning model in the embodiment of the present application can be a BERT model for medical text error correction, and the model can be trained specifically in the following manner.
[0103] First, the initial natural language processing deep learning model such as Bert can be trained based on the Masked Language Model (MLM). The MLM model is a mechanism that randomly masks the input sequence (usually a sentence as the basic unit) (that is, replaces the word with [MASK]), and then lets the transformed sequence predict which words are masked.
[0104] Based on this, in the historical BERT training process, the original input corpus is masked, 15% of the characters are marked as characters to be predicted, 80% of these characters are replaced with [mask], 10% are replaced with random characters, and 10% remain unchanged. In the information processing method provided in this embodiment, 10%-100% of the characters in each sample sentence are marked as characters to be predicted, that is, the first amount is 10% of the original text, the second amount is 10% of the random text, and the third amount is 80% of the replacement text.
[0105] Further, step 3304 may specifically include:
[0106] The initial natural language processing deep learning model is trained using the sample random selection sequence and the sample labeling sequence to obtain a training feature sequence;
[0107] Based on the sample random selection sequence and the training feature sequence, a first loss is determined; and based on the sample label sequence and the training feature sequence, a second loss is determined, wherein the first loss is a similarity error loss between the sample random selection sequence and the training feature sequence, and the second loss function is a classification error loss between the sample label sequence and the training feature sequence;
[0108] When the first loss satisfies the first training condition and the second loss satisfies the second training condition, a natural language processing deep learning model is obtained.
[0109] Exemplarily, the first loss may be softmax, and the second loss may be NLLloss.
[0110] Referring to step 340 , in one or more possible embodiments, a cosine similarity is calculated between a first text feature in the randomly selected sequence and a second text feature in the character feature sequence.
[0111] Here, the first text feature and the second text feature have the same position, such as Figure 8 As shown, the cosine similarity of each character feature matched by "R1", such as "sugar", "soil", "pain" and "w1", is calculated respectively, and the matching value with each character feature is obtained. For example, at the position of "R1", the matching value of "sugar" is 0.9, the matching value of "soil" is 0.7, and the matching value of "pain" is 0.6. Similarly, at the position of "R3", the matching value of "urine" is 0.8, the matching value of "sticky" is 0.5, and the matching value of "bird" is 0.2. And at the position of "R5", the matching value of "disease" is 0.9, the matching value of "bing" is 0.3, and the matching value of "change" is 0.1.
[0112] In one or more possible embodiments, step 350 is involved. Fig. 9 As shown, step 350 may specifically include steps 3501 to 3505.
[0113] Step 3501: Filter target text features that meet preset conditions from the matching values between the first text feature and the second text feature of the randomly selected sequence.
[0114] Step 3502, concatenate the target text features to obtain a recall sequence.
[0115] Step 3503, determining the recalled text features in the recalled sequence whose matching values are less than or equal to the target threshold.
[0116] Step 3504, the text information corresponding to the recalled text features is used as the text information of the input sentence for cyclic recall.
[0117] Step 3505: When the number of cyclic recalls meets the preset number, the recalled text features in the recall sequence corresponding to the preset number are determined as target text features.
[0118] It should be noted that the above-mentioned cyclic recall includes the following steps:
[0119] Converting the text information and the pinyin information into a randomly selected sequence, where the randomly selected sequence includes a first text feature and a first pinyin feature;
[0120] Determine a character feature sequence corresponding to the first pinyin feature from a preset text set, wherein the character feature sequence includes a second text feature;
[0121] Calculate the matching value between the first text feature and the second text feature of the randomly selected sequence.
[0122] For example, Figure 8 As shown, the text features with the highest matching value at each position are concatenated to obtain a recall sequence. For example, the highest matching value at position "R1" is 0.9, and the corresponding text feature of 0.9 is "sugar", the highest matching value at position "R3" is 0.8, and the corresponding text feature of 0.8 is "urine", and the highest matching value at position "R5" is 0.9, and the corresponding text feature of 0.9 is "disease", resulting in a recall sequence of "sugar", "urine", and "disease".
[0123] Next, determine the text features in the recall sequence "sugar", "urine", and "disease" whose matching values are less than or equal to the target threshold value, such as 0.8, and replace the text in the same position as "urine" in the text information of the entered sentence with the text feature "urine" corresponding to 0.8, and recall "urine" as the text information of the entered sentence in a loop until the preset number of times n is reached. The recalled text features in the recall sequence corresponding to the preset number of times can be determined as the target text features, so that when the revised text information does not match the text information of the entered sentence, the text information of the entered sentence can be replaced and displayed with the revised text information.
[0124] Based on this, in one example, before step 3502 involved above, the information processing method in the embodiment of the present application may further include:
[0125] The text features whose matching values between the first text feature and the second text feature of the randomly selected sequence do not meet the preset conditions are concatenated to obtain a similarity sequence;
[0126] Calculate the target threshold based on the quartiles of the similarity sequence.
[0127] Exemplarily, the target threshold t is set according to the quartile of the similarity sequence, and the target threshold t is used to filter out Chinese characters less than or equal to t in the recall sequence to replace the Chinese characters with the same position in the input sentence.
[0128] In step 360, when the revised text information corresponding to the target text feature does not match the text information of the input sentence, the text information is replaced with the revised text information.
[0129] For example, Figure 8 As shown, if the text information of the input sentence, such as "diabetes", is the same as the modified text information "diabetes", there is no need to replace it. On the contrary, if the text information of the input sentence, such as "diabetes", "diabetes N disease" or "diabetes and" is different from the modified text information "diabetes", the replacement text information is the modified text information.
[0130] In summary, according to the information processing method in the embodiment of the present application, after the user uses the pinyin input method to enter a sentence such as a medical sentence, by converting the text information and pinyin information of the entered sentence, a sequence of marks including a first text feature and a first pinyin feature is obtained, and then, from the preset text set, a character feature sequence corresponding to the first pinyin feature is determined, and the character feature sequence includes a second text feature, and then, according to the matching value of the first text feature and the second text feature of the randomly selected sequence, the target text feature is obtained, so that when the correction text information corresponding to the target text feature does not match the text information of the entered sentence, the text information is replaced with the correction text information. Thus, after the user enters the sentence, the text and pinyin combination can be used as a means of identifying the wrong text, so as to modify the identified wrongly entered text and realize automatic correction of the wrong text. Compared with the traditional proofreading method, the embodiment of the present application provides a function of discovering automatic modification, so that the user does not need to delete the wrongly entered text and re-enter the information, so as to reduce the user's operation of deleting and re-entering information and improve the efficiency of information entry.
[0131] The information processing method provided in the embodiments of the present application is described in detail in conjunction with specific scenarios such as medical scenarios.
[0132] Fig.10 is a flow chart showing a method for correcting medical text information according to an embodiment.
[0133] like Fig.10 As shown, the medical text information correction method can be applied to an information processing device, and the information processing device may include (such as Figure 1 Or Figure 2 The electronic device shown in the figure may specifically include the following steps:
[0134] Step 1010, when receiving text information of a medical sentence input by a user, obtaining pinyin information of the medical sentence;
[0135] Step 1020, converting the text information and the pinyin information into a randomly selected sequence, where the randomly selected sequence includes a first text feature and a first pinyin feature;
[0136] Step 1030, determining a character feature sequence corresponding to the first pinyin feature from a preset medical text set, wherein the character feature sequence includes a second text feature;
[0137] Step 1040, calculating a matching value between the first text feature and the second text feature of the randomly selected sequence;
[0138] Step 1050, obtaining target text features according to target matching values that meet preset conditions in the matching values;
[0139] Step 1060: When the revised text information corresponding to the target text feature does not match the text information of the medical statement, the text information of the medical statement entered by the user is replaced and displayed with the revised text information.
[0140] Therefore, when the user enters medical text through the Pinyin input method, the combination of text and Pinyin can be used as a means to identify erroneous text, so that the identified erroneously entered medical text can be modified, and the erroneous medical text can be automatically corrected, so that users such as medical personnel do not need to manually delete erroneously entered text or re-enter the information, thereby reducing the operations of medical personnel deleting and re-entering information, improving the efficiency of information entry, and providing input optimization for the medical profession.
[0141] In addition, the professional field of the preset text set can be adjusted so that the information processing method provided in the embodiment of the present application can be applied to a variety of scenarios, such as medical professional direction, legal professional direction, etc.
[0142] It should be noted that, in addition to training the natural language processing deep learning model in the above-mentioned manner, the model involved in the information processing method provided in the embodiment of the present application can also be trained by the user's input habit data to improve the error correction accuracy.
[0143] It should be clear that the present application is not limited to the specific configurations and processes described in the above embodiments and shown in the figures. For the convenience and brevity of description, a detailed description of the known methods is omitted here, and the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, which will not be repeated here.
[0144] Based on the same inventive concept, the present application provides an information processing device corresponding to the above-mentioned information processing method. Fig.11 Provide detailed explanation.
[0145] Fig.11 is a schematic diagram showing the structure of an information processing device according to an embodiment.
[0146] like Fig.11 As shown, the information processing device 110 is applied to Figure 1 or Figure 2 The electronic device shown, the information processing device 110 may specifically include:
[0147] The acquisition module 1101 is used to acquire the text information and pinyin information of the input sentence;
[0148] A conversion module 1102, configured to convert text information and pinyin information into a randomly selected sequence, wherein the randomly selected sequence includes a first text feature and a first pinyin feature;
[0149] A first determining module 1103 is used to determine a character feature sequence corresponding to the first pinyin feature from a preset text set, where the character feature sequence includes a second text feature;
[0150] A calculation module 1104, used to calculate a matching value between a first text feature and a second text feature of a randomly selected sequence;
[0151] The acquisition module 1101 is also used to acquire target text features according to target matching values that meet preset conditions in the matching values;
[0152] The replacement module 1105 is used to replace the text information with the revised text information when the revised text information corresponding to the target text feature does not match the text information of the input sentence.
[0153] Based on this, the information processing device 110 provided in the embodiment of the present application is described in detail below:
[0154] In one or more possible embodiments, the acquisition module 1101 may be specifically configured to acquire an input sentence, where the input sentence includes at least one character;
[0155] Determine the character category of each character in at least one character, respectively, the character category including a text character category and an English character category;
[0156] In the case where the character category of the character is a text character category, the character is determined as text information, and the pinyin of the character is determined as pinyin information;
[0157] When the character category of the character is an English character category, the target pinyin matching the character is determined as the pinyin information, and the text corresponding to the target pinyin is determined as the text information. The target pinyin is a pinyin whose number of initials and finals for the character splicing meets the preset number of digits.
[0158] In another or more possible embodiments, the conversion module 1102 may be specifically configured to alternately concatenate each text element in the text information and each phonetic element in the phonetic information to obtain mixed element information;
[0159] The mixed element information is converted into a randomly selected sequence, and the sequence length of the randomly selected sequence is the same as the sequence length of the mixed element information.
[0160] In one or more possible embodiments, the information processing device 110 in the embodiment of the present application may also include: a first generation module, used to generate a tag sequence according to the first position of the text element in the mixed element information and the second position of the pinyin element in the mixed element information when the randomly selected sequence also includes a tag sequence.
[0161] In yet another one or more possible embodiments, the first determination module 1103 can be specifically used to, when the feature sequence also includes a second pinyin feature, input the randomly selected sequence and the marked sequence into a natural language processing deep learning model, and determine, through the natural language processing deep learning model, from a preset text set a second text feature and a second pinyin feature corresponding to the first pinyin feature, to obtain a character feature sequence output from the natural language processing deep learning model.
[0162] In one or more possible embodiments, the information processing device 110 in the embodiment of the present application may further include: a screening module, a first splicing module and a second determining module; wherein,
[0163] A screening module, used to screen a target text feature that meets a preset condition from the matching value between the first text feature and the second text feature of the randomly selected sequence;
[0164] The first concatenation module is used to concatenate target text features to obtain a recall sequence;
[0165] A second determination module is used to determine the recall text features in the recall sequence whose matching values are less than or equal to the target threshold;
[0166] The text information corresponding to the recalled text features is used as the text information of the input sentence for cyclic recall;
[0167] When the number of cyclic recalls meets the preset number, the recalled text features in the recall sequence corresponding to the preset number are determined as target text features;
[0168] Among them, the cyclic recall includes the following steps:
[0169] Converting the text information and the pinyin information into a randomly selected sequence, wherein the randomly selected sequence includes a first text feature and a first pinyin feature;
[0170] Determine, from a preset text set, a character feature sequence corresponding to the first pinyin feature, the character feature sequence including the second text feature;
[0171] Calculate the matching value between the first text feature and the second text feature of the randomly selected sequence.
[0172] In one or more possible embodiments, the information processing device 110 in the embodiment of the present application may further include: a second splicing module, configured to splice text features whose matching values between the first text feature and the second text feature of the randomly selected sequence do not meet a preset condition, to obtain a similarity sequence;
[0173] The calculation module 1104 may also be used to calculate a target threshold based on the quartiles of the similarity sequence.
[0174] Therefore, after the user enters the text, the combination of text and pinyin can be used as a means to identify the erroneous text, so as to modify the identified erroneous text and automatically correct the erroneous text, so that the user does not need to delete the erroneous text and re-enter the information, thereby reducing the user's deletion and re-entry operations and improving the efficiency of information entry.
[0175] In combination with specific scenarios, such as medical scenarios, the present application provides a medical text information correction device corresponding to the medical text information correction method involved above. Figure 8 Provide detailed explanation.
[0176] Fig.12 It is a schematic diagram showing the structure of a medical text information correction device according to an embodiment.
[0177] like Fig.12 As shown, the medical text information correction device 120 is applied to Figure 1 or Figure 2 In the electronic device shown, the information processing device 120 may specifically include:
[0178] The acquisition module 1201 is used to acquire the pinyin information of the medical sentence when receiving the text information of the medical sentence input by the user;
[0179] A conversion module 1202, configured to convert text information and pinyin information into a randomly selected sequence, wherein the randomly selected sequence includes a first text feature and a first pinyin feature;
[0180] A first determination module 1203 is used to determine a character feature sequence corresponding to the first pinyin feature from a preset medical text set, where the character feature sequence includes a second text feature;
[0181] A calculation module 1204, used to calculate a matching value between a first text feature and a second text feature of a randomly selected sequence;
[0182] The acquisition module 1201 is also used to acquire target text features according to target matching values that meet preset conditions in the matching values;
[0183] The display module 1205 is used to replace the text information of the medical statement entered by the user with the revised text information when the revised text information corresponding to the target text feature does not match the text information of the medical statement.
[0184] Therefore, when the user enters medical text through the Pinyin input method, the combination of text and Pinyin can be used as a means to identify erroneous text, so that the identified erroneously entered medical text can be modified, and the erroneous medical text can be automatically corrected, so that users such as medical personnel do not need to manually delete erroneously entered text or re-enter the information, thereby reducing the operations of medical personnel deleting and re-entering information, improving the efficiency of information entry, and providing input optimization for the medical profession.
[0185] Fig.13 FIG. 4 is a schematic diagram showing the hardware structure of a computer device according to an embodiment.
[0186] like Fig.13 As shown, the computer device 1300 includes an input device 1301 , an input interface 1302 , a processor 1303 , a memory 1304 , an output interface 1305 , and an output device 1306 .
[0187] The input interface 1302, the processor 1303, the memory 1304, and the output interface 1305 are connected to each other through the bus 1310, and the input device 1301 and the output device 1306 are connected to the bus 1310 through the input interface 1302 and the output interface 1305, respectively, and then connected to other components of the computer device 1300. Specifically, the input device 1301 receives input information from the outside, and transmits the input information to the processor 1303 through the input interface 1302; the processor 1303 processes the input information based on the computer executable instructions stored in the memory 1304 to generate output information, temporarily or permanently stores the output information in the memory 1304, and then transmits the output information to the output device 1306 through the output interface 1305; the output device 1306 outputs the output information to the outside of the computer device 1300 for use by the user.
[0188] In one embodiment, Fig.13 The computer device 1300 shown may be implemented as an information processing device, which may include: a memory configured to store a program; and a processor configured to run the program stored in the memory to execute the information processing method described in the above embodiment.
[0189] In one embodiment, the memory can also be used to store text information and pinyin information of the input sentence and the combination of the above Figures 1 to 10 The calculation results of each step in the described information processing and medical text information correction process. As an example, the calculation results at least include: the conversion result of the text information and the pinyin information conversion is the randomly selected sequence, the character feature sequence corresponding to the first pinyin feature is determined from the preset text set, the matching value of the first text feature and the second text feature of the randomly selected sequence, and the corrected text information corresponding to the target text feature.
[0190] According to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer-readable storage medium. For example, an embodiment of the present application includes a computer-readable storage medium, which includes storing a program or instruction on the computer-readable storage medium, and when the program or instruction is executed by a computer device, the computer device performs the steps of the above method.
[0191] According to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network, and / or installed from a removable storage medium.
[0192] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions, and when it is run on a computer, the computer executes the method described in each of the above embodiments. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrations. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state drive), etc.
[0193] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0194] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. An information processing method, comprising: Get the text information and pinyin information of the input sentence; Converting the text information and the pinyin information into a randomly selected sequence, wherein the randomly selected sequence includes a first text feature and a first pinyin feature; Determine, from a preset text set, a character feature sequence corresponding to the first pinyin feature, wherein the character feature sequence includes a second text feature; Calculating a matching value between the first text feature and the second text feature of the randomly selected sequence; Acquire target text features according to target matching values that meet preset conditions among the matching values; In the case where the revised text information corresponding to the target text feature does not match the text information of the input sentence, the text information is replaced with the revised text information.
2. The method according to claim 1, wherein: The step of obtaining text information and pinyin information of the input sentence includes: Acquire an input sentence, wherein the input sentence includes at least one character; Determine the character category of each character in the at least one character respectively, wherein the character category includes a text character category and an English character category; In the case where the character category of the character is the text character category, determining the character as the text information, and determining the pinyin of the character as the pinyin information; When the character category of the character is the English character category, the target pinyin matched by the character is determined as the pinyin information, and the text corresponding to the target pinyin is determined as the text information, wherein the target pinyin is a pinyin whose number of digits of initial consonants and finals concatenated for the character meets a preset number of digits.
3. The method according to claim 1 or 2, wherein: The converting the text information and the pinyin information into a randomly selected sequence comprises: Alternately concatenate each text element in the text information and each phonetic element in the phonetic information to obtain mixed element information; The mixed element information is converted into a randomly selected sequence, wherein the sequence length of the randomly selected sequence is the same as the sequence length of the mixed element information.
4. The method according to claim 3, wherein: The randomly selected sequence also includes a tag sequence; before converting the mixed element information into the randomly selected sequence, the method also includes: The tag sequence is generated according to the first position of the text element in the mixed element information and the second position of the pinyin element in the mixed element information.
5. The method according to claim 4, wherein: The character feature sequence also includes a second pinyin feature; The step of determining a character feature sequence corresponding to the first pinyin feature from a preset text set includes: The randomly selected sequence and the marked sequence are input into a natural language processing deep learning model. Through the natural language processing deep learning model, the second text feature and the second pinyin feature corresponding to the first pinyin feature are determined from a preset text set to obtain the character feature sequence output from the natural language processing deep learning model.
6. The method according to claim 1, wherein: The step of obtaining target text features according to a target matching value that satisfies a preset condition among the matching values includes: Selecting a target text feature that meets a preset condition from the matching values of the first text feature and the second text feature of the randomly selected sequence; splicing the target text features to obtain a recall sequence; Determining the recalled text features in the recalled sequence whose matching values are less than or equal to a target threshold; Using the text information corresponding to the recalled text feature as the text information of the input sentence for cyclic recall; When the number of cyclic recalls meets a preset number, the recalled text features in the recall sequence corresponding to the preset number are determined as target text features; The cyclic recall includes the following steps: Converting the text information and the pinyin information into a randomly selected sequence, wherein the randomly selected sequence includes a first text feature and a first pinyin feature; Determine, from a preset text set, a character feature sequence corresponding to the first pinyin feature, wherein the character feature sequence includes a second text feature; Calculate the matching value between the first text feature and the second text feature of the randomly selected sequence.
7. The method according to claim 6, wherein: Before determining the recalled text features in the recalled sequence whose matching values are less than or equal to the target threshold, the method further includes: splicing the text features whose matching values between the first text feature and the second text feature of the randomly selected sequence do not satisfy the preset condition to obtain a similarity sequence; The target threshold is calculated based on the quartiles of the similarity sequence.
8. A method for correcting medical text information, comprising: Upon receiving text information of a medical statement input by a user, obtaining pinyin information of the medical statement; Converting the text information and the pinyin information into a randomly selected sequence, wherein the randomly selected sequence includes a first text feature and a first pinyin feature; Determine, from a preset medical text set, a character feature sequence corresponding to the first pinyin feature, wherein the character feature sequence includes a second text feature; Calculating a matching value between the first text feature and the second text feature of the randomly selected sequence; Acquire target text features according to target matching values that meet preset conditions among the matching values; When the revised text information corresponding to the target text feature does not match the text information of the medical statement, the text information of the medical statement entered by the user is replaced and displayed with the revised text information.
9. An information processing device, comprising: The acquisition module is used to obtain the text information and pinyin information of the input sentence; A conversion module, used for converting the text information and the pinyin information into a randomly selected sequence, wherein the randomly selected sequence includes a first text feature and a first pinyin feature; A first determination module, configured to determine a character feature sequence corresponding to the first pinyin feature from a preset text set, wherein the character feature sequence includes a second text feature; A calculation module, used for calculating a matching value between the first text feature and the second text feature of the randomly selected sequence; The acquisition module is also used to acquire target text features according to target matching values that meet preset conditions among the matching values; The replacement module is used to replace the text information with the revised text information when the revised text information corresponding to the target text feature does not match the text information of the input sentence.
10. A computer device comprising: Memory and processor, The memory is used to store a computer program; The processor is used to execute the computer program stored in the memory, and when the computer program is run, the processor executes the steps of the information processing method according to any one of claims 1 to 7.
11. A computer-readable storage medium storing a program or instruction, wherein when the program or instruction is executed by a computer device, the computer device executes the steps of the information processing method according to any one of claims 1 to 7.
12. A computer program product, comprising a computer program, which enables a computer device to execute the steps of the information processing method according to any one of claims 1 to 7 when the computer program is executed by the computer device.
Citation Information
Patent Citations
Text word-segmentation method and system
CN103942190A
Voice scoring method and device, computer device and storage medium
CN109461459A
