Text error correction method, text error correction device, electronic equipment and medium

By combining text error correction methods with pronunciation, shape and semantic characteristics, the problem of low text error correction accuracy in financial institutions is solved, and the accurate identification of customer intentions is achieved.

CN119294385AActive Publication Date: 2025-01-10PING AN TECH (SHENZHEN) CO LTD

Patent Information

Application Number
CN202411328798.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-01-10
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

The methods used in text error correction in financial institutions are of low accuracy, which affects the accurate understanding of customer intentions.

Method used

Using text error correction methods combining pronunciation features, glyph features and semantic features, the target text is detected and corrected through pre-trained text error detection model and error correction model, and the sub-model model and glyph feature extraction sub-extracting Model and semantic feature extraction submodels perform feature extraction and text prediction is performed based on error correction submodels.

Benefits of technology

Improve the accuracy of text error correction, reduce miscorrection, and ensure accurate identification of customer intentions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119294385A_ABST
    Figure CN119294385A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a text error correction method, a text error correction device, electronic equipment and a medium, and belongs to the technical field of financial science and technology. The method comprises the following steps: inputting a target text into a text error detection model for text error detection to obtain text marking data, wherein the text marking data is used for marking correct characters and error characters in text characters; inputting the target text into a text error correction model based on the text marking data; extracting text character and pronunciation features of the text characters based on a character and pronunciation feature extraction sub-model; extracting text font features based on the font feature extraction sub-model, wherein the text font features comprise first mask features of error characters; extracting text semantic features based on the semantic feature extraction sub-model, wherein the text font features comprise second mask features of error characters; and performing text prediction on the text character pronunciation features, the text font features and the text semantic features based on the error correction sub-model to obtain a target error correction text. According to the embodiment of the invention, the error correction accuracy of the text can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology, and in particular to a text correction method and text correction device, electronic equipment and medium. Background Art

[0002] In financial institutions such as banks and insurance companies, a large amount of natural language interaction with customers is usually required, and a large amount of interactive text is generated. These interactive texts can be texts generated by translating conversational speech through automatic speech recognition (ASR) technology, or they can be texts entered by customers through the keyboard. Due to the influence of some subjective and objective factors, the generated text cannot be guaranteed to be completely correct, that is, the generated text may contain some text errors. However, text errors have an impact on accurately understanding the customer's intentions, so text error correction is particularly important. The text error correction method adopted by related technologies usually considers the semantic information of the text to realize text error correction, but the error correction accuracy of this method is low. Therefore, how to improve the accuracy of text error correction and avoid the influence of erroneous text on customer intention recognition has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a text correction method and a text correction device, an electronic device and a medium, aiming to improve the accuracy of text correction and avoid the influence of erroneous text on customer intention recognition.

[0004] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application provides a text error correction method, the method comprising: obtaining a target text, the target text comprising text characters;

[0005] Inputting the target text into a pre-trained text error detection model to perform text error detection to obtain text marking data, wherein the text marking data is used to mark correct characters or incorrect characters in the text characters;

[0006] Inputting the target text into a pre-trained text error correction model based on the text tag data, the text error correction model comprising a phonetic feature extraction sub-model, a glyph feature extraction sub-model, a semantic feature extraction sub-model and an error correction sub-model;

[0007] Extracting phonetic features of the target text based on the phonetic feature extraction sub-model to obtain text phonetic features of the text characters;

[0008] Extracting glyph features of the target text based on the glyph feature extraction sub-model to obtain text glyph features, wherein the text glyph features include a first mask feature, and the first mask feature is a glyph feature of the erroneous character;

[0009] Extracting semantic features of the target text based on the semantic feature extraction sub-model to obtain text semantic features, wherein the text glyph features include second mask features, and the second mask features are semantic features of the erroneous characters;

[0010] Based on the error correction sub-model, text prediction is performed on the text phonetic features, the text glyph features and the text semantic features to obtain a target error correction text.

[0011] In some embodiments, the text markup data includes a character error mark, and the character error mark is used to indicate the erroneous character; and inputting the target text into a pre-trained text error correction model based on the text markup data includes:

[0012] Performing character replacement on the target text based on the character error mark to obtain replacement text; the replacement text is used to represent that the text characters corresponding to the character error mark in the target text are replaced with text after a preset mask;

[0013] The target text is updated according to the replacement text, and the updated target text is input into the text error correction model.

[0014] In some embodiments, the glyph feature extraction submodel includes a character vectorization layer, a first convolutional layer, a first pooling layer, and a first fully connected layer, and the glyph feature extraction of the target text based on the glyph feature extraction submodel to obtain the text glyph features includes:

[0015] Performing character vectorization on the correct characters in the target text based on the character vectorization layer to obtain character image features;

[0016] Performing character vectorization on the preset mask based on the character vectorization layer to obtain the first mask feature;

[0017] Performing convolution processing on the character image feature based on the first convolution layer to obtain a character convolution feature;

[0018] Performing pooling processing on the character convolutional features based on the first pooling layer to obtain character pooling features;

[0019] Based on the first fully connected layer, feature fusion is performed on the character pooling features to obtain character glyph features;

[0020] The character glyph feature and the first mask feature are subjected to feature fusion based on a preset feature size to obtain the text glyph feature.

[0021] In some embodiments, the performing character vectorization on the correct characters in the target text based on the character vectorization layer to obtain character image features includes:

