Text variable length error correction method, device, electronic device and storage medium

Training text data is generated through speech recognition and data enhancement processing, and a deep error correction model is trained, which solves the problem of low error correction accuracy with variable length text and achieves an efficient and automated error correction process.

CN113887200BActive Publication Date: 2024-09-27PING AN BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111147859.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-29
Publication Date
2024-09-27
Estimated Expiration
2041-09-29

AI Technical Summary

Technical Problem

The existing text variable length error correction method has low accuracy, high initial construction cost, high maintenance cost, low efficiency and accuracy, and takes a long time.

Method used

The original recording data is obtained through speech recognition, divided into text data of few-word and multi-word error types, data enhancement processing is performed respectively, and training text data is aggregated and trained to train a deep error correction model for error correction.

Benefits of technology

It improves the accuracy of text variable length error correction, reduces labor costs, shortens error correction time, and achieves automated and efficient error correction processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113887200B
    Figure CN113887200B
Patent Text Reader

Abstract

The present invention relates to artificial intelligence and digital medical technology, and discloses a text variable length error correction method, including: performing voice recognition on original recording data to obtain text data, by comparing the text data with a preset real text, dividing the text data into text data of a few-word error type and text data of a multi-word error type, respectively performing different data enhancements on the text data of the few-word error type and the text data of the multi-word error type, obtaining a first reconstructed text and a second reconstructed text, and summarizing to obtain training text data, using the training text data to train a deep error correction model to obtain a standard error correction model, and using the standard error correction model to perform error correction on the text to be corrected. In addition, the present invention also relates to blockchain technology, and text data can be stored in a node of the blockchain. The present invention also proposes a text variable length error correction device, an electronic device, and a storage medium. The present invention can improve the accuracy of text variable length error correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a text variable length error correction method, device, electronic device and computer-readable storage medium. Background Art

[0002] In the banking vertical field, many different banking business scenarios have accumulated a large number of business scenario recordings of manual seats or customers. The business side needs to perform quality inspection or analysis on the text content after voice recognition conversion of these recordings. The first step in quality inspection and analysis of business scenario recordings is to use voice recognition technology to convert the recordings into text. However, due to the complexity and diversity of the speaker's speaking style and accent in the recording, as well as the complexity and interference of the background sound when the speaker is speaking, all voice recognition technologies at this stage have the problem that the converted text content does not match the speaker's speech content in the original recording. Therefore, the text needs to be corrected.

[0003] At present, text error correction is generally performed by using text variable length correction. The text variable length correction refers to the correction of text whose length will change. At present, the solution for text variable length correction is usually to build and maintain a large dictionary corpus and then combine rules to perform text variable length correction. This method requires summarizing a large number of business rules, and the human cost investment in the initial construction is large, the cost of subsequent maintenance is high, the efficiency and accuracy of error correction are low, and the error correction takes a long time. Summary of the invention

[0004] The present invention provides a text variable length error correction method, device and computer readable storage medium, the main purpose of which is to solve the problem of low accuracy in text variable length error correction.

[0005] To achieve the above object, the present invention provides a text variable length error correction method, comprising:

[0006] Acquire original recording data, perform speech recognition on the original recording data, and obtain text data;

[0007] By comparing the text data with a preset real text, the text data is divided into text data of a type with few words errors and text data of a type with many words errors;

[0008] Performing a first data enhancement process on the text data of the missing-word error type to obtain a first reconstructed text;

[0009] Performing a second data enhancement process on the text data of the multi-word error type to obtain a second reconstructed text;

[0010] Aggregating the first reconstructed text and the second reconstructed text to obtain training text data, and using the training text data to train a preset deep error correction model to obtain a standard error correction model;

[0011] The text to be corrected is obtained, and the text to be corrected is input into the standard correction model to obtain a standard text.

[0012] Optionally, performing a first data enhancement process on the text data of the missing-word error type to obtain a first reconstructed text includes:

[0013] Performing word segmentation processing on the text data of the missing-word error type to obtain a word segmentation data set;

[0014] Filtering out a plurality of linked phrases in the word segmentation data set by using a preset pinyin linked phrase screening rule;

[0015] The multiple connected phrases are respectively subjected to a rearrangement process of the initials and finals to obtain a first reconstructed text.

[0016] Optionally, the step of performing a process of rearranging the initials and finals of the plurality of linked phrases comprises:

[0017] Rearrange and combine the initial consonant plus a part of the final vowel in the pinyin of the first word of two consecutive words in the consecutive phrase with the final vowel in the pinyin of the second word; or

