A voice interaction method, device, computer-readable storage medium and server

By using automatic speech recognition and natural language processing technology in the voice interaction system, the user's voice and intention recognition are solved, and the problem of low human-computer interaction fluency in the prior art is achieved, and more efficient voice interaction fluency is achieved.

CN113889104BActive Publication Date: 2025-03-21ONE CONNECT SMART TECH CO LTD SHENZHEN
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111152917.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-29
Publication Date
2025-03-21
Estimated Expiration
2041-09-29

AI Technical Summary

Technical Problem

Existing voice interaction methods are less fluent during human-computer interaction, especially in the case of environmental noise or speech without clear intentions, which can easily lead to the system interrupting voice broadcasting accidentally.

Method used

By establishing an interactive connection with the preset telephone platform, users receive real-time voice data and use an automatic voice recognition engine to recognize voice data as text data. Then, intention recognition is performed through the natural language processing system, and the AI ​​broadcast status is stopped only when the intention recognition result is valid.

Benefits of technology

Improve the fluency of human-computer interaction and avoid the system's accidentally interruption of voice broadcasts due to environmental noise or speech without clear intentions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113889104B_ABST
    Figure CN113889104B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of artificial intelligence technology, and in particular, relates to a voice interaction method, device, computer-readable storage medium and server. The method includes: establishing an interactive connection with a preset telephone platform, and receiving real-time user voice data sent by the telephone platform; when the telephone platform is in a preset artificial intelligence broadcast state, the user real-time voice data is recognized as text data by a preset automatic voice recognition engine; the text data is subjected to intent recognition by a preset natural language processing system to obtain an intent recognition result; if the intent recognition result is an invalid intent, the step of receiving the user real-time voice data sent by the telephone platform and its subsequent steps are returned to execute; if the intent recognition result is a valid intent, the recognition result of the automatic voice recognition engine is sent to the telephone platform, and the artificial intelligence broadcast state of the telephone platform is stopped.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and in particular relates to a voice interaction method, device, computer-readable storage medium and server. Background Art

[0002] In recent years, Automatic Speech Recognition (ASR) technology has made great progress. The system response time and speech recognition accuracy have been greatly improved. People can directly interact with robots by voice. The mode of human-computer interaction is generally to speak in turns. If a person speaks while the machine is broadcasting, or there is environmental background sound, the current common processing method is that the system continues to complete the set voice content broadcast, and then collects and processes the voice input. This method is not flexible enough and cannot understand human words in time. In order to solve this problem, there is another processing method in the prior art that is that when the system detects voice input, it immediately stops the voice broadcast and continues to wait for voice input. However, this method is easy to cause the system to mistakenly interrupt the voice broadcast due to environmental noise or some unclear intentions of people, resulting in a significant reduction in the fluency of human-computer interaction. Summary of the invention

[0003] In view of this, embodiments of the present invention provide a voice interaction method, device, computer-readable storage medium and server to solve the problem of low human-computer interaction fluency in existing voice interaction methods.

[0004] A first aspect of an embodiment of the present invention provides a voice interaction method, which may include:

[0005] Establishing an interactive connection with a preset telephone platform and receiving real-time voice data of the user sent by the telephone platform;

[0006] When the telephone platform is in a preset artificial intelligence broadcast state, the user's real-time voice data is recognized as text data through a preset automatic voice recognition engine;

[0007] Performing intent recognition on the text data through a preset natural language processing system to obtain an intent recognition result;

[0008] If the intention recognition result is an invalid intention, returning to execute the step of receiving the user's real-time voice data sent by the telephone platform and its subsequent steps;

[0009] If the intention recognition result is a valid intention, the recognition result of the automatic speech recognition engine is sent to the telephone platform, and the artificial intelligence broadcasting state of the telephone platform is stopped.

[0010] In a specific implementation of the first aspect, establishing an interactive connection with a preset telephone platform and receiving the user's real-time voice data sent by the telephone platform may include:

[0011] Receiving a session initiation protocol request sent by the telephone platform, and sending a session initiation protocol response message to the telephone platform; the session initiation protocol response message includes port information of a media resource control protocol port and port information of a voice interaction port;

[0012] receiving an automatic speech recognition request sent by the telephone platform according to the port information of the media resource control protocol port, and sending automatic speech recognition response information to the telephone platform;

[0013] Receive the user's real-time voice data sent by the telephone platform according to the port information of the voice interaction port.

