Replay processing method and device based on artificial intelligence, computer equipment and medium
Through the response processing method based on artificial intelligence, the problem that customer service system is difficult to understand user context and needs is solved, and high-precision and personalized reply services are achieved.
Patent Information
- Application Number
- CN202411973659.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-28
- Publication Date
- 2025-05-02
AI Technical Summary
In the prior art, it is difficult for the customer service system to accurately understand the specific context and personalized needs of user problems, resulting in low reply accuracy.
Using an artificial intelligence-based reply processing method, the user's voice data is received through real-time communication components, slice and encode processing, convert it into text and pre-process it, detect sensitive words, perform semantic recognition, generate target reply and optimize, and ultimately provide personalized reply services.
It achieves rapid and accurate responses that meet users' personalized needs, significantly improving the accuracy and service quality of reply processing.
Smart Images

Figure CN119920254A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to an artificial intelligence-based reply processing method, device, computer equipment and storage medium. Background Art
[0002] In today's rapidly developing logistics industry, the efficiency of cargo transportation and the quality of customer service have become important yardsticks for measuring corporate competitiveness. With the booming of e-commerce and the increasingly close global supply chain, users' demand for instant access to cargo transportation information, rapid response to problem solving, and personalized services is increasing. This trend has prompted logistics companies to attach great importance to the optimization and upgrading of customer service systems while improving logistics efficiency.
[0003] Currently, many logistics companies have adopted automated customer service systems as a means to improve customer service efficiency. These systems mainly rely on preset automatic reply functions to provide standardized answers to some common questions, thus achieving a certain degree of automated service. This automated reply mechanism is highly efficient in handling simple and repetitive questions, effectively reducing the burden on manual customer service and reducing operating costs.
[0004] However, as user needs become more diverse and complex, customer service systems that rely solely on automatic reply functions often find it difficult to accurately understand the specific context of user questions and personalized needs, and are thus unable to provide targeted responses, resulting in users potentially not receiving satisfactory service and low response accuracy. Summary of the invention
[0005] The main purpose of the present invention is to provide an artificial intelligence-based reply processing method, device, computer equipment and storage medium, aiming to solve the technical problem in the prior art that the customer service system often finds it difficult to accurately understand the specific context and personalized needs of user questions, resulting in low reply accuracy.
[0006] To achieve the above object, the present invention provides a reply processing method based on artificial intelligence, the method comprising:
[0007] Receiving voice data input by the user based on a preset real-time communication component;
[0008] Slicing and encoding the voice data to obtain corresponding target voice data;
[0009] Converting the target speech data to obtain corresponding text, and preprocessing the text to obtain target text;
[0010] Performing sensitive word detection on the target text based on a preset intelligent robot;
[0011] If there are no sensitive words in the target text, semantic recognition processing is performed on the target text to obtain corresponding semantic information;
[0012] Generate a target response corresponding to the semantic information based on a preset knowledge base;
[0013] A reply process is performed on the user based on the target reply.
[0014] Optionally, the slicing and encoding the voice data to obtain corresponding target voice data includes:
[0015] Get the preset slicing algorithm;
[0016] Segmenting the voice data into a plurality of voice segments based on the slicing algorithm;
[0017] Get the preset target transmission format;
[0018] Encoding the voice segment based on the target transmission format to obtain processed voice data;
[0019] The processed voice data is used as the target voice data.
[0020] Optionally, the preprocessing of the text to obtain a target text includes:
[0021] Performing denoising processing on the text to obtain a corresponding first text;
[0022] Performing word segmentation processing on the first text to obtain a corresponding second text;
[0023] Performing spelling correction processing on the second text to obtain a corresponding third text;
[0024] The third text is used as the target text.
[0025] Optionally, the generating a target response corresponding to the semantic information based on a preset knowledge base includes:
[0026] Call the preset text matching algorithm;
[0027] Based on the text matching algorithm, searching for a plurality of initial replies corresponding to the semantic information from the knowledge base;
[0028] Acquiring the reply preference information of the user, and filtering the initial reply based on the reply preference information to obtain a designated reply corresponding to the reply preference information;
[0029] The designated response is used as the target response.
[0030] Optionally, the acquiring the reply preference information of the user, and filtering the initial reply based on the reply preference information to obtain a designated reply corresponding to the reply preference information, includes:
[0031] Obtaining the historical input records of the user;
[0032] Predictively process the historical input records based on a preset preference model to obtain the user's reply preference information;
[0033] Filtering the first response that matches the preferred response information from all the initial responses;
[0034] Based on the text matching algorithm, obtaining a matching score for each of the first replies;
[0035] Filter out the second reply with the highest matching score from all the first replies;
[0036] The second reply is used as the designated reply.
[0037] Optionally, the reply processing to the user based on the target reply includes:
[0038] Get the preset reply optimization strategy;
[0039] Optimizing the target response based on the response optimization strategy to obtain an optimized third response;
[0040] Get the preset reply display method;
[0041] The third reply is displayed based on the reply display method.
[0042] Optionally, the optimizing the target reply based on the reply optimization strategy to obtain an optimized third reply includes:
[0043] Performing grammatical check on the target response;
[0044] If the target reply passes the grammar check, the target reply is processed for fluency improvement to obtain a corresponding fourth reply;
[0045] Performing style adjustment and tone adjustment processing on the fourth reply to obtain a corresponding fifth reply;
[0046] Treat the fifth reply as the third reply.
[0047] In addition, to achieve the above-mentioned purpose, the present invention further provides a reply processing device based on artificial intelligence, and the reply processing device based on artificial intelligence includes:
[0048] A receiving module, used for receiving voice data input by a user based on a preset real-time communication component;
[0049] A first processing module, used for slicing and encoding the voice data to obtain corresponding target voice data;
[0050] A second processing module is used to convert the target speech data to obtain corresponding text, and pre-process the text to obtain the target text;
[0051] A detection module, used to detect sensitive words on the target text based on a preset intelligent robot;
[0052] A recognition module, used for performing semantic recognition processing on the target text to obtain corresponding semantic information if there are no sensitive words in the target text;
[0053] A generation module, used for generating a target response corresponding to the semantic information based on a preset knowledge base;
[0054] A reply module is used to reply to the user based on the target reply.
[0055] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0056] The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the artificial intelligence-based reply processing methods proposed in the embodiments of the present application are implemented.
[0057] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0058] The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of any one of the artificial intelligence-based reply processing methods proposed in the embodiments of the present application are implemented.
[0059] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0060] The present invention provides a reply processing method, device, computer equipment and storage medium based on artificial intelligence. The method comprises: firstly, receiving voice data input by a user based on a preset real-time communication component; then slicing and encoding the voice data to obtain corresponding target voice data; then converting the target voice data to obtain corresponding text, and preprocessing the text to obtain target text; subsequently, performing sensitive word detection on the target text based on a preset intelligent robot; if there are no sensitive words in the target text, performing semantic recognition processing on the target text to obtain corresponding semantic information; further generating a target reply corresponding to the semantic information based on a preset knowledge base; and finally replying to the user based on the target reply. The present invention receives voice data input by a user based on the use of a real-time communication component, slices and encodes the voice data to obtain corresponding target voice data, then converts the target voice data to obtain corresponding text, and pre-processes the text to obtain a target text, and then performs sensitive word detection on the target text based on the use of an intelligent robot. When it is detected that there are no sensitive words in the target text, semantic recognition processing is performed on the target text to obtain corresponding semantic information, and subsequently a target reply corresponding to the semantic information is generated based on the use of a preset knowledge base, so that a target reply that meets the personalized needs of the user can be quickly and accurately obtained, so that the user can be replied to based on the target reply, and a more personalized reply service can be provided to the user, thereby significantly improving the accuracy of reply processing and service quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0062] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0063] Figure 2 is a flow chart of a reply processing method based on artificial intelligence provided by an embodiment of the present invention;
[0064] Figure 3 is a structural schematic diagram of an embodiment of an artificial intelligence-based reply processing device according to the present application;
[0065] Figure 4 This is a basic structural block diagram of the computer device in this embodiment. DETAILED DESCRIPTION
[0066] The artificial intelligence-based reply processing method provided by the embodiment of the present invention is applied to the artificial intelligence-based reply processing device. Unless otherwise defined, all technical and scientific terms used in this document have the same meaning as those generally understood by technicians in the technical field of this application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned figures are used to distinguish different objects, not to describe a specific order.
[0067] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0068] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0069] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0070] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social online platform software, etc.
[0071] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV), laptop computers, desktop computers, etc.
[0072] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0073] It should be noted that the artificial intelligence-based reply processing method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the artificial intelligence-based reply processing device is generally set in the server / terminal device.
[0074] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0075] In today's rapidly developing logistics industry, the efficiency of cargo transportation and the quality of customer service have become important yardsticks for measuring corporate competitiveness. With the booming of e-commerce and the increasingly close global supply chain, users' demand for instant access to cargo transportation information, rapid response to problem solving, and personalized services is increasing. This trend has prompted logistics companies to attach great importance to the optimization and upgrading of customer service systems while improving logistics efficiency.
[0076] Currently, many logistics companies have adopted automated customer service systems as a means to improve customer service efficiency. These systems mainly rely on preset automatic reply functions to provide standardized answers to some common questions, thus achieving a certain degree of automated service. This automated reply mechanism is highly efficient in handling simple and repetitive questions, effectively reducing the burden on manual customer service and reducing operating costs.
[0077] However, as user needs become more diverse and complex, customer service systems that rely solely on automatic reply functions often find it difficult to accurately understand the specific context of user questions and personalized needs, and are thus unable to provide targeted responses, resulting in users potentially not receiving satisfactory service and low response accuracy.
[0078] Continue to refer Figure 2, shows a flow chart of an embodiment of a reply processing method based on artificial intelligence proposed in the present application. The embodiment of the present application can acquire and process relevant data based on artificial intelligence technology.
[0079] The artificial intelligence-based reply processing method provided in the embodiment of the present invention comprises the following steps:
[0080] S210, receiving voice data input by the user based on a preset real-time communication component.
[0081] In this step, the executor of the present invention may specifically be a reply processing system, or a customer service system, referred to as the system. The present invention can be applied to business scenarios in which users (shippers or drivers) communicate with customer service in the field of customer service replies in freight transportation. Among them, the above-mentioned real-time communication component may specifically adopt the H5WebRTC component, which involves the application of WebRTC technology in the H5 (i.e. HTML5) environment. WebRTC (Web Real-Time Communication) is a collection of open standards and technologies that allow Web browsers and mobile applications to communicate in real time, such as voice calls, video chats, and data sharing, without installing plug-ins or downloading additional software. Specifically, when a user (shipper or driver) inputs voice data through the microphone of the device, the front-end interface of the system will use the above-mentioned real-time communication component to capture the voice data input by the user.
[0082] S220, slicing and encoding the voice data to obtain corresponding target voice data.
[0083] In this step, the specific implementation process of slicing and encoding the voice data to obtain the corresponding target voice data will be further described in detail in the subsequent specific embodiments of the present invention, and will not be elaborated on here.
[0084] S230, converting the target speech data to obtain corresponding text, and preprocessing the text to obtain target text.
[0085] In this step, the target speech data can be converted into text in real time by using a speech recognition engine, and the user's random short sentences, dialects or special expressions can be processed at the same time, which can reduce misunderstandings and improve the recognition accuracy of the obtained text. And the converted text can be pushed to the system in real time through the WebSocket protocol so as to be displayed to the user and for subsequent processing. Among them, the specific implementation process of pre-processing the text to obtain the target text will be further described in detail in the subsequent specific embodiments of the present invention, and will not be elaborated on here.
[0086] S240, performing sensitive word detection on the target text based on a preset intelligent robot.
[0087] In this step, the intelligent robot (AI-BOT) can monitor and identify in real time whether there are potential sensitive words in the target text. If sensitive words are detected in the target text, it will refuse to reply to the voice data input by the user corresponding to the target text, so as to help the system filter out inappropriate question data in time and maintain the enthusiasm and security of the dialogue. The sensitive words may refer to inappropriate content or issues that require special attention.
[0088] S250: If there is no sensitive word in the target text, semantic recognition processing is performed on the target text to obtain corresponding semantic information.
[0089] In this step, the target text can be semantically recognized by using the above-mentioned intelligent robot or natural language processing (NLP) model, which can specifically include semantic analysis, context understanding and other processing on the target text to identify the user's query intention, that is, the problem the user wants to solve or the task the user wants to complete, thereby obtaining the corresponding semantic information.
[0090] S260, generating a target response corresponding to the semantic information based on a preset knowledge base.
[0091] In this step, the specific implementation process of generating the target response corresponding to the semantic information based on the preset knowledge base will be further described in detail in the subsequent specific embodiments of the present invention, and will not be elaborated in detail here.
[0092] S270, performing reply processing on the user based on the target reply.
[0093] In this step, the specific implementation process of replying to the user based on the target reply will be described in further detail in subsequent specific embodiments of the present invention and will not be elaborated on here.
[0094] In an embodiment of the present invention, firstly, voice data input by a user is received based on a preset real-time communication component; then, the voice data is sliced and encoded to obtain corresponding target voice data; then, the target voice data is converted to obtain corresponding text, and the text is preprocessed to obtain a target text; subsequently, sensitive word detection is performed on the target text based on a preset intelligent robot; if there are no sensitive words in the target text, semantic recognition is performed on the target text to obtain corresponding semantic information; further, a target reply corresponding to the semantic information is generated based on a preset knowledge base; finally, a reply is processed to the user based on the target reply. The present invention receives voice data input by a user based on the use of a real-time communication component, slices and encodes the voice data to obtain corresponding target voice data, then converts the target voice data to obtain corresponding text, and pre-processes the text to obtain a target text, and then performs sensitive word detection on the target text based on the use of an intelligent robot. When it is detected that there are no sensitive words in the target text, semantic recognition processing is performed on the target text to obtain corresponding semantic information, and subsequently a target reply corresponding to the semantic information is generated based on the use of a preset knowledge base, so that a target reply that meets the personalized needs of the user can be quickly and accurately obtained, so that the user can be replied to based on the target reply, and a more personalized reply service can be provided to the user, thereby significantly improving the accuracy of reply processing and service quality.
[0095] Optionally, the slicing and encoding the voice data to obtain corresponding target voice data includes:
[0096] Get the preset slicing algorithm.
[0097] In this step, the slicing algorithm is an algorithm having a slicing function of dividing speech into multiple small speech segments.
[0098] The speech data is segmented into a plurality of speech segments based on the slicing algorithm.
[0099] In this step, the acquired voice data may be segmented into multiple voice segments by using the above-mentioned slicing algorithm for real-time processing.
[0100] Get the preset target transmission format.
[0101] In this step, the target transmission format refers to a format suitable for transmission, such as PCM or Opus.
[0102] The voice segment is encoded based on the target transmission format to obtain processed voice data.
[0103] In this step, each obtained voice segment can be encoded into the above-mentioned target transmission format to obtain the encoded voice segment, and the encoded voice segments are integrated to obtain the processed voice data as described above.
[0104] Use the processed voice data as the target voice data.
[0105] In the embodiment of the present invention, a preset slicing algorithm is obtained; then the voice data is segmented into multiple voice segments based on the slicing algorithm; then a preset target transmission format is obtained; subsequently, the voice segments are encoded based on the target transmission format to obtain the processed voice data; finally, the processed voice data is used as the target voice data. After receiving the voice data input by the user based on the real-time communication component, the present invention will intelligently segment the voice data into multiple voice segments based on the use of the slicing algorithm, and then encode the voice segments based on the use of the target transmission format, so as to quickly and intelligently complete the slicing and encoding processing of the voice data, ensure the data accuracy of the obtained target voice data, and facilitate the subsequent accurate implementation of the conversion processing of converting the target voice data into text in real time.
[0106] Optionally, the preprocessing of the text to obtain the target text includes:
[0107] Perform denoising processing on the text to obtain the corresponding first text.
[0108] In this step, the above denoising processing includes: removing special characters such as punctuation marks, HTML tags, numbers, etc.; removing stop words such as high-frequency but meaningless words like "de", "shi", "zai", etc.; removing duplicate content: deleting completely duplicate or highly similar sentences or paragraphs.
[0109] Perform word segmentation processing on the first text to obtain the corresponding second text.
[0110] In this step, the above word segmentation processing includes: using a rule-based method (such as forward maximum matching, backward maximum matching) or a statistic-based method (such as hidden Markov model, conditional random field) to segment a continuous character sequence into meaningful lexical units.
[0111] Perform spelling correction processing on the second text to obtain the corresponding third text.
[0112] In this step, the above spelling correction processing includes: using a strategy of matching spelling rules and dictionaries to correct spelling mistakes in the text, or using a language model to calculate the most likely correct spelling to correct spelling mistakes in the text.
[0113] Use the third text as the target text.
[0114] In an embodiment of the present invention, the text is subjected to denoising to obtain a corresponding first text; the first text is then subjected to word segmentation to obtain a corresponding second text; the second text is then subjected to spelling correction to obtain a corresponding third text; and the third text is subsequently used as a target text. The present invention performs denoising, word segmentation, and spelling correction on the text, thereby achieving efficient and accurate preprocessing of the text, ensuring the accuracy of the generated target text, and facilitating the provision of high-quality data input for subsequent semantic recognition processing.
[0115] Optionally, the generating a target response corresponding to the semantic information based on a preset knowledge base includes:
[0116] Call the preset text matching algorithm.
[0117] In this step, the above text matching algorithm can specifically adopt cosine similarity or BM25 algorithm. Cosine similarity is a commonly used algorithm that evaluates the similarity between two vectors by calculating the cosine value between them. BM25 algorithm is a text matching algorithm based on word frequency and inverse document frequency, which is particularly suitable for information retrieval tasks.
[0118] Based on the text matching algorithm, multiple initial replies corresponding to the semantic information are searched from the knowledge base.
[0119] In this step, the above-mentioned knowledge base is a pre-built database containing answers to common questions, related information, processes, etc. about cargo transportation. These answers can exist in the form of text, tables, structured data, etc. Among them, the similarity between the above-mentioned semantic information and each answer contained in the above-mentioned knowledge base can be calculated by using the above-mentioned text matching algorithm. Specifically, the above-mentioned semantic information and the information contained in the knowledge base can be converted into vector representations, and then the similarity score between them is calculated. Then, the answers in the knowledge base are sorted according to the similarity score, and the specified answers with a similarity score greater than a preset score threshold are used as multiple initial replies corresponding to the above-mentioned semantic information. Among them, there is no specific limitation on the selection of the numerical value of the above-mentioned score threshold, and it can be set according to actual business needs.
[0120] Acquire the reply preference information of the user, and filter the initial reply based on the reply preference information to obtain a designated reply corresponding to the reply preference information.
[0121] In this step, the specific implementation process of filtering the initial reply based on the reply preference information to obtain the specified reply corresponding to the reply preference information will be further described in detail in subsequent specific embodiments of the present invention and will not be elaborated on here.
[0122] The designated response is used as the target response.
[0123] In an embodiment of the present invention, a preset text matching algorithm is called; then based on the text matching algorithm, multiple initial replies corresponding to the semantic information are searched from the knowledge base; then the reply preference information of the user is obtained, and the initial replies are screened based on the reply preference information to obtain a designated reply corresponding to the reply preference information; and the designated reply is subsequently used as the target reply. The present invention searches for multiple initial replies corresponding to the semantic information from the knowledge base based on the use of a text matching algorithm, and then screens the initial replies based on the obtained user's reply preference information, so that replies that meet the user's expectations can be automatically and accurately obtained, thereby improving the accuracy of the target reply obtained, which is conducive to providing users with a more personalized service experience based on the target reply obtained.
[0124] Optionally, the acquiring the reply preference information of the user, and filtering the initial reply based on the reply preference information to obtain a designated reply corresponding to the reply preference information, includes:
[0125] Get the historical input records of the user.
[0126] In this step, the above historical input records are pre-collected historical input records of users in the system and restored by the system, such as query records, click behaviors, dwell time, etc.
[0127] The historical input records are predicted and processed based on a preset preference model to obtain the user's reply preference information.
[0128] In this step, the above-mentioned preference model is a model that is generated by training a machine learning model based on pre-collected user input record data and has the function of predicting the reply preference of the current user. Among them, a suitable machine learning model can be selected according to specific needs, such as a deep learning model (such as LSTM, Transformer, etc.) or a traditional machine learning model (such as logistic regression, support vector machine, etc.). Specifically, the collected user input record data is divided into a training set and a test set for training and verification of the model. The training set is then used to train the machine learning model so that it can predict the user's reply preference. The test set is then used to fine-tune the trained machine learning model to improve the accuracy and generalization ability of the model, thereby obtaining the desired preference model.
[0129] By inputting the historical input records of the above-mentioned user into the above-mentioned preference model, the historical input records are predicted and processed by the preference model, so as to output the predicted reply preference matching the user, that is, the above-mentioned reply preference information.
[0130] A first reply matching the preferred reply information is selected from all the initial replies.
[0131] In this step, according to the preferred reply information, a first reply matching the preferred reply information may be selected from the initial replies. For example, if the preferred reply information is concise, a concise reply is selected from the initial replies and used as the first reply. If the preferred reply information is detailed, a detailed reply is selected from the initial replies and used as the first reply.
[0132] Based on the text matching algorithm, a matching score of each of the first replies is obtained.
[0133] In this step, the matching score of each of the first replies refers to a similarity score between the semantic information and each of the first answers contained in the knowledge base calculated using a text matching algorithm.
[0134] The second reply with the highest matching score is selected from all the first replies.
[0135] In this step, the matching scores of all first replies can be numerically compared to screen out the second reply with the highest matching score.
[0136] The second reply is used as the designated reply.
[0137] In an embodiment of the present invention, the historical input records of the user are obtained; then the historical input records are predicted and processed based on a preset preference model to obtain the reply preference information of the user; then the first reply matching the preferred reply information is screened out from all the initial replies; then the matching score of each first reply is obtained based on the text matching algorithm; the second reply with the highest matching score is further screened out from all the first replies; and finally the second reply is used as the designated reply. The present invention obtains the historical input records of the user, and then predicts and processes the historical input records based on the use of a preset preference model to obtain the reply preference information of the user, and then the first reply matching the preferred reply information is screened out from all the initial replies, and then the matching score of each first reply is obtained based on the text matching algorithm, and the second reply with the highest matching score is screened out from all the first replies as the final designated reply, thereby achieving automatic and accurate acquisition of the designated reply that meets the user's reply preference, improving the accuracy of the designated reply, and thus facilitating providing the user with a more personalized service experience based on the designated reply.
[0138] Optionally, the reply processing to the user based on the target reply includes:
[0139] Gets a preset reply optimization strategy.
[0140] In this step, the strategy content of the above reply optimization strategy includes grammar checking, spelling correction, fluency improvement, etc. of the reply to ensure the quality of the reply and improve the naturalness and fluency of the reply.
[0141] The target reply is optimized based on the reply optimization strategy to obtain an optimized third reply.
[0142] In this step, the specific implementation process of optimizing the target reply based on the reply optimization strategy to obtain the optimized third reply will be described in further detail in subsequent specific embodiments of the present invention and will not be elaborated on here.
[0143] Get the default reply display method.
[0144] In this step, there is no specific limitation on the selection of the above-mentioned reply display method, which can be selected according to actual business needs. For example, it may include text display, voice broadcast, graphical interface display, etc., depending on the user's needs and the system's functions.
[0145] The third reply is displayed based on the reply display method.
[0146] In this step, the above-mentioned reply display method can be used to display the above-mentioned third reply, thereby completing the intelligent reply processing for the user using the third reply.
[0147] In an embodiment of the present invention, a preset reply optimization strategy is obtained; then the target reply is optimized based on the reply optimization strategy to obtain an optimized third reply; then a preset reply display method is obtained; and then the third reply is displayed based on the reply display method. After obtaining the corresponding target reply based on the knowledge base, the present invention will also intelligently optimize the target reply based on the use of the reply optimization strategy to obtain an optimized third reply, and then display the third reply based on the use of the reply display method, so as to provide users with more accurate and personalized reply services, which is conducive to improving the user experience.
[0148] Optionally, the optimizing the target reply based on the reply optimization strategy to obtain an optimized third reply includes:
[0149] The target response is syntax-checked.
[0150] In this step, the grammar check includes using a grammar check tool or algorithm to perform a grammar check on the target reply to ensure that there are no grammatical errors in the target reply. If there are no grammatical errors in the target reply, it is determined that the target reply passes the grammar check. In addition, if there are grammatical errors in the target reply, the target reply can be further modified accordingly according to the grammar check result to ensure the accuracy of the target reply.
[0151] If the target reply passes the grammatical check, the target reply is processed for fluency improvement to obtain a corresponding fourth reply.
[0152] In this step, the fluency improvement process includes: adjusting the sentence structure in the reply to make it more natural and fluent; adding appropriate conjunctions and transition sentences in the reply to enhance the coherence and logic of the reply; removing redundant and repeated information in the reply to make the reply more concise and clear.
[0153] The style and tone of the fourth reply are adjusted to obtain a corresponding fifth reply.
[0154] In this step, the context data corresponding to the above-mentioned voice data can be obtained, and then the style and tone of the fourth reply can be adjusted according to the context data and the user's reply preference information, so that the generated fifth reply better meets the user's expectations.
[0155] Treat the fifth reply as the third reply.
[0156] In an embodiment of the present invention, a grammar check is performed on the target reply; if the target reply passes the grammar check, the target reply is processed for fluency improvement to obtain a corresponding fourth reply; the fourth reply is then processed for style adjustment and tone adjustment to obtain a corresponding fifth reply; the fifth reply is subsequently used as the third reply. The present invention performs grammar check, fluency improvement, style adjustment and tone adjustment on the target reply, thereby realizing intelligent and accurate optimization of the target reply, thereby generating a natural, fluent reply that meets user needs, and effectively improving the quality of the reply and user experience.
[0157] In some optional implementations, the user information obtained is subject to the user's consent and complies with relevant laws and policies.
[0158] Further references Figure 3 , as a response to the above Figure 2 In order to realize the method shown in the figure, the present application provides an embodiment of a reply processing device 300 based on artificial intelligence, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0159] An embodiment of the present invention provides an artificial intelligence-based reply processing device 300, and the artificial intelligence-based reply processing device 300 includes:
[0160] The receiving module 310 is used to receive voice data input by the user based on a preset real-time communication component;
[0161] The first processing module 320 is used to slice and encode the voice data to obtain corresponding target voice data;
[0162] The second processing module 330 is used to convert the target speech data to obtain corresponding text, and pre-process the text to obtain the target text;
[0163] A detection module 340 is used to detect sensitive words on the target text based on a preset intelligent robot;
[0164] The recognition module 350 is used to perform semantic recognition processing on the target text to obtain corresponding semantic information if there is no sensitive word in the target text;
[0165] A generating module 360, configured to generate a target response corresponding to the semantic information based on a preset knowledge base;
[0166] The reply module 370 is used to reply to the user based on the target reply.
[0167] Optionally, the first processing module 320 includes:
[0168] A first acquisition submodule is used to acquire a preset slicing algorithm;
[0169] A segmentation submodule, used for segmenting the voice data into a plurality of voice segments based on the slicing algorithm;
[0170] A second acquisition submodule is used to acquire a preset target transmission format;
[0171] The encoding submodule is used to encode the voice segment based on the target transmission format to obtain processed voice data;
[0172] The first determining submodule is used to use the processed voice data as the target voice data.
[0173] Optionally, the second processing module 330 includes:
[0174] A first processing submodule, used for performing denoising processing on the text to obtain a corresponding first text;
[0175] A second processing submodule, configured to perform word segmentation processing on the first text to obtain a corresponding second text;
[0176] A third processing submodule, configured to perform spelling correction processing on the second text to obtain a corresponding third text;
[0177] The second determination submodule is used to use the third text as the target text.
[0178] Optionally, the generating module 360 includes:
[0179] The calling submodule is used to call the preset text matching algorithm;
[0180] A search submodule, configured to search for a plurality of initial replies corresponding to the semantic information from the knowledge base based on the text matching algorithm;
[0181] A screening submodule, used to obtain the reply preference information of the user, and screen the initial reply based on the reply preference information to obtain a designated reply corresponding to the reply preference information;
[0182] The third determination submodule is used to use the designated reply as the target reply.
[0183] Optionally, the screening submodule includes:
[0184] A first acquisition unit, used to acquire the historical input records of the user;
[0185] A prediction unit, configured to perform prediction processing on the historical input records based on a preset preference model to obtain the reply preference information of the user;
[0186] A first screening unit, configured to screen out a first reply matching the preferred reply information from all the initial replies;
[0187] A second acquisition unit, configured to acquire a matching score of each of the first replies based on the text matching algorithm;
[0188] A second screening unit, configured to screen out a second reply with the highest matching score from all the first replies;
[0189] The first determining unit is configured to use the second reply as the designated reply.
[0190] Optionally, the reply module 370 includes:
[0191] The third acquisition submodule is used to obtain a preset reply optimization strategy;
[0192] An optimization submodule, configured to optimize the target response based on the response optimization strategy to obtain an optimized third response;
[0193] The fourth acquisition submodule is used to obtain a preset reply display method;
[0194] The display submodule is used to display the third reply based on the reply display method.
[0195] Optionally, the optimization submodule includes:
[0196] A verification unit, configured to perform grammatical verification on the target response;
[0197] A first processing unit is configured to perform fluency improvement processing on the target reply if the target reply passes the grammar check, to obtain a corresponding fourth reply;
[0198] A second processing unit is used to adjust the style and tone of the fourth reply to obtain a corresponding fifth reply;
[0199] The second determining unit is configured to use the fifth reply as the third reply.
[0200] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0201] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0202] The computer device may be a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with the user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0203] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as the program code of the reply processing method based on artificial intelligence, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0204] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the program code stored in the memory 41 or process data, such as running the program code of the artificial intelligence-based reply processing method.
[0205] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0206] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores the application crash processing program, and the application crash processing program can be executed by at least one processor to enable the at least one processor to perform the steps of the above-mentioned artificial intelligence-based reply processing method.
[0207] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware online platform, and of course, by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0208] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0209] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A reply processing method based on artificial intelligence, characterized in that: include: Receiving voice data input by the user based on a preset real-time communication component; Slicing and encoding the voice data to obtain corresponding target voice data; Converting the target speech data to obtain corresponding text, and preprocessing the text to obtain target text; Performing sensitive word detection on the target text based on a preset intelligent robot; If there are no sensitive words in the target text, semantic recognition processing is performed on the target text to obtain corresponding semantic information; Generate a target response corresponding to the semantic information based on a preset knowledge base; A reply process is performed on the user based on the target reply.
2. The method according to claim 1, characterized in that The slicing and encoding of the voice data to obtain corresponding target voice data includes: Get the preset slicing algorithm; Segmenting the voice data into a plurality of voice segments based on the slicing algorithm; Get the preset target transmission format; Encoding the voice segment based on the target transmission format to obtain processed voice data; The processed voice data is used as the target voice data.
3. The method according to claim 1, characterized in that The preprocessing of the text to obtain the target text includes: Performing denoising processing on the text to obtain a corresponding first text; Performing word segmentation processing on the first text to obtain a corresponding second text; Performing spelling correction processing on the second text to obtain a corresponding third text; The third text is used as the target text.
4. The method according to claim 1, characterized in that: The generating a target response corresponding to the semantic information based on a preset knowledge base includes: Call the preset text matching algorithm; Based on the text matching algorithm, searching for a plurality of initial replies corresponding to the semantic information from the knowledge base; Acquiring the reply preference information of the user, and filtering the initial reply based on the reply preference information to obtain a designated reply corresponding to the reply preference information; The designated response is used as the target response.
5. The method according to claim 4, characterized in that The obtaining of the reply preference information of the user, and filtering the initial reply based on the reply preference information to obtain a designated reply corresponding to the reply preference information, includes: Obtaining the historical input records of the user; Predictively process the historical input records based on a preset preference model to obtain the user's reply preference information; Filtering the first response that matches the preferred response information from all the initial responses; Based on the text matching algorithm, obtaining a matching score for each of the first replies; Filter out the second reply with the highest matching score from all the first replies; The second reply is used as the designated reply.
6. The method according to claim 1, characterized in that The step of replying to the user based on the target reply includes: Get the preset reply optimization strategy; Optimizing the target response based on the response optimization strategy to obtain an optimized third response; Get the preset reply display method; The third reply is displayed based on the reply display method.
7. The method according to claim 6, characterized in that The step of optimizing the target response based on the response optimization strategy to obtain an optimized third response includes: Performing grammatical check on the target response; If the target reply passes the grammar check, the target reply is processed for fluency improvement to obtain a corresponding fourth reply; Performing style adjustment and tone adjustment processing on the fourth reply to obtain a corresponding fifth reply; Treat the fifth reply as the third reply.
8. A reply processing device based on artificial intelligence, characterized in that: include: A receiving module, used for receiving voice data input by a user based on a preset real-time communication component; A first processing module, used for slicing and encoding the voice data to obtain corresponding target voice data; A second processing module is used to convert the target speech data to obtain corresponding text, and pre-process the text to obtain the target text; A detection module, used to detect sensitive words on the target text based on a preset intelligent robot; A recognition module, used for performing semantic recognition processing on the target text to obtain corresponding semantic information if there are no sensitive words in the target text; A generation module, used for generating a target response corresponding to the semantic information based on a preset knowledge base; A reply module is used to reply to the user based on the target reply.
9. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the reply processing method based on artificial intelligence as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the artificial intelligence-based reply processing method as described in any one of claims 1 to 7 are implemented.