Correction result acquisition method and device, equipment and storage medium

The pre-trained model calculates the confusion based on visual, pinyin and semantic features and automatically corrects the sentences, solving the problems of cumbersome and inefficient sentence correction in the prior art, and achieving efficient and reliable calibration results.

CN119180278APending Publication Date: 2024-12-24PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411181169.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

The process of obtaining the correction results of sentences in the prior art is cumbersome, resulting in inefficiency and susceptible to human intervention.

Method used

Pre-trained model training based on preset visual features, pinyin features and semantic features is used to determine the correction results of sentences by calculating the confusion, reducing manual intervention and improving efficiency.

Benefits of technology

The correction results are not required to be manually acquired, which significantly reduces the correction time and improves the acquisition efficiency and reliability of the correction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119180278A_ABST
    Figure CN119180278A_ABST
Patent Text Reader

Abstract

The invention relates to the field of artificial intelligence and financial science and technology, and discloses a correction result obtaining method, device and equipment and a storage medium, the method comprises the steps of obtaining a current sentence of a current text, obtaining a current wrong word in the current sentence, obtaining a first confusion degree according to the current wrong word and a trained first pre-training model, and obtaining a correction result according to the first confusion degree; obtaining a second confusion degree according to the current wrong word and a trained second pre-training model, and obtaining a third confusion degree according to the current wrong word and a trained third pre-training model; according to the current sentence and a preset obtaining mode, a fourth confusion degree, a fifth confusion degree and a sixth confusion degree are obtained, and according to the minimum value of the first confusion degree, the second confusion degree, the third confusion degree, the fourth confusion degree, the fifth confusion degree and the sixth confusion degree, a correction result of the current sentence is determined. The method is beneficial for improving the acquisition efficiency of the correction result of the current sentence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of artificial intelligence and financial technology, and in particular to a correction result acquisition method, device, equipment and storage medium. Background Art

[0002] Sentences are the basic unit of information transmission. Whether it is oral communication or written expression, the accuracy and standardization of sentences directly affect whether the information can be accurately and clearly conveyed to readers. The result of sentence correction can reduce errors or ambiguities in sentences, help readers better understand the meaning of sentences, and promote effective communication.

[0003] However, the existing process of obtaining the correction result of the current sentence is cumbersome, which is not conducive to improving the efficiency of obtaining the correction result. The reason is that the existing technology mainly adopts a manual acquisition method to obtain the correction result of the current sentence, and the manual acquisition method consumes a lot of human resources and time resources, increases the time to obtain the correction result of the current sentence, and is easily affected by human intervention. Therefore, it is not conducive to improving the efficiency of obtaining the correction result. Summary of the invention

[0004] The present invention provides a correction result acquisition method, device, computer equipment and storage medium to solve the technical problem that the existing process of acquiring the correction result of the current sentence is cumbersome and is not conducive to improving the efficiency of acquiring the correction result.

[0005] In a first aspect, a method for obtaining a correction result is provided, comprising:

[0006] Obtain a preset sentence of a preset text, obtain a preset wrong word in the preset sentence, and obtain a preset correct word, a preset visual feature, a preset pinyin feature, and a preset semantic feature corresponding to the preset wrong word;

[0007] Based on the preset visual features, training a preset first pre-trained model, and acquiring the trained first pre-trained model;

[0008] Based on the preset pinyin features, training a preset second pre-trained model, and obtaining the trained second pre-trained model;

[0009] Based on the preset visual features, training a preset third pre-trained model, and obtaining the trained third pre-trained model;

[0010] Obtain a current sentence of a current text, obtain a current wrong word in the current sentence, obtain a first perplexity according to the current wrong word and the first trained pre-trained model, obtain a second perplexity according to the current wrong word and the second trained pre-trained model, and obtain a third perplexity according to the current wrong word and the third trained pre-trained model;

[0011] According to the current sentence and a preset acquisition method, a fourth perplexity, a fifth perplexity, and a sixth perplexity are obtained, and a correction result of the current sentence is determined according to a minimum value among the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity.

[0012] Furthermore, the step of training a preset first pre-trained model based on the preset visual features and obtaining the trained first pre-trained model includes:

[0013] Inputting the preset visual feature into a preset first pre-trained model, obtaining a first word and a first prediction probability output by the first pre-trained model based on the preset visual feature, wherein the first prediction probability indicates a probability that the first word is predicted to be the preset correct word;

[0014] Obtain a first loss value between the first predicted probability and the true probability, take reducing the first loss value as a first goal, train the first pre-trained model, and when the reduction amplitude of the first loss value is less than a preset amplitude, output the trained first pre-trained model.