[0018] Rearrange the initial consonants in the previous pinyin of the character and the final vowels in the next pinyin of the character.

[0019] Optionally, performing a second data enhancement process on the text data of the multi-word error type to obtain a second reconstructed text includes:

[0020] Get the preset onomatopeia text and the preset random dialogue text;

[0021] The onomatopeia text and the random dialogue text are inserted into the text data of the multi-word error type to obtain a second reconstructed text.

[0022] Optionally, the using the training text data to train a preset deep error correction model to obtain a standard error correction model includes:

[0023] Using the encoder in the deep error correction model to encode the training text data to obtain encoded data;

[0024] Using the decoder in the deep error correction model to perform text reconstruction processing on the encoded data to obtain predicted text;

[0025] Calculating a cross entropy loss value between the predicted text and a preset reference text;

[0026] When the cross entropy loss value is greater than or equal to the cross entropy loss threshold, the parameters of the deep error correction model are adjusted until the cross entropy loss value is less than the cross entropy threshold, and the deep error correction model is output as a standard error correction model.

[0027] Optionally, the calculating a cross entropy loss value between the predicted text and a preset reference text includes:

[0028] The cross entropy loss value between the predicted text and the preset reference text is calculated using the following formula:

[0029]

[0030] Among them, C is the cross entropy loss value, y is the reference text, a is the predicted text, and n is the total amount of data.

[0031] Optionally, the step of comparing the text data with a preset real text to divide the text data into text data with a few-word error type and text data with a many-word error type includes:

[0032] Extracting the text lengths of the text data and the real text respectively;

[0033] Comparing the text length of the text data with the text length of the real text;

[0034] If the text length of the text data is equal to the text length of the real text, the type of the text data is determined to be a correct type;

[0035] If the text length of the text data is less than the text length of the real text, the text data is determined to be text data of a missing word error type;

[0036] If the text length of the text data is greater than the text length of the real text, the text data is determined to be text data of a multi-word error type.

[0037] In order to solve the above problem, the present invention also provides a text variable length error correction device, the device comprising:

[0038] A speech recognition module is used to obtain original recording data, perform speech recognition on the original recording data, and obtain text data;

[0039] A type determination module, used for classifying the text data into text data of a few-word error type and text data of a multi-word error type by comparing the text data with a preset real text;

[0040] A data enhancement module, configured to perform a first data enhancement process on the text data of the few-word error type to obtain a first reconstructed text, and perform a second data enhancement process on the text data of the multi-word error type to obtain a second reconstructed text;

[0041] A model training module, used to aggregate the first reconstructed text and the second reconstructed text to obtain training text data, and use the training text data to train a preset deep error correction model to obtain a standard error correction model;

[0042] The text error correction module is used to obtain the text to be corrected, input the text to be corrected into the standard error correction model, and obtain the standard text.

[0043] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0044] at least one processor; and,

[0045] a memory communicatively connected to the at least one processor; wherein,

[0046] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the text variable length error correction method described above.

[0047] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned text variable length error correction method.

[0048] The embodiment of the present invention obtains text data by performing speech recognition on the original recording data, and by comparing the text data with the preset real text, the text data is divided into text data of a few-word error type and text data of a multi-word error type, so as to facilitate subsequent different data enhancement processing according to the error type of the text data, and respectively perform corresponding data enhancement processing on the text data of the few-word error type and the text data of the second data type, and the data enhancement processing can automatically and quickly construct a large number of high-quality training samples that can be used for training models, summarize the reconstructed text generated after data enhancement to obtain training text data, and use the training text data to train a preset deep error correction model to obtain a standard error correction model. The text to be corrected is input into the standard error correction model to obtain a standard text. Therefore, the text variable length error correction method, device, electronic device and computer-readable storage medium proposed by the present invention can solve the problem of low accuracy of text variable length error correction. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A flowchart of a text variable length error correction method provided by an embodiment of the present invention;

[0050] Figure 2 A functional module diagram of a text variable length error correction device provided by an embodiment of the present invention;

[0051] Figure 3 A schematic diagram of the structure of an electronic device for implementing the text variable length error correction method provided by one embodiment of the present invention.

[0052] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0053] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0054] The embodiment of the present application provides a text variable length error correction method. The execution subject of the text variable length error correction method includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the text variable length error correction method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.

[0055] Reference Figure 1 FIG. 1 is a flow chart of a text variable length error correction method provided by an embodiment of the present invention. In this embodiment, the text variable length error correction method includes:

[0056] S1. Obtain original recording data, perform speech recognition on the original recording data, and obtain text data.