[0014] In a specific implementation of the first aspect, recognizing the user's real-time voice data as text data by a preset automatic voice recognition engine may include:

[0015] Determine whether the user's real-time voice data has been transmitted according to a preset first timeout threshold; the first timeout threshold represents the threshold of the pause length between each voice segment;

[0016] If the user real-time voice data has been transmitted, forwarding the user real-time voice data to the automatic voice recognition engine, so that the automatic voice recognition engine recognizes the user real-time voice data as the text data;

[0017] The text data sent by the automatic speech recognition engine is received.

[0018] In a specific implementation of the first aspect, performing intent recognition on the text data by a preset natural language processing system to obtain an intent recognition result may include:

[0019] Counting the number of characters in the text data;

[0020] If the number of characters is less than a preset number threshold, sending the text data and the first timeout threshold to the natural language processing system, so that the natural language processing system performs intent recognition according to the text data and the first timeout threshold to obtain the intent recognition result;

[0021] Receive the intention recognition result sent by the natural language processing system.

[0022] In a specific implementation of the first aspect, sending the recognition result of the automatic speech recognition engine to the telephone platform and stopping the artificial intelligence broadcast state of the telephone platform may include:

[0023] Sending a recognition end request to the automatic speech recognition engine so that the automatic speech recognition engine stops performing automatic speech recognition;

[0024] Receiving a recognition end response message sent by the automatic speech recognition engine, and sending a recognition result acquisition request to the automatic speech recognition engine;

[0025] Receive the recognition result of the automatic speech recognition engine, and send the recognition result of the automatic speech recognition engine to the telephone platform, and stop the artificial intelligence broadcasting state of the telephone platform.

[0026] In a specific implementation of the first aspect, the voice interaction method may further include:

[0027] When the telephone platform is in a preset artificial intelligence broadcast end state, the user's real-time voice data is recognized as text data through the automatic voice recognition engine;

[0028] Performing intent recognition on the text data by the natural language processing system to obtain an intent recognition result;

[0029] If the intention recognition result is an incomplete intention, returning to execute the step of receiving the user's real-time voice data sent by the telephone platform and its subsequent steps;

[0030] If the intent recognition result is a complete intent, the recognition result of the automatic speech recognition engine is sent to the telephone platform.

[0031] In a specific implementation of the first aspect, the voice interaction method may further include:

[0032] When the real-time voice data of the user cannot be detected, timing the duration for which the real-time voice data of the user cannot be detected;

[0033] If it is not detected that the duration of the user's real-time voice data is greater than the preset second timeout threshold, a request to end recognition is sent to the automatic voice recognition engine to stop the automatic voice recognition engine.

[0034] A second aspect of an embodiment of the present invention provides a voice interaction device, which may include:

[0035] A voice data receiving module, used to establish an interactive connection with a preset telephone platform and receive real-time user voice data sent by the telephone platform;

[0036] An automatic speech recognition module, used to recognize the user's real-time speech data as text data through a preset automatic speech recognition engine when the telephone platform is in a preset artificial intelligence broadcast state;

[0037] A natural language processing module, used to perform intent recognition on the text data through a preset natural language processing system to obtain an intent recognition result;

[0038] The recognition result sending module is used to send the recognition result of the automatic speech recognition engine to the telephone platform if the intention recognition result is a valid intention, and stop the artificial intelligence broadcasting state of the telephone platform.

[0039] In a specific implementation of the second aspect, the voice data receiving module may include:

[0040] A session initiation protocol response unit, configured to receive a session initiation protocol request sent by the telephone platform, and send a session initiation protocol response message to the telephone platform; the session initiation protocol response message includes port information of a media resource control protocol port and port information of a voice interaction port;

[0041] an automatic speech recognition response unit, configured to receive an automatic speech recognition request sent by the telephone platform according to the port information of the media resource control protocol port, and send automatic speech recognition response information to the telephone platform;

[0042] The voice data receiving unit is used to receive the user's real-time voice data sent by the telephone platform according to the port information of the voice interaction port.

[0043] In a specific implementation of the second aspect, the automatic speech recognition module may include:

[0044] A transmission completion judgment unit, used to judge whether the user's real-time voice data has been transmitted according to a preset first timeout threshold; the first timeout threshold represents a threshold of the pause time between each voice segment;

[0045] A voice data forwarding unit, configured to forward the user's real-time voice data to the automatic voice recognition engine if the user's real-time voice data has been transmitted, so that the automatic voice recognition engine recognizes the user's real-time voice data as the text data;