[0022] Performing text style extraction on the target text to obtain text style data;

[0023] Determining a first preset font and a second preset font based on the text style data;

[0024] Performing character vectorization on the correct characters in the target text based on the first preset font to obtain a first character image sub-feature;

[0025] Performing character vectorization on the correct characters in the target text based on the second preset font to obtain second character image sub-features;

[0026] The first character image sub-feature and the second character image sub-feature are subjected to feature fusion to obtain the character image feature.

[0027] In some embodiments, the semantic feature extraction sub-model includes an embedding layer and an encoding layer, and the step of extracting semantic features from the target text based on the semantic feature extraction sub-model to obtain text semantic features includes:

[0028] Performing semantic vectorization on the correct characters in the target text based on the embedding layer to obtain character semantic features;

[0029] Performing semantic vectorization on the preset mask in the target text based on the embedding layer to obtain a second mask feature;

[0030] The character semantic feature and the second mask feature are feature encoded based on the encoding layer to obtain the text semantic feature.

[0031] In some embodiments, the pronunciation feature extraction submodel includes a pinyin conversion layer, a second convolutional layer, a second pooling layer, and a second fully connected layer, and the pronunciation feature extraction of the target text based on the pronunciation feature extraction submodel to obtain the text pronunciation feature includes:

[0032] Performing pinyin conversion on the target text based on the pinyin conversion layer to obtain text pinyin, wherein the text pinyin includes a character pinyin sequence and a character tone mark;

[0033] Based on the second convolutional layer, convolution processing is performed on the character pinyin sequence and the character tone mark to obtain a character phonetic convolution feature;

[0034] Based on the second pooling layer, the pronunciation convolution feature is pooled to obtain a pronunciation pooled feature;

[0035] The pronunciation pooling features are subjected to feature fusion based on the second fully connected layer to obtain the text pronunciation features.

[0036] In some embodiments, the error correction sub-model includes a feature fusion layer and a prediction layer, and the text prediction is performed on the text phonetic features, the text glyph features, and the text semantic features based on the error correction sub-model to obtain a target error correction text, including:

[0037] Based on the feature fusion layer, the text phonetic feature, the text glyph feature and the text semantic feature are fused to obtain the target text feature;

[0038] The target text feature is predicted based on the prediction layer to obtain the target error-corrected text.

[0039] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a text error correction device, the device comprising:

[0040] An acquisition module, used for acquiring a target text, wherein the target text includes text characters;

[0041] An error detection module is used to input the target text into a pre-trained text error detection model to perform text error detection to obtain text marking data, wherein the text marking data is used to mark correct characters and incorrect characters in the text characters;

[0042] An input module, used for inputting the target text into a pre-trained text error correction model based on the text markup data, wherein the text error correction model includes a phonetic feature extraction sub-model, a glyph feature extraction sub-model, a semantic feature extraction sub-model and an error correction sub-model;

[0043] A pronunciation extraction module, used for extracting pronunciation features of the target text based on the pronunciation feature extraction sub-model to obtain text pronunciation features of the text characters;

[0044] A glyph extraction module, configured to extract glyph features of the target text based on the glyph feature extraction sub-model to obtain text glyph features, wherein the text glyph features include a first mask feature, and the first mask feature is a glyph feature of the erroneous character;

[0045] A semantic extraction module, configured to extract semantic features of the target text based on the semantic feature extraction sub-model to obtain text semantic features, wherein the text glyph features include a second mask feature, and the second mask feature is a semantic feature of the erroneous character;

[0046] The prediction module is used to perform text prediction on the text phonetic features, the text glyph features and the text semantic features based on the error correction sub-model to obtain a target error correction text.

[0047] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the text correction method described in the first aspect when executing the computer program.

[0048] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the text error correction method described in the first aspect is implemented.

[0049] The present application proposes a text error correction method and a text error correction device, an electronic device and a medium, which obtain a target text, wherein the target text includes text characters; input the target text into a pre-trained text error detection model for text error detection to obtain text tagging data, wherein the text tagging data is used to tag correct characters and erroneous characters in the text characters; further, based on the text tagging data, the target text is input into a pre-trained text error correction model, wherein the text error correction model includes a phonetic feature extraction sub-model, a glyph feature extraction sub-model, a semantic feature extraction sub-model and an error correction sub-model; based on the phonetic feature extraction sub-model, the target text is corrected and the glyph feature extraction sub-model is extracted; The text is subjected to pronunciation feature extraction to obtain the text pronunciation feature of the text characters; the target text is subjected to glyph feature extraction based on the glyph feature extraction submodel to obtain the text glyph feature, the text glyph feature includes a first mask feature, and the first mask feature is the glyph feature of the wrong character; the target text is subjected to semantic feature extraction based on the semantic feature extraction submodel to obtain the text semantic feature, the text glyph feature includes a second mask feature, and the second mask feature is the semantic feature of the wrong character; the text pronunciation feature, the text glyph feature and the text semantic feature are subjected to text prediction based on the error correction submodel to obtain the target error correction text. In the embodiment of the present application, the target text can be subjected to text error detection in the text error detection model first to mark the correct characters and the wrong characters in the text characters, and then the target text can be input into the pre-trained text error correction model for text error correction based on the text marking data, so that the wrong characters can be corrected more accurately and the situation of being wrongly corrected can be reduced. Therefore, the present application can effectively improve the accuracy of error correction of the text and avoid the influence of the wrong text on the recognition of customer intentions. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is a flow chart of a text error correction method provided by an embodiment of the present application;