[0057] In the embodiment of the present invention, the original recording data is a business scenario recording of a human agent or a customer in a banking business scenario.

[0058] Specifically, the original recording data is subjected to speech recognition using the Automatic Speech Recognition technology to obtain text data, wherein the principle flow of speech recognition includes encoding, decoding and text output of speech data.

[0059] Among them, it is necessary to perform voice recognition on the original recording data to obtain text data, and perform quality inspection or analysis based on the text data.

[0060] S2. By comparing the text data with a preset real text, the text data is divided into text data of a type with few words errors and text data of a type with many words errors.

[0061] In the embodiment of the present invention, the text data is divided into text data of a few-word error type and text data of a multi-word error type by comparing the text data with a preset real text, including:

[0062] Extracting the text lengths of the text data and the real text respectively;

[0063] Comparing the text length of the text data with the text length of the real text;

[0064] If the text length of the text data is equal to the text length of the real text, the type of the text data is determined to be a correct type;

[0065] If the text length of the text data is less than the text length of the real text, the text data is determined to be text data of a missing word error type;

[0066] If the text length of the text data is greater than the text length of the real text, the text data is determined to be text data of a multi-word error type.

[0067] The real text refers to a standard text used as a reference, which does not have errors such as extra or missing words, and is usually used as a reference to determine whether there are errors in the recognized text.

[0068] For example, the real text is "I would like to consult what consumer installment products your bank has", and the text data obtained through voice recognition is "I would like to consult what installment products your bank has", the text data has a few-word error relative to the real text, and its text length is less than the text length of the real text, so the text data is determined to be text data with a few-word error type. If the text data obtained through voice recognition is "I would like to consult what consumer installment products your bank has, hahahahahaha", the text data has a multi-word error relative to the real text, and its text length is greater than the text length of the real text, so the text data is determined to be text data with a multi-word error type.

[0069] In detail, the appearance of the text data of the few-word error type is usually caused by the speaker speaking in a low voice and speaking quickly, so that the speech recognition fails to recognize it. The appearance of the text data of the multi-word error type is usually caused by the presence of noise or other people's voices in the background when the speaker is speaking, causing the speech recognition to mistakenly recognize these noises or other people's voices into the text. The misrecognition content of the speech recognition is equivalent to adding disturbing noise content to the text.

[0070] S3. Perform a first data enhancement process on the text data of the type of missing-word errors to obtain a first reconstructed text.

[0071] In the embodiment of the present invention, performing a first data enhancement process on the text data of the type of missing-word error to obtain a first reconstructed text includes:

[0072] Performing word segmentation processing on the text data of the missing-word error type to obtain a word segmentation data set;

[0073] Filtering out a plurality of linked phrases in the word segmentation data set by using a preset pinyin linked phrase screening rule;

[0074] The multiple connected phrases are respectively subjected to a rearrangement process of the initials and finals to obtain a first reconstructed text.

[0075] In detail, the text data of the missing-word error type is "The customer wants to apply for a credit card and purchase Ping An Gold financial management product". The Jieba word segmenter is used to perform word segmentation processing, and the obtained word segmentation data set is "Customer / want / apply / for / credit / card / and / purchase / Ping An Gold / financial / product".

[0076] Specifically, the re-arranging of the initials and finals of the plurality of linked phrases includes:

[0077] Rearrange and combine the initial consonant plus a part of the final vowel in the pinyin of the first word of two consecutive words in the consecutive phrase with the final vowel in the pinyin of the second word; or

[0078] Rearrange and combine the initial consonant in the pinyin of the previous character with the final sound in the pinyin of the next character.

[0079] Specifically, use the preset pinyin connected speech screening rules to screen out multiple connected speech phrases in the word segmentation dataset. The connected speech phrases can be "credit card" and "Ping An Gold". In the two characters "credit", the initial consonant "x" and the final sound "i" in the pinyin of the character "xin" and the final sound "ong" in the pinyin of the character "yong" have a "pinyin connected speech phenomenon" to form the pinyin "xiong", making the quickly pronounced "credit" become the character "xiong". Similarly, "Ping An Gold" can become "partial gold". Therefore, the first reconstructed text is "The customer wants to apply for a xiong card and purchase partial gold wealth management products".

[0080] In another alternative embodiment of the present invention, the first data enhancement process for the text data of the few-character error type to obtain the first reconstructed text includes:

[0081] Obtain a preset deletion ratio range;

[0082] Randomly perform a deletion operation on the text data of the few-character error type based on the deletion ratio range to obtain the first reconstructed text.