[0015] Furthermore, the step of training a preset second pre-training model based on the preset pinyin feature and obtaining the trained second pre-training model includes:

[0016] Inputting the preset pinyin feature into a preset second pre-training model, obtaining a second word and a second prediction probability output by the second pre-training model based on the preset pinyin feature, wherein the second prediction probability indicates a probability that the second word is predicted to be the preset correct word;

[0017] Obtain a second loss value between the second predicted probability and the true probability, take reducing the second loss value as a second goal, train the second pre-trained model, and when the reduction of the second loss value is less than a preset range, output the trained second pre-trained model.

[0018] Furthermore, the step of training a preset third pre-trained model based on the preset visual features and acquiring the trained third pre-trained model includes:

[0019] Inputting the preset semantic feature into a preset third pre-training model, obtaining a third word and a third prediction probability output by the third pre-training model based on the preset semantic feature, wherein the third prediction probability indicates a probability that the third word is predicted to be the preset correct word;

[0020] Obtain a third loss value between the third predicted probability and the true probability, and train the third pre-trained model to reduce the third loss value as a third target. When the reduction amplitude of the third loss value is less than a preset amplitude, output the trained third pre-trained model.

[0021] Further, the method of obtaining a current sentence of a current text, obtaining a current wrong word in the current sentence, obtaining a first perplexity according to the current wrong word and the first trained pre-trained model, obtaining a second perplexity according to the current wrong word and the second trained pre-trained model, and obtaining a third perplexity according to the current wrong word and the third trained pre-trained model includes:

[0022] Acquire a current sentence of a current text, acquire a current wrong word in the current sentence, perform feature extraction on the character shape of the current wrong word, generate a current visual feature corresponding to the current wrong word, perform feature extraction on the pinyin of the current wrong word, generate a current pinyin feature corresponding to the current wrong word, perform feature extraction on the semantic information of the current wrong word, and generate a current semantic feature corresponding to the current wrong word;

[0023] A first perplexity is obtained based on the current visual features and the first pre-trained model after training, a second perplexity is obtained based on the current pinyin features and the second pre-trained model after training, and a third perplexity is obtained based on the current semantic features and the third pre-trained model after training.

[0024] Further, the obtaining, according to the current sentence and a preset obtaining method, a fourth perplexity, a fifth perplexity, and a sixth perplexity, and determining a correction result of the current sentence according to a minimum value among the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity, includes:

[0025] The perplexity of the first pre-trained model after training on the current sentence is set to a fourth perplexity, the perplexity of the second pre-trained model after training on the current sentence is set to a fifth perplexity, and the perplexity of the third pre-trained model after training on the current sentence is set to a sixth perplexity;

[0026] A correction result of the current sentence is determined according to a minimum value among the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity.

[0027] Further, after obtaining the fourth perplexity, the fifth perplexity, and the sixth perplexity according to the current sentence and the preset acquisition method, and determining the correction result of the current sentence according to the minimum value of the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity, the correction result acquisition method includes:

[0028] A preset storage area is obtained, and the correction result of the current sentence is stored in the storage area.

[0029] In a second aspect, a correction result acquisition device is provided, comprising:

[0030] A first acquisition module is used to acquire a preset sentence of a preset text, acquire a preset wrong word in the preset sentence, and acquire a preset correct word, a preset visual feature, a preset pinyin feature, and a preset semantic feature corresponding to the preset wrong word;

[0031] A first training module, used for training a preset first pre-training model based on the preset visual features, and obtaining the trained first pre-training model;

[0032] A second training module is used to train a preset second pre-training model based on the preset pinyin feature, and obtain the trained second pre-training model;

[0033] A third training module, used for training a preset third pre-training model based on the preset visual features, and obtaining the trained third pre-training model;

[0034] A second acquisition module is used to acquire a current sentence of a current text, acquire a current wrong word in the current sentence, acquire a first perplexity according to the current wrong word and the first trained pre-trained model, acquire a second perplexity according to the current wrong word and the second trained pre-trained model, and acquire a third perplexity according to the current wrong word and the third trained pre-trained model;

[0035] A determination module is used to obtain a fourth perplexity, a fifth perplexity, and a sixth perplexity according to the current sentence and a preset acquisition method, and determine a correction result of the current sentence according to a minimum value among the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity.

[0036] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the correction result acquisition method when executing the computer program.

[0037] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned correction result acquisition method are implemented.

