CN112612877A - Multi-type message intelligent reply method, device, computer equipment and storage medium - Google Patents

Multi-type message intelligent reply method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN112612877A
CN112612877A CN202011486547.9A CN202011486547A CN112612877A CN 112612877 A CN112612877 A CN 112612877A CN 202011486547 A CN202011486547 A CN 202011486547A CN 112612877 A CN112612877 A CN 112612877A
Authority
CN
China
Prior art keywords
message
text
type
reply
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011486547.9A
Other languages
Chinese (zh)
Inventor
赵程
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011486547.9A priority Critical patent/CN112612877A/en
Publication of CN112612877A publication Critical patent/CN112612877A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3343Query execution using phonetics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/26Speech to text systems

Abstract

The invention discloses a multi-type message intelligent reply method, a device, computer equipment and a storage medium, which relate to artificial intelligence and comprise the steps of obtaining the message type of a user message; if the message type is not supported by the adapter, sending the first notification information to the monitoring terminal; if the message type supported by the adapter is available, text data corresponding to the user message is acquired; acquiring a text semantic vector corresponding to the text semantic vector, and locally acquiring a target reply text semantic vector with the maximum vector similarity with the text semantic vector and a target reply text corresponding to the target reply text; and converting the target reply text into reply data corresponding to the message type, and adding the reply data into a corresponding layout file to obtain the user message reply data. The method realizes that the corresponding message type identification extension data is configured in the adapter, can support the receiving of the user message of the corresponding message type, and carry out accurate content analysis on the user message, and supports the intelligent reply of multiple message types.

Description