[0046] A text data receiving unit is used to receive the text data sent by the automatic speech recognition engine.

[0047] In a specific implementation of the second aspect, the natural language processing module may include:

[0048] A character number counting unit, used for counting the number of characters in the text data;

[0049] a data sending unit, configured to send the text data and the first timeout threshold to the natural language processing system if the number of characters is less than a preset number threshold, so that the natural language processing system performs intent recognition according to the text data and the first timeout threshold to obtain the intent recognition result;

[0050] An intention recognition result receiving unit is used to receive the intention recognition result sent by the natural language processing system.

[0051] In a specific implementation of the second aspect, the recognition result sending module may include:

[0052] an end recognition request sending unit, used to send an end recognition request to the automatic speech recognition engine, so that the automatic speech recognition engine stops performing automatic speech recognition;

[0053] A recognition result acquisition unit, configured to receive a recognition end response message sent by the automatic speech recognition engine, and send a recognition result acquisition request to the automatic speech recognition engine;

[0054] The recognition result sending unit is used to receive the recognition result of the automatic speech recognition engine, and send the recognition result of the automatic speech recognition engine to the telephone platform, and stop the artificial intelligence broadcasting state of the telephone platform.

[0055] In a specific implementation of the second aspect, the voice interaction device may further include:

[0056] The announcement end processing module is used to recognize the user's real-time voice data as text data through the automatic speech recognition engine when the telephone platform is in a preset artificial intelligence announcement end state; perform intent recognition on the text data through the natural language processing system to obtain an intent recognition result; if the intent recognition result is a complete intent, the recognition result of the automatic speech recognition engine is sent to the telephone platform.

[0057] In a specific implementation of the second aspect, the voice interaction device may further include:

[0058] The non-voice processing module is used to time the duration for which the user's real-time voice data cannot be detected when the user's real-time voice data cannot be detected; if the duration for which the user's real-time voice data cannot be detected is greater than a preset second timeout threshold, send an end recognition request to the automatic speech recognition engine to stop the automatic speech recognition engine from performing automatic speech recognition.

[0059] A third aspect of an embodiment of the present invention 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, the steps of any of the above-mentioned voice interaction methods are implemented.

[0060] The fourth aspect of an embodiment of the present invention provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above-mentioned voice interaction methods when executing the computer program.

[0061] A fifth aspect of an embodiment of the present invention provides a computer program product. When the computer program product runs on a server, it enables the server to execute the steps of any one of the above-mentioned voice interaction methods.

[0062] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: the embodiments of the present invention establish an interactive connection with a preset telephone platform and receive the user's real-time voice data sent by the telephone platform; when the telephone platform is in a preset artificial intelligence broadcast state, the user's real-time voice data is recognized as text data by a preset automatic voice recognition engine; the text data is subjected to intention recognition by a preset natural language processing system to obtain an intention recognition result; if the intention recognition result is an invalid intention, the step of receiving the user's real-time voice data sent by the telephone platform and its subsequent steps are returned to execute; if the intention recognition result is a valid intention, the recognition result of the automatic voice recognition engine is sent to the telephone platform to stop the artificial intelligence broadcast state of the telephone platform. Through the embodiments of the present invention, intention recognition can be performed while performing automatic voice recognition, and the artificial intelligence broadcast state will only be stopped when the intention recognition result is a valid intention, thereby avoiding the system from interrupting the voice broadcast by mistake due to environmental noise or some people's words without clear intentions, greatly improving the fluency of human-computer interaction. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0064] Figure 1 This is a flow chart of an embodiment of a voice interaction method in an embodiment of the present invention;

[0065] Figure 2A schematic flow chart for establishing an interactive connection with a preset telephone platform and receiving real-time voice data of a user sent by the telephone platform;

[0066] Figure 3 This is a structural diagram of an embodiment of a voice interaction device in an embodiment of the present invention;

[0067] Figure 4 The figure is a schematic block diagram of a server in an embodiment of the present invention. DETAILED DESCRIPTION

[0068] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0069] 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.

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

[0071] The execution subject of the embodiment of the present invention may be an artificial intelligence-based server for executing the voice interaction method in the embodiment of the present invention. The server may be a server providing Media Resource Control Protocol (MRCP) service.

[0072] See also Figure 1 , an embodiment of a voice interaction method in an embodiment of the present invention may include:

[0073] Step S101: establish an interactive connection with a preset telephone platform, and receive real-time user voice data sent by the telephone platform.

[0074] like Figure 2As shown, step S101 may specifically include the following process:

[0075] Step S1011: Receive a Session Initiation Protocol (Session Initiation Protocol, SIP) request sent by the telephone platform, and send a Session Initiation Protocol response message to the telephone platform.

[0076] The telephone platform is used to perform artificial intelligence-based voice interaction with the user, and broadcast the preset conversation content to the user during the voice interaction process, that is, perform AI broadcasting.

[0077] The telephone platform can send a SIP request to the server. SIP is a text-based application layer signaling control protocol used to create, modify and release sessions of one or more participants. These sessions can be Internet multimedia conferences, IP phones or multimedia distribution. SIP messages are mainly divided into two categories: one is a request message (Request) sent by the client (i.e., the telephone platform) to the server; the other is a response message (Response) sent by the server to the client. A basic SIP message = start line (including request line or status line) + one or more header fields + a blank line indicating the end of the header field + an optional message body. The start line includes a request line or a status line. For a request message, the request line = method + space + request address + SIP version number + blank line; for a response message, the status line = SIP version + space + status code + space + related text phrases + blank line; wherein, the request line specifies the category of the request, and the status line indicates the status of each request, such as success or failure. In the case of failure, the reason or type of failure is given. The message header (header field) provides more information about the request or response, such as the source of the message, the specified message recipient, and some other important information. In a possible implementation, the SIP session request message = request line + header field + a blank line indicating the end of the header field + an optional message body. The header field includes the client address that notifies the server to initiate the SIP session request and the port information used to transmit the voice packet.

[0078] After receiving the SIP request, the server may send SIP response information to the telephone platform, wherein the SIP response information includes port information of a media resource control protocol port and port information of a voice interaction port.

[0079] It should be understood that the MRCP protocol is a communication protocol family, including the SIP protocol, the RTP protocol and the MRCP protocol. Among them, the SIP protocol is a session control protocol, and a session path between the server and the telephone platform is established by sending a SIP message. After the session path is established, the server and the telephone platform can send control messages through the MRCP protocol, and the control messages are used to control whether to play voice, or whether to perform voice recognition, for example, an ASR request, or an ASR end recognition request, or an ASR recognition result. The RTP protocol is a resource transfer protocol, which is used to transmit voice data.

[0080] It should be understood that the port information of the voice interaction port is used to transmit voice data through the RTP resource transmission protocol.

[0081] In a possible implementation, SIP response = status line + header field + blank line indicating the end of the header field + an optional message body. The header field includes the media resource control protocol port and voice interaction port information related to the MRCP protocol.

[0082] Step S1012: receiving an automatic speech recognition request sent by the telephone platform according to the port information of the media resource control protocol port, and sending automatic speech recognition response information to the telephone platform.

[0083] After receiving the SIP response information sent by the server, the telephone platform can send an ASR request to the server according to the port information of the media resource control protocol port; the ASR request includes at least a status parameter, and the status parameter is used to characterize the status of the AI ​​broadcast of the telephone platform; the status parameter includes at least two identifiers: identifier 1 and identifier 2; identifier 1 is used to characterize that the telephone platform is in the AI ​​broadcast state; the identifier 2 is used to characterize that the telephone platform is in the AI ​​broadcast end state.

[0084] It should be understood that after the telephone platform receives the SIP session response information, the telephone platform establishes a SIP session path with the server. After the SIP session path is established, the server and the telephone platform can send control messages, such as ASR requests, through the MRCP protocol to perform voice recognition.

[0085] It should be understood that the content reported by the AI ​​is a preset question, and the preset question is automatically reported by the robot in the telephone platform.

[0086] After receiving the ASR request, the server may send an ASR response message to the telephone platform. Optionally, the response message may be a 200OK status code, indicating that the request is successful. After sending the ASR response message, the server may create a background service thread, call the application programming interface (API) of the ASR engine for speech recognition, and establish a connection with the ASR engine.

[0087] Step S1013: receiving the user's real-time voice data sent by the telephone platform according to the port information of the voice interaction port.

[0088] Optionally, the server and the telephone platform interact with each other in voice data via the RTP protocol.