[0038] The present application provides a correction result acquisition method, apparatus, computer equipment and storage medium, which obtain a preset sentence of a preset text, obtain a preset wrong word in the preset sentence, obtain a preset correct word, a preset visual feature, a preset pinyin feature, and a preset semantic feature corresponding to the preset wrong word; based on the preset visual feature, train a preset first pre-trained model to obtain the trained first pre-trained model; based on the preset pinyin feature, train a preset second pre-trained model to obtain the trained second pre-trained model; based on the preset visual feature, train a preset third pre-trained model to obtain the trained third pre-trained model; obtain a current sentence of the current text, obtain a current wrong word in the current sentence, obtain a first perplexity based on the current wrong word and the trained first pre-trained model, obtain a second perplexity based on the current wrong word and the trained second pre-trained model, and obtain a second perplexity based on the current wrong word and the trained third pre-trained model. , obtain the third perplexity; according to the current sentence and the preset acquisition method, obtain the fourth perplexity, the fifth perplexity, and the sixth perplexity, and determine the correction result of the current sentence according to the minimum value of the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity. The beneficial effects are in two aspects. On the one hand, according to the current sentence and the preset acquisition method, obtain the fourth perplexity, the fifth perplexity, and the sixth perplexity, and determine the correction result of the current sentence according to the minimum value of the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity. Since no manual acquisition is required, the acquisition time of the correction result of the current sentence is reduced, which is beneficial to improving the acquisition efficiency of the correction result of the current sentence; on the other hand, it will not be affected by human intervention, so it is beneficial to improve the reliability of the obtained correction result of the current sentence. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0040] Figure 1 is a schematic diagram of an application environment of a method for obtaining a correction result in an embodiment of the present invention;

[0041] Figure 2 A schematic diagram of a flow chart of a method for obtaining a correction result provided by an embodiment of the present invention;

[0042] Figure 3 yes Figure 1 A schematic flow chart of a specific implementation of step S23;

[0043] Figure 4 yes Figure 1 A schematic flow chart of a specific implementation of step S25;

[0044] Figure 5 yes Figure 1 A schematic flow chart of a specific implementation of step S26;

[0045] Figure 6 is a structural schematic diagram of a correction result acquisition device in one embodiment of the present invention;

[0046] Figure 7 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;

[0047] Figure 8 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] See also Figure 1 , Figure 1 is a schematic diagram of an application environment of a correction result acquisition method according to an embodiment of the present invention. The correction result acquisition method provided by the embodiment of the present invention can be applied in Figure 1 In an application environment, a client communicates with a server through a network.

[0050] The server obtains a preset sentence of a preset text through the client, obtains a preset wrong word in the preset sentence, and obtains a preset correct word, a preset visual feature, a preset pinyin feature, and a preset semantic feature corresponding to the preset wrong word;

[0051] Based on the preset visual features, training a preset first pre-trained model, and acquiring the trained first pre-trained model;

[0052] Based on the preset pinyin features, training a preset second pre-trained model, and obtaining the trained second pre-trained model;

[0053] Based on the preset visual features, training a preset third pre-trained model, and obtaining the trained third pre-trained model;

[0054] Obtain a current sentence of a current text, obtain a current wrong word in the current sentence, obtain a first perplexity according to the current wrong word and the first trained pre-trained model, obtain a second perplexity according to the current wrong word and the second trained pre-trained model, and obtain a third perplexity according to the current wrong word and the third trained pre-trained model;

[0055] According to the current sentence and a preset acquisition method, a fourth perplexity, a fifth perplexity, and a sixth perplexity are obtained, and a correction result of the current sentence is determined according to a minimum value among the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity.

[0056] In the scheme implemented by the correction result acquisition method, device, equipment and medium mentioned above, the beneficial effects are in two aspects. On the one hand, according to the current sentence and the preset acquisition method, the fourth perplexity, the fifth perplexity and the sixth perplexity are acquired, and the correction result of the current sentence is determined according to the minimum value of the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity and the sixth perplexity. Since no manual acquisition is required, the acquisition time of the correction result of the current sentence is reduced, which is conducive to improving the acquisition efficiency of the correction result of the current sentence. On the other hand, it will not be affected by human intervention, which is conducive to improving the reliability of the correction result of the current sentence.

[0057] The client may include but is not limited to various personal computers, laptops, smart phones, tablet computers, and portable wearable devices.

[0058] The server can be implemented with an independent task database or a task database cluster composed of multiple task databases. The present invention is described in detail below through specific embodiments.