Multi-type message intelligent reply method, device, computer equipment and storage medium
Technical Field
The invention relates to the field of artificial intelligence voice semantics, in particular to a multi-type message intelligent reply method, a device, computer equipment and a storage medium.
Background
At present, intelligent customer service is popularized and applied in more and more fields, such as e-commerce, finance and other fields. When a user needs to consult the intelligent customer service for some problems, a UI (user interface) corresponding to the intelligent client is opened, and then the consultation problems in a text form are added into a chat box corresponding to the UI and sent to the intelligent customer service for consultation. Once the user sends other non-text forms of consultation questions, the intelligent customer service does not support message recognition and intelligent reply.
Disclosure of Invention
The embodiment of the invention provides a multi-type message intelligent reply method, a multi-type message intelligent reply device, computer equipment and a storage medium, and aims to solve the problem that in the prior art, an intelligent customer service receives a non-text consultation problem and does not support message identification and intelligent reply.
In a first aspect, an embodiment of the present invention provides a method for intelligently replying to multiple types of messages, where the method includes:
if the user message sent by the user side is detected, the message type of the user message is obtained; wherein the message types comprise text messages, voice messages, picture messages and video messages;
judging whether the message type is the message type supported in the adapter;
if the message type is not the message type supported in the adapter, sending first notification information for notifying that the message type is supported by the extension to the monitoring terminal;
if the message type is the message type supported in the adapter, text data corresponding to the user message is obtained;
acquiring a text semantic vector corresponding to the text data, and acquiring a target reply text semantic vector with the maximum vector similarity with the text semantic vector and a target reply text corresponding to the target reply text semantic vector in a local reply text library; and
and converting the target reply text into reply data corresponding to the message type, acquiring a layout file corresponding to the message type, and adding the reply data into the layout file to obtain user message reply data.
In a second aspect, an embodiment of the present invention provides a multi-type message intelligent response device, which includes:
a message type obtaining unit, configured to obtain a message type of a user message sent by a user side if the user message is detected; wherein the message types comprise text messages, voice messages, picture messages and video messages;
a type support judging unit, configured to judge whether the message type is a message type supported in the adapter;
a type extension notifying unit, configured to send, to the monitoring terminal, first notification information for notifying that the message type is supported by extension, if the message type is not a message type supported by the adapter;
a text data obtaining unit, configured to obtain text data corresponding to the user message if the message type is a message type supported by the adapter;
a target reply text acquisition unit, configured to acquire a text semantic vector corresponding to the text data, and acquire, in a local reply text library, a target reply text semantic vector whose vector similarity with the text semantic vector is a maximum value, and a target reply text corresponding to the target reply text semantic vector; and
and the reply data acquisition unit is used for converting the target reply text into reply data corresponding to the message type, acquiring a layout file corresponding to the message type, and adding the reply data into the layout file to obtain user message reply data.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor, when executing the computer program, implements the multi-type message intelligent reply method described in the first aspect.
In a fourth aspect, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the multi-type message intelligent response method according to the first aspect.
The embodiment of the invention provides a multi-type message intelligent reply method, a device, computer equipment and a storage medium, wherein the method comprises the steps of acquiring the message type of a user message if the user message sent by a user side is detected; if the message type is not the message type supported in the adapter, sending first notification information for notifying that the message type is supported by the extension to the monitoring terminal; if the message type is the message type supported in the adapter, acquiring text data corresponding to the user message; acquiring a text semantic vector corresponding to the text data, and acquiring a target reply text semantic vector with the maximum vector similarity with the text semantic vector and a target reply text corresponding to the target reply text semantic vector in a local reply text library; and converting the target reply text into reply data corresponding to the message type, acquiring a layout file corresponding to the message type, and adding the reply data into the layout file to obtain the user message reply data. The method realizes that the corresponding message type identification extension data is configured in the adapter, can support the receiving of the user message of the corresponding message type, and carry out accurate content analysis on the user message, and supports the intelligent reply of multiple message types.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of an intelligent multi-type message reply method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an intelligent multi-type message reply method according to an embodiment of the present invention;
FIG. 3 is a schematic block diagram of an intelligent multi-type message response device according to an embodiment of the present invention;
FIG. 4 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic view of an application scenario of an intelligent multi-type message reply method according to an embodiment of the present invention; fig. 2 is a schematic flowchart of an intelligent multi-type message reply method according to an embodiment of the present invention, where the method is applied to a server and is executed by application software installed in the server.
As shown in fig. 2, the method includes steps S101 to S106.
S101, if a user message sent by a user side is detected, obtaining the message type of the user message; wherein the message types include text messages, voice messages, picture messages, and video messages.
In this embodiment, in order to more clearly understand the technical solution of the present application, the following detailed description is made on the terminal concerned.
The first is a server, where an intelligent customer service (also known as an intelligent conversation robot) is deployed in the server, and after a user terminal successfully logs in, a UI interface (i.e., a user interaction interface, which is an interface provided by the intelligent customer service to the user terminal, for example, a chat box corresponding to the intelligent customer service is displayed on the display interface of the user terminal, and this chat box is an interface where the user terminal is docked with the intelligent customer service), at this time, the user terminal can send various types of messages (e.g., text messages, picture messages, voice messages, etc.) to the server through the UI interface, and after receiving the message from the user terminal and performing message type recognition and message content analysis, the server correspondingly generates a reply message and sends the reply message to the user terminal.
And secondly, the user side is an intelligent terminal (such as a smart phone, a tablet computer and the like) used by the user, and the user can edit messages in various forms and send the messages to the server in a chat interface displayed after the user side and the server are successfully connected. And then, a reply message corresponding to the feedback of the server can be received.
When the server receives a user message sent by a user terminal, the server firstly acquires the message type of the user message, for example, the message type of the user message is one or more of a text message, a voice message, a picture message and a video message.
S102, judging whether the message type is the message type supported in the adapter.
In this embodiment, due to the intelligent customer service deployed in the server, the intelligent chat can be implemented after the interface provided by the intelligent customer service is called by the APP (i.e., application program) installed on the user side. The intelligent customer service adopts the mode of the adapter when being built, which fully considers the situation that the types of the messages received by the intelligent customer service are more and more, the types of the received or sent messages can be automatically adapted through the adapter, the corresponding message types are automatically adapted, and the corresponding messages are displayed for users.
The types of messages supported by the adapter may be set to be less initially, for example, to be one and specifically text messages, and if the message type corresponding to the user message sent by the user terminal is a voice message, it needs to first determine whether the voice message corresponding to the user message is related to the message type supported by the adapter
S103, if the message type is not the message type supported in the adapter, sending first notification information for notifying that the message type is supported by the extension to the monitoring terminal.
In this embodiment, if the message type is not a message type supported by the adapter, for example, the message type supported by the adapter in the above example is a text message, but the message type corresponding to the user message sent by the user side is a voice message, it is obvious that the message type is not a message type supported by the adapter, at this time, in order to timely extend and support the message type by an operator of the notification server, notification information for notifying that the message type is extended and supported may be sent to the monitoring terminal. The monitoring terminal is an intelligent terminal used by a developer appointed by an operator of the known server.
In an embodiment, step S103 is followed by:
and sending second prompt information for informing that the user side does not support the message type to the user side.
In this embodiment, when the server does not support replying to the message type sent by the client, in order to prompt the user that normal recovery cannot be performed in time, a second prompt message [ unidentified message type ] may be sent to the client to prompt the user that normal reply of the intelligent customer service cannot be received.
In an embodiment, step S103 is followed by:
and if message type identification extended data which is sent by the monitoring terminal and corresponds to the message type is received, adding the message type identification extended data into the adapter for local configuration.
In this embodiment, after receiving the first notification information, the monitoring terminal correspondingly develops the unsupported message type sent by the user side and the data result of the user message to obtain the message type identification extension data corresponding to the message type, and then sends the message type identification extension data to the adapter in the server for local configuration, so that the identification of the message type can be supported.
And S104, if the message type is the message type supported by the adapter, acquiring text data corresponding to the user message.
In this embodiment, when the message type of the user message sent by the user side to the smart customer service is a message type supported by the adapter, at this time, text data corresponding to the user message needs to be acquired first.
In an embodiment, the acquiring the text data corresponding to the user message in step S104 includes:
if the message type is a text message, acquiring the user message as text data;
if the message type is a voice message, calling a locally stored voice recognition model to recognize the user message so as to obtain text data corresponding to the user message;
if the message type is a picture message, calling a locally stored OCR character recognition model to perform character recognition on the user message so as to obtain text data corresponding to the user message;
and if the message type is a video message, audio and video separation is carried out on the user message to obtain corresponding audio data, and the voice recognition model is used for recognizing the audio data to obtain text data corresponding to the user message.
In this embodiment, in order for the smart customer service to support accurate responses of various message types, it needs to support at least the above four functions, and when receiving a user message of a text message type, or a user message of a voice message type, or a user message of a picture message type, or a user message of a video message type, it can call a corresponding model to extract a text of a consultation question required by a user.
If the message type is a text message, the intelligent customer service can directly acquire the user message as text data without identification.
In one embodiment, the invoking a locally stored speech recognition model to recognize the user message to obtain text data corresponding to the user message includes:
and identifying the user message through an N-gram model to obtain text data corresponding to the user message.
In this embodiment, a N-gram model trained and stored in a server in advance is called to perform speech recognition on the user message, so as to obtain corresponding text data. Through the setting, no matter a user sends a text or a voice to the server, the intelligent customer service can effectively and accurately identify the text or the voice.
If the message type is a picture message, character recognition can be performed on the user message through an OCR character recognition model. The OCR technology is an abbreviation for Optical Character Recognition (Optical Character Recognition), and is a computer input technology that converts characters of various bills, newspapers, books, manuscripts, and other printed matters into image information by an Optical input method such as scanning, and then converts the image information into usable computer information by using a Character Recognition technology. Can be applied to the fields of inputting and processing bank notes, a large amount of text data, file files and documentaries. It is suitable for automatic scanning, identification and long-term storage of a large number of bill forms in the industries of banks, tax administration and the like.
If the message type is a video message, the essence of the message type is the combination of audio data and video data, at this time, audio and video separation can be performed on the user message first, then the audio data in the user message can be acquired, and then the user message is identified by referring to an N-gram model, so that a processing process of text data corresponding to the user message can be obtained.
Therefore, once the server configures the corresponding message type identification extension data in the adapter, the server can support receiving the user message of the corresponding message type and perform accurate content analysis on the user message.
S105, obtaining a text semantic vector corresponding to the text data, and obtaining a target reply text semantic vector with the maximum vector similarity with the text semantic vector and a target reply text corresponding to the target reply text semantic vector in a local reply text library.
In this embodiment, in order to accurately reply to the user message, at this time, after obtaining text data corresponding to the user message, word segmentation, keyword extraction, and weight summation of keyword-word vectors are sequentially performed on the text data, so that a corresponding text semantic vector can be obtained. Similarly, a plurality of reply texts and reply text semantic vectors corresponding to the reply texts are stored in the reply text library of the server. Thus, after the target reply text semantic vector is obtained, the target reply text semantic vector with the maximum vector similarity with the text semantic vector and the target reply text corresponding to the target reply text semantic vector can be obtained from the reply text semantic vectors respectively corresponding to the reply texts.
When calculating the vector similarity between two semantic vectors, the pearson similarity between the two semantic vectors may be used as the vector similarity. Through the method, the most accurate text in all the reply texts can be obtained as the target reply text.
S106, converting the target reply text into reply data corresponding to the message type, acquiring a layout file corresponding to the message type, and adding the reply data into the layout file to obtain user message reply data.
In this embodiment, different types of message types correspond to different layout files in the server (for example, a text message, a voice message, a picture message, and a video message correspond to one layout file respectively, and the pushing to the user side for displaying is also different), for example, a layout file corresponding to a text container for a text message, a layout file corresponding to an audio container for an audio message, a layout file corresponding to a picture container for a picture message, and a layout file corresponding to a video container for a video message. And once the target reply text is converted into reply data corresponding to the message type, the reply data is added to a corresponding layout file to obtain user message reply data.
In an embodiment, the step S106 of converting the target reply text into reply data corresponding to the message type includes:
if the message type is a text message, the target reply text is used as reply data;
if the message type is a voice message, performing voice conversion on the target reply text to obtain reply data;
if the message type is a picture message, acquiring a pre-stored picture template, and adding the target reply text to the picture template to obtain reply data;
and if the message type is a video message, acquiring a pre-stored video template, and adding target audio data corresponding to the target reply text to the video template to obtain reply data.
In this embodiment, if the message type is a voice message, the target reply text is subjected to voice conversion to obtain a voice synthesis process that the reply data is essentially text-to-voice, and the text can be converted into the reply data in a voice form according to the called voice template.
If the message type is a picture message, a simple superposition process of adding the layer corresponding to the text to the layer corresponding to the picture template is performed, so that reply data in the form of the picture can be obtained. More specifically, a picture template locally stored by the server may be obtained (for example, 10 picture styles of picture templates are locally stored in the server, and at this time, the server randomly selects one of the picture templates as a currently selected picture template), and then the layer corresponding to the text is added to the layer corresponding to the picture template, so that reply data in a picture form can be quickly obtained.
If the message type is a video message, target audio data corresponding to the target reply text is obtained according to text-to-speech, and then the target audio data is added to the video template to obtain reply data. More specifically, the audio time duration corresponding to the target audio data may be obtained first, then a target video template (the target video template is pure video data) with the smallest difference between the video time duration and the audio time duration is selected from a video template library locally stored in the server, and the target audio data and the target video template are synthesized to obtain the reply data in the form of video. Therefore, through the mode, the intelligent customer service in the server supports intelligent reply of multiple message types.
The method realizes that the corresponding message type identification extension data is configured in the adapter, can support the receiving of the user message of the corresponding message type, and carry out accurate content analysis on the user message, and supports the intelligent reply of multiple message types.
The embodiment of the invention also provides an intelligent multi-type message response device, which is used for executing any embodiment of the intelligent multi-type message response method. Specifically, referring to fig. 3, fig. 3 is a schematic block diagram of a multi-type message intelligent response device according to an embodiment of the present invention. The multi-type message intelligent reply device 100 may be configured in a server.
As shown in fig. 3, the multi-type message intelligent reply device 100 includes: a message type acquisition unit 101, a type support judgment unit 102, a type extension notification unit 103, a text data acquisition unit 104, a target reply text acquisition unit 105, and a reply data acquisition unit 106.
A message type obtaining unit 101, configured to obtain a message type of a user message sent by a user terminal if the user message is detected; wherein the message types include text messages, voice messages, picture messages, and video messages.
In this embodiment, when the server receives a user message sent by the user side, the message type of the user message is first obtained, for example, the message type of the user message is one or more of a text message, a voice message, a picture message, and a video message.
A type support judging unit 102, configured to judge whether the message type is a supported message type in the adapter.
In this embodiment, due to the intelligent customer service deployed in the server, the intelligent chat can be implemented after the interface provided by the intelligent customer service is called by the APP (i.e., application program) installed on the user side. The intelligent customer service adopts the mode of the adapter when being built, which fully considers the situation that the types of the messages received by the intelligent customer service are more and more, the types of the received or sent messages can be automatically adapted through the adapter, the corresponding message types are automatically adapted, and the corresponding messages are displayed for users.
The types of messages supported by the adapter may be set to be less initially, for example, to be one and specifically text messages, and if the message type corresponding to the user message sent by the user terminal is a voice message, it needs to first determine whether the voice message corresponding to the user message is related to the message type supported by the adapter
A type extension notifying unit 103, configured to send, if the message type is not a message type supported in the adapter, first notification information for notifying that the message type is supported by extension to the monitoring terminal.
In this embodiment, if the message type is not a message type supported by the adapter, for example, the message type supported by the adapter in the above example is a text message, but the message type corresponding to the user message sent by the user side is a voice message, it is obvious that the message type is not a message type supported by the adapter, at this time, in order to timely extend and support the message type by an operator of the notification server, notification information for notifying that the message type is extended and supported may be sent to the monitoring terminal. The monitoring terminal is an intelligent terminal used by a developer appointed by an operator of the known server.
In one embodiment, multi-type message intelligent reply device 100 further comprises:
and the type non-support prompting unit is used for sending second prompting information for informing that the user side does not support the message type to the user side.
In this embodiment, when the server does not support replying to the message type sent by the client, in order to prompt the user that normal recovery cannot be performed in time, a second prompt message [ unidentified message type ] may be sent to the client to prompt the user that normal reply of the intelligent customer service cannot be received.
In one embodiment, multi-type message intelligent reply device 100 further comprises:
and the extended data configuration unit is used for adding the message type identification extended data into the adapter for local configuration if receiving the message type identification extended data which is sent by the monitoring terminal and corresponds to the message type.
In this embodiment, after receiving the first notification information, the monitoring terminal correspondingly develops the unsupported message type sent by the user side and the data result of the user message to obtain the message type identification extension data corresponding to the message type, and then sends the message type identification extension data to the adapter in the server for local configuration, so that the identification of the message type can be supported.
A text data obtaining unit 104, configured to obtain text data corresponding to the user message if the message type is a message type supported in the adapter.
In this embodiment, when the message type of the user message sent by the user side to the smart customer service is a message type supported by the adapter, at this time, text data corresponding to the user message needs to be acquired first.
In one embodiment, the text data obtaining unit 104 includes:
a first obtaining unit, configured to obtain the user message as text data if the message type is a text message;
the second obtaining unit is used for calling a locally stored voice recognition model to recognize the user message if the message type is a voice message so as to obtain text data corresponding to the user message;
a third obtaining unit, configured to, if the message type is a picture message, invoke a locally stored OCR character recognition model to perform character recognition on the user message, so as to obtain text data corresponding to the user message;
and the fourth acquisition unit is used for carrying out audio-video separation on the user message to obtain corresponding audio data if the message type is a video message, and the voice recognition model is used for recognizing the audio data to obtain text data corresponding to the user message.
In this embodiment, in order for the smart customer service to support accurate responses of various message types, it needs to support at least the above four functions, and when receiving a user message of a text message type, or a user message of a voice message type, or a user message of a picture message type, or a user message of a video message type, it can call a corresponding model to extract a text of a consultation question required by a user.
If the message type is a text message, the intelligent customer service can directly acquire the user message as text data without identification.
In an embodiment, the second obtaining unit is further configured to:
and identifying the user message through an N-gram model to obtain text data corresponding to the user message.
In this embodiment, a N-gram model trained and stored in a server in advance is called to perform speech recognition on the user message, so as to obtain corresponding text data. Through the setting, no matter a user sends a text or a voice to the server, the intelligent customer service can effectively and accurately identify the text or the voice.
If the message type is a picture message, character recognition can be performed on the user message through an OCR character recognition model. The OCR technology is an abbreviation for Optical Character Recognition (Optical Character Recognition), and is a computer input technology that converts characters of various bills, newspapers, books, manuscripts, and other printed matters into image information by an Optical input method such as scanning, and then converts the image information into usable computer information by using a Character Recognition technology. Can be applied to the fields of inputting and processing bank notes, a large amount of text data, file files and documentaries. It is suitable for automatic scanning, identification and long-term storage of a large number of bill forms in the industries of banks, tax administration and the like.
If the message type is a video message, the essence of the message type is the combination of audio data and video data, at this time, audio and video separation can be performed on the user message first, then the audio data in the user message can be acquired, and then the user message is identified by referring to an N-gram model, so that a processing process of text data corresponding to the user message can be obtained.
Therefore, once the server configures the corresponding message type identification extension data in the adapter, the server can support receiving the user message of the corresponding message type and perform accurate content analysis on the user message.
A target reply text acquiring unit 105, configured to acquire a text semantic vector corresponding to the text data, acquire a target reply text semantic vector having a maximum vector similarity with the text semantic vector in a local reply text library, and acquire a target reply text corresponding to the target reply text semantic vector.
In this embodiment, in order to accurately reply to the user message, at this time, after obtaining text data corresponding to the user message, word segmentation, keyword extraction, and weight summation of keyword-word vectors are sequentially performed on the text data, so that a corresponding text semantic vector can be obtained. Similarly, a plurality of reply texts and reply text semantic vectors corresponding to the reply texts are stored in the reply text library of the server. Thus, after the target reply text semantic vector is obtained, the target reply text semantic vector with the maximum vector similarity with the text semantic vector and the target reply text corresponding to the target reply text semantic vector can be obtained from the reply text semantic vectors respectively corresponding to the reply texts.
When calculating the vector similarity between two semantic vectors, the pearson similarity between the two semantic vectors may be used as the vector similarity. Through the method, the most accurate text in all the reply texts can be obtained as the target reply text.
A reply data obtaining unit 106, configured to convert the target reply text into reply data corresponding to the message type, obtain a layout file corresponding to the message type, and add the reply data to the layout file to obtain user message reply data.
In this embodiment, different types of message types correspond to different layout files in the server (for example, a text message, a voice message, a picture message, and a video message correspond to one layout file respectively, and the pushing to the user side for displaying is also different), for example, a layout file corresponding to a text container for a text message, a layout file corresponding to an audio container for an audio message, a layout file corresponding to a picture container for a picture message, and a layout file corresponding to a video container for a video message. And once the target reply text is converted into reply data corresponding to the message type, the reply data is added to a corresponding layout file to obtain user message reply data.
In one embodiment, the reply data obtaining unit 106 includes:
a fifth obtaining unit, configured to take the target reply text as reply data if the message type is a text message;
a sixth obtaining unit, configured to perform voice conversion on the target reply text to obtain reply data if the message type is a voice message;
a seventh obtaining unit, configured to obtain a pre-stored picture template if the message type is a picture message, and add the target reply text to the picture template to obtain reply data;
an eighth obtaining unit, configured to obtain a pre-stored video template if the message type is a video message, and add target audio data corresponding to the target reply text to the video template to obtain reply data.
In this embodiment, if the message type is a voice message, the target reply text is subjected to voice conversion to obtain a voice synthesis process that the reply data is essentially text-to-voice, and the text can be converted into the reply data in a voice form according to the called voice template. If the message type is a picture message, a simple superposition process of adding the layer corresponding to the text to the layer corresponding to the picture template is performed, so that reply data in the form of the picture can be obtained. If the message type is a video message, target audio data corresponding to the target reply text is obtained according to text-to-speech, and then the target audio data is added to the video template to obtain reply data. Therefore, through the mode, the intelligent customer service in the server supports intelligent reply of multiple message types.
The device realizes that the corresponding message type identification extension data is configured in the adapter, can support receiving the user message of the corresponding message type, and carries out accurate content analysis on the user message, and supports intelligent reply of multiple message types.
The above-mentioned multi-type message intelligent response apparatus may be implemented in the form of a computer program, which can be run on a computer device as shown in fig. 4.
Referring to fig. 4, fig. 4 is a schematic block diagram of a computer device according to an embodiment of the present invention. The computer device 500 is a server, and the server may be an independent server or a server cluster composed of a plurality of servers.
Referring to fig. 4, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer programs 5032, when executed, cause the processor 502 to perform a multi-type message intelligent reply method.
The processor 502 is used to provide computing and control capabilities that support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 can be enabled to execute the multi-type message intelligent reply method.
The network interface 505 is used for network communication, such as providing transmission of data information. Those skilled in the art will appreciate that the configuration shown in fig. 4 is a block diagram of only a portion of the configuration associated with aspects of the present invention and is not intended to limit the computing device 500 to which aspects of the present invention may be applied, and that a particular computing device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The processor 502 is configured to run the computer program 5032 stored in the memory to implement the multi-type message intelligent response method disclosed in the embodiment of the present invention.
Those skilled in the art will appreciate that the embodiment of a computer device illustrated in fig. 4 does not constitute a limitation on the specific construction of the computer device, and that in other embodiments a computer device may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may only include a memory and a processor, and in such embodiments, the structures and functions of the memory and the processor are consistent with those of the embodiment shown in fig. 4, and are not described herein again.
It should be understood that, in the embodiment of the present invention, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer readable storage medium may be a non-volatile computer readable storage medium. The computer readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the multi-type message intelligent response method disclosed by the embodiments of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only a logical division, and there may be other divisions when the actual implementation is performed, or units having the same function may be grouped into one unit, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. An intelligent multi-type message reply method, comprising:
if the user message sent by the user side is detected, the message type of the user message is obtained; wherein the message types comprise text messages, voice messages, picture messages and video messages;
judging whether the message type is the message type supported in the adapter;
if the message type is not the message type supported in the adapter, sending first notification information for notifying that the message type is supported by the extension to the monitoring terminal;
if the message type is the message type supported in the adapter, text data corresponding to the user message is obtained;
acquiring a text semantic vector corresponding to the text data, and acquiring a target reply text semantic vector with the maximum vector similarity with the text semantic vector and a target reply text corresponding to the target reply text semantic vector in a local reply text library; and
and converting the target reply text into reply data corresponding to the message type, acquiring a layout file corresponding to the message type, and adding the reply data into the layout file to obtain user message reply data.
2. The method for intelligently replying to multi-type messages according to claim 1, wherein after sending the first notification message for notifying that the extension supports the message type to the monitoring terminal, further comprising:
and sending second prompt information for informing that the user side does not support the message type to the user side.
3. The method for intelligently replying to multi-type messages according to claim 1, wherein after sending the first notification message for notifying that the extension supports the message type to the monitoring terminal, further comprising:
and if message type identification extended data which is sent by the monitoring terminal and corresponds to the message type is received, adding the message type identification extended data into the adapter for local configuration.
4. The method according to claim 1, wherein said obtaining text data corresponding to said user message comprises:
if the message type is a text message, acquiring the user message as text data;
if the message type is a voice message, calling a locally stored voice recognition model to recognize the user message so as to obtain text data corresponding to the user message;
if the message type is a picture message, calling a locally stored OCR character recognition model to perform character recognition on the user message so as to obtain text data corresponding to the user message;
and if the message type is a video message, audio and video separation is carried out on the user message to obtain corresponding audio data, and the voice recognition model is used for recognizing the audio data to obtain text data corresponding to the user message.
5. The method for multi-type message intelligent reply according to claim 4, wherein said calling a locally stored speech recognition model to recognize said user message for text data corresponding to said user message comprises:
and identifying the user message through an N-gram model to obtain text data corresponding to the user message.
6. The method for multi-type message intelligent response according to claim 1, wherein said converting said target response text into response data corresponding to said message type comprises:
if the message type is a text message, the target reply text is used as reply data;
if the message type is a voice message, performing voice conversion on the target reply text to obtain reply data;
if the message type is a picture message, acquiring a pre-stored picture template, and adding the target reply text to the picture template to obtain reply data;
and if the message type is a video message, acquiring a pre-stored video template, and adding target audio data corresponding to the target reply text to the video template to obtain reply data.
7. An intelligent multi-type message response device, comprising:
a message type obtaining unit, configured to obtain a message type of a user message sent by a user side if the user message is detected; wherein the message types comprise text messages, voice messages, picture messages and video messages;
a type support judging unit, configured to judge whether the message type is a message type supported in the adapter;
a type extension notifying unit, configured to send, to the monitoring terminal, first notification information for notifying that the message type is supported by extension, if the message type is not a message type supported by the adapter;
a text data obtaining unit, configured to obtain text data corresponding to the user message if the message type is a message type supported by the adapter;
a target reply text acquisition unit, configured to acquire a text semantic vector corresponding to the text data, and acquire, in a local reply text library, a target reply text semantic vector whose vector similarity with the text semantic vector is a maximum value, and a target reply text corresponding to the target reply text semantic vector; and
and the reply data acquisition unit is used for converting the target reply text into reply data corresponding to the message type, acquiring a layout file corresponding to the message type, and adding the reply data into the layout file to obtain user message reply data.
8. The multi-type message intelligent response device of claim 7, further comprising:
and the type non-support prompting unit is used for sending second prompting information for informing that the user side does not support the message type to the user side.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the multi-type message intelligent reply method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to execute the multi-type message intelligent response method according to any one of claims 1 to 6.
CN202011486547.9A 2020-12-16 2020-12-16 Multi-type message intelligent reply method, device, computer equipment and storage medium Pending CN112612877A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011486547.9A CN112612877A (en) 2020-12-16 2020-12-16 Multi-type message intelligent reply method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011486547.9A CN112612877A (en) 2020-12-16 2020-12-16 Multi-type message intelligent reply method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112612877A true CN112612877A (en) 2021-04-06