[0051] Figure 2It is a schematic diagram of a model structure for implementing text error correction provided by an embodiment of the present application;

[0052] Figure 3 yes Figure 1 A flowchart of step S130 in FIG.

[0053] Figure 4 yes Figure 1 A flowchart of step S140 in FIG.

[0054] Figure 5 yes Figure 1 A flowchart of step S150 in FIG.

[0055] Figure 6 yes Figure 5 A flowchart of step S510 in FIG.

[0056] Figure 7 yes Figure 1 A flowchart of step S160 in FIG.

[0057] Figure 8 yes Figure 1 A flowchart of step S170 in FIG.

[0058] Fig. 9 It is a structural schematic diagram of a text error correction device provided in an embodiment of the present application;

[0059] Fig.10 It is a hardware structure diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is 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 used to explain the present application and are not used to limit the present application.

[0061] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0063] First, some nouns involved in this application are analyzed:

[0064] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0065] Normalized exponential (Softmax function): compresses a K-dimensional vector containing arbitrary real numbers into another K-dimensional vector so that each element ranges between (0,1) and the sum of all elements is 1.

[0066] Token: A token or mark. In computer science and network security, a "token" usually refers to a token used for authentication or authorization.

[0067] In financial institutions such as banks and insurance companies, a large amount of natural language interaction with customers is usually required, and a large amount of interactive text is generated. These interactive texts can be texts generated by translating conversational speech through automatic speech recognition (ASR) technology, or texts entered by customers through keyboards. Due to the influence of some subjective and objective factors, the generated text cannot be guaranteed to be completely correct, that is, the generated text may contain some text errors. However, text errors have an impact on accurately understanding the customer's intentions, so text error correction is particularly important. The text error correction method adopted by related technologies usually considers the semantic information of the text to realize text error correction, but the error correction accuracy of this method is low. Therefore, how to improve the accuracy of text error correction and avoid the influence of erroneous text on customer intention recognition has become a technical problem that needs to be solved urgently.

[0068] Based on this, the embodiments of the present application provide a text correction method and a text correction device, an electronic device and a medium, which can improve the accuracy of selecting maintenance objects based on claim orders, thereby selecting the object that is most suitable for performing maintenance operations on the claim orders.

[0069] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0070] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0071] The text error correction method provided in the embodiment of the present application relates to the field of artificial intelligence technology. The text error correction method provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server side, and can also be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDN) and cloud servers that provide basic cloud computing services such as big data and artificial intelligence platforms; the software can be an application that implements the text error correction method, etc., but is not limited to the above forms.

[0072] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0073] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on the interactive text communicated with the customer, customer attribute information, customer identity information and other data related to the identity or characteristics of the object, the permission or consent of the object will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. In addition, when the embodiment of the present application needs to obtain the sensitive personal information of the object, the separate permission or separate consent of the object will be obtained through a pop-up window or jump to a confirmation page. After clearly obtaining the separate permission or separate consent of the object, the necessary object-related data for the normal operation of the embodiment of the present application will be obtained.

[0074] See also Figure 1 , Figure 1 is an optional flow chart of the text error correction method provided by the embodiment of the present application. In some embodiments, Figure 1 The method may include but is not limited to steps S110 to S170:

[0075] Step S110, obtaining the target text;

[0076] Step S120, inputting the target text into a pre-trained text error detection model to perform text error detection to obtain text label data;

[0077] Step S130, inputting the target text into a pre-trained text error correction model based on the text tag data;

[0078] Step S140, extracting phonetic features of the target text based on the phonetic feature extraction sub-model to obtain text phonetic features of the text characters;

[0079] Step S150, extracting font features of the target text based on the font feature extraction sub-model to obtain font features of the text;

[0080] Step S160, extracting semantic features of the target text based on the semantic feature extraction sub-model to obtain text semantic features;

[0081] Step S1170, performing text prediction on the text phonetic features, text glyph features and text semantic features based on the error correction sub-model to obtain a target error correction text.

[0082] In steps S110 to S170 of some embodiments, compared to the related art, only the semantic information of the text is considered to realize text error correction, while the phonetic features and glyph features of the Chinese text are ignored, or even if they are considered, the accuracy of text error correction is not enough. However, the embodiment of the present application can first perform text error detection on the target text in the text error detection model to mark the correct characters and incorrect characters in the text characters, and then input the target text into the pre-trained text error correction model based on the text marking data for text error correction, which can more accurately correct the incorrect characters and reduce the situation of being corrected by mistake. Therefore, the present application can effectively improve the accuracy of text error correction and avoid the influence of incorrect text on customer intent recognition.

[0083] In step S110 of some embodiments, the target text refers to the text that needs to be corrected. The target text can be the text generated by translating the conversation speech through ASR technology, or it can be the text entered by the customer through the keyboard, or it can be the text entered by the operation object that needs to be corrected, without limitation. The target text includes text characters. For example, if the target text is "Today's weather is good", then the corresponding text characters include "today", "day", "weather", "air", "diagnosis", and "good".