[0089] In a possible implementation, while sending voice data, the telephone platform calls a listening thread to listen to the protocol port of MRCP, waiting for the server to return a control message and a recognition result. The recognition result is a text converted from the user's voice; the control message is control information sent through the MRCP protocol, for example, the status information of the voice data to be recognized. Exemplarily, the user does not speak, and the server receives blank voice. After the blank voice data arrives at the server, the server will make a preliminary judgment. When it is determined that the voice contains actual user voice, or when there is actual voice data, through the algorithm provided by the server or the algorithm provided by the ASR engine, the server sends a Start of Input control message to notify the telephone platform that the user's voice has been detected.

[0090] After the telephone platform receives the control message, there are two situations. In one situation, when the user voice is received during the AI ​​broadcast, the telephone platform actively stops the AI ​​broadcast and only retains the user's voice to improve the friendliness of human-computer interaction. In the other situation, the telephone platform will make a timeout judgment to detect how long the user has not spoken. The telephone platform is ready to hang up. After receiving the control message, if it is determined that the user still wants to speak, the phone platform will not hang up.

[0091] Step S102: When the telephone platform is in a preset AI broadcast state (ie, the state parameter is identification 1), the user's real-time voice data is recognized as text data through a preset ASR engine.

[0092] Specifically, the server may first determine whether the user's real-time voice data has been transmitted according to a preset first timeout threshold.

[0093] In a possible implementation, the first timeout threshold is an integer value, which represents the threshold of the pause length between each speech segment. Exemplarily, when the first timeout threshold is set to 1 second, after the user completes the first speech segment, if the pause time in between is less than 1 second, the first speech segment and the second speech segment are considered to be the same speech content, and the server determines that the user has not completed the speech input; when the user completes the first speech segment, if the pause time in between is greater than 1 second, the server determines that the user has completed the speech input, the speech data corresponding to the user's speech has been transmitted, and the current recognition process no longer recognizes the content of the second speech segment.

[0094] Optionally, the preset first timeout threshold is different in different scenarios. For example, in scenario 1 of asking for the user's address information and scenario 2 of asking for the user's gender, the user needs to fully consider the time different, and the value of the first timeout threshold in scenario 1 is greater than the value of the first timeout threshold in scenario 2.

[0095] If the user real-time voice data has been transmitted, the server may forward the user real-time voice data to the ASR engine. In a possible implementation, the ASR engine interacts with the server via a TCP protocol.

[0096] After receiving the user's real-time voice data, the ASR engine can recognize the user's real-time voice data as the text data through a preset voice recognition algorithm, and send the text data to the server. The server receives the text data sent by the ASR engine.

[0097] Step S103: performing intent recognition on the text data through a preset natural language processing (NLP) system to obtain an intent recognition result.

[0098] Specifically, the server may first count the number of characters in the text data. If the number of characters is less than a preset number threshold, the server sends the text data and the first timeout threshold to the NLP system. The number threshold may be set according to actual conditions, for example, it may be set to 3. Of course, it may also be set to other values, which are not specifically limited in the embodiments of the present invention.

[0099] In a possible implementation, the server and the NLP system transmit text data via the HTTP protocol.

[0100] In another possible implementation, the server and the NLP system transmit text data via the HTTPs protocol.

[0101] The NLP system can perform intent recognition based on the text data and the first timeout threshold, obtain the intent recognition result, and send the intent recognition result to the server.

[0102] It should be understood that the intent mentioned in the embodiment of the present invention is used to characterize whether the voice corresponding to the text data can answer the question broadcast by the AI. In one possible implementation, the intent includes valid intent and invalid intent. Exemplarily, the first question is the user's name, and the second question is the user's address, and the name and address are two scene information. The name corresponds to scene information 1, and the address corresponds to scene information 2. When the scene information is 1 but it is detected that the text data corresponding to the user's answer does not include the name keyword, the user's answer is judged to be an invalid intent. The embodiment of the present invention can set different first timeout thresholds according to different scenarios, and judge whether the text data includes valid intent in different scenarios, thereby further improving the accuracy of intent recognition.

[0103] The server may receive the intent recognition result sent by the NLP system. If the intent recognition result is an invalid intent, the server returns to the step of receiving the user's real-time voice data sent by the telephone platform and its subsequent steps, and the telephone platform continues to maintain the AI ​​broadcast state. If the intent recognition result is a valid intent, step S104 is executed.

[0104] Step S104: Send the recognition result of the ASR engine to the telephone platform, and stop the AI ​​broadcast status of the telephone platform.

[0105] Specifically, the server may first send an end recognition request to the ASR engine.