[0083] Preferably, the preset deletion ratio can be 10% to 15%.

[0084] For example, the text data of the few-character error type is "want to consult which fee-term products of your bank". Randomly perform a deletion operation on the text data of the few-character error type, that is, randomly delete 10% to 15% of the characters. You can delete "want", "under", and "some" in "want to consult which fee-term products of your bank". Therefore, the first reconstructed text obtained is "Consult which fee-term products of your bank".

[0085] Specifically, the first reconstructed text enhanced under the first data enhancement process enables the subsequent model to obtain the correction ability for the "error problem of few characters in the business text after speech recognition due to the speaker's low voice".

[0086] S4. Perform a second data enhancement process on the text data of the multi-character error type to obtain a second reconstructed text.

[0087] In the embodiment of the present invention, the second data enhancement process for the text data of the multi-character error type to obtain the second reconstructed text includes:

[0088] Obtain a preset onomatopoeia text and a preset random dialogue text;

[0089] The onomatopeia text and the random dialogue text are inserted into the text data of the multi-word error type to obtain a second reconstructed text.

[0090] In detail, the preset onomatopoeia text may be dang, zhi, hum, kuang, bang, xu and hong, etc., and the preset random dialogue text refers to text irrelevant to the business text content in the embodiment of the invention. The onomatopoeia text is inserted to simulate the noise in the background when the speaker is speaking, and the character dialogue text and other irrelevant texts are inserted to simulate the sound of other people speaking in the background when the speaker is speaking.

[0091] For example, the text data of the multi-word error type is "I would like to consult what consumer installment products your bank has, hahahahaha", then the operation of randomly inserting onomatopoeia and random dialogue text is performed on the text data of the multi-word error type, wherein the onomatopoeia are "dangdang" and "ding", and the random dialogue text is "show health code", then the second reconstructed text is "I would like to consult Dangdang what consumer installment products your bank has, hahahahaha".

[0092] S5. Aggregate the first reconstructed text and the second reconstructed text to obtain training text data, and use the training text data to train a preset deep error correction model to obtain a standard error correction model.

[0093] In an embodiment of the present invention, the first reconstructed text and the second reconstructed text are aggregated to obtain training text data, and the training text data is used for subsequent training of the preset deep error correction model.

[0094] The preset deep error correction model is an Encoder-Decoder denoising self-encoding deep model. The Encoder-Decoder denoising self-encoding deep model can perform variable-length error correction on business texts with fewer or more words after speech recognition based on text reconstruction.

[0095] Specifically, the method of using the training text data to train a preset deep error correction model to obtain a standard error correction model includes:

[0096] Using the encoder in the deep error correction model to encode the training text data to obtain encoded data;

[0097] Using the decoder in the deep error correction model to perform text reconstruction processing on the encoded data to obtain predicted text;

[0098] Calculating a cross entropy loss value between the predicted text and a preset reference text;

[0099] When the cross entropy loss value is greater than or equal to the cross entropy loss threshold, the parameters of the deep error correction model are adjusted until the cross entropy loss value is less than the cross entropy threshold, and the deep error correction model is output as a standard error correction model.

[0100] In detail, the encoder in the deep error correction model contains 12 sub-encoder layer networks, each of which contains three sub-layers: multi-head self-attention sub-layer, layer normalization sub-layer and feed-forward network sub-layer. Among them, the feed-forward network sub-layer is a fully connected layer with an activation function.

[0101] Among them, the encoder has a strong natural language understanding (NLU) capability in the Encoder-Decoder denoising autoencoder deep model, which can perform semantic encoding and feature extraction on the text in the input model.

[0102] Specifically, the decoder of the Encoder-Decoder denoising autoencoder deep model also contains 12 sub-decoder layers, each of which contains three sub-layers: Multi-head Self Attention, LayerNormalization, and Feed-forward Network. The decoder has a powerful natural language generation (NLG) capability in the Encoder-Decoder denoising autoencoder deep model, which can reconstruct the text in the input model.

[0103] Further, the calculating the cross entropy loss value between the predicted text and the preset reference text includes:

[0104] The cross entropy loss value between the predicted text and the preset reference text is calculated using the following formula:

[0105]

[0106] Among them, C is the cross entropy loss value, y is the reference text, a is the predicted text, and n is the total amount of data.

[0107] S6. Obtain the text to be corrected, and input the text to be corrected into the standard correction model to obtain a standard text.

[0108] In the embodiment of the present invention, the pre-acquired text to be corrected is input into the standard error correction model for error correction processing to obtain a standard text.