[0084] In step S120 of some embodiments, after obtaining the target text, the target text can be first input into a pre-trained text error detection model for text error detection to obtain text tag data. The text error detection model is used to detect possible erroneous characters in the target text and perform corresponding processing on the possible erroneous characters to reduce the interference of erroneous characters on text prediction in subsequent prediction processes and improve the accuracy of error correction. Among them, the text error detection model of the present application can be a model built based on the BERT model structure, without limitation.

[0085] It should be noted that the text tag data output by the text error detection model is used to mark the correct characters or incorrect characters in the text characters, and the tag data includes a character error tag and a character correct tag, the character error tag is used to indicate the incorrect character in the target text, and the character correct tag is used to indicate the correct character in the target text. Among them, the text tag data can be a tag string containing the character tag corresponding to each text character. For example, the target text is "Today's weather is good", the target text is input into the text error detection model, and the output text tag data is "0 0 0 0 1 0", wherein "0" represents the correct character tag, and "1" represents the incorrect character tag, and 0 and 1 can correspond to a text character respectively. In this way, it can be determined that the correct characters in the target text include "today", "day", "weather", "air", "good", and the incorrect characters include "diagnosis".

[0086] It should be noted that the text error detection model includes a text encoding layer, a normalization layer, and an output layer. The target text is input into the pre-trained text error detection model for text error detection to obtain text labeling data, which may specifically include: character encoding processing of the target text based on the text encoding layer to obtain character encoding features; normalization processing of the character encoding features based on the normalization layer to obtain character prediction probabilities; label mapping of the character prediction probabilities based on the output layer to obtain text labeling data. Among them, the text encoding layer can be a layer constructed based on the BERT model structure, and the text content is encoded by BERT to obtain the token corresponding to each text character, and the normalization layer and the output layer can predict the token corresponding to the input text character to obtain the probability of each token error. The place with a high probability is a possible wrong token, and the place with a low probability is a correct token. In this way, the character label corresponding to each text character can be determined according to the set probability threshold.

[0087] In step S130 of some embodiments, the text error correction model refers to a model for correcting erroneous characters in the target text to output the corrected text. Based on this, after determining the target text and the text tag data corresponding to the target text, the target text can be input into the pre-trained text error correction model based on the text tag data.

[0088] In some embodiments, see Figure 2 , Figure 2It is a schematic diagram of a model structure for realizing text error correction provided by an embodiment of the present application. The model for realizing the text error correction method of the present application includes a text error detection model 210 and a text error correction model 220. The text error correction model 220 includes a pronunciation feature extraction sub-model 221, a glyph feature extraction sub-model 222, a semantic feature extraction sub-model 223, and an error correction sub-model 224. Among them, the pronunciation feature extraction sub-model 221 refers to a model for extracting the pronunciation features in the target text. By extracting the pronunciation of text characters, the present application can take into account words with similar pronunciations but different meanings. For example, "qing lang" in "The weather is qing lang" should be "qing lang", and the pronunciation feature extraction sub-model 221 usually relies on features such as phoneme information and pinyin similarity to identify possible incorrect characters. The glyph feature extraction sub-model 222 refers to a model for extracting the glyph features in the target text. By extracting the glyphs of text characters, the present application can focus more on identifying and correcting errors with similar glyphs, such as "gao liang" should be "gao liang". The semantic feature extraction sub-model 223 refers to a model for extracting the deep semantic features in the target text. The semantic feature extraction sub-model 223 can utilize word embeddings, context information, etc. to understand the meaning of the text, extract deep semantic information from the text, so as to more accurately judge and correct errors. The error correction sub-model 224 is the core of the entire text error correction model 220, which can integrate the features of the previous layers and determine and correct the errors in the text through specific algorithms. This process may involve steps such as candidate word generation, probability scoring, and final selection. Based on this, the present application greatly improves the accuracy of error correction by integrating the text error detection model 210 and the text error correction model 220, and considering the character-related features from multiple dimensions in the text error correction model 220, that is, pronunciation features, glyph features, and semantic features, and by making full use of the advantages of various features.

[0089] In some embodiments, please refer to Figure 3 , Figure 3 It is an alternative flowchart of step S130 provided by an embodiment of the present application. Among them, this step S130 may specifically include steps S310 to S320:

[0090] Step S310, perform character replacement on the target text based on the character error mark to obtain a replacement text;

[0091] Step S320, update the target text according to the replacement text, and input the updated target text into the text error correction model.

[0092] In steps S310 to S320 of some embodiments, after obtaining the character error markers corresponding to the target text, the error characters marked as corresponding to the character error markers in the target text can be character-replaced to obtain a replacement text, and the replacement text is used to represent the text after replacing the text characters corresponding to the character error markers in the target text with a preset mask. Further, the replacement text can be input into the text error correction model as the new target text, that is, the text with the error detection error identifier (i.e., the preset mask corresponding to the character error marker) is used to obtain the accurate text after error correction. For example, if the target text is "Today's weather is good", after inputting the target text into the text error detection model, it can be determined that the correct characters in the target text include "今", "天", "天", "气", "好", and the error character includes "诊". If the preset mask is [mask], the text characters corresponding to the character error markers can be replaced with the preset mask. At this time, the replacement text is "Today's weather [mask] good".

[0093] In step S140 of some embodiments, when the updated target text is input into the text error correction model, the text pronunciation features of the text characters can be extracted from the target text based on the pronunciation feature extraction sub-model. The text pronunciation features at this time include the pronunciation features of all text characters. The pronunciation feature extraction sub-model includes a pinyin conversion layer, a second convolutional layer, a second pooling layer, and a second fully connected layer.

