Voice intelligent matching method, device, electronic device and storage medium
By using the pretrained text matching model to perform bidirectional encoding and information correlation calculation of speech text, the problem of insufficient context semantic recognition in speech matching in conversation is solved, and more accurate speech matching is achieved.
Patent Information
- Application Number
- CN202210056342.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-18
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2042-01-18
AI Technical Summary
The existing voice matching method for voice matching is based on text matching algorithms, and cannot effectively identify the context semantic information in voice comments, resulting in insufficient matching accuracy.
The encoding layer in the pre-trained text matching model is used to encode speech text bidirectional encoding, combine the interactive layer to calculate information relevance, and identify the matching categories between speech text through the pooling layer and the fully connected layer to realize speech text semantic association detection.
It improves the accuracy of speech matching, ensures the comprehensive recognition of the associated information between speech texts, and thus improves the accuracy of speech matching.
Smart Images

Figure CN114429137B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to a voice intelligent matching method, device, electronic device and computer-readable storage medium. Background Art
[0002] Call voice matching refers to the process of identifying whether the contextual semantics of two call voices are connected. Through the call voice matching, it can be identified whether the first call voice content and the second call voice content are not smoothly connected, thereby identifying business scenarios with abnormal calls.
[0003] At present, the matching of call speech is usually implemented based on a text matching algorithm, that is, the correlation between each sentence between the call speech is identified through the text matching algorithm to determine whether the call speech is matched. However, since the call speech involves dialogue operations, that is, sentences with contextual interactions will appear in the call speech, and the text matching algorithm cannot support the semantic information recognition of contextual sentences in the call speech, this will affect the accuracy of the calculation of the correlation between the call speech, and thus affect the accuracy of the call speech matching. Summary of the invention
[0004] The present invention provides a voice intelligent matching method, device, electronic device and computer-readable storage medium, the main purpose of which is to improve the accuracy of voice matching.
[0005] To achieve the above object, the present invention provides a voice intelligent matching method, comprising:
[0006] Acquire at least two segments of conversation speech, perform speech recognition on each segment of the conversation speech, and obtain at least two segments of speech text;
[0007] Using the encoding layer in the pre-trained text matching model to bidirectionally encode the text sentences in each segment of the speech text to obtain the bidirectional sentence vector of each segment of the speech text, and using the encoding layer to encode the text latent vector of each segment of the speech text according to the bidirectional sentence vector of each segment of the speech text;
[0008] According to the bidirectional sentence vector and the text latent vector, the information relevance between the speech texts is calculated using the interaction layer in the text matching model to identify the associated information features in the speech texts;
[0009] Using the pooling layer in the text matching model to perform pooling processing on the associated information features to obtain target information features;
[0010] According to the target information features, the fully connected layer in the text matching model is used to calculate the matching category between the speech texts, and according to the matching category, the matching results of the at least two segments of call speech are identified.
[0011] Optionally, performing speech recognition on each segment of the call speech to obtain at least two segments of speech text includes:
[0012] Extracting audio features of each segment of the call speech, and calculating the phoneme sequence probability of each segment of the audio features using an acoustic model;
[0013] According to the phoneme sequence probability, a language model is used to calculate the text sequence of each segment of the audio feature, and at least two segments of speech text are obtained according to the text sequence of each segment of the call speech.
[0014] Optionally, the using the encoding layer in the pre-trained text matching model to bidirectionally encode the text sentences in each segment of the speech text to obtain the bidirectional sentence vector of each segment of the speech text includes:
[0015] Obtaining text words of text sentences in each segment of the speech text, performing forward vector encoding and backward vector encoding on the text words to obtain forward word vectors and backward word vectors;
[0016] The forward word vector and the backward word vector are combined to obtain a bidirectional sentence vector for each segment of the speech text.
[0017] Optionally, detecting the associated information features between the speech and texts using an interaction layer in the text matching model according to the bidirectional sentence vector and the text latent vector includes:
[0018] Calculating a sentence similarity matrix between the bidirectional sentence vectors and a text similarity matrix between the text latent vectors;
[0019] According to the sentence similarity matrix, calculating the sentence relevance between the bidirectional sentence vectors, and according to the text similarity matrix, calculating the text relevance between the text latent vectors;
[0020] According to the sentence relevance and the text relevance, the relevance information feature between the speech texts is identified.
[0021] Optionally, calculating the sentence relevance between the bidirectional sentence vectors according to the sentence similarity matrix includes:
[0022] The sentence relevance between the two-way sentence vectors is calculated using the following formula:
[0023]
[0024]
[0025] in, represents the sentence relevance between the i-th bidirectional sentence vector in speech text a and the j-th bidirectional sentence vector in speech text b, represents the jth bidirectional sentence vector in the speech text b, represents the sentence relevance between the jth bidirectional sentence vector in the speech text b and the ith bidirectional sentence vector in the speech text a, represents the i-th bidirectional sentence vector in the speech text a, e ij Represents the sentence similarity matrix, exp(e ij ) represents the exponential function of the sentence similarity matrix, l b represents the number of bidirectional sentence vectors in the speech text b, l a Represents the number of bidirectional sentence vectors in the speech text a.
[0026] Optionally, the identifying, according to the sentence relevance and the text relevance, the relevance information feature between the speech texts includes:
[0027] Determine the associated sentence features between the voice texts according to the sentence association, and determine the associated topic features between the voice texts according to the text association;
[0028] According to the associated sentence features and the associated topic features, associated information features between the speech texts are generated.
[0029] Optionally, the using a pooling layer in the text matching model to perform pooling processing on the associated information features to obtain target information features includes:
[0030] The associated information features are subjected to feature dimensionality reduction using the pooling algorithm in the pooling layer, and the associated information features after feature dimensionality reduction are activated using the activation function in the pooling layer to obtain the target information features.
[0031] In order to solve the above problems, the present invention also provides a voice intelligent matching device, the device comprising:
[0032] A call speech recognition module, used to obtain at least two segments of call speech, perform speech recognition on each segment of the call speech, and obtain at least two segments of speech text;
[0033] A speech-to-text encoding module is used to use the encoding layer in the pre-trained text matching model to bidirectionally encode the text sentences in each segment of the speech text to obtain the bidirectional sentence vector of each segment of the speech text, and according to the bidirectional sentence vector of each segment of the speech text, use the encoding layer to encode the text latent vector of each segment of the speech text;
[0034] An information feature extraction module, used to calculate the information relevance between the speech texts according to the bidirectional sentence vector and the text latent vector by using the interaction layer in the text matching model, so as to identify the relevant information features in the speech texts;
[0035] An information feature pooling module, used to perform pooling processing on the associated information features using the pooling layer in the text matching model to obtain target information features;
[0036] A matching result identification module is used to calculate the matching category between the speech texts according to the target information features using the fully connected layer in the text matching model, and to identify the matching results of the at least two segments of call speech according to the matching category.
[0037] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0038] at least one processor; and,
[0039] a memory communicatively connected to the at least one processor; wherein,
[0040] 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 to implement the above-mentioned voice intelligent matching method.
[0041] In order to solve the above problems, 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 voice intelligent matching method.
[0042] It can be seen that the embodiment of the present invention performs speech recognition on at least two segments of call speech to obtain at least two segments of speech text to ensure the matching premise of subsequent call speech, and uses the encoding layer in the pre-trained text matching model to bidirectionally encode the text sentences in each segment of the speech text to obtain the bidirectional sentence vector of each segment of the speech text, and based on the bidirectional sentence vector of each segment of the speech text, the encoding layer is used to encode the text latent vector of each segment of the speech text, which can well understand the semantics of the preceding and following sentence information of the text sentence and the semantics of the overall text information, and ensure the accuracy of the calculation of the relevance of the subsequent text semantics; secondly, according to the bidirectional sentence vector and the text latent vector, the embodiment of the present invention, The information correlation between the speech texts is calculated using the interaction layer in the text matching model to identify the related information features in the speech texts, and the related information features are pooled using the pooling layer in the text matching model to obtain the target information features, and the matching categories between the speech texts are calculated using the fully connected layer in the text matching model to obtain the matching results of the at least two segments of call speech, which can realize the semantic correlation detection of sentences and topics between the speech texts, and ensure the comprehensiveness of the recognition of related information features between the speech texts, thereby improving the recognition accuracy of speech texts with related semantic features, and further ensuring the accuracy of subsequent speech matching. Therefore, a speech intelligent matching method, device, electronic device and computer-readable storage medium proposed in the embodiments of the present invention can improve the accuracy of speech matching. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flowchart of a voice intelligent matching method provided by an embodiment of the present invention;
[0044] Figure 2 A schematic diagram of a module of a voice intelligent matching device provided by an embodiment of the present invention;
[0045] Figure 3 A schematic diagram of the internal structure of an electronic device for implementing a voice intelligent matching method provided by an embodiment of the present invention;
[0046] 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
[0047] 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.
[0048] The embodiment of the present invention provides a voice intelligent matching method. The execution subject of the voice intelligent matching 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 invention. In other words, the voice intelligent matching 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 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 basic cloud computing services such as big data and artificial intelligence platforms.
[0049] Reference Figure 1 FIG. 1 is a flow chart of a voice intelligent matching method provided by an embodiment of the present invention. In the embodiment of the present invention, the voice intelligent matching method includes:
[0050] S1. Obtain at least two segments of call speech, perform speech recognition on each segment of the call speech, and obtain at least two segments of speech text.
[0051] In the embodiment of the present invention, the call voice refers to voice data with dialogue operations, which is generated based on different chat scenarios, such as telephone chat, audio chat and other scenarios. Furthermore, the embodiment of the present invention obtains at least two segments of call voice to ensure the matching premise of subsequent call voice. It should be understood that only data audio is recorded in the call voice, and no specific call information text is included. Therefore, the embodiment of the present invention performs voice recognition on each segment of the call voice to obtain the information text of each segment of the call voice, thereby identifying the semantic information between the call voices, and then achieving call voice matching.
[0052] As an embodiment of the present invention, performing speech recognition on each segment of the call speech to obtain at least two segments of speech text includes: extracting audio features of each segment of the call speech, calculating the phoneme sequence probability of each segment of the audio features using an acoustic model, calculating the text sequence of each segment of the audio features using a language model based on the phoneme sequence probability, and obtaining at least two segments of speech text based on the text sequence of each segment of the call speech.
[0053] Among them, the extraction of the audio features refers to the process of compressing the information of the call voice to improve the speech recognition speed of subsequent call voices. Optionally, the extraction of the audio features is implemented by the Mel Frequency Cepstrum Coefficient (MFCC) method.
[0054] Further, the phoneme sequence probability refers to the syllable probability of generating text. For example, if the text is "国" (guo), its syllables include: "g", "u", and "o". Then, by calculating the phoneme sequence probability of the audio features, the syllables that can generate the subsequent text "信" (xin) can be determined, thereby obtaining the text sequence of the audio features. Optionally, in the embodiments of the present invention, the acoustic model includes a Hidden Markov Model.
[0055] Further, the text sequence refers to the information relationship between the phoneme sequence and the generated text, and is used to generate the audio recognition result of the call voice. Optionally, in the embodiments of the present invention, the language model includes an N-Gram language model.
[0056] Further, to ensure the privacy and security of the speech text, the speech text can also be stored in a blockchain node.
[0057] S2. Use the encoding layer in the pre-trained text matching model to perform bidirectional encoding on the text sentences in each segment of the speech text to obtain the bidirectional sentence vectors of each segment of the speech text. According to the bidirectional sentence vectors of each segment of the speech text, use the encoding layer to encode the text hidden vectors of each segment of the speech text.
[0058] In the embodiments of the present invention, the pre-trained text matching model is constructed by deep learning technology and is used for binary classification of text matching. It includes an encoding layer, an interaction layer, a pooling layer, and a fully connected layer. Among them, the encoding layer is constructed by a bidirectional BILSTM network, which is used to perform bidirectional encoding on the sentences in the speech text to determine the sentence positions and context information in the speech text. The interaction layer is constructed by an attention mechanism, which is used to identify the relevance between speech texts and between sentences to identify feature sentences with relevance. The pooling layer is used to perform dimensionality reduction and compression on the feature sentences output by the interaction layer to reduce the computational complexity of the model. The fully connected layer is constructed by a feedforward neural network, which is used to summarize the feature information output by the pooling layer to calculate the matching categories between the speech texts.
[0059] As an embodiment of the present invention, the encoding layer in the pre-trained text matching model is used to bidirectionally encode the text sentences in each segment of the speech text to obtain the bidirectional sentence vector of each segment of the speech text, including: obtaining the text words of the text sentences in each segment of the speech text, performing forward vector encoding and backward vector encoding on the text words to obtain forward word vectors and backward word vectors, and combining the forward word vectors and backward word vectors to obtain the bidirectional sentence vector of each segment of the speech text.
[0060] For example, there is a text sentence "I love to eat", and the text words of the text sentence include "I", "love" and "eat", and the text words are forward vector encoded and backward vector encoded by the encoding layer to obtain [h 1 ]、[h 2 ]、[h 3 ] and the forward word vector of [l 3 ]、[l 2 ]、[l 1 ], and the forward word vector and the backward word vector are combined to obtain the bidirectional sentence vector [h 1 ,l 3 、h 2 ,l 2 、h 3 ,l 1 ].
[0061] Based on the bidirectional encoding of the text sentence, the information of the preceding and following sentences of the text sentence can be well understood, thereby ensuring the comprehensiveness of the acquisition of the text sentence information and the accuracy of the subsequent calculation of the relevance of the text semantics.
[0062] Furthermore, in an embodiment of the present invention, the text latent vector of each segment of the speech text is encoded using the encoding layer based on the bidirectional sentence vector of each segment of the speech text, including: forward encoding and backward encoding the bidirectional sentence vector to obtain a forward sentence vector and a backward sentence vector, and combining the forward sentence vector and the backward sentence vector to obtain a text latent vector of each segment of the speech text.
[0063] Among them, the forward and backward encoding of the bidirectional sentence vector is the same as the forward and backward encoding principle of the above-mentioned text words, which will not be further elaborated here. Based on the text latent vector, the overall text information semantics of each segment of speech text can be fully understood, further ensuring the accuracy of the subsequent text semantic correlation calculation.
[0064] S3. According to the bidirectional sentence vector and the text latent vector, the information relevance between the speech texts is calculated using the interaction layer in the text matching model to identify the associated information features in the speech texts.
[0065] In an embodiment of the present invention, the detection of the associated information features between the speech texts based on the bidirectional sentence vectors and the text latent vectors using the interaction layer in the text matching model includes: using the interaction layer to calculate the sentence similarity matrix between the bidirectional sentence vectors and the text similarity matrix between the text latent vectors, calculating the sentence relevance between the bidirectional sentence vectors based on the sentence similarity matrix, calculating the text relevance between the text latent vectors based on the text similarity matrix, and identifying the associated information features between the speech texts based on the sentence relevance and the text relevance.
[0066] In an optional implementation of the present invention, the sentence similarity matrix between the bidirectional sentence vectors is calculated using the following formula:
[0067]
[0068] Among them, e ij Represents the sentence similarity matrix, i represents the i-th bidirectional sentence vector in speech text a, and j represents the j-th bidirectional sentence vector in speech text b.
[0069] In an optional implementation of the present invention, the sentence relevance between the bidirectional sentence vectors is calculated using the following formula:
[0070]
[0071]
[0072] in, represents the sentence relevance between the i-th bidirectional sentence vector in speech text a and the j-th bidirectional sentence vector in speech text b, represents the jth bidirectional sentence vector in the speech text b, represents the sentence relevance between the jth bidirectional sentence vector in the speech text b and the ith bidirectional sentence vector in the speech text a, represents the i-th bidirectional sentence vector in the speech text a, e ij Represents the sentence similarity matrix, exp(e ij ) represents the exponential function of the sentence similarity matrix, l b represents the number of bidirectional sentence vectors in the speech text b, l a Represents the number of bidirectional sentence vectors in the speech text a.
[0073] It should be noted that the calculation principle of the text similarity matrix and text relevance is the same as the calculation principle of the sentence similarity matrix and sentence relevance, which will not be further elaborated here.
[0074] In an optional implementation of the present invention, the identifying of the associated information features between the speech texts based on the sentence association and the text association includes: determining the associated sentence features between the speech texts based on the sentence association, determining the associated topic features between the speech texts based on the text association, and generating the associated information features between the speech texts based on the associated sentence features and the associated topic features.
[0075] The associated sentence feature refers to text sentence information with associated semantics between the voice texts, and the associated topic feature refers to description information of associated topics between the voice texts.
[0076] Based on the bidirectional sentence vector and the text latent vector, semantic association detection of sentences and topics between the speech texts can be realized, ensuring the comprehensiveness of the recognition of associated information features between the speech texts, thereby improving the recognition accuracy of associated semantic features between speech texts, and further ensuring the matching accuracy between subsequent speech texts.
[0077] S4. Performing pooling processing on the associated information features using the pooling layer in the text matching model to obtain target information features.
[0078] The embodiment of the invention performs pooling processing on the associated information features through the pooling layer in the text matching model to filter out redundant features in the associated information features, thereby improving the calculation speed and accuracy of subsequent models.
[0079] As an embodiment of the present invention, the pooling layer in the text matching model is used to perform pooling processing on the associated information features to obtain target information features, including: using the pooling algorithm in the pooling layer to perform feature dimensionality reduction on the associated information features, and using the activation function in the pooling layer to activate the associated information features after feature dimensionality reduction to obtain the target information features.
[0080] Among them, the pooling algorithm includes a maximum pooling algorithm and an average pooling algorithm, and the activation function includes a relu function.
[0081] S5. According to the target information features, use the fully connected layer in the text matching model to calculate the matching category between the speech texts, and identify the matching results of the at least two segments of call speech according to the matching category.
[0082] In an embodiment of the present invention, the target information features are identified based on the fully connected layer in the text matching model to obtain the matching results of the at least two segments of call speech, including: integrating the target information features using the forward network in the fully connected layer, and calculating the matching category probability of the integrated target information features using the activation function in the fully connected layer to output the matching category between the speech texts.
[0083] The activation function in the fully connected layer includes a softmax function, and the matching category includes 0 and 1 (0 indicates no match, and 1 indicates a match).
[0084] Furthermore, the embodiment of the present invention identifies the matching result of the at least two segments of call speech according to the matching category, that is, when the matching category is mismatch, the matching result is failure, and when the matching category is match, the matching result is success.
[0085] It can be seen that the embodiment of the present invention performs speech recognition on at least two segments of call speech to obtain at least two segments of speech text to ensure the matching premise of subsequent call speech, and uses the encoding layer in the pre-trained text matching model to bidirectionally encode the text sentences in each segment of the speech text to obtain the bidirectional sentence vector of each segment of the speech text, and based on the bidirectional sentence vector of each segment of the speech text, the encoding layer is used to encode the text latent vector of each segment of the speech text, which can well understand the semantics of the preceding and following sentence information of the text sentence and the semantics of the overall text information, and ensure the accuracy of the calculation of the relevance of the subsequent text semantics; secondly, according to the bidirectional sentence vector and the text latent vector, the embodiment of the present invention, The information correlation between the speech texts is calculated using the interaction layer in the text matching model to identify the related information features in the speech texts, and the related information features are pooled using the pooling layer in the text matching model to obtain the target information features, and the matching categories between the speech texts are calculated using the fully connected layer in the text matching model to obtain the matching results of the at least two segments of conversation speech, which can realize the semantic correlation detection of sentences and topics between the speech texts, and ensure the comprehensiveness of the recognition of related information features between the speech texts, thereby improving the recognition accuracy of speech texts with related semantic features, and further ensuring the accuracy of subsequent speech matching. Therefore, a speech intelligent matching method proposed in an embodiment of the present invention can improve the accuracy of speech matching.
[0086] like Figure 2 The figure shows a functional module diagram of the speech intelligent matching device of the present invention.
[0087] The voice intelligent matching device 100 of the present invention can be installed in an electronic device. According to the functions implemented, the voice intelligent matching device can include a call voice recognition module 101, a voice text encoding module 102, an information feature extraction module 103, an information feature pooling module 104 and a matching result recognition 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 a processor of an electronic device and can complete fixed functions, which are stored in the memory of the electronic device.
[0088] In this embodiment, the functions of each module / unit are as follows:
[0089] The call speech recognition module 101 is used to obtain at least two segments of call speech, perform speech recognition on each segment of the call speech, and obtain at least two segments of speech text;
[0090] The speech-to-text encoding module 102 is used to use the encoding layer in the pre-trained text matching model to bidirectionally encode the text sentences in each segment of the speech text to obtain the bidirectional sentence vector of each segment of the speech text, and encode the text latent vector of each segment of the speech text using the encoding layer according to the bidirectional sentence vector of each segment of the speech text;
[0091] The information feature extraction module 103 is used to calculate the information relevance between the speech texts according to the bidirectional sentence vector and the text latent vector by using the interaction layer in the text matching model to identify the relevant information features in the speech texts;
[0092] The information feature pooling module 104 is used to perform pooling processing on the associated information features using the pooling layer in the text matching model to obtain target information features;
[0093] The matching result identification module 105 is used to calculate the matching category between the speech texts according to the target information features using the fully connected layer in the text matching model, and identify the matching results of the at least two call speech segments according to the matching category.
[0094] In detail, each module in the voice intelligent matching device 100 in the embodiment of the present invention is used in the same manner as above. Figure 1 The same technical means as the voice intelligent matching method described in and can produce the same technical effects will not be repeated here.
[0095] like Figure 3 , which is a schematic diagram of the structure of an electronic device 1 for implementing the voice intelligent matching method of the present invention.
[0096] 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 voice intelligent matching program.
[0097] In some embodiments, the processor 10 may be composed of an integrated circuit, 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. The processor 10 is the control core (ControlUnit) of the electronic device 1, and uses various interfaces and lines to connect the various components of the entire electronic device 1, and executes or executes programs or modules stored in the memory 11 (for example, executing a voice intelligent matching program, etc.), and calls the data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
[0098] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 can also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 can also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the voice intelligent matching program, etc., but also can be used to temporarily store data that has been output or is to be output.
[0099] 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.
[0100] The communication interface 13 is used for communication between the above-mentioned electronic device 1 and other devices, including a network interface and an employee 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 1 and other electronic devices 1. The employee interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the employee 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) 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 1 and to display a visual employee interface.
[0101] Figure 3 Only the electronic device 1 having components is shown, and those skilled in the art can 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.
[0102] For example, although not shown, the electronic device 1 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 any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0103] It should be understood that the embodiment is for illustrative purposes only and the scope of the patent invention is not limited to this structure.
[0104] The voice intelligent matching program stored in the memory 11 in the electronic device 1 is a combination of multiple computer programs. When running in the processor 10, it can achieve:
[0105] Obtain at least two segments of call speech, perform speech recognition on each segment of the call speech, and obtain at least two segments of speech text; use the encoding layer in the pre-trained text matching model to bidirectionally encode the text sentences in each segment of the speech text to obtain a bidirectional sentence vector for each segment of the speech text, and use the encoding layer to encode the text latent vector of each segment of the speech text according to the bidirectional sentence vector of each segment of the speech text;
[0106] According to the bidirectional sentence vector and the text latent vector, the information relevance between the speech texts is calculated using the interaction layer in the text matching model to identify the associated information features in the speech texts;
[0107] Using the pooling layer in the text matching model to perform pooling processing on the associated information features to obtain target information features;
[0108] According to the target information features, the fully connected layer in the text matching model is used to calculate the matching category between the speech texts, and according to the matching category, the matching results of the at least two segments of call speech are identified.
[0109] Specifically, the specific implementation method of the processor 10 for the above computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0110] 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 non-volatile 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).
[0111] 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 the electronic device 1, the computer program can implement:
[0112] Acquire at least two segments of conversation speech, perform speech recognition on each segment of the conversation speech, and obtain at least two segments of speech text;
[0113] Using the encoding layer in the pre-trained text matching model to bidirectionally encode the text sentences in each segment of the speech text to obtain the bidirectional sentence vector of each segment of the speech text, and using the encoding layer to encode the text latent vector of each segment of the speech text according to the bidirectional sentence vector of each segment of the speech text;
[0114] According to the bidirectional sentence vector and the text latent vector, the information relevance between the speech texts is calculated using the interaction layer in the text matching model to identify the associated information features in the speech texts;
[0115] Using the pooling layer in the text matching model to perform pooling processing on the associated information features to obtain target information features;
[0116] According to the target information features, the fully connected layer in the text matching model is used to calculate the matching category between the speech texts, and according to the matching category, the matching results of the at least two segments of call speech are identified.
[0117] 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.
[0118] 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.
[0119] 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.
[0120] 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.
[0121] 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.
[0122] 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.
[0123] The embodiments of the present invention can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0124] 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 second and other words are used to indicate names, but not to indicate any particular order.
[0125] 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 voice intelligent matching method, characterized in that: The method comprises: Acquire at least two segments of conversation speech, perform speech recognition on each segment of the conversation speech, and obtain at least two segments of speech text; Using the encoding layer in the pre-trained text matching model to bidirectionally encode the text sentences in each segment of the speech text to obtain the bidirectional sentence vector of each segment of the speech text, and using the encoding layer to encode the text latent vector of each segment of the speech text according to the bidirectional sentence vector of each segment of the speech text; According to the bidirectional sentence vector and the text latent vector, the information relevance between the speech texts is calculated using the interaction layer in the text matching model to identify the associated information features in the speech texts; Using the pooling layer in the text matching model to perform pooling processing on the associated information features to obtain target information features; According to the target information feature, using the fully connected layer in the text matching model to calculate the matching category between the speech texts, and according to the matching category, identifying the matching results of the at least two segments of call speech; The method of using the encoding layer in the pre-trained text matching model to bidirectionally encode the text sentences in each segment of the speech text to obtain the bidirectional sentence vector of each segment of the speech text includes: obtaining the text words of the text sentences in each segment of the speech text, performing forward vector encoding and backward vector encoding on the text words to obtain forward word vectors and backward word vectors; combining the forward word vectors and the backward word vectors to obtain the bidirectional sentence vector of each segment of the speech text; The method of calculating the information relevance between the speech texts based on the bidirectional sentence vectors and the text latent vectors using the interaction layer in the text matching model to identify the associated information features in the speech texts includes: calculating a sentence similarity matrix between the bidirectional sentence vectors and a text similarity matrix between the text latent vectors; calculating the sentence relevance between the bidirectional sentence vectors based on the sentence similarity matrix, and calculating the text relevance between the text latent vectors based on the text similarity matrix; and identifying the associated information features between the speech texts based on the sentence relevance and the text relevance.
2. The voice intelligent matching method according to claim 1, characterized in that: The performing speech recognition on each segment of the call speech to obtain at least two segments of speech text includes: Extracting audio features of each segment of the call speech, and calculating the phoneme sequence probability of each segment of the audio features using an acoustic model; According to the phoneme sequence probability, a language model is used to calculate the text sequence of each segment of the audio feature, and at least two segments of speech text are obtained according to the text sequence of each segment of the call speech.
3. The voice intelligent matching method according to claim 1, characterized in that: The calculating the sentence relevance between the bidirectional sentence vectors according to the sentence similarity matrix includes: The sentence relevance between the two-way sentence vectors is calculated using the following formula: in, represents the sentence relevance between the i-th bidirectional sentence vector in speech text a and the j-th bidirectional sentence vector in speech text b, represents the jth bidirectional sentence vector in the speech text b, represents the sentence relevance between the jth bidirectional sentence vector in the speech text b and the ith bidirectional sentence vector in the speech text a, represents the i-th bidirectional sentence vector in the speech text a, represents the sentence similarity matrix, represents the exponential function of the sentence similarity matrix, represents the number of bidirectional sentence vectors in the speech text b, Represents the number of bidirectional sentence vectors in the speech text a.
4. The voice intelligent matching method according to claim 1, characterized in that: The identifying, according to the sentence relevance and the text relevance, the relevance information feature between the speech texts includes: Determine the associated sentence features between the voice texts according to the sentence association, and determine the associated topic features between the voice texts according to the text association; According to the associated sentence features and the associated topic features, associated information features between the speech texts are generated.
5. The voice intelligent matching method according to any one of claims 1 to 4, characterized in that: The method of performing pooling processing on the associated information features by using the pooling layer in the text matching model to obtain the target information features includes: The associated information features are subjected to feature dimensionality reduction using the pooling algorithm in the pooling layer, and the associated information features after feature dimensionality reduction are activated using the activation function in the pooling layer to obtain the target information features.
6. A voice intelligent matching device, used to implement the voice intelligent matching method according to any one of claims 1 to 5, characterized in that: The device comprises: A call speech recognition module, used to obtain at least two segments of call speech, perform speech recognition on each segment of the call speech, and obtain at least two segments of speech text; A speech-to-text encoding module is used to use the encoding layer in the pre-trained text matching model to bidirectionally encode the text sentences in each segment of the speech text to obtain the bidirectional sentence vector of each segment of the speech text, and according to the bidirectional sentence vector of each segment of the speech text, use the encoding layer to encode the text latent vector of each segment of the speech text; An information feature extraction module, used to calculate the information relevance between the speech texts according to the bidirectional sentence vector and the text latent vector by using the interaction layer in the text matching model, so as to identify the relevant information features in the speech texts; An information feature pooling module, used to perform pooling processing on the associated information features using the pooling layer in the text matching model to obtain target information features; A matching result identification module is used to calculate the matching category between the speech texts according to the target information features using the fully connected layer in the text matching model, and to identify the matching results of the at least two segments of call speech according to the matching category.
7. 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 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 voice intelligent matching method as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the voice intelligent matching method as described in any one of claims 1 to 5 is implemented.