[0109] The embodiment of the present invention obtains text data by performing speech recognition on the original recording data, and by comparing the text data with the preset real text, the text data is divided into text data of a few-word error type and text data of a multi-word error type, so as to facilitate subsequent different data enhancement processing according to the error type of the text data, and respectively perform corresponding data enhancement processing on the text data of the few-word error type and the text data of the second data type, and the data enhancement processing can automatically and quickly construct a large number of high-quality training samples that can be used for training models, summarize the reconstructed text generated after data enhancement to obtain training text data, and use the training text data to train a preset deep error correction model to obtain a standard error correction model. The text to be corrected is input into the standard error correction model to obtain a standard text. Therefore, the text variable length error correction method proposed in the present invention can solve the problem of low accuracy of text variable length error correction.

[0110] like Figure 2 , which is a functional module diagram of a text variable length error correction device provided by an embodiment of the present invention.

[0111] The text variable length error correction device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the text variable length error correction device 100 can include a speech recognition module 101, a type determination module 102, a data enhancement module 103, a model training module 104 and a text error correction module 105. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0112] In this embodiment, the functions of each module / unit are as follows:

[0113] The speech recognition module 101 is used to obtain original recording data, perform speech recognition on the original recording data, and obtain text data;

[0114] The type determination module 102 is used to classify the text data into text data of a few-word error type and text data of a multi-word error type by comparing the text data with a preset real text;

[0115] The data enhancement module 103 is used to perform a first data enhancement process on the text data of the few-word error type to obtain a first reconstructed text, and to perform a second data enhancement process on the text data of the multi-word error type to obtain a second reconstructed text;

[0116] The model training module 104 is used to aggregate the first reconstructed text and the second reconstructed text to obtain training text data, and use the training text data to train a preset deep error correction model to obtain a standard error correction model;

[0117] The text error correction module 105 is used to obtain the text to be corrected, input the text to be corrected into the standard error correction model, and obtain the standard text.

[0118] In detail, the specific implementation of each module of the text variable length error correction device 100 is as follows:

[0119] Step 1: Obtain original recording data, perform speech recognition on the original recording data, and obtain text data.

[0120] In the embodiment of the present invention, the original recording data is a business scenario recording of a human agent or a customer in a banking business scenario.

[0121] Specifically, the original recording data is subjected to speech recognition using the Automatic Speech Recognition technology to obtain text data, wherein the principle flow of speech recognition includes encoding, decoding and text output of speech data.

[0122] Among them, it is necessary to perform voice recognition on the original recording data to obtain text data, and perform quality inspection or analysis based on the text data.

[0123] Step 2: By comparing the text data with a preset real text, the text data is divided into text data with a few-word error type and text data with a many-word error type.

[0124] In the embodiment of the present invention, the text data is divided into text data of a few-word error type and text data of a multi-word error type by comparing the text data with a preset real text, including:

[0125] Extracting the text lengths of the text data and the real text respectively;

[0126] Comparing the text length of the text data with the text length of the real text;

[0127] If the text length of the text data is equal to the text length of the real text, the type of the text data is determined to be a correct type;

[0128] If the text length of the text data is less than the text length of the real text, the text data is determined to be text data of a missing word error type;

[0129] If the text length of the text data is greater than the text length of the real text, the text data is determined to be text data of a multi-word error type.

[0130] The real text refers to a standard text used as a reference, which does not have errors such as extra or missing words, and is usually used as a reference to determine whether there are errors in the recognized text.

[0131] For example, the real text is "I would like to consult what consumer installment products your bank has", and the text data obtained through voice recognition is "I would like to consult what installment products your bank has", the text data has a few-word error relative to the real text, and its text length is less than the text length of the real text, so the text data is determined to be text data with a few-word error type. If the text data obtained through voice recognition is "I would like to consult what consumer installment products your bank has, hahahahahaha", the text data has a multi-word error relative to the real text, and its text length is greater than the text length of the real text, so the text data is determined to be text data with a multi-word error type.

[0132] In detail, the appearance of the text data of the few-word error type is usually caused by the speaker speaking in a low voice and speaking quickly, so that the speech recognition fails to recognize it. The appearance of the text data of the multi-word error type is usually caused by the presence of noise or other people's voices in the background when the speaker is speaking, causing the speech recognition to mistakenly recognize these noises or other people's voices into the text. The misrecognition content of the speech recognition is equivalent to adding disturbing noise content to the text.

[0133] Step three: perform a first data enhancement process on the text data of the type of missing word errors to obtain a first reconstructed text.