[0094] In some embodiments, please refer to Figure 4 , Figure 4 which is an optional flowchart of step S140 provided by the embodiments of the present application. Specifically, the step S140 may include steps S410 to S440:

[0095] Step S410, perform pinyin conversion on the target text based on the pinyin conversion layer to obtain text pinyin;

[0096] Step S420, perform convolution processing on the character pinyin sequence and the character tone markers based on the second convolutional layer to obtain pronunciation convolution features;

[0097] Step S430, perform pooling processing on the pronunciation convolution features based on the second pooling layer to obtain pronunciation pooling features;

[0098] Step S440, perform feature fusion on the pronunciation pooling features based on the second fully connected layer to obtain text pronunciation features.

[0099] In step S410 of some embodiments, the pinyin conversion layer is used to convert each text character into pinyin. The text pinyin after pinyin conversion includes a character pinyin sequence and a character tone mark. The character pinyin sequence represents the pinyin corresponding to the text character and can be composed of Roman characters; the character tone mark represents the tone corresponding to the text character. There are four types of tones. Special marks can be used to represent each tone, and the tone can occupy 4 tokens, which are arranged behind the character pinyin sequence. In addition, special marks can be set according to actual needs without limitation.

[0100] In step S420 of some embodiments, after obtaining the character pinyin sequence and character tone mark corresponding to each text character, the character pinyin sequence and the character tone mark can be convoluted based on the second convolutional layer to obtain the character phonetic convolution feature of the target text. The second convolutional layer can be based on a structure constructed by a convolutional neural network (CNN), which is responsible for extracting features from the input data. The second convolutional layer can work by sliding a series of small weight matrices (called convolution kernels or filters) on the input character pinyin sequence and character tone mark, calculating the dot product of these weight matrices and the input data, and generating a feature map, i.e., the character phonetic convolution feature.

[0101] In step S430 of some embodiments, after convolution using a CNN convolutional network, a pooling layer can be used for further processing, that is, the phonetic convolution features are pooled based on the second pooling layer to obtain phonetic pooled features. Pooling can be used to reduce the spatial size of the feature map, reduce the amount of calculation, and prevent overfitting. The pooling layer works by downsampling each small area of ​​the input feature map. This process involves sliding a window across the feature map and extracting a single representative value from each window, such as a maximum value or an average value. The pooling layer may include a maximum pooling layer and a mean pooling layer, and the first pooling layer of the present application may be a maximum pooling layer.

[0102] In step S440 of some embodiments, further, the character pronunciation pooling features can be fused based on the second fully connected layer to obtain text character pronunciation features. The fully connected layer can be used to convert the extracted features into the final output results. Among them, each neuron in the fully connected layer is connected to all neurons in the previous layer to achieve the integration and reorganization of features. This layer captures the intrinsic connections and patterns between features by weighted summation, laying the foundation for further data analysis and processing.

[0103] In step S150 of some embodiments, the updated target text is input into the text error correction model, and the glyph features of the target text can be extracted based on the glyph feature extraction sub-model to obtain text glyph features. The text glyph features include glyph features corresponding to the correct characters and a first mask feature, and the first mask feature is the glyph feature of the incorrect character. In other words, when the glyph feature extraction sub-model extracts glyph features, it will vectorize the preset mask in the target text into the first mask feature, so that the model can accurately predict the character corresponding to the first mask feature in the subsequent prediction. The glyph feature extraction sub-model includes a character vectorization layer, a first convolutional layer, a first pooling layer, and a first fully connected layer.

[0104] In some embodiments, see Figure 5 , Figure 5 It is an optional flow chart of step S150 provided in the embodiment of the present application. Among them, step S150 may specifically include steps S510 to S560:

[0105] Step S510, performing character vectorization on the correct characters in the target text based on the character vectorization layer to obtain character image features;

[0106] Step S520, performing character vectorization on the preset mask based on the character vectorization layer to obtain a first mask feature;

[0107] Step S530, performing convolution processing on the character image features based on the first convolution layer to obtain character convolution features;

[0108] Step S540, performing pooling processing on the character convolutional features based on the first pooling layer to obtain character pooling features;

[0109] Step S550, performing feature fusion on the character pooling features based on the first fully connected layer to obtain character glyph features;

[0110] Step S560: Fusing the character glyph feature and the first mask feature based on a preset feature size to obtain a text glyph feature.

[0111] In steps S510 to S560 of some embodiments, in the glyph feature extraction submodel, the correct characters and the preset masks in the target text can be character vectorized based on the character vectorization layer to obtain the character image features corresponding to the correct characters and the first mask features corresponding to the preset mask. The character vectorization layer can vectorize each text character into a 24*24 graphic, that is, the size of the feature map corresponding to the vectorized character image features and the first mask features is the same, both of which are 24 rows and 24 columns. Further, the character glyph features are obtained by sequentially passing through the first convolutional layer, the first pooling layer and the first fully connected layer. The character glyph features refer to the glyph features corresponding to the correct characters in the target text. Further, the character glyph features and the first mask features are feature fused based on the preset feature size to obtain the text glyph features, that is, the glyph features corresponding to multiple text characters are spliced, and the spliced ​​features are adjusted based on the preset feature size to obtain the text glyph features of the preset feature size. In addition, the first convolutional layer, the first pooling layer and the first fully connected layer have been described in detail in the above-mentioned phonetic feature extraction sub-model, and the corresponding structures are the same, so they will not be repeated here.