[0059] See also Figure 2 , Figure 2 A flowchart of a method for obtaining a calibration result provided by an embodiment of the present invention includes the following steps:

[0060] S21, obtaining a preset sentence of a preset text, obtaining a preset wrong word in the preset sentence, and obtaining a preset correct word, a preset visual feature, a preset pinyin feature, and a preset semantic feature corresponding to the preset wrong word;

[0061] Among them, the preset sentence is a preset wrong sentence.

[0062] The preset visual features are visual features of preset wrong words.

[0063] The preset pinyin feature is the pinyin feature of the preset wrong word;

[0064] The preset semantic feature is a semantic feature of a preset wrong word.

[0065] Exemplarily, obtaining a preset sentence of a preset text, obtaining a preset wrong word in the preset sentence, and obtaining a preset correct word, a preset visual feature, a preset pinyin feature, and a preset semantic feature corresponding to the preset wrong word include:

[0066] Obtaining a preset sentence of a preset text, and obtaining a preset wrong word in the preset sentence;

[0067] Extracting features of the character shapes of the preset wrong words to generate preset visual features corresponding to the preset wrong words;

[0068] Extracting features of the pinyin of the preset wrong word to generate preset pinyin features corresponding to the preset wrong word;

[0069] Feature extraction is performed on the semantic information of the preset wrong word to generate a preset semantic feature corresponding to the preset wrong word.

[0070] S22, training a preset first pre-trained model based on the preset visual features, and acquiring the trained first pre-trained model;

[0071] The step of training a preset first pre-trained model based on the preset visual features and obtaining the trained first pre-trained model includes:

[0072] Inputting the preset visual feature into a preset first pre-trained model, obtaining a first word and a first prediction probability output by the first pre-trained model based on the preset visual feature, wherein the first prediction probability indicates a probability that the first word is predicted to be the preset correct word;

[0073] Obtain a first loss value between the first predicted probability and the true probability, take reducing the first loss value as a first goal, train the first pre-trained model, and when the reduction amplitude of the first loss value is less than a preset amplitude, output the trained first pre-trained model.

[0074] Among them, a first loss value between the first predicted probability and the true probability is obtained through a cross entropy loss function.

[0075] S23, training a preset second pre-training model based on the preset pinyin feature, and obtaining the trained second pre-training model;

[0076] S24, training a preset third pre-trained model based on the preset visual features, and acquiring the trained third pre-trained model;

[0077] The step of training a preset third pre-trained model based on the preset visual features and obtaining the trained third pre-trained model includes:

[0078] Inputting the preset semantic feature into a preset third pre-training model, obtaining a third word and a third prediction probability output by the third pre-training model based on the preset semantic feature, wherein the third prediction probability indicates a probability that the third word is predicted to be the preset correct word;

[0079] Obtain a third loss value between the third predicted probability and the true probability, and train the third pre-trained model to reduce the third loss value as a third target. When the reduction amplitude of the third loss value is less than a preset amplitude, output the trained third pre-trained model.

[0080] Among them, a third loss value between the third predicted probability and the true probability is obtained through the cross entropy loss function.

[0081] S25, obtaining a current sentence of the current text, obtaining a current wrong word in the current sentence, obtaining a first perplexity according to the current wrong word and the first trained pre-trained model, obtaining a second perplexity according to the current wrong word and the second trained pre-trained model, and obtaining a third perplexity according to the current wrong word and the third trained pre-trained model;

[0082] Among them, the current text includes the text of insurance services and the text of financial services. Because the text of insurance services and the text of financial services involve a large amount of personal information and service terms, the accuracy of this information is directly related to the rights and interests of customers and the service quality of the company. Through the correction results, the errors or omissions in the text of insurance services and financial services during the transmission process can be reduced, which is conducive to improving the stability of the text of insurance services and financial services.

[0083] S26, obtaining a fourth perplexity, a fifth perplexity, and a sixth perplexity according to the current sentence and a preset acquisition method, and determining a correction result of the current sentence according to a minimum value among the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity.

[0084] Exemplarily, determining a correction result of the current sentence according to a minimum value among the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity includes:

[0085] Obtaining a minimum value among the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity;

[0086] When the minimum value is the first perplexity, selecting the first sentence as the correction result of the current sentence;

[0087] When the minimum value is the second perplexity, selecting the second sentence as the correction result of the current sentence;

[0088] When the minimum value is the third perplexity, the third sentence is selected as the correction result of the current sentence.

[0089] When the minimum value is one of the fourth perplexity, the fifth perplexity, and the sixth perplexity, the current sentence is retained and output.