[0134] In the embodiment of the present invention, performing a first data enhancement process on the text data of the type of missing-word error to obtain a first reconstructed text includes:

[0135] Performing word segmentation processing on the text data of the missing-word error type to obtain a word segmentation data set;

[0136] Filtering out a plurality of linked phrases in the word segmentation data set by using a preset pinyin linked phrase screening rule;

[0137] Perform initial consonant and final rearrangement processing on the multiple consecutive reading phrases respectively to obtain a first reconstructed text.

[0138] Specifically, the text data of the type of text with missing characters is "The customer wants to apply for a credit card and purchase Ping An Gold financial products". Using the Jieba word segmentation tool for word segmentation processing, the word segmentation data set obtained is "customer / wants / to / apply / for / a / credit / card / and / purchase / Ping An Gold / financial / products".

[0139] Specifically, the performing of initial consonant and final rearrangement processing on the multiple consecutive reading phrases respectively includes:

[0140] Rearranging and combining the initial consonant of the first character in the two consecutive characters in the consecutive phrase plus a part of the final of the first character with the final of the second character in the consecutive phrase; or

[0141] Rearranging and combining the initial consonant of the first character with the final of the second character.

[0142] Specifically, using the preset initial consonant and final consecutive reading screening rules to screen out multiple consecutive reading phrases in the word segmentation data set. The consecutive reading phrases can be "credit card" and "Ping An Gold". Since in the two characters "credit", the initial consonant "x" and the final "i" of the character "xin" are combined with the final "ong" of the character "yong" due to the "initial consonant and final consecutive reading phenomenon" to form the pronunciation "xiong". So the quickly pronounced "credit" becomes the character "xiong". Similarly, "Ping An Gold" can be changed to "pian jin". Therefore, the first reconstructed text is "The customer wants to apply for a xiong card and purchase pian jin financial products".

[0143] In another optional embodiment of the present invention, the performing of first data enhancement processing on the text data of the type of text with missing characters to obtain a first reconstructed text includes:

[0144] Obtain a preset deletion ratio range;

[0145] Perform a deletion operation randomly on the text data of the type of text with missing characters based on the deletion ratio range to obtain a first reconstructed text.

[0146] Preferably, the preset deletion ratio can be 10% to 15%.

[0147] For example, the text data of the type of text with missing characters is "Want to consult which fee-term products of your bank". Perform a deletion operation randomly on the text data of the type of text with missing characters, that is, randomly delete 10% to 15% of the characters. "Want", "xia", and "xie" in "Want to consult which fee-term products of your bank" can be deleted. Therefore, the first reconstructed text obtained is "Consult which fee-term products of your bank".

[0148] In detail, the first reconstructed text enhanced by the first data enhancement processing can enable the subsequent model to obtain the ability to correct the "error problem of missing words in the business text after speech recognition due to the speaker's low voice".

[0149] Step 4: Perform a second data enhancement process on the text data of the multi-word error type to obtain a second reconstructed text.

[0150] In the embodiment of the present invention, performing a second data enhancement process on the text data of the multi-word error type to obtain a second reconstructed text includes:

[0151] Get the preset onomatopeia text and the preset random dialogue text;

[0152] The onomatopeia text and the random dialogue text are inserted into the text data of the multi-word error type to obtain a second reconstructed text.

[0153] In detail, the preset onomatopoeia text may be dang, zhi, hum, kuang, bang, xu and hong, etc., and the preset random dialogue text refers to text irrelevant to the business text content in the embodiment of the invention. The onomatopoeia text is inserted to simulate the noise in the background when the speaker is speaking, and the character dialogue text and other irrelevant texts are inserted to simulate the sound of other people speaking in the background when the speaker is speaking.

[0154] For example, the text data of the multi-word error type is "I would like to consult what consumer installment products your bank has, hahahahaha", then the operation of randomly inserting onomatopoeia and random dialogue text is performed on the text data of the multi-word error type, wherein the onomatopoeia are "dangdang" and "ding", and the random dialogue text is "show health code", then the second reconstructed text is "I would like to consult Dangdang what consumer installment products your bank has, hahahahaha".

[0155] Step five: Aggregate the first reconstructed text and the second reconstructed text to obtain training text data, and use the training text data to train a preset deep error correction model to obtain a standard error correction model.

[0156] In an embodiment of the present invention, the first reconstructed text and the second reconstructed text are aggregated to obtain training text data, and the training text data is used for subsequent training of the preset deep error correction model.

[0157] The preset deep error correction model is an Encoder-Decoder denoising self-encoding deep model. The Encoder-Decoder denoising self-encoding deep model can perform variable-length error correction on business texts with fewer or more words after speech recognition based on text reconstruction.