[0112] It should be noted that step S560 may specifically include: performing feature splicing on the character glyph features and the first mask features in the order of characters in the target text to obtain initial glyph features; performing feature conversion on the initial glyph features based on a preset feature size to obtain text glyph features. The feature conversion of the initial glyph features by using a preset feature size is also to ensure that the obtained text glyph features can be the same size as the features output by the phonetic feature extraction submodel and the semantic feature extraction submodel, so as to facilitate the final feature fusion. Among them, the preset feature size can be a 576-dimensional feature. In this way, if the obtained character glyph features and the first mask features are both 24*24 features, they can be converted into 1 row and 576 columns, that is, 1*576 features.

[0113] In some embodiments, step S510 may specifically include extracting text style from the target text to obtain text style data; determining a first number of preset fonts based on the text style data; performing character vectorization on the correct characters in the target text based on each preset font to obtain a character image sub-feature; and performing feature fusion on the first number of character image sub-features to obtain a character image feature. The first number may be 2, 3, etc., without limitation.

[0114] In some embodiments, if the first number is 2, see Figure 6 , Figure 6 It is an optional flow chart of step S510 provided in the embodiment of the present application. Wherein, step S510 may specifically include steps S610 to S650:

[0115] Step S610, extracting the text style of the target text to obtain text style data;

[0116] Step S620, determining a first preset font and a second preset font based on the text style data;

[0117] Step S630, performing character vectorization on the correct characters in the target text based on the first preset font to obtain a first character image sub-feature;

[0118] Step S640, performing character vectorization on the correct characters in the target text based on the second preset font to obtain a second character image sub-feature;

[0119] Step S650: performing feature fusion on the first character image sub-feature and the second character image sub-feature to obtain a character image feature.

[0120] In step S610 and step S620 of some embodiments, the present application will consider different preset fonts when determining the character glyph features to consider the impact of different fonts on the character glyphs. Specifically, the corpus can be segmented, part-of-speech tagged, sentiment analyzed, etc. through natural language processing (NLP) technology to extract the text style of the target text and obtain text style data, which can represent the style of the text as a description of multiple dimensions such as elegance, formality, and liveliness. Further, the corresponding first preset font and second preset font can be determined based on the text style data corresponding to the target text. The first preset font and the second preset font are fonts selected to highlight the main style features of the text. For example, if the text style is elegant, an elegant serif font may be selected to adapt to different parts or different uses of the text. Among them, the first preset font can be Fangsong, Xingkai, Lishu, etc., which are not limited here.

[0121] In steps S630 to S650 of some embodiments, after determining the first preset font and the second preset font, character vectorization can be performed on the correct characters in the target text based on each preset font to obtain corresponding character image sub-features. Further, feature fusion can be performed on the first character image sub-feature and the second character image sub-feature to obtain character image features.

[0122] It should be noted that the present application can select more preset fonts according to actual needs, and is not limited to the above two, which will not be repeated here.

[0123] In the above embodiments, when extracting glyph features of text characters, the present application considers the influence of text style, text font and glyph size on feature extraction, so that text glyph features with richer features can be extracted.

[0124] In step S160 of some embodiments, the updated target text is input into the text error correction model, and semantic features of the target text can be extracted based on the semantic feature extraction sub-model to obtain text semantic features, wherein the text glyph features include a second mask feature, and the second mask feature is a semantic feature of the erroneous character. The semantic feature extraction sub-model includes an embedding layer and an encoding layer.

[0125] In some embodiments, see Figure 7 , Figure 7 It is an optional flow chart of step S160 provided in the embodiment of the present application. Among them, step S160 may specifically include steps S710 to S730:

[0126] Step S710, semantically vectorizing the correct characters in the target text based on the embedding layer to obtain character semantic features;

[0127] Step S720, semantically vectorizing the preset mask in the target text based on the embedding layer to obtain a second mask feature;

[0128] Step S730, performing feature encoding on the character semantic features and the second mask features based on the encoding layer to obtain text semantic features.

[0129] In steps S710 to S730 of some embodiments, the semantic feature extraction sub-model can be a model built based on the BERT network structure, and the preset mask and correct characters in the target text are semantically vectorized based on the embedding layer to obtain the second mask feature and the character semantic feature to convert the character into a vector representation, which can include vocabulary embedding, position embedding and segment embedding to ensure that the model can understand the semantics, position and sentence relationship of the word. Furthermore, the character semantic features and the second mask features are feature encoded based on the encoding layer to obtain the text semantic features. Among them, the encoding layer can be a multi-layer Transformer encoder, which is composed of multiple Transformer encoder layers stacked, and each encoder layer contains a self-attention mechanism and a feedforward neural network, allowing the model to capture complex dependencies in the input sequence.

[0130] In step S170 of some embodiments, further, based on the error correction sub-model, text prediction is performed on the text pronunciation features, text glyph features and text semantic features to obtain a target error correction text, which is the correct text after error correction. The error correction sub-model includes a feature fusion layer and a prediction layer, the feature fusion layer is used to perform feature fusion on the text pronunciation features, text glyph features and text semantic features, and the prediction layer is used to perform text prediction based on the fused features.