[0090] Among them, by analyzing the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity, a stable correction effect can be provided for the current sentence.

[0091] For the sake of illustration, an example is given below:

[0092] For example: The current sentence is: Don’t be sad, my mother and I will come to see you soon.

[0093] The first sentence is: Don’t be sad, my mother and I will come to see you often.

[0094] The second sentence is: Don’t be sad, my mother and I are always here to see you.

[0095] The third sentence is: Don’t be sad, my mother and I will come to see you soon.

[0096] When the minimum value is the first perplexity, the first sentence is selected as the correction result of the current sentence. At this time, the correction result of the current sentence is: Don't be sad, my mother and I will come to see you often.

[0097] Wherein, after obtaining the fourth perplexity, the fifth perplexity, and the sixth perplexity according to the current sentence and the preset acquisition method, and determining the correction result of the current sentence according to the minimum value of the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity, the correction result acquisition method includes:

[0098] A preset storage area is obtained, and the correction result of the current sentence is stored in the storage area.

[0099] In the embodiment of the present invention, the beneficial effects lie in two aspects. On the one hand, according to the current sentence and a preset acquisition method, the fourth perplexity, the fifth perplexity, and the sixth perplexity are acquired. According to the minimum value of the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity, the correction result of the current sentence is determined. Since no manual acquisition is required, the acquisition time of the correction result of the current sentence is reduced, which is beneficial to improving the acquisition efficiency of the correction result of the current sentence. On the other hand, it will not be affected by human intervention, which is beneficial to improving the reliability of the correction result of the current sentence obtained.

[0100] See also Figure 3 , Figure 3 yes Figure 1 A specific implementation flow diagram of step S23 is described in detail as follows:

[0101] S31, inputting the preset pinyin feature into a preset second pre-training model, obtaining a second word and a second prediction probability output by the second pre-training model based on the preset pinyin feature, wherein the second prediction probability indicates a probability that the second word is predicted to be the preset correct word;

[0102] S32, obtaining a second loss value between the second predicted probability and the true probability, taking reducing the second loss value as a second goal, training the second pre-trained model, and when the reduction of the second loss value is less than a preset range, outputting the trained second pre-trained model.

[0103] Among them, a second loss value between the second predicted probability and the true probability is obtained through the cross entropy loss function.

[0104] In an embodiment of the present invention, the second pre-trained model after training is output, and when needed, the second pre-trained model after training is loaded without re-training, which can reduce the training cost.

[0105] See also Figure 4 , Figure 4 yes Figure 1A specific implementation flow diagram of step S25 is described in detail as follows:

[0106] S41, obtaining a current sentence of a current text, obtaining a current wrong word in the current sentence, performing feature extraction on the character shape of the current wrong word, generating a current visual feature corresponding to the current wrong word, performing feature extraction on the pinyin of the current wrong word, generating a current pinyin feature corresponding to the current wrong word, performing feature extraction on the semantic information of the current wrong word, generating a current semantic feature corresponding to the current wrong word;

[0107] Among them, the current sentence is the current wrong sentence.

[0108] Among them, the current visual feature is the visual feature of the current wrong word.

[0109] Among them, the current pinyin feature is the pinyin feature of the current wrong word;

[0110] Among them, the current semantic feature is the semantic feature of the current wrong word.

[0111] S42, obtaining a first perplexity according to the current visual feature and the first pre-trained model after training, obtaining a second perplexity according to the current pinyin feature and the second pre-trained model after training, and obtaining a third perplexity according to the current semantic feature and the third pre-trained model after training.

[0112] Exemplarily, the obtaining of a first perplexity according to the current visual feature and the first pre-trained model after training, the obtaining of a second perplexity according to the current phonetic feature and the second pre-trained model after training, and the obtaining of a third perplexity according to the current semantic feature and the third pre-trained model after training include:

[0113] Input the current visual feature into the first pre-trained model after training, obtain a fourth word output by the first pre-trained model after training based on the current visual feature, use the fourth word to replace the current wrong word, set the current sentence with the fourth word as the first sentence, and set the perplexity of the first pre-trained model after training on the first sentence to the first perplexity;

[0114] Input the current pinyin feature into the trained second pre-trained model, obtain the fifth word output by the trained second pre-trained model based on the current pinyin feature, use the fifth word to replace the current wrong word, set the current sentence with the fifth word as the second sentence, and set the perplexity of the trained second pre-trained model on the second sentence as the second perplexity;