[0158] Specifically, the method of using the training text data to train a preset deep error correction model to obtain a standard error correction model includes:

[0159] Using the encoder in the deep error correction model to encode the training text data to obtain encoded data;

[0160] Using the decoder in the deep error correction model to perform text reconstruction processing on the encoded data to obtain predicted text;

[0161] Calculating a cross entropy loss value between the predicted text and a preset reference text;

[0162] When the cross entropy loss value is greater than or equal to the cross entropy loss threshold, the parameters of the deep error correction model are adjusted until the cross entropy loss value is less than the cross entropy threshold, and the deep error correction model is output as a standard error correction model.

[0163] In detail, the encoder in the deep error correction model contains 12 sub-encoder layer networks, each of which contains three sub-layers: multi-head self-attention sub-layer, layer normalization sub-layer and feed-forward network sub-layer. Among them, the feed-forward network sub-layer is a fully connected layer with an activation function.

[0164] Among them, the encoder has a strong natural language understanding (NLU) capability in the Encoder-Decoder denoising autoencoder deep model, which can perform semantic encoding and feature extraction on the text in the input model.

[0165] Specifically, the decoder of the Encoder-Decoder denoising autoencoder deep model also contains 12 sub-decoder layers, each of which contains three sub-layers: Multi-head Self Attention, LayerNormalization, and Feed-forward Network. The decoder has a powerful natural language generation (NLG) capability in the Encoder-Decoder denoising autoencoder deep model, which can reconstruct the text in the input model.

[0166] Further, the calculating the cross entropy loss value between the predicted text and the preset reference text includes:

[0167] The cross entropy loss value between the predicted text and the preset reference text is calculated using the following formula:

[0168]

[0169] Among them, C is the cross entropy loss value, y is the reference text, a is the predicted text, and n is the total amount of data.

[0170] Step 6: Obtain the text to be corrected, input the text to be corrected into the standard correction model, and obtain the standard text.

[0171] In the embodiment of the present invention, the pre-acquired text to be corrected is input into the standard error correction model for error correction processing to obtain a standard text.

[0172] The embodiment of the present invention obtains text data by performing speech recognition on the original recording data, and by comparing the text data with the preset real text, the text data is divided into text data of a few-word error type and text data of a multi-word error type, so as to facilitate subsequent different data enhancement processing according to the error type of the text data, and respectively perform corresponding data enhancement processing on the text data of the few-word error type and the text data of the second data type, and the data enhancement processing can automatically and quickly construct a large number of high-quality training samples that can be used for training models, summarize the reconstructed text generated after data enhancement to obtain training text data, and use the training text data to train a preset deep error correction model to obtain a standard error correction model. The text to be corrected is input into the standard error correction model to obtain a standard text. Therefore, the text variable length error correction device proposed by the present invention can solve the problem of low accuracy of text variable length error correction.

[0173] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a text variable length error correction method provided by an embodiment of the present invention.

[0174] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a text variable length error correction program.

[0175] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, executing a text variable length error correction program, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device and process data.

[0176] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device, such as the code of a text variable length error correction program, etc., but may also be used to temporarily store data that has been output or is to be output.

[0177] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0178] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0179] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0180] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0181] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0182] The text variable length error correction program stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0183] Acquire original recording data, perform speech recognition on the original recording data, and obtain text data;

[0184] By comparing the text data with a preset real text, the text data is divided into text data of a type with few words errors and text data of a type with many words errors;

[0185] Performing a first data enhancement process on the text data of the missing-word error type to obtain a first reconstructed text;

[0186] Performing a second data enhancement process on the text data of the multi-word error type to obtain a second reconstructed text;

[0187] Aggregating the first reconstructed text and the second reconstructed text to obtain training text data, and using the training text data to train a preset deep error correction model to obtain a standard error correction model;

[0188] The text to be corrected is obtained, and the text to be corrected is input into the standard correction model to obtain a standard text.

[0189] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.

[0190] Furthermore, if the module / unit integrated in the electronic device 1 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. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0191] The present invention further provides 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 of an electronic device, the computer program can implement:

[0192] Acquire original recording data, perform speech recognition on the original recording data, and obtain text data;

[0193] By comparing the text data with a preset real text, the text data is divided into text data of a type with few words errors and text data of a type with many words errors;

[0194] Performing a first data enhancement process on the text data of the missing-word error type to obtain a first reconstructed text;

[0195] Performing a second data enhancement process on the text data of the multi-word error type to obtain a second reconstructed text;

