WO2023065633A1 - 异常语义截断检测方法、装置、设备及介质 - Google Patents
异常语义截断检测方法、装置、设备及介质 Download PDFInfo
- Publication number
- WO2023065633A1 WO2023065633A1 PCT/CN2022/089937 CN2022089937W WO2023065633A1 WO 2023065633 A1 WO2023065633 A1 WO 2023065633A1 CN 2022089937 W CN2022089937 W CN 2022089937W WO 2023065633 A1 WO2023065633 A1 WO 2023065633A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- truncation
- text
- abnormal
- semantic
- model
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/284—Lexical analysis, e.g. tokenisation or collocates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/22—Procedures used during a speech recognition process, e.g. man-machine dialogue
Definitions
- the present application relates to the technical field of artificial intelligence, and in particular to a method, device, electronic device and computer-readable storage medium for abnormal semantic truncation detection.
- the inventor realized that the general interaction process is that the user first outputs the voice, and then the intelligent customer service robot will recognize the user's voice and provide corresponding services.
- the user often appears He only said a few words, then paused, and when he was about to continue speaking, the customer service robot had already begun to reply intelligently.
- the user's true intention cannot be correctly identified, resulting in an increase in the number of interactions between the user and the intelligent robot, affecting the user's experience.
- the customer service robot waits for the time setting process, the time for the user to wait for the feedback from the customer service robot will also increase accordingly, which will also bring a poor experience to the user.
- a large number of services will be poured into artificial seats, which will increase the company's operating costs and affect customer satisfaction.
- the present application provides an abnormal semantic truncation detection method, device, electronic equipment and computer-readable storage medium, the main purpose of which is to improve the efficiency of abnormal semantic truncation detection.
- abnormal semantic truncation detection is performed on the speech signal to be detected.
- an abnormal semantic truncation detection device which includes:
- the recognition text acquisition unit is used to obtain the original prediction, and perform phonetic-to-character recognition on the original corpus to obtain the recognition text corresponding to the original prediction;
- An annotated text acquisition unit configured to annotate the abnormal semantic truncated text in the identified text, to obtain annotated text corresponding to the identified text;
- a truncation type judging unit configured to judge the truncation type of each truncation in the abnormal semantic truncated text based on corpus and preset classification rules
- An abnormal semantic truncation detection unit configured to detect abnormal semantic truncation of the speech signal to be detected based on the recognition strategy.
- an electronic device which includes:
- the memory stores a computer program executable by the at least one processor, the computer program is executed by the at least one processor, so that the at least one processor can perform the steps in the abnormal semantic truncation detection method; in,
- the abnormal semantic truncation detection method includes:
- abnormal semantic truncation detection is performed on the speech signal to be detected.
- the present application also provides a computer-readable storage medium
- a computer program is stored, wherein, when the computer program is executed by the processor, the steps in the abnormal semantic truncation detection method are implemented; wherein,
- the abnormal semantic truncation detection method includes:
- abnormal semantic truncation detection is performed on the speech signal to be detected.
- the original corpus is recognized by sound-to-word conversion, and the corresponding recognition text is obtained, and then the abnormal semantic truncated text in the recognition text is marked and word-segmented, and the corresponding word-segmented corpus is obtained, and then the abnormality is judged.
- the truncation type of each truncation in the semantic truncation text and based on the truncation type, formulate a recognition strategy corresponding to the truncation type, and finally, based on the recognition strategy, abnormal semantic truncation detection is performed on the speech signal to be detected, which can accurately identify Judging the user's semantic truncation, and waiting for processing when the user has abnormal semantic truncation, improving the flexibility of the intelligent question answering system and the user's experience effect.
- FIG. 1 is a schematic flow diagram of an abnormal semantic truncation detection method provided by an embodiment of the present application
- FIG. 2 is a block diagram of an abnormal semantic truncation detection device provided by an embodiment of the present application
- FIG. 3 is a schematic diagram of the internal structure of an electronic device implementing an abnormal semantic truncation detection method provided by an embodiment of the present application;
- this application provides a The abnormal semantic truncation detection method can accurately judge the user's semantic truncation, and wait for processing when the user has abnormal semantic truncation, so as to improve the flexibility of the intelligent question answering system and the user's experience effect.
- AI artificial intelligence
- 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.
- Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics.
- Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
- the present application provides a method for detecting abnormal semantic truncation.
- FIG. 1 it is a schematic flowchart of an abnormal semantic truncation detection method provided by an embodiment of the present application.
- the method may be performed by a device, and the device may be implemented by software and/or hardware.
- the abnormal semantic truncation detection method includes:
- S100 Obtain an original prediction, and perform phonetic-to-character recognition on the original corpus to obtain a recognized text corresponding to the original prediction.
- the pre-trained speech recognition model can be used to perform sound-to-word recognition on the original corpus, but because the speech recognition model will have certain recognition errors, in order to improve the accuracy of the text recognition, it is convenient to accurately obtain the abnormal (abnormal) text in the later stage.
- the truncation type of truncation, in this step, the original corpus can also be manually translated during the process of phonetic-to-word recognition of the original corpus.
- the acquired original corpus is subjected to phonetic-to-character recognition and manual translation processing to obtain the corresponding recognized text and translated text; then, based on the translated text, the errors in the recognized text are corrected, and the corrected text is obtained as The final recognized text.
- the pre-training process of the speech recognition model may further include:
- S110 Construct a neural network model including an encoder network and a decoder network
- S120 Input the obtained pre-training data into the encoder network for encoding processing, so as to obtain hidden features corresponding to the training data as an output of the encoder network;
- S130 Use the decoder network to decode the output of the encoder network to obtain a text label sequence corresponding to the training data
- S150 Iteratively train the neural network model based on the training data until the loss converges within a preset range to form the speech recognition model.
- the expression of the loss of the neural network model is simultaneously as follows:
- y represents the real text sequence of the training data
- h represents the hidden feature
- t represents the tth hidden feature
- h t ) represents the tth hidden feature of the real text sequence probability at .
- the labeling of abnormal semantically truncated texts can be done manually, or can be done by training a labeling model, which is not specifically limited in this solution.
- S300 Perform word segmentation processing on the tagged text to obtain word-segmented corpus corresponding to the tagged text.
- S320 Based on the acquired training text, iteratively train the neural network model until the neural network model converges within a preset range to form a word segmentation model.
- the constructed neural network model may include four layers, which are respectively an input layer, a first hidden layer, a second hidden layer and an output layer, wherein the input of the input layer is the character feature vector of the training text, so
- the first hidden layer includes a first preset number of nodes
- the second hidden layer includes a second preset number of nodes
- the activation functions of the first hidden layer and the second hidden layer can use a relu function
- the output of the output layer is the probability that the character is of any type
- the activation function of the output layer may use a logistic function.
- the above-mentioned neural network model can also choose other structures or adjust structural parameters, etc.
- an n-order Markov model n-gram model can also be used to perform word segmentation processing on the labeled text, etc.
- the corpus after word segmentation includes the labeled Abnormal semantic truncation text, and then the types of these abnormal semantic truncation can be inductively classified.
- S400 Based on the corpus and preset classification rules, determine the truncation type of each truncation in the abnormal semantic truncation text.
- the preset classification rules mainly include: classify based on the corpus with abnormal semantic truncation.
- the corpus when abnormal semantic truncation occurs is expected words such as "um” and "uh”, such truncation types can be summarized as The modal particles are abnormally truncated.
- this type of truncation can be summarized as pause abnormal truncation, etc., and finally can be based on the corpus after word segmentation.
- the first type modal particles are abnormally truncated, such as "ah”, “amount”, “um”, “uh”, etc.;
- pause abnormal truncation mainly refers to the abnormal truncation caused by pause or interruption when the user expresses, such as "consult”, “to check”, “excuse me below”, “how to say”, “want to understand” wait;
- Abnormal truncation of spoken language mainly refers to the abnormal truncation caused by the occurrence of oral habitual vocabulary in expression, such as "this", “that”, “that is”, etc.
- truncation types can also be summarized according to specific business scenarios, that is, different truncation types can be summarized for different scenarios, and then, after determining the truncation type of abnormal truncation, corresponding identification can be formulated for different truncation types Strategy, in order to be able to analyze and respond to the user's voice information in a more humane manner in the intelligent question answering system, so as to avoid that the intelligent customer service has already started to reply when the abnormal truncation occurs.
- S500 Based on the truncation type, formulate an identification strategy corresponding to the truncation type.
- the rule system strategy can be adopted for the abnormal truncation of this truncation type, and the rule system can include three kinds of rule matching methods: head query matching, Special query matching and short sentence query matching, among them, head query matching mainly refers to the abnormal truncation of the query that is relatively small in number but relatively concentrated in the abnormal semantic truncation text, and the abnormal truncation is judged through the exact text matching method; the special query matching mainly It refers to the judgment of abnormal truncation by using regular matching for some queries with special formats; short sentence query matching is mainly for some short sentence queries that are difficult to solve by the model, marking the part-of-speech sequence, and judging the abnormal truncation by matching the part-of-speech sequence method.
- a dictionary containing abnormally truncated modal particles can be constructed. If the text corresponding to the user's current speech signal can accurately match the modal particles in the corresponding dictionary, it can be determined that the current speech signal is abnormal. Truncated, and then can control the corresponding intelligent system to wait for a short period of time.
- the method of combining the rule system and the model can be used for identification and detection.
- the strategy of combining the rule system and the classification model includes: based on the rule system strategy, the voice signal to be detected is Abnormal semantic truncation, if no abnormal semantic truncation is detected, abnormal semantic truncation is performed on the speech signal to be detected again based on the classification model.
- phrases and phrases frequently appearing in truncated sentences can be counted as a rule dictionary.
- the model can choose bert as the classification model.
- the training process of the classification model includes:
- the representation is input into the transformer structure of the bert model, and the output vector of the hidden state of the last layer of the transformer structure is obtained;
- the output vector is input into a fully connected layer, and the probability score of the category is output through the fully connected layer;
- the bert model is iteratively trained based on the training set until the error of the classification result converges within a preset range to form the classification model.
- the model structure can adopt the standard BERT model, namely 12-layer, 768-hidden, 12-heads, 110M parameters.
- the whole training process is, firstly, the training data in the preprocessed training set passes through the embedding layer to obtain the representation of the corresponding text, and then the representation is sent to the transformer, and the output vector of the last hidden state is sent to a fully connected layer.
- the output of the connection layer is the probability score of the two categories, and the category with the highest score is taken as the final prediction result.
- the strategy of combining the rule system and the model can be used. First, the beginning and end of the text to be detected are matched. If the rule system cannot be determined, the classification model is further used to distinguish and give the detection As a result; if the rule system matches directly as an anomalous truncation case, then no model checking is required.
- the combination of rules and models is also adopted. Similar to the second case, the colloquial habitual vocabulary frequently appearing in the truncated sentence can be counted first, and a rule dictionary can be established, including the exact matching dictionary of phrases and the matching dictionary of special formats. Similarly, use such truncated corpus as positive examples and non-truncated corpus as negative examples to construct a training set and train the BERT classification model. The final strategy is to use the rule system to match the end of the text to be detected. If the rule system cannot be determined, the classification model is used for discrimination and the detection result is given.
- S600 Perform abnormal semantic truncation detection on the speech signal to be detected based on the recognition strategy.
- the recognition strategy can include a collection of all the above strategies, and then when the abnormal semantic truncation detection is performed on the speech signal to be detected, it can be directly detected through the recognition strategy, and the recognition strategy will combine rules and models to detect the abnormal truncation identify.
- the recognition strategy includes a pre-constructed modal particle dictionary, an exact matching dictionary, a dictionary of oral habits, and a classification model.
- the matching detection is first performed through the above-mentioned dictionaries by default. If the corresponding matching information is used, it is directly determined that the current speech signal is abnormal semantic truncation, otherwise, the speech signal to be detected is further detected through the classification model, and finally whether it is abnormal semantic truncation is determined.
- the speech signal to be detected is usually a sentence.
- the intelligent question answering system whenever the user outputs a sentence, it is detected for abnormal semantic truncation, thereby achieving the purpose of improving the performance of the intelligent question answering system.
- the waiting time of the intelligent customer service can be flexibly set, for example, 300 milliseconds
- the induction of truncation type is the basis, and its accuracy determines what kind of solution strategy to adopt in the future.
- Analysis from different angles such as the frequency distribution of fragments, can classify all kinds of abnormal semantic truncations. For example, there are many texts such as "Consult” and "I want to ask”.
- some users stop thinking after saying this sentence, and when they are about to say the next sentence, the customer service robot starts replied.
- the user listened to a broadcast he said "uh” unconsciously, delayed for a second or two, and when he just said the next word, the customer service robot began to reply.
- FIG. 2 it is a functional block diagram of the abnormal semantic truncation detection device of the present application.
- the abnormal semantic truncation detection apparatus 200 described in this application can be installed in an electronic device.
- the abnormal semantic truncation detection device may include the following units: recognition text acquisition unit 210, marked text acquisition unit 220, word segmentation data acquisition unit 230, truncation type judgment unit 240, recognition strategy formulation unit 250 and abnormal semantics
- the detection unit 260 is truncated.
- the unit described in the present invention can also be called a module, which refers to a series of computer program segments that can be executed by the processor of the electronic device and can complete fixed functions, and are stored in the memory of the electronic device.
- each module/unit is as follows:
- the recognition text acquisition unit 210 is configured to obtain an original prediction, and perform phonetic-to-character recognition on the original corpus to obtain the recognition text corresponding to the original prediction.
- the pre-trained speech recognition model can be used to perform sound-to-word recognition on the original corpus, but because the speech recognition model will have certain recognition errors, in order to improve the accuracy of the text recognition, it is convenient to accurately obtain the abnormal (abnormal) text in the later stage.
- the truncation type of truncation, in this step, the original corpus can also be manually translated during the process of phonetic-to-word recognition of the original corpus.
- the pre-training process of the speech recognition model may further include:
- a network model building block for constructing a neural network model including an encoder network and a decoder network
- a hidden feature acquisition module configured to input the obtained pre-training data into the encoder network for encoding processing, so as to obtain hidden features corresponding to the training data as the output of the encoder network;
- a text label sequence acquisition module configured to decode the output of the encoder network through the decoder network to obtain a text label sequence corresponding to the training data
- a loss determination module configured to obtain the negative log-likelihood of the real text sequence of the training data under the hidden feature, as the loss of the neural network model
- a speech recognition model forming module configured to iteratively train the neural network model based on the training data until the loss converges within a preset range to form the speech recognition model.
- the expression of the loss of the neural network model is simultaneously as follows:
- y represents the real text sequence of the training data
- h represents the hidden feature
- t represents the tth hidden feature
- h t ) represents the tth hidden feature of the real text sequence probability at .
- An annotated text acquisition unit 220 is configured to annotate the abnormal semantically truncated text in the recognized text to obtain annotated text corresponding to the identified text.
- the abnormal semantic truncated text mainly refers to the situation where there is a brief interruption of sentences in the original corpus, but the short middle section is not the user's intended sentence pause, that is, a non-subjective sentence pause, for example, when the user expresses the language
- the short middle section is not the user's intended sentence pause, that is, a non-subjective sentence pause, for example, when the user expresses the language
- the user's true meaning is not fully expressed.
- it can be defaulted to abnormal semantic truncation.
- the corresponding intelligent customer service may be instructed to wait for a certain period of time instead of directly replying.
- the preprocessing process includes: deleting punctuation, garbled characters, symbols, etc. in the tagged text, and only retaining the text section, and formatting text, etc.
- performing word segmentation processing on the tagged text may further include:
- the word segmentation model forming module is used to iteratively train the neural network model based on the acquired training text until the neural network model converges within a preset range to form a word segmentation model.
- the constructed neural network model may include four layers, which are respectively an input layer, a first hidden layer, a second hidden layer and an output layer, wherein the input of the input layer is the character feature vector of the training text, so
- the first hidden layer includes a first preset number of nodes
- the second hidden layer includes a second preset number of nodes
- the activation functions of the first hidden layer and the second hidden layer can use a relu function
- the output of the output layer is the probability that the character is of any type
- the activation function of the output layer may use a logistic function.
- a word segmentation processing module configured to perform word segmentation processing on the tagged text based on the word segmentation model.
- the above-mentioned neural network model can also choose other structures or adjust structural parameters, etc.
- an n-order Markov model n-gram model can also be used to perform word segmentation processing on the labeled text, etc.
- the corpus after word segmentation includes the labeled Abnormal semantic truncation text, and then the types of these abnormal semantic truncation can be inductively classified.
- the truncation type judging unit 240 is configured to judge the truncation type of each truncation in the abnormal semantic truncated text based on the corpus and preset classification rules.
- the preset classification rules mainly include: classify based on the corpus with abnormal semantic truncation.
- the corpus when abnormal semantic truncation occurs is expected words such as "um” and "uh”, such truncation types can be summarized as The modal particles are abnormally truncated.
- this type of truncation can be summarized as pause abnormal truncation, etc., and finally can be based on the corpus after word segmentation.
- the first type modal particles are abnormally truncated, such as "ah”, “amount”, “um”, “uh”, etc.;
- pause abnormal truncation mainly refers to the abnormal truncation caused by pause or interruption when the user expresses, such as "consult”, “to check”, “excuse me below”, “how to say”, “want to understand” wait;
- Abnormal truncation of spoken language mainly refers to the abnormal truncation caused by the occurrence of oral habitual vocabulary in expression, such as "this", “that”, “that is”, etc.
- truncation types can also be summarized according to specific business scenarios, that is, different truncation types can be summarized for different scenarios, and then, after determining the truncation type of abnormal truncation, corresponding identification can be formulated for different truncation types Strategy, in order to be able to analyze and respond to the user's voice information in a more humane manner in the intelligent question answering system, so as to avoid that the intelligent customer service has already started to reply when the abnormal truncation occurs.
- the rule system strategy can be adopted for the abnormal truncation of this truncation type, and the rule system can include three kinds of rule matching methods: head query matching, Special query matching and short sentence query matching, among them, head query matching mainly refers to the abnormal truncation of the query that is relatively small in number but relatively concentrated in the abnormal semantic truncation text, and the abnormal truncation is judged through the exact text matching method; the special query matching mainly It refers to the judgment of abnormal truncation by using regular matching for some queries with special formats; short sentence query matching is mainly for some short sentence queries that are difficult to solve by the model, marking the part-of-speech sequence, and judging the abnormal truncation by matching the part-of-speech sequence method.
- a dictionary containing abnormally truncated modal particles can be constructed. If the text corresponding to the user's current speech signal can accurately match the modal particles in the corresponding dictionary, it can be determined that the current speech signal is abnormal. Truncated, and then can control the corresponding intelligent system to wait for a short period of time.
- the method of combining rules and models can be used for identification and detection.
- the strategy of combining the rule system and classification model includes: based on the rule system strategy, the speech signal to be detected is abnormally Semantic truncation, if abnormal semantic truncation is not detected, abnormal semantic truncation is performed on the speech signal to be detected again based on the classification model.
- phrases and phrases that frequently appear in the truncated sentences can be counted as a rule dictionary.
- the model can choose bert as the classification model.
- the training process of the classification model includes:
- the middle and long sentence corpus with abnormal semantic truncation is used as a positive example, and the non-truncated corpus is used as a negative example to construct a training set;
- the representation is input into the transformer structure of the bert model, and the output vector of the hidden state of the last layer of the transformer structure is obtained;
- the output vector is input into a fully connected layer, and the probability score of the category is output through the fully connected layer;
- the bert model is iteratively trained based on the training set until the error of the classification result converges within a preset range to form the classification model.
- the model structure can adopt the standard BERT model, namely 12-layer, 768-hidden, 12-heads, 110M parameters.
- the whole training process is, firstly, the training data in the preprocessed training set passes through the embedding layer to obtain the representation of the corresponding text, and then the representation is sent to the transformer, and the output vector of the last hidden state is sent to a fully connected layer.
- the output of the connection layer is the probability score of the two categories, and the category with the highest score is taken as the final prediction result.
- the strategy of combining the rule system and the model can be used. First, the beginning and end of the text to be detected are matched. If the rule system cannot be determined, the classification model is further used to distinguish and give the detection As a result; if the rule system matches directly as an anomalous truncation case, then no model checking is required.
- the combination of rules and models is also adopted. Similar to the second case, the colloquial habitual vocabulary frequently appearing in the truncated sentence can be counted first, and a rule dictionary can be established, including the exact matching dictionary of phrases and the matching dictionary of special formats. Similarly, use such truncated corpus as positive examples and non-truncated corpus as negative examples to construct a training set and train the BERT classification model. The final strategy is to use the rule system to match the end of the text to be detected. If the rule system cannot be determined, the classification model is used for discrimination and the detection result is given.
- the speech signal to be detected is usually a sentence.
- the intelligent question answering system whenever the user outputs a sentence, it is detected for abnormal semantic truncation, thereby achieving the purpose of improving the performance of the intelligent question answering system.
- the waiting time of the intelligent customer service can be flexibly set, for example, 300 milliseconds
- the electronic device 1 may include a processor 10 , a memory 11 and a bus, and may also include a computer program stored in the memory 11 and operable on the processor 10 , such as an abnormal semantic truncation detection program 12 .
- the processor 10 may be composed of integrated circuits, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same function or different functions, including one or more Central processing unit (Central Processing unit, CPU), microprocessor, digital processing chip, graphics processor and a combination of various control chips, etc.
- the processor 10 is the control core (Control Unit) of the electronic device, which uses various interfaces and lines to connect the various components of the entire electronic device, and runs or executes programs or modules stored in the memory 11 (such as exception Semantic truncation detection program, etc.), and call the data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
- Control Unit Control Unit
- the bus may be a peripheral component interconnect standard (PCI for short) bus or an extended industry standard architecture (EISA for short) bus or the like.
- PCI peripheral component interconnect standard
- EISA extended industry standard architecture
- the bus can be divided into address bus, data bus, control bus and so on.
- the bus is configured to realize connection and communication between the memory 11 and at least one processor 10 and the like.
- FIG. 3 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 3 does not constitute a limitation to the electronic device 1, and may include fewer or more components, or combinations of certain components, or different arrangements of components.
- the electronic device 1 can also include a power supply (such as a battery) for supplying power to various components.
- the power supply can be logically connected to the at least one processor 10 through a power management device, so that the power supply can be controlled by power management.
- the device implements functions such as charge management, discharge management, and power consumption management.
- the power supply may also include one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
- the electronic device 1 may also include various sensors, bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
- the electronic device 1 may also include a network 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 are usually used in the electronic device 1 Establish a communication connection with other electronic devices.
- a network 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 are usually used in the electronic device 1 Establish a communication connection with other electronic devices.
- the electronic device 1 may further include a user interface, which may be a display (Display) or an input unit (such as a keyboard (Keyboard)).
- the user interface may also be a standard wired interface or a wireless interface.
- the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, and the like.
- the display may also be appropriately called a display screen or a display unit, and is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
- the artificial intelligence-based abnormal semantic truncation detection program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions, and when running in the processor 10, it can realize:
- abnormal semantic truncation detection is performed on the speech signal to be detected.
- an optional technical solution is to perform phonetic-to-character recognition on the original corpus, so that the step of obtaining the recognized text corresponding to the original prediction includes:
- the recognized text is corrected based on the translated text, and the corrected text is acquired as the recognized text.
- the training process of the speech recognition model includes:
- the step of performing word segmentation on the labeled text includes: constructing a deep neural network model
- the neural network model is iteratively trained until the neural network model converges within a preset range to form a word segmentation model
- the truncation types include abnormal truncation types of modal particles, abnormal truncation types of pauses and abnormal truncation types of spoken language;
- the identification strategy includes a rule system strategy corresponding to the abnormal truncation type of the modal particle, and a rule system and a classification model combination strategy corresponding to the abnormal truncation type of the pause and the abnormal truncation type of the spoken language;
- the strategy of combining the rule system and the classification model includes: performing abnormal semantic truncation on the speech signal to be detected based on the rule system strategy, and performing abnormal semantic truncation on the speech signal to be detected based on the classification model if no abnormal semantic truncation is detected. Semantic truncation.
- rule system strategy includes: head query matching rules, special query matching rules and short sentence query matching rules;
- the training process of the classification model includes:
- the middle and long sentence corpus with abnormal semantic truncation is used as a positive example, and the non-truncated corpus is used as a negative example to construct a training set;
- the representation is input into the transformer structure of the bert model, and the output vector of the hidden state of the last layer of the transformer structure is obtained;
- the output vector is input into a fully connected layer, and the probability score of the category is output through the fully connected layer;
- the bert model is iteratively trained based on the training set until the error of the classification result converges within a preset range to form the classification model.
- an optional technical solution is that, after performing abnormal semantic truncation detection on the speech signal to be detected based on the recognition strategy, it also includes:
- the intelligent customer service When the speech signal to be detected does not belong to abnormal semantic truncation, the intelligent customer service will feed back the reply content corresponding to the speech signal to be detected according to a normal process.
- the integrated modules/units of the electronic device 1 are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
- the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a removable hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM, Read-Only Memory) .
- the computer-readable storage medium may be non-volatile or volatile.
- 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 may be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional module in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software function modules.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Biophysics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Human Computer Interaction (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Machine Translation (AREA)
Abstract
本申请涉及人工智能技术领域,揭露一种异常语义截断检测方法,包括:获取原始语料,对原始语料进行音转字识别,以得到原始语料对应的识别文本;对所述识别文本中的异常语义截断文本进行标注,得到对应的标注文本;对所述标注文本进行分词处理,得到标注文本对应的分词后的语料;基于语料以及预设分类规则,判断所述异常语义截断文本中各截断的截断类型;基于所述截断类型,制定与所述截断类型相对应的识别策略;基于所述识别策略对待检测语音信号进行异常语义截断检测。本申请可以实现更人性化的智能问答。
Description
本申请要求于2021年10月22日提交中国专利局、申请号为202111232008.7,发明名称为“异常语义截断检测方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及人工智能技术领域,尤其涉及一种异常语义截断检测的方法、装置、电子设备及计算机可读存储介质。
随着社会的发展及生活节奏的加快,人们对生活质量及服务质量的追求也越来越高,例如,人们使用的终端设备也从传统的PC、电视、电话等发展到了智能手机、智能穿戴等设备,对应的网络信息也呈现出共享化、个性化、实时化、大数据化等特点。因此,为适应社会的发展和用户的需求,以及克服人工客服存在的时间和精力限制等问题,智能克服应运而生,其能够24小时在线为不同用户同时解决问题,工作效率高,是传统人工客服所不具备的。
在现有的智能客服系统中,发明人意识到一般的交互流程是用户先输出语音,然后智能客服机器人会对用户的语音进行识别并提供对应的服务,但在交互过程中,经常会出现用户只说了几个字,然后停顿了一下,正准备继续说话时,客服机器人却已经开始了智能答复。此时,用户的真正意图无法被正确识别,导致用户与智能机器人之间的交互次数增加,影响用户的体验效果。但是,如果客服机器人等待时间设置过程,用户说完需要等待客服机器人反馈的时间也相应增多,这同样也会给用户带来较差的体验。最后会导致大量的服务涌入人工坐席,增加公司的运营成本,客户满意度也会受到影响。
发明内容
本申请提供一种异常语义截断检测方法、装置、电子设备及计算机可读存储介质,其主要目的在于提高了异常语义截断检测的效率。
为实现上述目的,本申请提供的一种异常语义截断检测方法,包括:获取原始语料,对所述原始语料进行音转字识别,以得到所述原始语料对应的识别文本;
对所述识别文本中的异常语义截断文本进行标注,得到所述识别文本对应的标注文本;
对所述标注文本进行分词处理,得到所述标注文本对应的分词后的语料;
基于语料以及预设分类规则,判断所述异常语义截断文本中各截断的截断类型;
基于所述截断类型,制定与所述截断类型相对应的识别策略;
基于所述识别策略对待检测语音信号进行异常语义截断检测。
为了解决上述问题,本申请还提供一种异常语义截断检测装置,所述装置包括:
识别文本获取单元,用于获取原始预料,对所述原始语料进行音转字识别,以得到所述原始预料对应的识别文本;
标注文本获取单元,用于对所述识别文本中的异常语义截断文本进行标注,得到所述识别文本对应的标注文本;
分词语料获取单元,用于对所述标注文本进行分词处理,得到所述标注文本对应的分 词后的语料;
截断类型判断单元,用于基于语料以及预设分类规则,判断所述异常语义截断文本中各截断的截断类型;
识别策略制定单元,用于基于所述截断类型,制定与所述截断类型相对应的识别策略;
异常语义截断检测单元,用于基于所述识别策略对待检测语音信号进行异常语义截断检测。
为了解决上述问题,本申请还提供一种电子设备,所述电子设备包括:
至少一个处理器;以及,
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行异常语义截断检测方法中的步骤;其中,
所述异常语义截断检测方法,包括:
获取原始语料,对所述原始语料进行音转字识别,以得到所述原始语料对应的识别文本;
对所述识别文本中的异常语义截断文本进行标注,得到所述识别文本对应的标注文本;
对所述标注文本进行分词处理,得到所述标注文本对应的分词后的语料;
基于所述语料以及预设分类规则,判断所述异常语义截断文本中各截断的截断类型;
基于所述截断类型,制定与所述截断类型相对应的识别策略;
基于所述识别策略对待检测语音信号进行异常语义截断检测。
为了解决上述问题,本申请还提供一种计算机可读存储介质,
存储有计算机程序,其中,所述计算机程序被处理器执行时实现异常语义截断检测方法中的步骤;其中,
所述异常语义截断检测方法,包括:
获取原始语料,对所述原始语料进行音转字识别,以得到所述原始语料对应的识别文本;
对所述识别文本中的异常语义截断文本进行标注,得到所述识别文本对应的标注文本;
对所述标注文本进行分词处理,得到所述标注文本对应的分词后的语料;
基于所述语料以及预设分类规则,判断所述异常语义截断文本中各截断的截断类型;
基于所述截断类型,制定与所述截断类型相对应的识别策略;
基于所述识别策略对待检测语音信号进行异常语义截断检测。
本申请实施例通过对原始语料进行音转字识别,获取对应的识别文本,然后对识别文本中的异常语义截断文本进行标注和分词处理,并获取对应的分词后的语料,进而判断所述异常语义截断文本中各截断的截断类型,并基于所述截断类型,制定与所述截断类型相对应的识别策略,最后,基于所述识别策略对待检测语音信号进行异常语义截断检测,能够准确地对用户的语义截断进行判断,并在用户出现异常语义截断的情况时进行等待处理,提高智能问答系统的灵活性以及用户的体验效果。
图1为本申请一实施例提供的异常语义截断检测方法的流程示意图;
图2为本申请一实施例提供的异常语义截断检测装置的模块示意图;
图3为本申请一实施例提供的实现异常语义截断检测方法的电子设备的内部结构示意图;
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
为解决现有智能客服系统中存在的,不能识别用户的停顿是异常还是正常的情况,导致用户继续进行语音输出时,客服机器人却已开始智能问答,影响用户体验等问题,本申请提供一种异常语义截断检测方法,能够准确地对用户的语义截断进行判断,并在用户出现异常语义截断的情况时进行等待处理,提高智能问答系统的灵活性以及用户的体验效果。
本申请实施例可以基于人工智能技术对相关的数据进行获取和处理。其中,人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。
人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、机器人技术、生物识别技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。
本申请提供一种异常语义截断检测方法。参照图1所示,为本申请一实施例提供的异常语义截断检测方法的流程示意图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。
在本实施例中,异常语义截断检测方法包括:
S100:获取原始预料,对所述原始语料进行音转字识别,以得到所述原始预料对应的识别文本。
其中,可通过预训练的语音识别模型对原始语料进行音转字识别,但是由于语音识别模型会存在一定的识别误差,为了提高识别文本的精度,方便后期能够准确地获取属于非正常(异常)截断的截断类型,该步骤在对原始语料进行音转字识别过程中,还可以同时通过人工对原始语料进行转译处理。
具体地,首先,对获取的原始语料分别进行音转字识别以及人工转译处理,获取对应的识别文本以及转译文本;然后,基于转译文本对识别文本中的错误进行纠正,获取纠正后的文本作为最终的识别文本。
其中,语音识别模型的预训练过程可进一步包括:
S110:构建包括编码器网络和解码器网络的神经网络模型;
S120:将获取的预训练数据输入所述编码器网络进行编码处理,以获取与所述训练数据对应的隐藏特征,作为所述编码器网络的输出;
S130:通过所述解码器网络对所述编码器网络的输出进行解码处理,以获取与所述训练数据对应的文本标签序列;
S140:获取所述隐藏特征下的所述训练数据的真实文本序列的负对数似然,作为所述神经网络模型的损失;
S150:基于所述训练数据迭代训练所述神经网络模型,直至所述损失收敛在预设范围内,形成所述语音识别模型。
具体地,在训练过程中,神经网络模型的损失的表达同时如下:
在上述公式中,y表示所述训练数据的真实文本序列,h表示所述隐藏特征,t表示第t个隐藏特征,P(y|h
t)表示所述真实文本序列在第t个隐藏特征处的概率。
S200:对所述识别文本中的异常语义截断文本进行标注,得到所述识别文本对应的标注文本。
其中,异常语义截断文本主要是指在原始语料中,出现语句短暂中断的情况,但该短 暂的中断并不是用户本意的语句停顿,即非主观意识的语句停顿,例如,当用户在语言表达过程中出现“我想咨询一下,那个”出现短暂的中断时,或者,出现“额”、“嗯”等语气词时,用户的真实意思并没有表达完整,这种情况可默认为异常语义截断,此时,可指示对应的智能客服进行一定时间的等待,而不是直接进行答复。
具体地,对异常语义截断文本的标注可通过人工进行标注,也可训练标注模型进行标注,在本方案中不做具体限制。
S300:对所述标注文本进行分词处理,得到所述标注文本对应的分词后的语料。
其中,在对所述标注文本进行分词处理之前,还包括对所述标注文本进行预处理的过程,其中,该预处理的过程包括:删除标注文本中的标点、乱码、符号等,仅保留文字部分,以及对文本进行格式调整等操作。
具体地,对标注文本进行分词处理的过程可进一步包括:
S310:构建深度神经网络模型;
S320:基于获取的训练文本,对所述神经网络模型进行迭代训练,直至所述神经网络模型收敛在预设范围内,形成分词模型。
作为具体示例,所构建的神经网络模型可包括四层,分别为输入层、第一隐藏层、第二隐藏层和输出层,其中的输入层的输入为所述训练文本的字符特征向量,所述第一隐藏层包括第一预设数目的节点,所述第二隐藏层包括第二预设数目的节点,所述第一隐藏层和所述第二隐藏层的激活函数可采用relu函数,所述输出层的输出为所述字符为任一类型的概率,所述输出层的激活函数可采用logistics函数。
S330:基于所述分词模型对所述标注文本进行分词处理。
可知,上述神经网络模型也可以选用其他结构或调整结构参数等,例如,也可采用n阶马尔科夫模型n-gram模型,对标注文本进行分词处理等,分词后的语料中即包含标注的异常语义截断文本,进而可据此对这些异常语义截断的类型进行归纳分类处理。
S400:基于所述语料以及预设分类规则,判断所述异常语义截断文本中各截断的截断类型。
具体地,预设分类规则主要包括:基于出现异常语义截断的语料进行分类,当异常语义截断出现时的语料为“嗯”、“呃”等预期词时,可将这类的截断类型归纳为语气词异常截断,当异常语义截断出现时的语料为“请问以下”、“怎么说呢”等时,可将这类截断类型归纳为停顿异常截断等,最终可基于分词后的语料进行全面的统计分析,从句长、首尾字、句式结构、出现频率等多个维度进行全方位分析,总结归纳语句容易出现异常截断的类型(即截断类型)。作为具体示例,在业务应用过程中,可归纳以下三种主要的截断类型:
第一种:语气词异常截断,例如“啊”、“额”、“嗯”、“呃”等;
第二种:停顿异常截断,主要指在用户表达时由于停顿或中断导致的异常截断,例如“咨询一下”、“要查”、“请问以下”、“怎么说呢”、“想了解下”等;
第三种:口语异常截断,主要指在表达时出现口语习惯词汇导致的异常截断,例如“这个”、“那个”、“就是”等。
可知,上述的截断类型也可根据具体的业务场景进行归纳总结,即针对不同的场景可归纳不同的截断类型,进而,在确定异常截断的截断类型后,可针对不同的截断类型制定对应的识别策略,以便能够在智能问答系统中,对用户的语音信息进行更加人性化的分析及对答,避免在异常截断出现时,智能客服却已经开始进行回复。
S500:基于所述截断类型,制定与所述截断类型相对应的识别策略。
其中,由于上述第一种语气词异常截断类型,多出现在短句中,针对这种截断类型的异常截断,可采用规则系统策略,规则系统可包括三种规则匹配方法:头部query匹配、特殊query匹配和短句query匹配,其中,头部query匹配,主要是指针对异常语义截断文 本中数量较少但比较集中的query,通过文本精确匹配的方式进行异常截断进行判定;特殊query匹配主要是指针对一些特殊格式的query,采用正则匹配的方式进行异常截断的判断;短句query匹配,主要是针对一些模型难以解决的短句query,标注词性序列,通过匹配词性序列进行异常截断判定的方法。
在实际应用过程中,可构建一个包含异常截断的语气词的字典,如果与用户的当前语音信号对应的文本中能都精确匹配到相应的字典中的语气词,则可判定当前语音信号属于异常截断,进而可控制对应的智能系统进行短暂的等待处理。
此外,对于第二种停顿异常截断的情况,可采用规则系统和模型相组合的方法进行识别检测,所述规则系统和分类模型相结合策略包括:基于规则系统策略对所述待检测语音信号进行异常语义截断,如果未检测到异常语义截断,则基于分类模型再次对所述待检测语音信号进行异常语义截断,在实际应用中,可统计截断语句高频出现的短语和词组,作为规则字典。另外,模型方面可选择bert作为分类模型。
具体地,所述分类模型的训练过程包括:
将出现语义异常截断的中长句语料作为正例,非截断的语料作为负例,构建训练集;
基于构建的训练集训练初始化的bert模型,通过所述bert模型的嵌入层获取所述训练集的文本的表征;
将所述表征输入所述bert模型的transformer结构中,获取所述transformer结构的最后一层的隐藏状态的输出向量;
将所述输出向量输入全连接层,通过所述全连接层输出类别的概率得分;
基于所述概率得分确定所述训练集中的训练数据的分类结果;
基于所述训练集迭代训练所述bert模型,直至所述分类结果的误差收敛在预设范围内,形成所述分类模型。
进一步地,模型结构可采用标准的BERT模型,即12-layer,768-hidden,12-heads,110M parameters。整个训练过程是,首先预处理好的训练集中的训练数据经过embedding层,得到对应文本的表征,接着将表征送入transformer中,将最后一层隐藏状态的输出向量送入一个全连接层,全连接层的输出结果就是两个类别的概率得分,取得分高的类别作为最终的预测结果。
最后,针对第二种停顿异常截断,可使用规则系统和模型相结合的策略,首先对待检测文本的开头及结尾进行匹配,如果规则系统无法确定,则进一步使用分类模型进行判别,并给出检测结果;如果规则系统直接匹配为异常截断情况,则无需进行模型检测。
对于第三种口语词汇的截断类型,同样采用规则与模型的组合方法。与第二种情况相似,可先统计出截断语句高频出现的口语习惯词汇,建立一个规则字典,包括短语的精确匹配字典及特殊格式匹配字典。同样,将这类截断的语料作为正例,非截断的语料作为负例,构建训练集,训练BERT分类模型。最终的策略是使用规则系统对待检测文本的结尾匹配,如果规则系统无法确定,则使用分类模型进行判别,给出检测结果。
S600:基于所述识别策略对待检测语音信号进行异常语义截断检测。
具体地,识别策略中可包括上述所有策略的集合,然后在对待检测语音信号进行异常语义截断检测时,可直接通过识别策略进行直接检测,识别策略会结合规则和模型对其中的异常截断进行检测识别。
其中,识别策略包括预先构造的语气词字典、精确匹配字典、口语习惯字典以及分类模型,通过识别策略对待检测语音信号进行检测的过程中,默认先通过上述各字典进行匹配检测,如果能够检测到对应的匹配信息,则直接确定当前语音信号为异常语义截断,否则,进一步通过分类模型对该待检测语音信号进行检测,最终确定其是否为异常语义截断的情况。
需要说明的是,上述待检测语音信号通常为一个句子,在智能问答系统中,每当用户 输出一个句子时,即对其进行异常语义截断检测,进而达到提高智能问答系统性能的目的。
此外,通过预先制定的识别策略对待检测语音信号进行异常语义截断检测之后,还可以包括:
(1)、若当前待检测语音信号属于异常语义截断时,则延长智能客服的等待时间,该等待时间可灵活设置,例如300毫秒;
(2)、若当前待检测语音信号不属于异常语义截断时,则智能客服按照正常流程反馈对应的回答内容。
根据上述本申请的异常语义截断检测方法,截断类型的归纳是基础,其准确度决定了后续采取什么样的解决策略,通过对文本的长度、首尾字、句式结构、句子词性顺序、分词后的片段频率分布等不同角度分析,可对各类的异常语义截断进行归纳分类。比如“咨询一下”、“我要问一下”这样的文本比较多,在目前的智能问答系统中,存在用户在说完这句话后思考停顿了一下,准备说下一句时,客服机器人却开始回复了。同样地,用户听完一段播报后,无意识地说了“呃”,拖延了一两秒,刚说下一个字时,客服机器人便已经开始回复。虽然这两种都是语义截断,但类型不同,前一种多为用户主观停顿,句式表达多为主语+动词,后一种多以一些语气词的形式出现,无其他内容,因此准确全面地对上述各种异常语义截断进行统计归纳,能够为后续的检测效果带来帮助。
最后,在具体应用过程中,还可以不断对识别策略进行优化,利用已有的规则系统、语言模型等筛选一些截断数据进行在线抽样,并进行人工标注,同时线上随机抽样进行人工标注,可增强数据,丰富训练集,达到异常语义截断的检测精度和效率。
如图2所示,是本申请异常语义截断检测装置的功能模块图。
本申请所述异常语义截断检测装置200可以安装于电子设备中。根据实现的功能,所述异常语义截断检测装置可以包括以下单元:识别文本获取单元210、标注文本获取单元220、分词语料获取单元230、截断类型判断单元240、识别策略制定单元250和异常语义截断检测单元260。本发所述单元也可以称之为模块,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。
在本实施例中,关于各模块/单元的功能如下:
识别文本获取单元210,用于获取原始预料,对所述原始语料进行音转字识别,以得到所述原始预料对应的识别文本。
其中,可通过预训练的语音识别模型对原始语料进行音转字识别,但是由于语音识别模型会存在一定的识别误差,为了提高识别文本的精度,方便后期能够准确地获取属于非正常(异常)截断的截断类型,该步骤在对原始语料进行音转字识别过程中,还可以同时通过人工对原始语料进行转译处理。
具体地,首先,对获取的原始语料分别进行音转字识别以及人工转译处理,获取对应的识别文本以及转译文本;然后,基于转译文本对识别文本中的错误进行纠正,获取纠正后的文本作为最终的识别文本。
其中,语音识别模型的预训练过程可进一步包括:
网络模型构建模块,用于构建包括编码器网络和解码器网络的神经网络模型;
隐藏特征获取模块,用于将获取的预训练数据输入所述编码器网络进行编码处理,以获取与所述训练数据对应的隐藏特征,作为所述编码器网络的输出;
文本标签序列获取模块,用于通过所述解码器网络对所述编码器网络的输出进行解码处理,以获取与所述训练数据对应的文本标签序列;
损失确定模块,用于获取所述隐藏特征下的所述训练数据的真实文本序列的负对数似然,作为所述神经网络模型的损失;
语音识别模型形成模块,用于基于所述训练数据迭代训练所述神经网络模型,直至所述损失收敛在预设范围内,形成所述语音识别模型。
具体地,在训练过程中,神经网络模型的损失的表达同时如下:
在上述公式中,y表示所述训练数据的真实文本序列,h表示所述隐藏特征,t表示第t个隐藏特征,P(y|h
t)表示所述真实文本序列在第t个隐藏特征处的概率。
标注文本获取单元220,用于对所述识别文本中的异常语义截断文本进行标注,得到所述识别文本对应的标注文本。
其中,异常语义截断文本主要是指在原始语料中,出现语句短暂中断的情况,但该短暂的中段并不是用户本意的语句停顿,即非主观意识的语句停顿,例如,当用户在语言表达过程中出现“我想咨询一下,那个”出现短暂的中断时,或者,出现“额”、“嗯”等语气词时,用户的真实意思并没有表达完整,这种情况可默认为异常语义截断,此时,可指示对应的智能客服进行一定时间的等待,而不是直接进行答复。
具体地,对异常语义截断文本的标注可通过人工进行标注,也可训练标注模型进行标注,在本方案中不做具体限制。
分词语料获取单元230,用于对所述标注文本进行分词处理,得到所述标注文本对应的分词后的语料。
其中,在对所述标注文本进行分词处理之前,还包括对所述标注文本进行预处理的过程,其中,该预处理的过程包括:删除标注文本中的标点、乱码、符号等,仅保留文字部分,以及对文本进行格式调整等操作。
具体地,对标注文本进行分词处理可进一步包括:
网络模型构建模块,用于构建深度神经网络模型;
分词模型形成模块,用于基于获取的训练文本,对所述神经网络模型进行迭代训练,直至所述神经网络模型收敛在预设范围内,形成分词模型。
作为具体示例,所构建的神经网络模型可包括四层,分别为输入层、第一隐藏层、第二隐藏层和输出层,其中的输入层的输入为所述训练文本的字符特征向量,所述第一隐藏层包括第一预设数目的节点,所述第二隐藏层包括第二预设数目的节点,所述第一隐藏层和所述第二隐藏层的激活函数可采用relu函数,所述输出层的输出为所述字符为任一类型的概率,所述输出层的激活函数可采用logistics函数。
分词处理模块,用于基于所述分词模型对所述标注文本进行分词处理。
可知,上述神经网络模型也可以选用其他结构或调整结构参数等,例如,也可采用n阶马尔科夫模型n-gram模型,对标注文本进行分词处理等,分词后的语料中即包含标注的异常语义截断文本,进而可据此对这些异常语义截断的类型进行归纳分类处理。
截断类型判断单元240,用于基于语料以及预设分类规则,判断所述异常语义截断文本中各截断的截断类型。
具体地,预设分类规则主要包括:基于出现异常语义截断的语料进行分类,当异常语义截断出现时的语料为“嗯”、“呃”等预期词时,可将这类的截断类型归纳为语气词异常截断,当异常语义截断出现时的语料为“请问以下”、“怎么说呢”等时,可将这类截断类型归纳为停顿异常截断等,最终可基于分词后的语料进行全面的统计分析,从句长、首尾字、句式结构、出现频率等多个维度进行全方位分析,总结归纳语句容易出现异常截断的类型(即截断类型)。作为具体示例,在业务应用过程中,可归纳以下三种主要的截断类型:
第一种:语气词异常截断,例如“啊”、“额”、“嗯”、“呃”等;
第二种:停顿异常截断,主要指在用户表达时由于停顿或中断导致的异常截断,例如“咨询一下”、“要查”、“请问以下”、“怎么说呢”、“想了解下”等;
第三种:口语异常截断,主要指在表达时出现口语习惯词汇导致的异常截断,例如“这 个”、“那个”、“就是”等。
可知,上述的截断类型也可根据具体的业务场景进行归纳总结,即针对不同的场景可归纳不同的截断类型,进而,在确定异常截断的截断类型后,可针对不同的截断类型制定对应的识别策略,以便能够在智能问答系统中,对用户的语音信息进行更加人性化的分析及对答,避免在异常截断出现时,智能客服却已经开始进行回复。
识别策略制定单元250,用于基于所述截断类型,制定与所述截断类型相对应的识别策略。
其中,由于上述第一种语气词异常截断类型,多出现在短句中,针对这种截断类型的异常截断,可采用规则系统策略,规则系统可包括三种规则匹配方法:头部query匹配、特殊query匹配和短句query匹配,其中,头部query匹配,主要是指针对异常语义截断文本中数量较少但比较集中的query,通过文本精确匹配的方式进行异常截断进行判定;特殊query匹配主要是指针对一些特殊格式的query,采用正则匹配的方式进行异常截断的判断;短句query匹配,主要是针对一些模型难以解决的短句query,标注词性序列,通过匹配词性序列进行异常截断判定的方法。
在实际应用过程中,可构建一个包含异常截断的语气词的字典,如果与用户的当前语音信号对应的文本中能都精确匹配到相应的字典中的语气词,则可判定当前语音信号属于异常截断,进而可控制对应的智能系统进行短暂的等待处理。
此外,对于第二种停顿异常截断的情况,可采用规则和模型相组合的方法进行识别检测,所述规则系统和分类模型相结合策略包括:基于规则系统策略对所述待检测语音信号进行异常语义截断,如果未检测到异常语义截断,则基于分类模型再次对所述待检测语音信号进行异常语义截断,在实际应用中,可统计截断语句高频出现的短语和词组,作为规则字典。另外,模型方面可选择bert作为分类模型。
具体地,所述分类模型的训练过程包括:
将出现语义异常截断的中长句语料作为正例,非截断的语料作为负例,构建训练集;
基于构建的训练集训练初始化的bert模型,通过所述bert模型的嵌入层获取所述训练集的文本的表征;
将所述表征输入所述bert模型的transformer结构中,获取所述transformer结构的最后一层的隐藏状态的输出向量;
将所述输出向量输入全连接层,通过所述全连接层输出类别的概率得分;
基于所述概率得分确定所述训练集中的训练数据的分类结果;
基于所述训练集迭代训练所述bert模型,直至所述分类结果的误差收敛在预设范围内,形成所述分类模型。
进一步地,模型结构可采用标准的BERT模型,即12-layer,768-hidden,12-heads,110M parameters。整个训练过程是,首先预处理好的训练集中的训练数据经过embedding层,得到对应文本的表征,接着将表征送入transformer中,将最后一层隐藏状态的输出向量送入一个全连接层,全连接层的输出结果就是两个类别的概率得分,取得分高的类别作为最终的预测结果。
最后,针对第二种停顿异常截断,可使用规则系统和模型相结合的策略,首先对待检测文本的开头及结尾进行匹配,如果规则系统无法确定,则进一步使用分类模型进行判别,并给出检测结果;如果规则系统直接匹配为异常截断情况,则无需进行模型检测。
对于第三种口语词汇的截断类型,同样采用规则与模型的组合方法。与第二种情况相似,可先统计出截断语句高频出现的口语习惯词汇,建立一个规则字典,包括短语的精确匹配字典及特殊格式匹配字典。同样,将这类截断的语料作为正例,非截断的语料作为负例,构建训练集,训练BERT分类模型。最终的策略是使用规则系统对待检测文本的结尾匹配,如果规则系统无法确定,则使用分类模型进行判别,给出检测结果。
异常语义截断检测单元260,用于基于所述识别策略对待检测语音信号进行异常语义截断检测。
具体地,识别策略中可包括上述所有策略的集合,然后在对待检测语音信号进行异常语义截断检测时,可直接通过识别策略进行直接检测,识别策略会结合规则和模型对其中的异常截断进行检测识别。
其中,识别策略包括预先构造的语气词字典、精确匹配字典、口语习惯字典以及分类模型,通过识别策略对待检测语音信号进行检测的过程中,默认先通过上述各字典进行匹配检测,如果能够检测到对应的匹配信息,则直接确定当前语音信号为异常语义截断,否则,进一步通过分类模型对该待检测语音信号进行检测,最终确定其是否为异常语义截断的情况。
需要说明的是,上述待检测语音信号通常为一个句子,在智能问答系统中,每当用户输出一个句子时,即对其进行异常语义截断检测,进而达到提高智能问答系统性能的目的。
此外,通过预先制定的识别策略对待检测语音信号进行异常语义截断检测之后,还可以包括:
(1)、若当前待检测语音信号属于异常语义截断时,则延长智能客服的等待时间,该等待时间可灵活设置,例如300毫秒;
(2)、若当前待检测语音信号不属于异常语义截断时,则智能客服按照正常流程反馈对应的回答内容。
如图3所示,是本申请实现异常语义截断检测方法的电子设备的结构示意图。
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如异常语义截断检测程序12。
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如异常语义截断检测程序的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如异常语义截断检测程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。
图3仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图3示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。
所述电子设备1中的所述存储器11存储的基于人工智能的异常语义截断检测程序12是多个指令的组合,在所述处理器10中运行时,可以实现:
获取原始语料,对所述原始语料进行音转字识别,以得到所述原始语料对应的识别文本;
对所述识别文本中的异常语义截断文本进行标注,得到所述识别文本对应的标注文本;
对所述标注文本进行分词处理,得到所述标注文本对应的分词后的语料;
基于语料以及预设分类规则,判断所述异常语义截断文本中各截断的截断类型;
基于所述截断类型,制定与所述截断类型相对应的识别策略;
基于所述识别策略对待检测语音信号进行异常语义截断检测。
此外,可选的技术方案是,对所述原始语料进行音转字识别,以得到所述原始预料对应的识别文本的步骤包括:
通过预训练的语音识别模型对所述原始语料进行音转字识别,并获取对应的识别文本;同时,
对所述原始语料进行人工转译处理,并获取对应的转译文本;
基于所述转译文本对所述识别文本进行纠正,获取纠正后的文本作为所述识别文本。
此外,可选的技术方案是,所述语音识别模型的训练过程包括:
构建包括编码器网络和解码器网络的神经网络模型;
将获取的预训练数据输入所述编码器网络进行编码处理,以获取与所述训练数据对应的隐藏特征,作为所述编码器网络的输出;
通过所述解码器网络对所述编码器网络的输出进行解码处理,以获取与所述训练数据对应的文本标签序列;
获取所述隐藏特征下的所述训练数据的真实文本序列的负对数似然,作为所述神经网络模型的损失;
基于所述训练数据迭代训练所述神经网络模型,直至所述损失收敛在预设范围内,形成所述语音识别模型。
此外,可选的技术方案是,所述对所述标注文本进行分词处理的步骤包括:构建深度神经网络模型;
基于获取的训练文本,对所述神经网络模型进行迭代训练,直至所述神经网络模型收敛在预设范围内,形成分词模型;
基于所述分词模型对所述标注文本进行分词处理。
此外,可选的技术方案是,所述截断类型包括语气词异常截断类型、停顿异常截断类型和口语异常截断类型;
所述识别策略包括与所述语气词异常截断类型相对应的规则系统策略,以及与所述停顿异常截断类型和所述口语异常截断类型相对应的规则系统和分类模型相结合策略;其中,
所述规则系统和分类模型相结合策略包括:基于规则系统策略对所述待检测语音信号进行异常语义截断,如果未检测到异常语义截断,则基于分类模型再次对所述待检测语音信号进行异常语义截断。
此外,可选的技术方案是,所述规则系统策略包括:头部query匹配规则、特殊query匹配规则和短句query匹配规则;
所述分类模型的训练过程包括:
将出现语义异常截断的中长句语料作为正例,非截断的语料作为负例,构建训练集;
基于构建的训练集训练初始化的bert模型,通过所述bert模型的嵌入层获取所述训练集的文本的表征;
将所述表征输入所述bert模型的transformer结构中,获取所述transformer结构的最后一层的隐藏状态的输出向量;
将所述输出向量输入全连接层,通过所述全连接层输出类别的概率得分;
基于所述概率得分确定所述训练集中的训练数据的分类结果;
基于所述训练集迭代训练所述bert模型,直至所述分类结果的误差收敛在预设范围内,形成所述分类模型。
此外,可选的技术方案是,在基于所述识别策略对待检测语音信号进行异常语义截断检测之后,还包括:
当所述待检测语音信号属于异常语义截断时,按照预设时间延长智能客服的等待时间;否则,
当所述待检测语音信号不属于异常语义截断时,所述智能客服按照正常流程反馈与所述待检测语音信号相对应的答复内容。
具体地,所述处理器10对上述指令的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。其中,所述计算机可读存储介质可以是非易失性,也可以是易失性。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申 请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。
Claims (20)
- 一种异常语义截断检测方法,其中,所述方法包括:获取原始语料,对所述原始语料进行音转字识别,以得到所述原始语料对应的识别文本;对所述识别文本中的异常语义截断文本进行标注,得到所述识别文本对应的标注文本;对所述标注文本进行分词处理,得到所述标注文本对应的分词后的语料;基于所述语料以及预设分类规则,判断所述异常语义截断文本中各截断的截断类型;基于所述截断类型,制定与所述截断类型相对应的识别策略;基于所述识别策略对待检测语音信号进行异常语义截断检测。
- 如权利要求1所述的异常语义截断检测方法,其中,所述对所述原始语料进行音转字识别,以得到所述原始语料对应的识别文本的步骤包括:通过预训练的语音识别模型对所述原始语料进行音转字识别,并获取对应的识别文本;同时,对所述原始语料进行人工转译处理,并获取对应的转译文本;基于所述转译文本对所述识别文本进行纠正,获取纠正后的文本作为所述识别文本。
- 如权利要求2所述的异常语义截断检测方法,其中,所述语音识别模型的训练过程包括:构建包括编码器网络和解码器网络的神经网络模型;将获取的预训练数据输入所述编码器网络进行编码处理,以获取与所述训练数据对应的隐藏特征,作为所述编码器网络的输出;通过所述解码器网络对所述编码器网络的输出进行解码处理,以获取与所述训练数据对应的文本标签序列;获取所述隐藏特征下的所述训练数据的真实文本序列的负对数似然,作为所述神经网络模型的损失;基于所述训练数据迭代训练所述神经网络模型,直至所述损失收敛在预设范围内,形成所述语音识别模型。
- 如权利要求1至3中任意一项所述的异常语义截断检测方法,其中,所述对所述标注文本进行分词处理的步骤包括:构建深度神经网络模型;基于获取的训练文本,对所述神经网络模型进行迭代训练,直至所述神经网络模型收敛在预设范围内,形成分词模型;基于所述分词模型对所述标注文本进行分词处理。
- 如权利要求1所述的异常语义截断检测方法,其中,所述截断类型包括语气词异常截断类型、停顿异常截断类型和口语异常截断类型;所述识别策略包括与所述语气词异常截断类型相对应的规则系统策略,以及与所述停顿异常截断类型和所述口语异常截断类型相对应的规则系统和分类模型相结合策略;其中,所述规则系统和分类模型相结合策略包括:基于规则系统策略对所述待检测语音信号进行异常语义截断,如果未检测到异常语义截断,则基于分类模型再次对所述待检测语音信号进行异常语义截断。
- 如权利要求5所述的异常语义截断检测方法,其中,所述规则系统策略包括:头部query匹配规则、特殊query匹配规则和短句query匹配规则;所述分类模型的训练过程包括:将出现语义异常截断的中长句语料作为正例,非截断的语料作为负例,构建训练集;基于构建的训练集训练初始化的bert模型,通过所述bert模型的嵌入层获取所述训练集的文本的表征;将所述表征输入所述bert模型的transformer结构中,获取所述transformer结构的最后一层的隐藏状态的输出向量;将所述输出向量输入全连接层,通过所述全连接层输出类别的概率得分;基于所述概率得分确定所述训练集中的训练数据的分类结果;基于所述训练集迭代训练所述bert模型,直至所述分类结果的误差收敛在预设范围内,形成所述分类模型。
- 如权利要求1所述的异常语义截断检测方法,其中,在基于所述识别策略对待检测语音信号进行异常语义截断检测之后,还包括:当所述待检测语音信号属于异常语义截断时,按照预设时间延长智能客服的等待时间;否则,当所述待检测语音信号不属于异常语义截断时,所述智能客服按照正常流程反馈与所述待检测语音信号相对应的答复内容。
- 一种异常语义截断检测装置,其中,所述装置包括:识别文本获取单元,用于获取原始语料,对所述原始语料进行音转字识别,以得到所述原始语料对应的识别文本;标注文本获取单元,用于对所述识别文本中的异常语义截断文本进行标注,得到所述识别文本对应的标注文本;分词语料获取单元,用于对所述标注文本进行分词处理,得到所述标注文本对应的分词后的语料;截断类型判断单元,用于基于所述语料以及预设分类规则,判断所述异常语义截断文本中各截断的截断类型;识别策略制定单元,用于基于所述截断类型,制定与所述截断类型相对应的识别策略;异常语义截断检测单元,用于基于所述识别策略对待检测语音信号进行异常语义截断检测。
- 一种电子设备,其中,所述电子设备包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行异常语义截断检测方法中的步骤;其中,所述异常语义截断检测方法,包括:获取原始语料,对所述原始语料进行音转字识别,以得到所述原始语料对应的识别文本;对所述识别文本中的异常语义截断文本进行标注,得到所述识别文本对应的标注文本;对所述标注文本进行分词处理,得到所述标注文本对应的分词后的语料;基于所述语料以及预设分类规则,判断所述异常语义截断文本中各截断的截断类型;基于所述截断类型,制定与所述截断类型相对应的识别策略;基于所述识别策略对待检测语音信号进行异常语义截断检测。
- 如权利要求9所述的电子设备,其中,所述对所述原始语料进行音转字识别,以得到所述原始语料对应的识别文本的步骤包括:通过预训练的语音识别模型对所述原始语料进行音转字识别,并获取对应的识别文本;同时,对所述原始语料进行人工转译处理,并获取对应的转译文本;基于所述转译文本对所述识别文本进行纠正,获取纠正后的文本作为所述识别文本。
- 如权利要求10所述的电子设备,其中,所述语音识别模型的训练过程包括:构建包括编码器网络和解码器网络的神经网络模型;将获取的预训练数据输入所述编码器网络进行编码处理,以获取与所述训练数据对应的隐藏特征,作为所述编码器网络的输出;通过所述解码器网络对所述编码器网络的输出进行解码处理,以获取与所述训练数据对应的文本标签序列;获取所述隐藏特征下的所述训练数据的真实文本序列的负对数似然,作为所述神经网络模型的损失;基于所述训练数据迭代训练所述神经网络模型,直至所述损失收敛在预设范围内,形成所述语音识别模型。
- 如权利要求9至11中任意一项所述的电子设备,其中,所述对所述标注文本进行分词处理的步骤包括:构建深度神经网络模型;基于获取的训练文本,对所述神经网络模型进行迭代训练,直至所述神经网络模型收敛在预设范围内,形成分词模型;基于所述分词模型对所述标注文本进行分词处理。
- 如权利要求9所述的电子设备,其中,所述截断类型包括语气词异常截断类型、停顿异常截断类型和口语异常截断类型;所述识别策略包括与所述语气词异常截断类型相对应的规则系统策略,以及与所述停顿异常截断类型和所述口语异常截断类型相对应的规则系统和分类模型相结合策略;其中,所述规则系统和分类模型相结合策略包括:基于规则系统策略对所述待检测语音信号进行异常语义截断,如果未检测到异常语义截断,则基于分类模型再次对所述待检测语音信号进行异常语义截断。
- 如权利要求13所述的电子设备,其中,所述规则系统策略包括:头部query匹配规则、特殊query匹配规则和短句query匹配规则;所述分类模型的训练过程包括:将出现语义异常截断的中长句语料作为正例,非截断的语料作为负例,构建训练集;基于构建的训练集训练初始化的bert模型,通过所述bert模型的嵌入层获取所述训练集的文本的表征;将所述表征输入所述bert模型的transformer结构中,获取所述transformer结构的最后一层的隐藏状态的输出向量;将所述输出向量输入全连接层,通过所述全连接层输出类别的概率得分;基于所述概率得分确定所述训练集中的训练数据的分类结果;基于所述训练集迭代训练所述bert模型,直至所述分类结果的误差收敛在预设范围内,形成所述分类模型。
- 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现异常语义截断检测方法中的步骤;其中,所述异常语义截断检测方法,包括:获取原始语料,对所述原始语料进行音转字识别,以得到所述原始语料对应的识别文本;对所述识别文本中的异常语义截断文本进行标注,得到所述识别文本对应的标注文本;对所述标注文本进行分词处理,得到所述标注文本对应的分词后的语料;基于所述语料以及预设分类规则,判断所述异常语义截断文本中各截断的截断类型;基于所述截断类型,制定与所述截断类型相对应的识别策略;基于所述识别策略对待检测语音信号进行异常语义截断检测。
- 如权利要求15所述的计算机可读存储介质,其中,所述对所述原始语料进行音转字识别,以得到所述原始语料对应的识别文本的步骤包括:通过预训练的语音识别模型对所述原始语料进行音转字识别,并获取对应的识别文本;同时,对所述原始语料进行人工转译处理,并获取对应的转译文本;基于所述转译文本对所述识别文本进行纠正,获取纠正后的文本作为所述识别文本。
- 如权利要求16所述的计算机可读存储介质,其中,所述语音识别模型的训练过程包括:构建包括编码器网络和解码器网络的神经网络模型;将获取的预训练数据输入所述编码器网络进行编码处理,以获取与所述训练数据对应的隐藏特征,作为所述编码器网络的输出;通过所述解码器网络对所述编码器网络的输出进行解码处理,以获取与所述训练数据对应的文本标签序列;获取所述隐藏特征下的所述训练数据的真实文本序列的负对数似然,作为所述神经网络模型的损失;基于所述训练数据迭代训练所述神经网络模型,直至所述损失收敛在预设范围内,形成所述语音识别模型。
- 如权利要求15至17中任意一项所述的计算机可读存储介质,其中,所述对所述标注文本进行分词处理的步骤包括:构建深度神经网络模型;基于获取的训练文本,对所述神经网络模型进行迭代训练,直至所述神经网络模型收敛在预设范围内,形成分词模型;基于所述分词模型对所述标注文本进行分词处理。
- 如权利要求15所述的计算机可读存储介质,其中,所述截断类型包括语气词异常截断类型、停顿异常截断类型和口语异常截断类型;所述识别策略包括与所述语气词异常截断类型相对应的规则系统策略,以及与所述停顿异常截断类型和所述口语异常截断类型相对应的规则系统和分类模型相结合策略;其中,所述规则系统和分类模型相结合策略包括:基于规则系统策略对所述待检测语音信号进行异常语义截断,如果未检测到异常语义截断,则基于分类模型再次对所述待检测语音信号进行异常语义截断。
- 如权利要求19所述的计算机可读存储介质,其中,所述规则系统策略包括:头部query匹配规则、特殊query匹配规则和短句query匹配规则;所述分类模型的训练过程包括:将出现语义异常截断的中长句语料作为正例,非截断的语料作为负例,构建训练集;基于构建的训练集训练初始化的bert模型,通过所述bert模型的嵌入层获取所述训练集的文本的表征;将所述表征输入所述bert模型的transformer结构中,获取所述transformer结构的最后一层的隐藏状态的输出向量;将所述输出向量输入全连接层,通过所述全连接层输出类别的概率得分;基于所述概率得分确定所述训练集中的训练数据的分类结果;基于所述训练集迭代训练所述bert模型,直至所述分类结果的误差收敛在预设范围内,形成所述分类模型。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111232008.7 | 2021-10-22 | ||
| CN202111232008.7A CN113935331A (zh) | 2021-10-22 | 2021-10-22 | 异常语义截断检测方法、装置、设备及介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023065633A1 true WO2023065633A1 (zh) | 2023-04-27 |
Family
ID=79283743
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/089937 Ceased WO2023065633A1 (zh) | 2021-10-22 | 2022-04-28 | 异常语义截断检测方法、装置、设备及介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN113935331A (zh) |
| WO (1) | WO2023065633A1 (zh) |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117312772A (zh) * | 2023-09-27 | 2023-12-29 | 广州探域科技有限公司 | 一种基于分类任务的语言模型语料训练方法及系统 |
| US20240220723A1 (en) * | 2022-12-30 | 2024-07-04 | International Business Machines Corporation | Sentential unit extraction with sentence-label combinations |
| CN118395355A (zh) * | 2024-06-26 | 2024-07-26 | 中国电子系统工程第二建设有限公司 | 应用于排风设备故障自动诊断的模糊语义分析系统及方法 |
| CN118571261A (zh) * | 2024-06-05 | 2024-08-30 | 陕西千山航空电子有限责任公司 | 一种飞参音频数据的快速判读方法、系统、设备及介质 |
| CN118626964A (zh) * | 2024-08-13 | 2024-09-10 | 卓望数码技术(深圳)有限公司 | 一种生成式人工智能的安全评估方法以及装置 |
| CN120564696A (zh) * | 2025-07-29 | 2025-08-29 | 浪潮通用软件有限公司 | 一种基于大模型的自动语音识别方法及系统 |
| CN120726999A (zh) * | 2025-08-22 | 2025-09-30 | 北京火山引擎科技有限公司 | 基于大模型的模型训练方法和问答语音处理方法 |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113935331A (zh) * | 2021-10-22 | 2022-01-14 | 平安科技(深圳)有限公司 | 异常语义截断检测方法、装置、设备及介质 |
| CN114372476B (zh) * | 2022-01-18 | 2023-09-12 | 平安科技(深圳)有限公司 | 语义截断检测方法、装置、设备和计算机可读存储介质 |
| CN115527520B (zh) * | 2022-08-19 | 2026-03-10 | 中国电信股份有限公司 | 异常检测方法、装置、电子设备和计算机可读存储介质 |
| CN116521821B (zh) * | 2023-03-15 | 2025-10-24 | 青岛海尔电冰箱有限公司 | 文本语义匹配方法及制冷设备系统 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106328166A (zh) * | 2016-08-31 | 2017-01-11 | 上海交通大学 | 人机对话异常检测系统及方法 |
| US20190354557A1 (en) * | 2017-06-20 | 2019-11-21 | Tom Kornblit | System and Method For Providing Intelligent Customer Service |
| CN112242135A (zh) * | 2019-07-18 | 2021-01-19 | 北京声智科技有限公司 | 一种语音数据的处理方法及智能客服装置 |
| CN113488024A (zh) * | 2021-05-31 | 2021-10-08 | 杭州摸象大数据科技有限公司 | 一种基于语义识别的电话打断识别方法和系统 |
| CN113935331A (zh) * | 2021-10-22 | 2022-01-14 | 平安科技(深圳)有限公司 | 异常语义截断检测方法、装置、设备及介质 |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111160003B (zh) * | 2018-11-07 | 2023-12-08 | 北京猎户星空科技有限公司 | 一种断句方法及装置 |
| CN112466286B (zh) * | 2019-08-19 | 2024-11-05 | 阿里巴巴集团控股有限公司 | 数据处理方法及装置、终端设备 |
-
2021
- 2021-10-22 CN CN202111232008.7A patent/CN113935331A/zh active Pending
-
2022
- 2022-04-28 WO PCT/CN2022/089937 patent/WO2023065633A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106328166A (zh) * | 2016-08-31 | 2017-01-11 | 上海交通大学 | 人机对话异常检测系统及方法 |
| US20190354557A1 (en) * | 2017-06-20 | 2019-11-21 | Tom Kornblit | System and Method For Providing Intelligent Customer Service |
| CN112242135A (zh) * | 2019-07-18 | 2021-01-19 | 北京声智科技有限公司 | 一种语音数据的处理方法及智能客服装置 |
| CN113488024A (zh) * | 2021-05-31 | 2021-10-08 | 杭州摸象大数据科技有限公司 | 一种基于语义识别的电话打断识别方法和系统 |
| CN113935331A (zh) * | 2021-10-22 | 2022-01-14 | 平安科技(深圳)有限公司 | 异常语义截断检测方法、装置、设备及介质 |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20240220723A1 (en) * | 2022-12-30 | 2024-07-04 | International Business Machines Corporation | Sentential unit extraction with sentence-label combinations |
| CN117312772A (zh) * | 2023-09-27 | 2023-12-29 | 广州探域科技有限公司 | 一种基于分类任务的语言模型语料训练方法及系统 |
| CN118571261A (zh) * | 2024-06-05 | 2024-08-30 | 陕西千山航空电子有限责任公司 | 一种飞参音频数据的快速判读方法、系统、设备及介质 |
| CN118395355A (zh) * | 2024-06-26 | 2024-07-26 | 中国电子系统工程第二建设有限公司 | 应用于排风设备故障自动诊断的模糊语义分析系统及方法 |
| CN118626964A (zh) * | 2024-08-13 | 2024-09-10 | 卓望数码技术(深圳)有限公司 | 一种生成式人工智能的安全评估方法以及装置 |
| CN120564696A (zh) * | 2025-07-29 | 2025-08-29 | 浪潮通用软件有限公司 | 一种基于大模型的自动语音识别方法及系统 |
| CN120726999A (zh) * | 2025-08-22 | 2025-09-30 | 北京火山引擎科技有限公司 | 基于大模型的模型训练方法和问答语音处理方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113935331A (zh) | 2022-01-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2023065633A1 (zh) | 异常语义截断检测方法、装置、设备及介质 | |
| CN110717031B (zh) | 一种智能会议纪要生成方法和系统 | |
| CN107729309B (zh) | 一种基于深度学习的中文语义分析的方法及装置 | |
| WO2022222300A1 (zh) | 开放关系抽取方法、装置、电子设备及存储介质 | |
| CN112016310A (zh) | 文本纠错方法、系统、设备及可读存储介质 | |
| CN112101010B (zh) | 一种基于bert的电信行业oa办公自动化文稿审核的方法 | |
| CN116541493A (zh) | 基于意图识别的交互应答方法、装置、设备、存储介质 | |
| WO2019085779A1 (zh) | 机器处理及文本纠错方法和装置、计算设备以及存储介质 | |
| CN112559687B (zh) | 问题识别及查询方法、装置、电子设备及存储介质 | |
| CN111179935B (zh) | 一种语音质检的方法和设备 | |
| CN112699686B (zh) | 基于任务型对话系统的语义理解方法、装置、设备及介质 | |
| CN114386399B (zh) | 一种文本纠错方法及装置 | |
| WO2023173554A1 (zh) | 坐席违规话术识别方法、装置、电子设备、存储介质 | |
| US20140214406A1 (en) | Method and system of adding punctuation and establishing language model | |
| CN116863495A (zh) | 意图识别方法、装置、电子设备、存储介质 | |
| CN116450829A (zh) | 医疗文本分类方法、装置、设备及介质 | |
| CN113962215A (zh) | 基于人工智能的文本纠错方法、装置、设备及存储介质 | |
| CN114416987A (zh) | 基于人工智能的文本分类方法、装置、设备及存储介质 | |
| CN111597349B (zh) | 一种基于人工智能的轨道交通规范实体关系自动补全方法 | |
| CN115359799A (zh) | 语音识别方法、训练方法、装置、电子设备及存储介质 | |
| CN112036186A (zh) | 语料标注方法、装置、计算机存储介质及电子设备 | |
| WO2023137920A1 (zh) | 语义截断检测方法、装置、设备和计算机可读存储介质 | |
| CN112115229A (zh) | 文本意图识别方法、装置、系统以及文本分类系统 | |
| CN113362815A (zh) | 语音交互方法、系统、电子设备及存储介质 | |
| WO2024137401A1 (en) | Context-based natural language processing |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22882258 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22882258 Country of ref document: EP Kind code of ref document: A1 |