[0115] Input the current semantic feature into the trained third pre-trained model, obtain the sixth word output by the trained third pre-trained model based on the current semantic feature, use the sixth word to replace the current wrong word, set the current sentence with the sixth word to the third sentence, and set the perplexity of the trained third pre-trained model on the third sentence to the third perplexity.

[0116] In the embodiment of the present invention, the quality of the first sentence is evaluated by the first perplexity, the quality of the second sentence is evaluated by the second perplexity, and the quality of the third sentence is evaluated by the third perplexity, so that the qualities of the first sentence, the second sentence, and the third perplexity can be intuitively compared.

[0117] See also Figure 5 , Figure 5 yes Figure 1 A specific implementation flow diagram of step S26 is described in detail as follows:

[0118] S51, setting the perplexity of the first pre-trained model after training on the current sentence to a fourth perplexity, setting the perplexity of the second pre-trained model after training on the current sentence to a fifth perplexity, and setting the perplexity of the third pre-trained model after training on the current sentence to a sixth perplexity;

[0119] S52: Determine a correction result of the current sentence according to a minimum value among the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity.

[0120] In an embodiment of the present invention, the correction result of the current sentence is determined based on the minimum value of the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity. Since manual acquisition is not required, the acquisition time of the correction result of the current sentence is reduced, which is beneficial to improving the efficiency of acquiring the correction result of the current sentence.

[0121] See also Figure 6 , Figure 6 FIG. 1 is a schematic diagram of a correction result acquisition device according to an embodiment of the present invention. Figure 6 As shown, the correction result acquisition device includes a first acquisition module 101, a first training module 102, a second training module 103, a third training module 104, a second acquisition module 105, and a determination module 106. The functional modules are described in detail as follows:

[0122] The first acquisition module 101 is used to acquire a preset sentence of a preset text, acquire a preset wrong word in the preset sentence, and acquire a preset correct word, a preset visual feature, a preset pinyin feature, and a preset semantic feature corresponding to the preset wrong word;

[0123] A first training module 102 is used to train a preset first pre-training model based on the preset visual features, and obtain the trained first pre-training model;

[0124] A second training module 103 is used to train a preset second pre-training model based on the preset pinyin feature, and obtain the trained second pre-training model;

[0125] A third training module 104 is used to train a preset third pre-training model based on the preset visual features, and obtain the trained third pre-training model;

[0126] A second acquisition module 105 is used to acquire a current sentence of a current text, acquire a current wrong word in the current sentence, acquire a first perplexity according to the current wrong word and the first trained pre-trained model, acquire a second perplexity according to the current wrong word and the second trained pre-trained model, and acquire a third perplexity according to the current wrong word and the third trained pre-trained model;

[0127] The determination module 106 is used to obtain the fourth perplexity, the fifth perplexity, and the sixth perplexity according to the current sentence and a preset acquisition method, and determine the correction result of the current sentence according to the minimum value of the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity.

[0128] In one embodiment, the first training module 102 includes:

[0129] A first input subunit is used to input the preset visual feature into a preset first pre-trained model, and obtain a first word and a first prediction probability output by the first pre-trained model based on the preset visual feature, wherein the first prediction probability indicates a probability that the first word is predicted to be the preset correct word;

[0130] The first training subunit is used to obtain a first loss value between the first predicted probability and the true probability, to reduce the first loss value as a first goal, to train the first pre-trained model, and when the reduction range of the first loss value is less than a preset range, to output the trained first pre-trained model.

[0131] In one embodiment, the second training module 103 includes:

[0132] A second input subunit is used to input the preset pinyin feature into a preset second pre-training model, and obtain a second word and a second prediction probability output by the second pre-training model based on the preset pinyin feature, wherein the second prediction probability indicates the probability that the second word is predicted to be the preset correct word;

[0133] The second training subunit is used to obtain a second loss value between the second predicted probability and the true probability, to reduce the second loss value as a second goal, to train the second pre-trained model, and when the reduction of the second loss value is less than a preset range, to output the trained second pre-trained model.

[0134] In one embodiment, the third training module 104 includes:

[0135] A third input subunit, configured to input the preset semantic feature into a preset third pre-training model, and obtain a third word and a third prediction probability output by the third pre-training model based on the preset semantic feature, wherein the third prediction probability indicates a probability that the third word is predicted to be the preset correct word;

[0136] The third training subunit is used to obtain a third loss value between the third predicted probability and the true probability, to reduce the third loss value as a third target, to train the third pre-trained model, and when the reduction amplitude of the third loss value is less than a preset amplitude, to output the trained third pre-trained model.