[0196] Aggregating the first reconstructed text and the second reconstructed text to obtain training text data, and using the training text data to train a preset deep error correction model to obtain a standard error correction model;

[0197] The text to be corrected is obtained, and the text to be corrected is input into the standard correction model to obtain a standard text.

[0198] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0199] The modules described as separate components may or may not be physically separated, and the components shown as modules 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 modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0200] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, 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 hardware plus software functional modules.

[0201] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0202] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0203] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0204] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, 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.

[0205] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0206] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A text variable length error correction method, characterized in that: The method comprises: Acquire original recording data, perform speech recognition on the original recording data, and obtain text data; By comparing the text data with a preset real text, the text data is divided into text data of a type with few words errors and text data of a type with many words errors; Performing a first data enhancement process on the text data of the missing-word error type to obtain a first reconstructed text; Performing a second data enhancement process on the text data of the multi-word error type to obtain a second reconstructed text; Aggregating the first reconstructed text and the second reconstructed text to obtain training text data, and using the training text data to train a preset deep error correction model to obtain a standard error correction model; Obtaining a text to be corrected, and inputting the text to be corrected into the standard correction model to obtain a standard text; The step of performing a first data enhancement process on the text data of the type of error with fewer words to obtain a first reconstructed text includes: performing a word segmentation process on the text data of the type of error with fewer words to obtain a word segmentation data set; screening out a plurality of connected word phrases from the word segmentation data set using a preset pinyin connected word screening rule; and performing a consonant and vowel rearrangement process on the plurality of connected word phrases to obtain a first reconstructed text; The said re-arranging the initials and finals of the said plurality of connected phrases respectively comprises: re-arranging and combining the initials and a part of the finals in the pinyin of the first word of two consecutive words in the continuous phrase with the finals in the pinyin of the second word; or re-arranging and combining the initials in the pinyin of the first word with the finals in the pinyin of the second word; The step of performing a second data enhancement process on the text data of the multi-word error type to obtain a second reconstructed text includes: obtaining a preset onomatopoeia text and a preset random dialogue text; inserting the onomatopoeia text and the random dialogue text into the text data of the multi-word error type to obtain a second reconstructed text; The method of training a preset deep error correction model using the training text data to obtain a standard error correction model includes: encoding the training text data using an encoder in the deep error correction model to obtain encoded data; performing text reconstruction on the encoded data using a decoder in the deep error correction model to obtain a predicted text; calculating a cross entropy loss value between the predicted text and a preset reference text; and when the cross entropy loss value is greater than or equal to a cross entropy loss threshold, adjusting parameters of the deep error correction model until the cross entropy loss value is less than the cross entropy loss threshold, outputting the deep error correction model as a standard error correction model.

2. The text variable length error correction method according to claim 1, characterized in that: The calculating the cross entropy loss value between the predicted text and the preset reference text includes: The cross entropy loss value between the predicted text and the preset reference text is calculated using the following formula: in, is the cross entropy loss value, For the reference text, is the predicted text, and n is the total amount of data.

3. The text variable length error correction method according to claim 1, characterized in that: The method of comparing the text data with a preset real text to divide the text data into text data of a few-word error type and text data of a multi-word error type includes: Extracting the text lengths of the text data and the real text respectively; Comparing the text length of the text data with the text length of the real text; If the text length of the text data is equal to the text length of the real text, the type of the text data is determined to be a correct type; If the text length of the text data is less than the text length of the real text, the text data is determined to be text data of a missing word error type; If the text length of the text data is greater than the text length of the real text, the text data is determined to be text data of a multi-word error type.

4. A text variable length error correction device, used to implement the text variable length error correction method as claimed in any one of claims 1 to 3, characterized in that: The device comprises: A speech recognition module is used to obtain original recording data, perform speech recognition on the original recording data, and obtain text data; A type determination module, used for classifying the text data into text data of a few-word error type and text data of a multi-word error type by comparing the text data with a preset real text; A data enhancement module, configured to perform a first data enhancement process on the text data of the few-word error type to obtain a first reconstructed text, and perform a second data enhancement process on the text data of the multi-word error type to obtain a second reconstructed text; A model training module, used to aggregate the first reconstructed text and the second reconstructed text to obtain training text data, and use the training text data to train a preset deep error correction model to obtain a standard error correction model; The text error correction module is used to obtain the text to be corrected, input the text to be corrected into the standard error correction model, and obtain the standard text.

5. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the text variable length error correction method as described in any one of claims 1 to 3.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the text variable length error correction method as described in any one of claims 1 to 3 is implemented.