[0106] After receiving the end recognition request, the ASR engine stops automatic speech recognition and sends an end recognition response message to the server.

[0107] After receiving the end recognition response information, the server may send a recognition result acquisition request to the ASR engine.

[0108] After receiving the recognition result acquisition request, the ASR engine may send the recognition result of the ASR engine to the server. The recognition result of the ASR engine includes all text data recognized in the current automatic speech recognition process.

[0109] The server receives the recognition result of the ASR engine and sends the recognition result of the ASR engine to the telephone platform.

[0110] After receiving the recognition result of the ASR engine, the telephone platform stops the AI ​​broadcast state and stops sending voice data to the server to end the ASR recognition process.

[0111] In another specific implementation method of an embodiment of the present invention, when the telephone platform is in a preset AI broadcast end state (that is, the state parameter is identifier 2), the server can identify the user's real-time voice data as text data through the ASR engine, and perform intent recognition on the text data through the natural language processing system to obtain an intention recognition result; if the intention recognition result is an incomplete intention, that is, the user's intention has not been fully expressed, then return to execute the step of receiving the user's real-time voice data sent by the telephone platform and its subsequent steps; if the intention recognition result is a complete intention, that is, the user's intention has been fully expressed, then the recognition result of the ASR engine is sent to the telephone platform, and the ASR recognition process ends.

[0112] In another specific implementation of an embodiment of the present invention, when the user's real-time voice data cannot be detected, the server can time the duration for which the user's real-time voice data cannot be detected. If the duration for which the user's real-time voice data cannot be detected is greater than a preset second timeout threshold, a request to end recognition is sent to the ASR engine to stop the automatic voice recognition. The second timeout threshold is an integer value, indicating how long the user has not input voice. Exemplarily, the second timeout threshold can be 7 seconds. When the user believes that he has answered the question broadcast by the AI, he stops replying. When the user's voice cannot be detected after 7 seconds, the server determines that the current user is no longer inputting voice, and therefore, the ASR recognition process can be ended.

[0113] In summary, the embodiment of the present invention establishes an interactive connection with a preset telephone platform, and receives the user's real-time voice data sent by the telephone platform; when the telephone platform is in a preset artificial intelligence broadcast state, the user's real-time voice data is recognized as text data by a preset automatic voice recognition engine; the text data is subjected to intent recognition by a preset natural language processing system to obtain an intent recognition result; if the intent recognition result is an invalid intent, the step of receiving the user's real-time voice data sent by the telephone platform and its subsequent steps are returned to execute; if the intent recognition result is a valid intent, the recognition result of the automatic voice recognition engine is sent to the telephone platform, and the artificial intelligence broadcast state of the telephone platform is stopped. Through the embodiment of the present invention, intent recognition can be performed while performing automatic voice recognition, and the artificial intelligence broadcast state will only be stopped when the intent recognition result is a valid intent, thereby avoiding the system from interrupting the voice broadcast by mistake due to environmental noise or some people's words without clear intentions, greatly improving the fluency of human-computer interaction.

[0114] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0115] Corresponding to the voice interaction method described in the above embodiment, Figure 3 A structural diagram of an embodiment of a voice interaction device provided by an embodiment of the present invention is shown.

[0116] In this embodiment, a voice interaction device may include:

[0117] The voice data receiving module 301 is used to establish an interactive connection with a preset telephone platform and receive the user's real-time voice data sent by the telephone platform;

[0118] The automatic speech recognition module 302 is used to recognize the user's real-time speech data as text data through a preset automatic speech recognition engine when the telephone platform is in a preset artificial intelligence broadcast state;

[0119] A natural language processing module 303 is used to perform intent recognition on the text data through a preset natural language processing system to obtain an intent recognition result;

[0120] The recognition result sending module 304 is used to send the recognition result of the automatic speech recognition engine to the telephone platform if the intention recognition result is a valid intention, and stop the artificial intelligence broadcasting state of the telephone platform.

[0121] In a specific implementation of the embodiment of the present invention, the voice data receiving module may include:

[0122] A session initiation protocol response unit, configured to receive a session initiation protocol request sent by the telephone platform, and send a session initiation protocol response message to the telephone platform; the session initiation protocol response message includes port information of a media resource control protocol port and port information of a voice interaction port;

[0123] an automatic speech recognition response unit, configured to receive an automatic speech recognition request sent by the telephone platform according to the port information of the media resource control protocol port, and send automatic speech recognition response information to the telephone platform;

[0124] The voice data receiving unit is used to receive the user's real-time voice data sent by the telephone platform according to the port information of the voice interaction port.

[0125] In a specific implementation of the embodiment of the present invention, the automatic speech recognition module may include:

[0126] A transmission completion judgment unit, used to judge whether the user's real-time voice data has been transmitted according to a preset first timeout threshold; the first timeout threshold represents a threshold of the pause time between each voice segment;

[0127] A voice data forwarding unit, configured to forward the user's real-time voice data to the automatic voice recognition engine if the user's real-time voice data has been transmitted, so that the automatic voice recognition engine recognizes the user's real-time voice data as the text data;

[0128] A text data receiving unit is used to receive the text data sent by the automatic speech recognition engine.

[0129] In a specific implementation of the embodiment of the present invention, the natural language processing module may include:

[0130] A character number counting unit, used for counting the number of characters in the text data;

[0131] a data sending unit, configured to send the text data and the first timeout threshold to the natural language processing system if the number of characters is less than a preset number threshold, so that the natural language processing system performs intent recognition according to the text data and the first timeout threshold to obtain the intent recognition result;

[0132] An intention recognition result receiving unit is used to receive the intention recognition result sent by the natural language processing system.

[0133] In a specific implementation of the embodiment of the present invention, the recognition result sending module may include:

[0134] an end recognition request sending unit, used to send an end recognition request to the automatic speech recognition engine, so that the automatic speech recognition engine stops performing automatic speech recognition;

[0135] A recognition result acquisition unit, configured to receive a recognition end response message sent by the automatic speech recognition engine, and send a recognition result acquisition request to the automatic speech recognition engine;

[0136] The recognition result sending unit is used to receive the recognition result of the automatic speech recognition engine, and send the recognition result of the automatic speech recognition engine to the telephone platform, and stop the artificial intelligence broadcasting state of the telephone platform.

[0137] In a specific implementation of the embodiment of the present invention, the voice interaction device may further include:

[0138] The announcement end processing module is used to recognize the user's real-time voice data as text data through the automatic speech recognition engine when the telephone platform is in a preset artificial intelligence announcement end state; perform intent recognition on the text data through the natural language processing system to obtain an intent recognition result; if the intent recognition result is a complete intent, the recognition result of the automatic speech recognition engine is sent to the telephone platform.

[0139] In a specific implementation of the embodiment of the present invention, the voice interaction device may further include:

[0140] The non-voice processing module is used to time the duration for which the user's real-time voice data cannot be detected when the user's real-time voice data cannot be detected; if the duration for which the user's real-time voice data cannot be detected is greater than a preset second timeout threshold, send an end recognition request to the automatic speech recognition engine to stop the automatic speech recognition engine from performing automatic speech recognition.

[0141] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0142] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0143] Figure 4 A schematic block diagram of a server provided by an embodiment of the present invention is shown. For ease of description, only the parts related to the embodiment of the present invention are shown.

[0144] In this embodiment, the server may be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The server 4 may include: a processor 40, a memory 41, and computer-readable instructions 42 stored in the memory 41 and executable on the processor 40, such as computer-readable instructions for executing the above-mentioned voice interaction method. When the processor 40 executes the computer-readable instructions 42, the steps in the above-mentioned various voice interaction method embodiments are implemented, such as Figure 1 Alternatively, when the processor 40 executes the computer-readable instructions 42, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 3 Functions of modules 301 to 304 are shown.

[0145] Exemplarily, the computer-readable instructions 42 may be divided into one or more modules / units, which are stored in the memory 41 and executed by the processor 40 to implement the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer-readable instructions 42 in the server 4.

[0146] The processor 40 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0147] The memory 41 may be an internal storage unit of the server 4, such as a hard disk or memory of the server 4. The memory 41 may also be an external storage device of the server 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the server 4. Further, the memory 41 may also include both an internal storage unit of the server 4 and an external storage device. The memory 41 is used to store the computer-readable instructions and other instructions and data required by the server 4. The memory 41 may also be used to temporarily store data that has been output or is to be output.

[0148] Each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0149] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of computer-readable instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store computer-readable instructions.

