CN112040076B - Method, device, computer equipment and storage medium for processing agent report text - Google Patents

Method, device, computer equipment and storage medium for processing agent report text Download PDF

Info

Publication number
CN112040076B
CN112040076B CN202010905149.XA CN202010905149A CN112040076B CN 112040076 B CN112040076 B CN 112040076B CN 202010905149 A CN202010905149 A CN 202010905149A CN 112040076 B CN112040076 B CN 112040076B
Authority
CN
China
Prior art keywords
text
neural network
training
sequence
layer
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.)
Active
Application number
CN202010905149.XA
Other languages
Chinese (zh)
Other versions
CN112040076A (en
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 Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202010905149.XA priority Critical patent/CN112040076B/en
Publication of CN112040076A publication Critical patent/CN112040076A/en
Application granted granted Critical
Publication of CN112040076B publication Critical patent/CN112040076B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M3/00Automatic or semi-automatic exchanges
    • H04M3/42Systems providing special services or facilities to subscribers
    • H04M3/50Centralised arrangements for answering calls; Centralised arrangements for recording messages for absent or busy subscribers ; Centralised arrangements for recording messages
    • H04M3/51Centralised call answering arrangements requiring operator intervention, e.g. call or contact centers for telemarketing
    • H04M3/5166Centralised call answering arrangements requiring operator intervention, e.g. call or contact centers for telemarketing in combination with interactive voice response systems or voice portals, e.g. as front-ends
    • 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/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/06Creation of reference templates; Training of speech recognition systems, e.g. adaptation to the characteristics of the speaker's voice
    • G10L15/063Training
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/08Speech classification or search
    • G10L15/16Speech classification or search using artificial neural networks
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Signal Processing (AREA)
  • Machine Translation (AREA)

Abstract

The application relates to the technical field of artificial intelligence, and provides a method, a device, computer equipment and a storage medium for processing an agent report text, wherein the method comprises the steps of receiving a problem text reported by an agent terminal, and outputting a feature vector of the problem text through a short-staged neural network; the short-buffered neural network is formed by sequentially stacking a plurality of layers of BI-LSTM networks, the input layer of the next layer of BI-LSTM network is connected with the output layers of all the preceding BI-LSTM networks, and each layer of BI-LSTM network is connected with the word embedded layer; calculating the similarity between the problem text and the historical reported problem text in the database based on the characteristic vector, and determining the target historical reported problem with the maximum similarity, so that the solution text of the target historical reported problem is used as the solution of the problem text and is fed back to the seat terminal; the problem of manual handling repetition can be avoided to this application, promotes the treatment effeciency of solving the problem. This application is applicable in wisdom government affairs field to promote the construction in wisdom city.

Description

Method, device, computer equipment and storage medium for processing agent report text
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a method and an apparatus for processing an agent report text, a computer device, and a storage medium.
Background
In the current seat operation system, in the process of seat operation, because the number of users used is large (tens of thousands of users), the production problems and the system problems are very frequent. Aiming at the existing production problems, the online treatment is mainly carried out manually, and many production problems have similarity, so that the pressure for solving the production problems is higher, and the repeatability is higher; moreover, a processing person of a production problem needs to simultaneously process the problem reported by a plurality of agents, so that the timeliness for solving the production problem is poor.
Disclosure of Invention
The present application mainly aims to provide a method, an apparatus, a computer device and a storage medium for processing an agent report text, and aims to overcome the defect that a repetitive problem needs to be manually solved at present.
In order to achieve the above object, the present application provides a method for processing an agent report text, comprising the following steps:
receiving a problem text reported by an agent terminal, and constructing word embedding of the problem text based on a word embedding layer;
embedding and inputting the words into a short-Stacked neural network; the short-buffered neural network is formed by sequentially stacking a plurality of layers of BI-LSTM networks, the input layer of the next layer of BI-LSTM network is connected with the output layers of all the preceding BI-LSTM networks, and each layer of BI-LSTM network is connected with the word embedded layer;
outputting a feature vector corresponding to the problem text based on the last layer of the BI-LSTM network of the short-Stacked neural network;
calculating the similarity between the problem text and historical reported problem texts in a database based on the feature vectors corresponding to the problem text, and determining a target historical reported problem with the maximum similarity;
and judging whether the maximum similarity is greater than a threshold value, if so, acquiring a solution text corresponding to the target historical report problem, and feeding the solution text back to the seat terminal.
Further, before the step of receiving a question text reported by an agent terminal and constructing word embedding of the question text based on a word embedding layer, the method includes:
acquiring a sample set, wherein each sample in the sample set comprises two question sentences and a corresponding label, and the label is used for expressing whether the semantics of the two question sentences are the same;
dividing the sample set into a training set and a testing set according to a preset proportion;
word embedding of two question sentences in each sample of the training set is sequentially constructed, and words of the two question sentences are embedded and input into an initial short cut-Stacked neural network, wherein the initial short cut-Stacked neural network is formed by sequentially stacking multiple layers of BI-LSTM networks, an input layer of the next layer of BI-LSTM network is connected with output layers of all preceding BI-LSTM networks, and each layer of BI-LSTM network is connected with the word embedding layer;
respectively extracting the feature vectors of the two question sentences based on the last layer of the BI-LSTM network of the initial short-Stacked neural network;
calculating the similarity between the feature vectors of the two question sentences, and outputting a classification result through a fully-connected feedforward neural network; and iteratively training the parameters of the initial short-Stacked neural network until the classification result is consistent with the labels corresponding to the two question sentences, so as to obtain the short-Stacked neural network after training.
Further, the step of calculating the similarity between the question text and the historical reported question text in the database based on the feature vector corresponding to the question text includes:
acquiring a characteristic vector of each historical report problem text in the database;
performing hash calculation on the feature vector corresponding to the problem text to obtain a first hash value, and performing hash calculation on the feature vector of each historical reported problem text to obtain a corresponding second hash value;
performing dimensionality reduction calculation on the first hash value and each second hash value to obtain a first sequence corresponding to the first hash value and a second sequence corresponding to each second hash value;
and comparing the first sequence with each second sequence to obtain the similarity between the problem text and each historical reported problem text in the database.
Further, the step of comparing the first sequence with each of the second sequences to obtain a similarity between the question text and each of the historical reported question texts in the database includes:
obtaining the sequence length of the first sequence; wherein the first sequence is the same in sequence length as each of the second sequences;
comparing said first sequence to each of said second sequences to determine the number of sequences having the same value at the same sequence position;
and obtaining the similarity between the question text and each historical reported question text in the database according to the number of the same numerical values at the same sequence position in the sequence and the ratio of the sequence length of the first sequence.
Further, the step of receiving the question text reported by the agent terminal includes:
receiving voice information uploaded by the agent terminal;
framing the voice information to obtain frame data which are sequentially sequenced;
inputting the frame data into a preset frame embedding neural network in sequence to obtain a frame vector corresponding to each frame data, and combining the frame vectors corresponding to all the frame data to obtain a feature vector corresponding to the voice information; the frame embedded neural network is obtained by training a preset neural network based on voice training data and word vectors corresponding to the voice training data;
and inputting the feature vector corresponding to the voice information into a preset text recognition model to obtain a corresponding text serving as the problem text.
Further, before the step of receiving the voice information uploaded by the agent terminal, the method includes:
acquiring voice training data; the voice training data are a single training word and audio training data corresponding to the single training word, and the audio training data comprise a plurality of training frame data which are sequentially ordered;
sequentially inputting each training frame data into the preset neural network according to the sequence of the training frame data in the audio training data, and extracting a training vector corresponding to each training frame data;
summing training vectors corresponding to all training frame data to obtain a sum vector;
acquiring word vectors of single training words in the voice training data;
fitting the sum vector and the word vector, and training the network parameters of the preset neural network to obtain the frame embedded neural network.
Further, the method further comprises:
and storing the problem text, the solution text and the short-buffered neural network into a block chain.
The application also provides a device for processing the agent reporting text, which comprises:
the receiving unit is used for receiving the problem text reported by the agent terminal and constructing word embedding of the problem text based on a word embedding layer;
the input unit is used for embedding and inputting the words into a short-Stacked neural network; the short-staged neural network is formed by sequentially stacking a plurality of layers of BI-LSTM networks, the input layer of the next layer of BI-LSTM network is connected with the output layers of all the preceding BI-LSTM networks, and each layer of BI-LSTM network is connected with the word embedding layer;
the output unit is used for outputting the feature vector corresponding to the problem text based on the last layer of the BI-LSTM network of the short-Stacked neural network;
the calculation unit is used for calculating the similarity between the problem text and the historical reported problem text in the database based on the feature vector corresponding to the problem text and determining the target historical reported problem with the maximum similarity;
and the feedback unit is used for judging whether the maximum similarity is greater than a threshold value, if so, acquiring a solution text corresponding to the target historical report problem, and feeding the solution text back to the agent terminal.
The present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of any of the above.
According to the method, the device, the computer equipment and the storage medium for processing the agent report text, the problem text reported by the agent terminal is received, the feature vector of the problem text is output through a short-buffered neural network, the problem is reported by matching the target history with the largest similarity based on the feature vector, and therefore the solution text of the problem reported by the target history is fed back to the agent terminal as the solution of the problem text; the problem of manual handling repetition can be avoided, and the processing efficiency of solving the problem is improved.
Drawings
Fig. 1 is a schematic diagram illustrating steps of a method for processing an agent reporting text according to an embodiment of the present application;
fig. 2 is a block diagram illustrating a structure of an apparatus for processing an agent reporting text according to an embodiment of the present application;
fig. 3 is a block diagram illustrating a structure of a computer device according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
Referring to fig. 1, an embodiment of the present application provides a method for processing an agent reporting text, including the following steps:
the method comprises the following steps that S1, a problem text reported by an agent terminal is received, and word embedding of the problem text is established based on a word embedding layer;
s2, embedding and inputting the words into a short-Stacked neural network; the short-buffered neural network is formed by sequentially stacking a plurality of layers of BI-LSTM networks, the input layer of the next layer of BI-LSTM network is connected with the output layers of all the preceding BI-LSTM networks, and each layer of BI-LSTM network is connected with the word embedded layer;
s3, outputting a feature vector corresponding to the problem text based on the last layer of the BI-LSTM network of the short-Stacked neural network;
s4, calculating the similarity between the problem text and the historical reported problem text in a database based on the feature vector corresponding to the problem text, and determining the target historical reported problem with the maximum similarity;
and S5, judging whether the maximum similarity is greater than a threshold value, if so, acquiring a solution text corresponding to the target historical report problem, and feeding the solution text back to the agent terminal.
In this embodiment, the method is used in an agent system to solve the problem reported by an agent terminal. The method can also be used in the field of intelligent government affairs of the intelligent city to promote the construction of the intelligent city.
As described in step S1 above, the agent terminal may receive the production problem and the system problem fed back by the customer, and usually, the customer may use a text form for feedback. After receiving the problem text, the agent terminal may report the problem text to a server in order to solve the corresponding problem as soon as possible, where the server is used to provide a corresponding solution text for the problem text. Specifically, a similarity calculation model is established on the server and used for calculating the similarity between the problem text and a historical reported problem text in a database; the server is also provided with a word embedding model (namely a word embedding layer), word embedding of the problem text is established through the word embedding model, and the word embedding is a word vector. The word embedding layer is fused with a word embedding algorithm, and is used for mapping text data from a high-dimensional space to a low-dimensional space vector. The method mainly comprises a bag of words model (bag of word), one-hot encoding (one-hot encoding) and a word embedding model based on a neural network; in this embodiment, a neural network based word embedding model, such as the word2vec model, is preferably used.
As stated in the step S2, the word is embedded and input into the short-buffered neural network; the short-Stacked neural network is a neural network model obtained by pre-training, and is formed by sequentially stacking multiple layers of BI-LSTM networks, and the multiple layers of BI-LSTM networks form a Stacked structure; wherein, the input layer of each layer of BI-LSTM network is connected with the output layers of all the BI-LSTM networks before the input layer, and each layer of BI-LSTM network is connected with the word embedding layer. It is understood that the word embedding outputted from the word embedding layer is outputted to each of the BI-LSTM networks, and the output layer of each of the BI-LSTM networks is connected to the input layers of all the following BI-LSTM networks. In the present embodiment, the above improvement is made on the model structure, thereby increasing the depth of the neural network, so that it has a stronger extraction capability in feature extraction.
As stated in step S3, the last layer of the short-Stacked neural network outputs a feature vector, which is the feature vector corresponding to the question text. It can be understood that the input vector of the last layer of BI-LSTM network of the short-Stacked neural network is the word embedding and the output vectors of all the BI-LSTM networks before the layer of BI-LSTM network, i.e. the last layer of BI-LSTM network not only fuses the word embedding, but also is processed by the multiple layers of BI-LSTM networks before the last layer of BI-LSTM network, so that the network depth is increased, and the feature extraction capability is stronger.
As described in the step S4, the database stores a plurality of historical reporting problems, and each historical reporting problem has a corresponding solution text. And calculating the similarity between the problem text and the historical reported problem text in the database, and determining the historical reported problem with the maximum similarity as a target historical reported problem. The similarity calculation method can adopt a manhattan distance calculation method, a cosine distance similarity calculation method and the like.
As described in step S5, according to the maximum similarity, it may be determined whether the question text is a question that is particularly similar to the target historical report question, for example, whether the similarity is greater than 0.7 is determined, and if so, a corresponding solution text may be adopted to answer the question. If the similarity is smaller than the set value (such as 0.5), a solution text is not given, and the solution text is manually processed.
In this embodiment, when a repeated reporting problem is faced, a corresponding solution may be quickly found, and the timeliness of processing a production problem is significantly improved.
In an embodiment, before step S1 of receiving a question text reported by an agent terminal and constructing word embedding of the question text based on a word embedding layer, the method includes:
step S10, obtaining a sample set, wherein each sample in the sample set comprises two question sentences and a corresponding label, and the label is used for expressing whether the semantics of the two question sentences are the same;
s11, dividing the sample set into a training set and a testing set according to a preset proportion;
s12, word embedding of two question sentences in each sample of the training set is sequentially constructed, and words of the two question sentences are embedded and input into an initial short-buffered neural network, wherein the initial short-buffered neural network is formed by sequentially stacking multiple layers of BI-LSTM networks, an input layer of the next layer of BI-LSTM network is connected with output layers of all BI-LSTM networks before the input layer, and each layer of BI-LSTM network is connected with the word embedding layer;
s13, respectively extracting feature vectors of two question sentences based on the last layer of the BI-LSTM network of the initial short-Stacked neural network;
s14, calculating the similarity between the feature vectors of the two question sentences, and outputting a classification result through a fully-connected feedforward neural network; and iteratively training parameters of the initial Shortcut-Stacked neural network until the classification result is consistent with the labels corresponding to the two question sentences so as to obtain the trained Shortcut-Stacked neural network.
In this embodiment, a training process for the short-Stacked neural network is provided, and the training set of the short-Stacked neural network may be generated by collecting problem statements (for example, seat report: there is no sound in outgoing call) and corresponding solutions historically reported by the seat system, and storing a corresponding relationship between the historically reported problems and the solutions in a database. Converting (semantically recognizing) the intention of each reported question to generate a sentence with the same meaning as the question; combining two groups of questions with the same intention and labeling with a label 1; two question sentences with different intentions are randomly combined together and labeled with 0. For example, a set of sample data information is as follows:
a: i can not make a call to B: i call unable to call out tag: 1;
a: my next task error B my softphone has no sound tag: 0.
the sample set comprises a large number of samples, and the sample set is further split into a training set and a testing set according to the proportion of 9:1. In the process of training an initial short-Stacked neural network, the training set is used for training, and in the specific training process, a word embedding model is needed to respectively construct word embedding of two sentences in the sample, wherein the word embedding is a word vector.
The initial short-Stacked neural network is formed by sequentially stacking multiple layers of BI-LSTM networks, and the multiple layers of BI-LSTM networks form a Stacked stacking structure; wherein, the input layer of each layer of BI-LSTM network is connected with the output layers of all the BI-LSTM networks before the input layer, and each layer of BI-LSTM network is connected with the word embedding layer. It is understood that the word embedding outputted from the word embedding layer is outputted to each of the BI-LSTM networks, and the output layer of each of the BI-LSTM networks is connected to the input layers of all the following BI-LSTM networks. In the present embodiment, the above improvement is made on the model structure, thereby increasing the depth of the neural network, so that it has a stronger extraction capability in feature extraction.
Specifically, the inputs for each layer of the BI-LSTM network are: xi = [ w, h1, h2... Hi-1]
The output of each layer of the BI-LSTM network is: hi = BILSTM (Xi, i)
W is vector coding of sentences;
i-the number of layers of the current network;
h-the output of the network;
x-input to the network.
And respectively outputting a feature vector by the BI-LSTM network at the last layer of the initial short-buffered neural network, namely the feature vectors corresponding to the two question statements in the sample. Similarity calculation is carried out on the two feature vectors, and whether the two question sentences have the same semantic meaning or not can be determined. Specifically, the similarity of the two eigenvectors is calculated by adopting a Manhattan distance calculation method, a cosine distance similarity calculation method and the like, and then a classification result is output through a full-connection feedforward neural network; if the label of the sample is 1, the classification result should be also 1, and if the label of the sample is 0, the classification result should be also 0; in order to make the classification result of the sample consistent with the label of the sample, the parameters of the initial short-Stacked neural network need to be adjusted iteratively, that is, iterative training is performed, and finally the short-Stacked neural network is obtained through training.
Further, the test set can be input into a trained short-Stacked neural network for testing.
For example, after a problem statement a and a problem statement B included in a sample in a test set are input into a short-buffered neural network, two problem statements a and B are obtained, wherein the similarity of the two problem statements a and B is greater than 0.7, namely an output label is 1, if the obtained similarity is less than 0.7, namely the output label is 0, if the output labels are consistent with the labels of the problem statements a and B in the sample, the prediction is accurate, and if the output labels are inconsistent with the labels of the problem statements a and B in the sample, the prediction is not accurate; and after multiple iterative training and testing, storing the short-Stacked neural network with the highest prediction accuracy on the test set.
In an embodiment, the step S4 of calculating the similarity between the question text and the historical reported question text in the database based on the feature vector corresponding to the question text includes:
step S401, obtaining a feature vector of each historical report problem text in the database;
step S402, carrying out Hash calculation on the characteristic vector corresponding to the problem text to obtain a first Hash value, and carrying out Hash calculation on the characteristic vector of each historical reported problem text to obtain a corresponding second Hash value;
step S403, performing dimensionality reduction calculation on the first hash value and each second hash value to obtain a first sequence corresponding to the first hash value and a second sequence corresponding to each second hash value;
step S404, comparing the first sequence with each second sequence to obtain the similarity between the question text and each historical reported question text in the database.
In this embodiment, when the similarity between the problem text and the historically reported problem text in the database is calculated, since the feature vector of the problem text is already extracted through the Shortcut-Stacked neural network, in order to perform comparison in the same dimension, it is necessary to obtain the feature vector of each historically reported problem text in the database, and the feature vector of each historically reported problem text in the database may be preset in the database or extracted through the Shortcut-Stacked neural network.
The feature vector is a high-dimensional vector, and in order to reduce the dimension of the feature vector to a low-dimensional vector, hash calculation needs to be performed on the feature vector to obtain a corresponding hash value, and then dimension reduction calculation is performed to obtain the low-dimensional vectors, namely the first sequence and the second sequence. And then comparing the first sequence with each second sequence to obtain the positions of the first sequence and the second sequence which are different, thereby obtaining the similarity between the problem text and each historical reported problem text in the database.
In an embodiment, the step S404 of comparing the first sequence with each of the second sequences to obtain a similarity between the question text and each of the historical reported question texts in the database includes:
acquiring the sequence length of the first sequence; wherein the first sequence is the same in sequence length as each of the second sequences;
comparing said first sequence to each of said second sequences to determine the number of sequences having the same value at the same sequence position;
and obtaining the similarity between the question text and each historical reported question text in the database according to the number of the same numerical values at the same sequence position in the sequence and the ratio of the sequence length of the first sequence.
Specifically, the first sequence is 1010010011, and one of the second sequences is 1100010010, when the first sequence and the second sequence are compared, the three positions in the sequences are different, the distance between the first sequence and the second sequence is 3, the total length of the sequences is 10, and the similarity between the first sequence and the second sequence is 0.7.
In an embodiment, the step S1 of receiving the question text reported by the agent terminal includes:
step S101, receiving voice information uploaded by the seat terminal;
step S102, framing the voice information to obtain frame data which are sequentially sequenced;
step S103, inputting the frame data into a preset frame embedding neural network in sequence to obtain a frame vector corresponding to each frame data, and combining the frame vectors corresponding to all the frame data to obtain a feature vector corresponding to the voice information; the frame embedded neural network is obtained by training a preset neural network based on voice training data and word vectors corresponding to the voice training data;
and step S104, inputting the feature vector corresponding to the voice information into a preset text recognition model to obtain a corresponding text as the problem text.
In this embodiment, the frame-embedded neural network is obtained by training a preset neural network based on the speech training data and the word vectors corresponding to the speech training data, and not only retains the features of the speech frame data when extracting the feature vectors, but also fits the semantic features corresponding to the speech, so that the extracted feature vectors can express the features of the speech information, and the speech extraction effect for homophones and different characters is more obvious.
In an embodiment, before the step S101 of receiving the voice information uploaded by the agent terminal, the method includes:
acquiring voice training data; the voice training data are a single training word and audio training data corresponding to the single training word, and the audio training data comprise a plurality of training frame data which are sequentially ordered;
sequentially inputting each training frame data into the preset neural network according to the sequence of the training frame data in the audio training data, and extracting a training vector corresponding to each training frame data;
summing training vectors corresponding to all training frame data to obtain a sum vector;
acquiring word vectors of single training words in the voice training data;
fitting the sum vector and the word vector, and training the network parameters of the preset neural network to obtain the frame embedded neural network.
Specifically, the training process of the preset neural network includes:
acquiring target frame data in target voice information and multi-frame data before and after the target frame data;
inputting multi-frame data before and after the target frame data into a first neural network, and predicting a prediction vector of the target frame data;
inputting the target frame data into a second neural network, and extracting a target vector corresponding to the target frame data;
and calculating the similarity of the target vector and the prediction vector through a fitting function, and iteratively optimizing parameters of the fitting function to train and complete the first neural network and the second neural network, wherein the trained second neural network is used as the preset neural network.
In this embodiment, when training the preset neural network, two neural networks are used, which are a first neural network and a second neural network, respectively, wherein the first neural network inputs several frames of data before and after the target frame data, and the vector space is projected through the projection layer.
Through the second neural network, target frame data are input and projected to a vector space which is the same as that of the first neural network, then the cosine similarity of the two projected vectors is compared through a fitting function, and the optimized target function is the cosine similarity value, so that the greater the similarity is, the better the similarity is, and the similarity is maximized. In this embodiment, parameters of the fitting function are iteratively optimized to train and complete the first neural network and the second neural network, and the trained second neural network is used as the preset neural network.
In an embodiment, the method further comprises:
and storing the problem text, the solution text and the short-buffered neural network into a block chain. The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, which is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
Referring to fig. 2, an embodiment of the present application further provides a device for processing an agent report text, including:
the receiving unit 10 is configured to receive a problem text reported by an agent terminal, and construct word embedding of the problem text based on a word embedding layer;
an input unit 20, configured to embed and input the word into a short-Stacked neural network; the short-staged neural network is formed by sequentially stacking a plurality of layers of BI-LSTM networks, the input layer of the next layer of BI-LSTM network is connected with the output layers of all the preceding BI-LSTM networks, and each layer of BI-LSTM network is connected with the word embedding layer;
an output unit 30, configured to output a feature vector corresponding to the question text based on the last layer of the BI-LSTM network of the short-Stacked neural network;
a calculating unit 40, configured to calculate, based on the feature vector corresponding to the problem text, a similarity between the problem text and a history reported problem text in a database, and determine a target history reported problem with the largest similarity;
and the feedback unit 50 is configured to determine whether the maximum similarity is greater than a threshold, and if so, obtain a solution text corresponding to the target historical report problem, and feed the solution text back to the agent terminal.
In one embodiment, the apparatus further comprises:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a sample set, each sample in the sample set comprises two question sentences and a corresponding label, and the label is used for expressing whether the semantics of the two question sentences are the same;
the dividing unit is used for dividing the sample set into a training set and a testing set according to a preset proportion;
the building unit is used for sequentially building word embedding of two question sentences in each sample of the training set and embedding and inputting the words of the two question sentences into an initial short-buffered neural network, wherein the initial short-buffered neural network is formed by sequentially stacking a plurality of layers of BI-LSTM networks, an input layer of the next layer of BI-LSTM network is connected with output layers of all the BI-LSTM networks before the input layer, and each layer of BI-LSTM network is connected with the word embedding layer;
an extraction unit, configured to extract feature vectors of the two question statements respectively based on the last layer of the BI-LSTM network of the initial short-Stacked neural network;
the training unit is used for calculating the similarity between the feature vectors of the two question sentences and outputting a classification result through a full-connection feedforward neural network; and iteratively training parameters of the initial Shortcut-Stacked neural network until the classification result is consistent with the labels corresponding to the two question sentences so as to obtain the trained Shortcut-Stacked neural network.
In an embodiment, the apparatus further includes:
and the test unit is used for inputting the test set into the trained short-Stacked neural network for testing.
In an embodiment, the calculating unit 40 includes:
an obtaining subunit, configured to obtain a feature vector of each historical report problem text in the database;
the first calculating subunit is configured to perform hash calculation on the feature vector corresponding to the problem text to obtain a first hash value, and perform hash calculation on the feature vector of each historically reported problem text to obtain a corresponding second hash value;
the second calculating subunit is configured to perform dimensionality reduction calculation on the first hash value and each second hash value to obtain a first sequence corresponding to the first hash value and a second sequence corresponding to each second hash value;
and the comparison subunit is configured to compare the first sequence with each of the second sequences to obtain a similarity between the question text and each of the historical reported question texts in the database.
In an embodiment, the comparison subunit is specifically configured to:
acquiring the sequence length of the first sequence; wherein the first sequence is the same in sequence length as each of the second sequences;
comparing said first sequence to each of said second sequences to determine the number of sequences having the same value at the same sequence position;
and obtaining the similarity between the question text and each historical reported question text in the database according to the quantity of the same numerical values at the same sequence position in the sequence and the ratio of the sequence length of the first sequence.
In an embodiment, the receiving unit 10 is specifically configured to:
receiving voice information uploaded by the agent terminal;
framing the voice information to obtain frame data which are sequentially sequenced;
inputting the frame data into a preset frame embedding neural network in sequence to obtain a frame vector corresponding to each frame data, and combining the frame vectors corresponding to all the frame data to obtain a feature vector corresponding to the voice information; the frame embedded neural network is obtained by training a preset neural network based on voice training data and word vectors corresponding to the voice training data;
inputting the feature vector corresponding to the voice information into a preset text recognition model to obtain a corresponding text as the problem text;
in an embodiment, the receiving unit 10 is further configured to:
acquiring voice training data; the voice training data are a single training word and audio training data corresponding to the single training word, and the audio training data comprise a plurality of training frame data which are sequentially ordered;
sequentially inputting each training frame data into the preset neural network according to the sequence of the training frame data in the audio training data, and extracting a training vector corresponding to each training frame data;
summing training vectors corresponding to all training frame data to obtain a sum vector;
acquiring word vectors of single training words in the voice training data;
fitting the sum vector and the word vector, and training the network parameters of the preset neural network to obtain the frame embedded neural network.
In one embodiment, the apparatus further comprises:
and the storage unit is used for storing the problem text, the solution text and the short-buffered neural network into a block chain.
In the above embodiments, please refer to the above method embodiments for specific implementation of the above units and sub units, which is not described herein again.
Referring to fig. 3, an embodiment of the present application further provides a computer device, where the computer device may be a server, and an internal structure of the computer device may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing question texts and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a method of processing agent reporting text.
It will be understood by those skilled in the art that the structure shown in fig. 3 is only a block diagram of a part of the structure related to the present application, and does not constitute a limitation to the computer device to which the present application is applied.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for processing an agent reporting text. It is to be understood that the computer-readable storage medium in the present embodiment may be a volatile-readable storage medium or a non-volatile-readable storage medium.
In summary, for the method, the apparatus, the computer device, and the storage medium for processing an agent report text provided in the embodiments of the present application, a problem text reported by a receiving agent terminal is received, and a feature vector of the problem text is output through a short-buffered neural network; the short-staged neural network is formed by sequentially stacking a plurality of layers of BI-LSTM networks, the input layer of the next layer of BI-LSTM network is connected with the output layers of all the preceding BI-LSTM networks, and each layer of BI-LSTM network is connected with the word embedding layer; matching the target history reporting problem with the largest similarity based on the feature vector, and feeding back a solution text of the target history reporting problem to the agent terminal as a solution of the problem text; the problem of manual handling repetition can be avoided, and the processing efficiency of solving the problem is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, apparatus, article, or method that comprises the element.
The above description is only for the preferred embodiment of the present application and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are intended to be included within the scope of the present application.

Claims (9)

1. A method for processing agent report text is characterized by comprising the following steps:
receiving a problem text reported by an agent terminal, and constructing word embedding of the problem text based on a word embedding layer;
embedding and inputting the words into a short-Stacked neural network; the short-staged neural network is formed by sequentially stacking a plurality of layers of BI-LSTM networks, the input layer of the next layer of BI-LSTM network is connected with the output layers of all the preceding BI-LSTM networks, and each layer of BI-LSTM network is connected with the word embedding layer;
outputting a feature vector corresponding to the problem text based on the last layer of the BI-LSTM network of the short-Stacked neural network;
calculating the similarity between the problem text and historical reported problem texts in a database based on the feature vectors corresponding to the problem text, and determining a target historical reported problem with the maximum similarity;
judging whether the maximum similarity is greater than a threshold value, if so, acquiring a solution text corresponding to the target historical report problem, and feeding the solution text back to the seat terminal;
the step of calculating the similarity between the question text and the historical reported question text in the database based on the feature vector corresponding to the question text comprises the following steps:
acquiring a characteristic vector of each historical report problem text in the database;
performing hash calculation on the feature vector corresponding to the problem text to obtain a first hash value, and performing hash calculation on the feature vector of each historical reported problem text to obtain a corresponding second hash value;
performing dimensionality reduction calculation on the first hash value and each second hash value to obtain a first sequence corresponding to the first hash value and a second sequence corresponding to each second hash value;
and comparing the first sequence with each second sequence to obtain the similarity between the problem text and each historical reported problem text in the database.
2. The method for processing the question text reported by the agent terminal according to claim 1, wherein before the step of receiving the question text reported by the agent terminal and constructing word embedding of the question text based on a word embedding layer, the method comprises:
acquiring a sample set, wherein each sample in the sample set comprises two question sentences and a corresponding label, and the label is used for expressing whether the semantics of the two question sentences are the same;
dividing the sample set into a training set and a testing set according to a preset proportion;
word embedding of two question sentences in each sample of the training set is sequentially constructed, and words of the two question sentences are embedded and input into an initial short cut-buffered neural network, wherein the initial short cut-buffered neural network is formed by sequentially stacking a plurality of layers of BI-LSTM networks, an input layer of the next layer of BI-LSTM network is connected with output layers of all preceding BI-LSTM networks, and each layer of BI-LSTM network is connected with the word embedding layer;
respectively extracting the feature vectors of the two question sentences based on the last layer of the BI-LSTM network of the initial short-Stacked neural network;
calculating the similarity between the feature vectors of the two question sentences, and outputting a classification result through a fully-connected feedforward neural network; and iteratively training the parameters of the initial short-Stacked neural network until the classification result is consistent with the labels corresponding to the two question sentences, so as to obtain the short-Stacked neural network after training.
3. The method of claim 1, wherein the step of comparing the first sequence with each of the second sequences to obtain a similarity between the question text and each of the historical reported question texts in the database comprises:
acquiring the sequence length of the first sequence; wherein the first sequence is the same in sequence length as each of the second sequences;
comparing said first sequence to each of said second sequences to determine the number of sequences having the same value at the same sequence position;
and obtaining the similarity between the question text and each historical reported question text in the database according to the number of the same numerical values at the same sequence position in the sequence and the ratio of the sequence length of the first sequence.
4. The method of claim 1, wherein the step of receiving the question text reported by the agent terminal comprises:
receiving voice information uploaded by the agent terminal;
framing the voice information to obtain frame data which are sequentially sequenced;
inputting the frame data into a preset frame embedding neural network in sequence to obtain a frame vector corresponding to each frame data, and combining the frame vectors corresponding to all the frame data to obtain a feature vector corresponding to the voice information; the frame embedded neural network is obtained by training a preset neural network based on voice training data and word vectors corresponding to the voice training data;
and inputting the feature vector corresponding to the voice information into a preset text recognition model to obtain a corresponding text as the problem text.
5. The method of claim 4, wherein the step of receiving the voice message uploaded by the agent terminal is preceded by:
acquiring voice training data; the voice training data are a single training word and audio training data corresponding to the single training word, and the audio training data comprise a plurality of training frame data which are sequentially ordered;
sequentially inputting each training frame data into the preset neural network according to the sequence of the training frame data in the audio training data, and extracting a training vector corresponding to each training frame data;
summing training vectors corresponding to all training frame data to obtain a sum vector;
acquiring word vectors of single training words in the voice training data;
fitting the sum vector and the word vector, and training the network parameters of the preset neural network to obtain the frame embedded neural network.
6. The method of claim 1, wherein the method further comprises:
and storing the problem text, the solution text and the short-buffered neural network into a block chain.
7. An apparatus for processing agent reported text, comprising:
the receiving unit is used for receiving the problem text reported by the agent terminal and constructing word embedding of the problem text based on the word embedding layer;
the input unit is used for embedding and inputting the words into a short-Stacked neural network; the short-buffered neural network is formed by sequentially stacking a plurality of layers of BI-LSTM networks, the input layer of the next layer of BI-LSTM network is connected with the output layers of all the preceding BI-LSTM networks, and each layer of BI-LSTM network is connected with the word embedded layer;
the output unit is used for outputting the feature vector corresponding to the problem text based on the last layer of the BI-LSTM network of the short-Stacked neural network;
the calculation unit is used for calculating the similarity between the problem text and the historical reported problem text in the database based on the feature vector corresponding to the problem text and determining the target historical reported problem with the maximum similarity;
the feedback unit is used for judging whether the maximum similarity is greater than a threshold value or not, if so, acquiring a solution text corresponding to the target historical report problem, and feeding the solution text back to the agent terminal;
the calculation unit includes:
an obtaining subunit, configured to obtain a feature vector of each historical report problem text in the database;
the first calculating subunit is configured to perform hash calculation on the feature vector corresponding to the problem text to obtain a first hash value, and perform hash calculation on the feature vector of each historically reported problem text to obtain a corresponding second hash value;
the second calculating subunit is configured to perform dimensionality reduction calculation on the first hash value and each second hash value to obtain a first sequence corresponding to the first hash value and a second sequence corresponding to each second hash value;
and the comparison subunit is configured to compare the first sequence with each of the second sequences to obtain a similarity between the question text and each of the historical reported question texts in the database.
8. A computer device comprising a memory and a processor, the memory having stored therein a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method according to any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202010905149.XA 2020-09-01 2020-09-01 Method, device, computer equipment and storage medium for processing agent report text Active CN112040076B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010905149.XA CN112040076B (en) 2020-09-01 2020-09-01 Method, device, computer equipment and storage medium for processing agent report text

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010905149.XA CN112040076B (en) 2020-09-01 2020-09-01 Method, device, computer equipment and storage medium for processing agent report text

Publications (2)

Publication Number Publication Date
CN112040076A CN112040076A (en) 2020-12-04
CN112040076B true CN112040076B (en) 2022-11-04

Family

ID=73590882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010905149.XA Active CN112040076B (en) 2020-09-01 2020-09-01 Method, device, computer equipment and storage medium for processing agent report text

Country Status (1)

Country Link
CN (1) CN112040076B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328799B (en) * 2021-01-06 2021-04-02 腾讯科技(深圳)有限公司 Question classification method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415977A (en) * 2018-02-09 2018-08-17 华南理工大学 One is read understanding method based on the production machine of deep neural network and intensified learning
CN109918652A (en) * 2019-02-20 2019-06-21 上海方立数码科技有限公司 A kind of statement similarity judgment method and judge system
CN110765250A (en) * 2019-10-21 2020-02-07 拉扎斯网络科技(上海)有限公司 Retrieval method, retrieval device, readable storage medium and electronic equipment
CN111191457A (en) * 2019-12-16 2020-05-22 浙江大搜车软件技术有限公司 Natural language semantic recognition method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415977A (en) * 2018-02-09 2018-08-17 华南理工大学 One is read understanding method based on the production machine of deep neural network and intensified learning
CN109918652A (en) * 2019-02-20 2019-06-21 上海方立数码科技有限公司 A kind of statement similarity judgment method and judge system
CN110765250A (en) * 2019-10-21 2020-02-07 拉扎斯网络科技(上海)有限公司 Retrieval method, retrieval device, readable storage medium and electronic equipment
CN111191457A (en) * 2019-12-16 2020-05-22 浙江大搜车软件技术有限公司 Natural language semantic recognition method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112040076A (en) 2020-12-04

Similar Documents

Publication Publication Date Title
CN110162633B (en) Voice data intention determining method and device, computer equipment and storage medium
CN107590192B (en) Mathematical processing method, device, equipment and storage medium for text questions
CN110909137A (en) Information pushing method and device based on man-machine interaction and computer equipment
CN112613308A (en) User intention identification method and device, terminal equipment and storage medium
CN109344242B (en) Dialogue question-answering method, device, equipment and storage medium
CN112417855A (en) Text intention recognition method and device and related equipment
KR20210091671A (en) Method and apparatus for verifying medical fact
CN111223476B (en) Method and device for extracting voice feature vector, computer equipment and storage medium
CN111259113A (en) Text matching method and device, computer readable storage medium and computer equipment
CN111611383A (en) User intention recognition method and device, computer equipment and storage medium
CN114120978A (en) Emotion recognition model training and voice interaction method, device, equipment and medium
CN115495553A (en) Query text ordering method and device, computer equipment and storage medium
CN111858890A (en) Robot-based consultation method, consultation robot, computer equipment and medium
CN113886531A (en) Intelligent question and answer determining method and device, computer equipment and storage medium
CN112040076B (en) Method, device, computer equipment and storage medium for processing agent report text
CN116434741A (en) Speech recognition model training method, device, computer equipment and storage medium
CN112699213A (en) Speech intention recognition method and device, computer equipment and storage medium
CN115203372A (en) Text intention classification method and device, computer equipment and storage medium
CN113873088A (en) Voice call interaction method and device, computer equipment and storage medium
CN112364650A (en) Entity relationship joint extraction method, terminal and storage medium
CN112732884A (en) Target answer sentence generation method and device, computer equipment and storage medium
CN110929517B (en) Geographical position positioning method, system, computer equipment and storage medium
CN110795531A (en) Intention identification method, device and storage medium
WO2023173547A1 (en) Text image matching method and apparatus, device, and storage medium
CN113297367A (en) Method for generating user conversation linking language and related equipment

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
GR01 Patent grant
GR01 Patent grant