[0137] In one embodiment, the second acquisition module 105 includes:

[0138] An extraction subunit is used to obtain a current sentence of a current text, obtain a current wrong word in the current sentence, perform feature extraction on the character shape of the current wrong word, generate a current visual feature corresponding to the current wrong word, perform feature extraction on the pinyin of the current wrong word, generate a current pinyin feature corresponding to the current wrong word, perform feature extraction on the semantic information of the current wrong word, and generate a current semantic feature corresponding to the current wrong word;

[0139] An acquisition subunit is used to acquire a first perplexity based on the current visual feature and the first pre-trained model after training, to acquire a second perplexity based on the current phonetic feature and the second pre-trained model after training, and to acquire a third perplexity based on the current semantic feature and the third pre-trained model after training.

[0140] In one embodiment, the determining module 106 includes:

[0141] A setting subunit, configured to set the perplexity of the first pre-trained model after training on the current sentence to a fourth perplexity, set the perplexity of the second pre-trained model after training on the current sentence to a fifth perplexity, and set the perplexity of the third pre-trained model after training on the current sentence to a sixth perplexity;

[0142] A determination subunit is used to determine a correction result of the current sentence according to a minimum value among the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity.

[0143] In one embodiment, the correction result acquisition device further includes:

[0144] The storage module is used to obtain a preset storage area and store the correction result of the current sentence in the storage area.

[0145] In the embodiment of the present invention, the beneficial effects lie in two aspects. On the one hand, according to the current sentence and a preset acquisition method, the fourth perplexity, the fifth perplexity, and the sixth perplexity are acquired. According to the minimum value of the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity, the correction result of the current sentence is determined. Since no manual acquisition is required, the acquisition time of the correction result of the current sentence is reduced, which is beneficial to improving the acquisition efficiency of the correction result of the current sentence. On the other hand, it will not be affected by human intervention, which is beneficial to improving the reliability of the correction result of the current sentence obtained.

[0146] For the specific limitations of the correction result acquisition device, please refer to the limitations of the correction result acquisition method above, which will not be repeated here.

[0147] Each module in the correction result acquisition device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0148] See also Figure 7 , Figure 7 is a schematic diagram of a computer device in one embodiment of the present invention. In one embodiment, a computer device is provided. The computer device may be a server. The internal structure diagram thereof may be as shown in FIG. Figure 7 The computer device includes a processor, a memory, a network interface and a database connected through a system bus.

[0149] The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, the functions or steps of a correction result acquisition method on the server side are realized.

[0150] See also Figure 8 , Figure 8 is another structural diagram of a computer device in one embodiment of the present invention. In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external task database through a network connection. When the computer program is executed by the processor, the functions or steps of a correction result acquisition method are realized.

[0151] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor.

[0152] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0153] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0154] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A method for obtaining a correction result, characterized in that: include: Obtain a preset sentence of a preset text, obtain a preset wrong word in the preset sentence, and obtain a preset correct word, a preset visual feature, a preset pinyin feature, and a preset semantic feature corresponding to the preset wrong word; Based on the preset visual features, training a preset first pre-trained model, and acquiring the trained first pre-trained model; Based on the preset pinyin features, training a preset second pre-trained model, and obtaining the trained second pre-trained model; Based on the preset visual features, training a preset third pre-trained model, and obtaining the trained third pre-trained model; Obtain a current sentence of a current text, obtain a current wrong word in the current sentence, obtain a first perplexity according to the current wrong word and the first trained pre-trained model, obtain a second perplexity according to the current wrong word and the second trained pre-trained model, and obtain a third perplexity according to the current wrong word and the third trained pre-trained model; According to the current sentence and a preset acquisition method, a fourth perplexity, a fifth perplexity, and a sixth perplexity are obtained, and a correction result of the current sentence is determined according to a minimum value among the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity.

2. The method for obtaining the correction result according to claim 1, characterized in that: The step of training a preset first pre-trained model based on the preset visual features and acquiring the trained first pre-trained model includes: Inputting the preset visual feature into a preset first pre-trained model, obtaining a first word and a first prediction probability output by the first pre-trained model based on the preset visual feature, wherein the first prediction probability indicates a probability that the first word is predicted to be the preset correct word; Obtain a first loss value between the first predicted probability and the true probability, take reducing the first loss value as a first goal, train the first pre-trained model, and when the reduction amplitude of the first loss value is less than a preset amplitude, output the trained first pre-trained model.

3. The method for obtaining the correction result according to claim 1, characterized in that: Based on the preset pinyin feature, Training a preset second pre-trained model and obtaining the trained second pre-trained model includes: Inputting the preset pinyin feature into a preset second pre-training model, obtaining a second word and a second prediction probability output by the second pre-training model based on the preset pinyin feature, wherein the second prediction probability indicates a probability that the second word is predicted to be the preset correct word; Obtain a second loss value between the second predicted probability and the true probability, take reducing the second loss value as a second goal, train the second pre-trained model, and when the reduction of the second loss value is less than a preset range, output the trained second pre-trained model.

4. The method for obtaining the correction result according to claim 1, characterized in that: The step of training a preset third pre-trained model based on the preset visual features and acquiring the trained third pre-trained model comprises: Inputting the preset semantic feature into a preset third pre-training model, obtaining a third word and a third prediction probability output by the third pre-training model based on the preset semantic feature, wherein the third prediction probability indicates a probability that the third word is predicted to be the preset correct word; Obtain a third loss value between the third predicted probability and the true probability, and train the third pre-trained model to reduce the third loss value as a third target. When the reduction amplitude of the third loss value is less than a preset amplitude, output the trained third pre-trained model.

5. The method for obtaining the correction result according to claim 1, characterized in that: The method of obtaining a current sentence of a current text, obtaining a current wrong word in the current sentence, obtaining a first perplexity according to the current wrong word and the first trained pre-trained model, obtaining a second perplexity according to the current wrong word and the second trained pre-trained model, and obtaining a third perplexity according to the current wrong word and the third trained pre-trained model includes: Obtaining a current sentence of a current text, obtaining a current wrong word in the current sentence, performing feature extraction on the character shape of the current wrong word, generating a current visual feature corresponding to the current wrong word, performing feature extraction on the pinyin of the current wrong word, generating a current pinyin feature corresponding to the current wrong word, performing feature extraction on the semantic information of the current wrong word, generating a current semantic feature corresponding to the current wrong word; A first perplexity is obtained based on the current visual features and the first pre-trained model after training, a second perplexity is obtained based on the current pinyin features and the second pre-trained model after training, and a third perplexity is obtained based on the current semantic features and the third pre-trained model after training.

6. The method for obtaining the correction result according to claim 1, characterized in that: The method of acquiring a fourth perplexity, a fifth perplexity, and a sixth perplexity according to the current sentence and a preset acquisition method, and determining a correction result of the current sentence according to a minimum value among the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity, includes: The perplexity of the first pre-trained model after training on the current sentence is set to a fourth perplexity, the perplexity of the second pre-trained model after training on the current sentence is set to a fifth perplexity, and the perplexity of the third pre-trained model after training on the current sentence is set to a sixth perplexity; A correction result of the current sentence is determined according to a minimum value among the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity.

7. The method for obtaining the correction result according to any one of claims 1 to 6, characterized in that: After obtaining the fourth perplexity, the fifth perplexity, and the sixth perplexity according to the current sentence and the preset acquisition method, and determining the correction result of the current sentence according to the minimum value of the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity, the correction result acquisition method includes: A preset storage area is obtained, and the correction result of the current sentence is stored in the storage area.

8. A correction result acquisition device, characterized in that: include: A first acquisition module is used to acquire a preset sentence of a preset text, acquire a preset wrong word in the preset sentence, and acquire a preset correct word, a preset visual feature, a preset pinyin feature, and a preset semantic feature corresponding to the preset wrong word; A first training module, used for training a preset first pre-training model based on the preset visual features, and obtaining the trained first pre-training model; A second training module is used to train a preset second pre-training model based on the preset pinyin feature, and obtain the trained second pre-training model; A third training module, used for training a preset third pre-training model based on the preset visual features, and obtaining the trained third pre-training model; A second acquisition module is used to acquire a current sentence of a current text, acquire a current wrong word in the current sentence, acquire a first perplexity according to the current wrong word and the first trained pre-trained model, acquire a second perplexity according to the current wrong word and the second trained pre-trained model, and acquire a third perplexity according to the current wrong word and the third trained pre-trained model; A determination module is used to obtain a fourth perplexity, a fifth perplexity, and a sixth perplexity according to the current sentence and a preset acquisition method, and determine a correction result of the current sentence according to a minimum value among the first perplexity, the second perplexity, the third perplexity, the fourth perplexity, the fifth perplexity, and the sixth perplexity.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the correction result acquisition method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the correction result acquisition method according to any one of claims 1 to 7 are implemented.