[0131] In some embodiments, see Figure 8 , Figure 8is an optional flow chart of step S170 provided in an embodiment of the present application. Wherein, step S170 may specifically include steps S810 to S820:

[0132] Step S810, performing feature fusion on the text phonetic features, text glyph features and text semantic features based on the feature fusion layer to obtain target text features;

[0133] Step S820, performing text prediction on the target text features based on the prediction layer to obtain a target error correction text.

[0134] In steps S810 to S820 of some embodiments, the present application may perform feature splicing of text phonetic features, text glyph features, and text semantic features, and pass the spliced ​​features through a fully connected layer to obtain target text features. Furthermore, the fused target text features may be input into a prediction layer built based on BERT, and the mask part may be predicted through the features of the text context to obtain the corrected target error-corrected text.

[0135] It should be noted that the non-Company software tools or components appearing in the embodiments of the present application are merely examples and do not represent actual use.

[0136] A text error correction method provided by an embodiment of the present application adopts a method of combining a text error detection model and a text error correction model, firstly performs text error detection on the target text in the text error detection model, and obtains a token that may be wrong by the text error detection model to reduce the miscorrection of the text error correction model. Furthermore, the features of the text error correction model adopt a method of integrating three features: phonetic features, glyph features, and semantic features, and learns the features of the text from multiple levels to achieve a better error correction effect. In addition, when the text error correction model extracts features, the text glyph features and the text semantic features use token features with masks, which reduces the impact of the wrong part on the model and can better correct errors, while the text pronunciation features maintain complete pinyin features, because in many cases the characters are wrong but the pronunciation is correct, so the pronunciation can bring a certain auxiliary effect to the error correction. Therefore, the present application can effectively improve the accuracy of text error correction and avoid the impact of erroneous text on customer intent recognition.

[0137] See also Fig. 9 The present application also provides a text error correction device, which can implement the above text error correction method, and the device includes:

[0138] An acquisition module 910 is used to acquire a target text, where the target text includes text characters;

[0139] The error detection module 920 is used to input the target text into a pre-trained text error detection model to perform text error detection and obtain text marking data, where the text marking data is used to mark correct characters and incorrect characters in the text characters;

[0140] An input module 930 is used to input the target text into a pre-trained text error correction model based on the text tag data, wherein the text error correction model includes a phonetic feature extraction sub-model, a glyph feature extraction sub-model, a semantic feature extraction sub-model and an error correction sub-model;

[0141] The pronunciation extraction module 940 is used to extract the pronunciation features of the target text based on the pronunciation feature extraction sub-model to obtain the text pronunciation features of the text characters;

[0142] A glyph extraction module 950 is used to extract glyph features of a target text based on a glyph feature extraction sub-model to obtain text glyph features, where the text glyph features include a first mask feature, where the first mask feature is a glyph feature of an erroneous character;

[0143] A semantic extraction module 960 is used to extract semantic features of the target text based on the semantic feature extraction sub-model to obtain text semantic features, where the text glyph features include a second mask feature, where the second mask feature is a semantic feature of an erroneous character;

[0144] The prediction module 970 is used to perform text prediction on the text phonetic features, text glyph features and text semantic features based on the error correction sub-model to obtain a target error correction text.

[0145] The specific implementation of the text correction device is basically the same as the specific implementation of the above-mentioned text correction method, and will not be repeated here.

[0146] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above text error correction method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0147] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0148] The processor 1010 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0149] The memory 1020 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1020 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1020, and the processor 1010 calls and executes the text error correction method of the embodiment of this application;

[0150] Input / output interface 1030, used to implement information input and output;

[0151] The communication interface 1040 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WI FI, Bluetooth, etc.);

[0152] Bus 1050 , which transmits information between various components of the device (e.g., processor 1010 , memory 1020 , input / output interface 1030 , and communication interface 1040 );

[0153] The processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 are connected to each other in communication within the device via a bus 1050 .

[0154] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned text error correction method is implemented.

[0155] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0156] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0157] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0158] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0159] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0160] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0161] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0162] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0163] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0164] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0165] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0166] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A text error correction method, characterized in that: The method comprises: Acquire a target text, wherein the target text includes text characters; Inputting the target text into a pre-trained text error detection model to perform text error detection, thereby obtaining text marking data, wherein the text marking data is used to mark correct characters and incorrect characters in the text characters; Inputting the target text into a pre-trained text error correction model based on the text tag data, the text error correction model comprising a phonetic feature extraction sub-model, a glyph feature extraction sub-model, a semantic feature extraction sub-model and an error correction sub-model; Extracting phonetic features of the target text based on the phonetic feature extraction sub-model to obtain text phonetic features of the text characters; Extracting glyph features of the target text based on the glyph feature extraction sub-model to obtain text glyph features, wherein the text glyph features include a first mask feature, and the first mask feature is a glyph feature of the erroneous character; Extracting semantic features of the target text based on the semantic feature extraction sub-model to obtain text semantic features, wherein the text glyph features include second mask features, and the second mask features are semantic features of the erroneous characters; Based on the error correction sub-model, text prediction is performed on the text phonetic features, the text glyph features and the text semantic features to obtain a target error correction text.