Family

ID=75239590

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011486547.9A Pending CN112612877A (en) 2020-12-16 2020-12-16 Multi-type message intelligent reply method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112612877A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342954A (en) * 2021-06-21 2021-09-03 南京星云数字技术有限公司 Image information processing method and device applied to question-answering system and electronic equipment
CN115034186A (en) * 2022-08-15 2022-09-09 北京永洪商智科技有限公司 Report generation method and system based on data processing
CN115334462A (en) * 2022-07-18 2022-11-11 中银金融科技有限公司 Activity organization information processing method, system and storage medium based on 5G message

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050021834A1 (en) * 2003-06-19 2005-01-27 Nokia Corporation System for rendering multimedia messages by providing, in a multimedia message, URL for downloadable software to a receiving terminal
CN107040450A (en) * 2016-07-20 2017-08-11 平安科技(深圳)有限公司 Automatic reply method and device
CN107341059A (en) * 2017-07-16 2017-11-10 深圳大智软件技术有限公司 A kind of wechat public number concurrent message treatment mechanism
CN109063152A (en) * 2018-08-08 2018-12-21 鲸数科技(北京)有限公司 Intelligent answer method, apparatus and intelligent terminal
CN109102809A (en) * 2018-06-22 2018-12-28 北京光年无限科技有限公司 A kind of dialogue method and system for intelligent robot
CN109783677A (en) * 2019-01-21 2019-05-21 三角兽(北京)科技有限公司 Answering method, return mechanism, electronic equipment and computer readable storage medium
KR20200032380A (en) * 2018-09-18 2020-03-26 삼성에스디에스 주식회사 Apparatus and method for connecting chatbot

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050021834A1 (en) * 2003-06-19 2005-01-27 Nokia Corporation System for rendering multimedia messages by providing, in a multimedia message, URL for downloadable software to a receiving terminal
CN107040450A (en) * 2016-07-20 2017-08-11 平安科技(深圳)有限公司 Automatic reply method and device
CN107341059A (en) * 2017-07-16 2017-11-10 深圳大智软件技术有限公司 A kind of wechat public number concurrent message treatment mechanism
CN109102809A (en) * 2018-06-22 2018-12-28 北京光年无限科技有限公司 A kind of dialogue method and system for intelligent robot
CN109063152A (en) * 2018-08-08 2018-12-21 鲸数科技(北京)有限公司 Intelligent answer method, apparatus and intelligent terminal
KR20200032380A (en) * 2018-09-18 2020-03-26 삼성에스디에스 주식회사 Apparatus and method for connecting chatbot
CN109783677A (en) * 2019-01-21 2019-05-21 三角兽(北京)科技有限公司 Answering method, return mechanism, electronic equipment and computer readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342954A (en) * 2021-06-21 2021-09-03 南京星云数字技术有限公司 Image information processing method and device applied to question-answering system and electronic equipment
CN115334462A (en) * 2022-07-18 2022-11-11 中银金融科技有限公司 Activity organization information processing method, system and storage medium based on 5G message
CN115334462B (en) * 2022-07-18 2024-04-09 中银金融科技有限公司 Activity organization information processing method, system and storage medium based on 5G message
CN115034186A (en) * 2022-08-15 2022-09-09 北京永洪商智科技有限公司 Report generation method and system based on data processing