[0150] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A voice interaction method, characterized in that: include: Establishing an interactive connection with a preset telephone platform and receiving real-time voice data of the user sent by the telephone platform; When the telephone platform is in a preset artificial intelligence broadcast state, the user's real-time voice data is recognized as text data through a preset automatic voice recognition engine; Performing intent recognition on the text data through a preset natural language processing system to obtain an intent recognition result; If the intention recognition result is an invalid intention, return to execute the step of receiving the user's real-time voice data sent by the telephone platform and its subsequent steps; If the intention recognition result is a valid intention, an end recognition request is sent to the automatic speech recognition engine to stop the automatic speech recognition engine from performing automatic speech recognition; an end recognition response message sent by the automatic speech recognition engine is received, and a recognition result acquisition request is sent to the automatic speech recognition engine; the recognition result of the automatic speech recognition engine is received, and the recognition result of the automatic speech recognition engine is sent to the telephone platform to stop the artificial intelligence broadcast status of the telephone platform.

2. The voice interaction method according to claim 1, characterized in that: The step of establishing an interactive connection with a preset telephone platform and receiving real-time user voice data sent by the telephone platform includes: Receiving a session initiation protocol request sent by the telephone platform, and sending a session initiation protocol response message to the telephone platform; the session initiation protocol response message includes port information of a media resource control protocol port and port information of a voice interaction port; receiving an automatic speech recognition request sent by the telephone platform according to the port information of the media resource control protocol port, and sending automatic speech recognition response information to the telephone platform; Receive the user's real-time voice data sent by the telephone platform according to the port information of the voice interaction port.

3. The voice interaction method according to claim 1, characterized in that: The step of recognizing the user's real-time voice data as text data by a preset automatic voice recognition engine includes: Determine whether the user's real-time voice data has been transmitted according to a preset first timeout threshold; the first timeout threshold represents the threshold of the pause length between each voice segment; If the user real-time voice data has been transmitted, forwarding the user real-time voice data to the automatic voice recognition engine, so that the automatic voice recognition engine recognizes the user real-time voice data as the text data; The text data sent by the automatic speech recognition engine is received.

4. The voice interaction method according to claim 3, characterized in that: The performing intent recognition on the text data by a preset natural language processing system to obtain an intent recognition result includes: Counting the number of characters in the text data; If the number of characters is less than a preset number threshold, sending the text data and the first timeout threshold to the natural language processing system, so that the natural language processing system performs intent recognition according to the text data and the first timeout threshold to obtain the intent recognition result; Receive the intention recognition result sent by the natural language processing system.

5. The voice interaction method according to claim 1, characterized in that: Also includes: When the telephone platform is in a preset artificial intelligence broadcast end state, the user's real-time voice data is recognized as text data through the automatic voice recognition engine; Performing intent recognition on the text data by the natural language processing system to obtain an intent recognition result; If the intention recognition result is an incomplete intention, returning to execute the step of receiving the user's real-time voice data sent by the telephone platform and its subsequent steps; If the intent recognition result is a complete intent, the recognition result of the automatic speech recognition engine is sent to the telephone platform.

6. The voice interaction method according to any one of claims 1 to 5, characterized in that: Also includes: When the real-time voice data of the user cannot be detected, timing the duration for which the real-time voice data of the user cannot be detected; If it is not detected that the duration of the user's real-time voice data is greater than the preset second timeout threshold, a request to end recognition is sent to the automatic voice recognition engine to stop the automatic voice recognition engine.

7. A voice interaction device, characterized in that: include: A voice data receiving module, used to establish an interactive connection with a preset telephone platform and receive real-time user voice data sent by the telephone platform; An automatic speech recognition module, used to recognize the user's real-time speech data as text data through a preset automatic speech recognition engine when the telephone platform is in a preset artificial intelligence broadcast state; A natural language processing module, used to perform intent recognition on the text data through a preset natural language processing system to obtain an intent recognition result; The recognition result sending module is used to send an end recognition request to the automatic speech recognition engine if the intention recognition result is a valid intention, so that the automatic speech recognition engine stops automatic speech recognition; receive the end recognition response information sent by the automatic speech recognition engine, and send a recognition result acquisition request to the automatic speech recognition engine; receive the recognition result of the automatic speech recognition engine, and send the recognition result of the automatic speech recognition engine to the telephone platform, so as to stop the artificial intelligence broadcast status of the telephone platform.

8. A computer-readable storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the steps of the voice interaction method according to any one of claims 1 to 6 are implemented.

9. A server comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer-readable instructions, the steps of the voice interaction method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Intelligent telephone switchboard and working method and system thereof

    CN111050002A