2. The method according to claim 1, characterized in that The text mark data includes a character error mark, and the character error mark is used to indicate the erroneous character; and inputting the target text into a pre-trained text error correction model based on the text mark data includes: Performing character replacement on the target text based on the character error mark to obtain replacement text; the replacement text is used to represent that the text characters corresponding to the character error mark in the target text are replaced with text after a preset mask; The target text is updated according to the replacement text, and the updated target text is input into the text error correction model.

3. The method according to claim 2, characterized in that The glyph feature extraction submodel includes a character vectorization layer, a first convolution layer, a first pooling layer and a first fully connected layer. The glyph feature extraction submodel is used to extract glyph features of the target text to obtain text glyph features, including: Performing character vectorization on the correct characters in the target text based on the character vectorization layer to obtain character image features; Performing character vectorization on the preset mask based on the character vectorization layer to obtain the first mask feature; Performing convolution processing on the character image feature based on the first convolution layer to obtain a character convolution feature; Performing pooling processing on the character convolutional features based on the first pooling layer to obtain character pooling features; Based on the first fully connected layer, feature fusion is performed on the character pooling features to obtain character glyph features; The character glyph feature and the first mask feature are subjected to feature fusion based on a preset feature size to obtain the text glyph feature.

4. The method according to claim 3, characterized in that The performing character vectorization on the correct characters in the target text based on the character vectorization layer to obtain character image features includes: Performing text style extraction on the target text to obtain text style data; Determining a first preset font and a second preset font based on the text style data; Performing character vectorization on the correct characters in the target text based on the first preset font to obtain a first character image sub-feature; Performing character vectorization on the correct characters in the target text based on the second preset font to obtain second character image sub-features; The first character image sub-feature and the second character image sub-feature are subjected to feature fusion to obtain the character image feature.

5. The method according to any one of claims 1 to 4, characterized in that The semantic feature extraction sub-model includes an embedding layer and an encoding layer. The semantic feature extraction sub-model is used to extract the semantic features of the target text to obtain the text semantic features, including: Performing semantic vectorization on the correct characters in the target text based on the embedding layer to obtain character semantic features; Performing semantic vectorization on the preset mask in the target text based on the embedding layer to obtain a second mask feature; The character semantic feature and the second mask feature are feature encoded based on the encoding layer to obtain the text semantic feature.

6. The method according to any one of claims 1 to 4, characterized in that The pronunciation feature extraction submodel includes a pinyin conversion layer, a second convolutional layer, a second pooling layer, and a second fully connected layer. The pronunciation feature extraction submodel is used to extract the pronunciation features of the target text to obtain the text pronunciation features, including: Performing pinyin conversion on the target text based on the pinyin conversion layer to obtain text pinyin, wherein the text pinyin includes a character pinyin sequence and a character tone mark; Based on the second convolutional layer, convolution processing is performed on the character pinyin sequence and the character tone mark to obtain a character phonetic convolution feature; Performing pooling processing on the character pronunciation convolution feature based on the second pooling layer to obtain a character pronunciation pooling feature; The pronunciation pooling features are subjected to feature fusion based on the second fully connected layer to obtain the text pronunciation features.

7. The method according to any one of claims 1 to 4, characterized in that The error correction sub-model includes a feature fusion layer and a prediction layer, and the text prediction is performed on the text phonetic features, the text glyph features and the text semantic features based on the error correction sub-model to obtain a target error correction text, including: Based on the feature fusion layer, the text phonetic feature, the text glyph feature and the text semantic feature are fused to obtain the target text feature; The target text feature is predicted based on the prediction layer to obtain the target error-corrected text.

8. A text error correction device, characterized in that: The device comprises: An acquisition module, used for acquiring a target text, wherein the target text includes text characters; An error detection module is used to input the target text into a pre-trained text error detection model to perform text error detection to obtain text marking data, wherein the text marking data is used to mark correct characters and incorrect characters in the text characters; An input module, used for inputting the target text into a pre-trained text error correction model based on the text markup data, wherein the text error correction model includes a phonetic feature extraction sub-model, a glyph feature extraction sub-model, a semantic feature extraction sub-model and an error correction sub-model; A pronunciation extraction module, used for extracting pronunciation features of the target text based on the pronunciation feature extraction sub-model to obtain text pronunciation features of the text characters; A glyph extraction module, configured to extract glyph features of the target text based on the glyph feature extraction sub-model to obtain text glyph features, wherein the text glyph features include a first mask feature, and the first mask feature is a glyph feature of the erroneous character; A semantic extraction module, configured to extract semantic features of the target text based on the semantic feature extraction sub-model to obtain text semantic features, wherein the text glyph features include a second mask feature, and the second mask feature is a semantic feature of the erroneous character; The prediction module is used to perform text prediction on the text phonetic features, the text glyph features and the text semantic features based on the error correction sub-model to obtain a target error correction text.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

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

Citation Information

Patent Citations

  • Error correction method and device, and computing equipment

    CN112784582A

  • Text error correction method, device and equipment and computer readable storage medium

    CN113988063A

  • Text error correction processing method and device, electronic equipment and readable storage medium

    CN116956932A

  • Text error correction processing method and device, equipment and storage medium

    CN117058679A

  • Deep learning-based Chinese spelling error correction method and system

    CN118278392A

Cited By

  • Unmanned aerial vehicle software information matching method, device and equipment and storage medium

    CN121681813A

  • An unmanned aerial vehicle software information matching method, device, equipment and storage medium

    CN121681813B