Similar Documents

Publication Publication Date Title
CN112612877A (en) Multi-type message intelligent reply method, device, computer equipment and storage medium
CN105931644B (en) A kind of audio recognition method and mobile terminal
US7930226B1 (en) User-driven document-based data collection
US8285539B2 (en) Extracting tokens in a natural language understanding application
CN110597952A (en) Information processing method, server, and computer storage medium
US20150120282A1 (en) Preserving emotion of user input
CN111694926A (en) Interactive processing method and device based on scene dynamic configuration and computer equipment
CN105487668B (en) Display method and device of terminal equipment
CN112434501A (en) Work order intelligent generation method and device, electronic equipment and medium
US11531821B2 (en) Intent resolution for chatbot conversations with negation and coreferences
CN113139816A (en) Information processing method, device, electronic equipment and storage medium
CN114610199B (en) Session message processing method and device, storage medium and electronic equipment
CN115935182A (en) Model training method, topic segmentation method in multi-turn conversation, medium, and device
CN110187780B (en) Long text prediction method, long text prediction device, long text prediction equipment and storage medium
CN113626441A (en) Text management method, device and equipment based on scanning equipment and storage medium
CN110929014A (en) Information processing method, information processing device, electronic equipment and storage medium
CN112100364A (en) Text semantic understanding method and model training method, device, equipment and medium
CN109683727A (en) A kind of data processing method and device
EP3706125B1 (en) Method and system using successive differences of speech signals for emotion identification
CN115691505A (en) Control method, device, equipment, medium and program product of intelligent voice equipment
CN112487164A (en) Artificial intelligence interaction method
CN110895924B (en) Method and device for reading document content aloud, electronic equipment and readable storage medium
CN113015002A (en) Processing method and device for anchor video data
CN111161737A (en) Data processing method and device, electronic equipment and storage medium
CN111625636A (en) Man-machine conversation refusal identification method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination