Virtual wiring management system and method based on large language model

By using the linear SVM model to analyze speech features and combining it with emotion classification in the virtual wiring management system, the problem of emotion recognition and processing of large language models in virtual wiring services is solved, achieving a more personalized user experience and efficient emotional support.

CN118733733APending Publication Date: 2024-10-01CHANGZHOU XIAOWEN INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410875263.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

It is difficult for large language models to effectively identify and process users' emotions in virtual wiring services, especially because emotions are often expressed through tone and intonation, and the model lacks flexibility in processing different emotional states and cannot provide effective emotional support.

Method used

A virtual wiring management system based on a large language model is designed, including an input module, a selection module, a speech analysis module, a text analysis module and an output module. Through speech feature analysis, emotion classification and text generation, a linear SVM model is combined to analyze the speech content. Carry out emotion classification and modify the reply content based on the emotion classification to provide a personalized user experience.

Benefits of technology

Significantly improved emotion recognition capabilities, fast and accurate emotion analysis and corresponding responses, improved user experience and satisfaction, allowing users to experience more personalized services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733733A_ABST
    Figure CN118733733A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual wiring management system and method based on a large language model, and belongs to the technical field of natural language processing. The system comprises an input module, a selection module, a voice analysis module, a text analysis module and an output module. The input module is used for inputting text content and voice content by a user and converting the voice content into a text; the selection module is used for carrying out preliminary matching according to the text of the input module so as to select a corresponding processing policy; the voice analysis module is used for analyzing the emotional state of the user according to the voice content input by the user; the text analysis module is used for understanding the text content and analyzing the intention and emotion of the user according to the text content; and the output module is used for generating a text to reply the user in combination with the intention and emotion of the user after understanding the input of the user. The invention further provides a method for implementing the system. The situation that the emotion recognition and processing are insufficient in the prior art can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a virtual wiring management system and method based on a large language model. Background Art

[0002] Virtual call center is a technology-based service that simulates the work of traditional call center operators and interacts with users through telephone, network and voice recognition. Virtual call center technology mainly uses artificial intelligence and voice recognition technologies to automatically provide users with solutions and other services.

[0003] The Big Language Model is a natural language processing model based on deep learning technology that can process and generate natural language text. The model is trained with a large amount of text data and understands and generates human language by learning the vocabulary, grammar, structure and contextual relationships in the language.

[0004] Large language models are widely used in virtual call center services, but there are still some problems in emotion recognition and processing. Large text models mainly rely on text data, and emotions are often expressed through tone and intonation, which are non-linguistic features that are difficult to reflect in text. In addition, the model may lack flexibility when dealing with different emotional states and cannot provide effective emotional support. Summary of the invention

[0005] The purpose of the present invention is to provide a virtual wiring management system and method based on a large language model to solve the problems raised in the above background technology.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a virtual wiring management system based on a large language model, the system comprising an input module, a selection module, a speech analysis module, a text analysis module and an output module;

[0007] The input module is used for users to input text content and voice content, and convert the voice content into text; the selection module is used to perform preliminary matching based on the text of the input module to select the corresponding processing policy; the voice analysis module is used to analyze the user's emotional state based on the voice content input by the user; the text analysis module is used to understand the text content and analyze the user's intention and emotion based on the text content; the output module is used to generate text to reply to the user after understanding the user's input in combination with the user's intention and emotion;

[0008] The output end of the input module is connected to the input end of the selection module and the speech analysis module; the output end of the selection module is connected to the input end of the text analysis module and the output module; the output end of the speech analysis module is connected to the input end of the output module; the output end of the text analysis module is connected to the input end of the output module.

[0009] The input module includes a text interface unit, a voice interface unit and a text conversion unit;

[0010] The text interface unit is used to receive text content input by a user; the voice interface unit is used to receive voice content input by a user; the text conversion unit is used to convert the voice content input by a user into text;

[0011] The output end of the text interface unit is connected to the input end of the selection module; the output end of the voice interface unit is connected to the input ends of the text conversion unit and the voice analysis module; the output end of the text conversion unit is connected to the input end of the selection module.

[0012] The selection module includes a policy selection unit, a question-answer matching unit, an information request unit, an information verification unit, and a conversion manual unit;

[0013] The policy selection unit is used to select an appropriate processing policy for the text by matching keywords; the question-answer matching unit is used to match the text with the preset question; the information request unit is used to make further information requests to the user; the information verification unit is used to verify the correctness of the information obtained by the information request unit; the conversion manual unit is used to convert the interaction to manual;

[0014] The output end of the policy selection unit is connected to the input ends of the question and answer matching unit, the information request unit and the conversion manual unit; the output end of the question and answer request unit is connected to the input ends of the text analysis module and the output module; the output end of the information request unit is connected to the input end of the information verification unit; the output end of the information verification unit is connected to the input ends of the information request unit and the question and answer matching unit.

[0015] The speech analysis module includes a feature collection unit, a pre-training model unit and a classification prediction unit;

[0016] The feature collection unit is used to collect speech features of speech input; the pre-training model unit is used to train an emotion classification model according to the speech features and their corresponding emotion states; the classification prediction unit is used to train the features according to the pre-training model to obtain corresponding emotion classification;

[0017] The output end of the feature collection unit is connected to the input end of the pre-training model unit; the output end of the pre-training model unit is connected to the input end of the classification prediction unit; the output end of the classification prediction unit is connected to the input end of the output module.

[0018] The text analysis module includes an intention analysis unit, a text understanding unit and a sentiment analysis unit;

[0019] The intention analysis unit is used to perform matching analysis based on the text content to obtain the user intention; the text understanding unit is used to understand the text content; the sentiment analysis unit is used to analyze the sentiment state contained in the text content;

[0020] The output end of the intention classification unit is connected to the input end of the text understanding unit; the output end of the text understanding unit is connected to the input end of the sentiment analysis unit; the output end of the sentiment analysis unit is connected to the input end of the output module.

[0021] The output module includes a database unit, a text generation unit, a text output unit, a speech conversion unit and an output unit;

[0022] The database unit is used to store and access pre-set policy keywords, responses to some commonly used questions, and text generation templates corresponding to different emotions; the text generation unit is used to generate corresponding responses according to the user's input content and emotional state; the text output unit is used to output the responses generated by the text generation unit; the speech conversion unit is used to convert text content into speech content when the input format is speech; the output unit is used to output corresponding text and speech content according to the content format input by the user;

[0023] The output end of the database unit is connected to the input end of the text generation unit; the output end of the text generation unit is connected to the input end of the text output unit; the output end of the text output unit is connected to the input ends of the speech conversion unit and the output unit; the output end of the speech conversion unit is connected to the input end of the output unit.

[0024] A virtual wiring management method based on a large language model, the method comprising the following steps:

[0025] S1, receiving user input, collecting features of the voice content and converting it into text;

[0026] S2. Matching keywords on the user's input to select a corresponding processing policy;

[0027] S3. Set a matching threshold to match the text to questions and answers. When the matching degree is higher than the threshold, respond to the user based on the questions and their corresponding answers preset in the database.

[0028] S4. When the matching degree is not higher than the threshold, the user intention, text content and emotion are analyzed, and a reply text is generated according to the analysis results;

[0029] S5, modifying the text generated in step S4 according to the predicted speech content emotion classification and the text template corresponding to the emotion classification in the database;

[0030] S6. Output the text obtained in step S5 according to the input format.

[0031] In step S1, the Transformer ASR model is used to convert the speech content into text content;

[0032] In step S2, a processing policy is selected according to the matching user input keyword, and the specific method is as follows:

[0033] There are three types of processing policies: transfer to manual, request for more information, and question-answer matching;

[0034] Switch to manual policy Preset keywords [keyword1, keyword2, …, keyword n ]; Request more information policy preset keywords [Keyword1, Keyword2..., Keyword m ]; Use Jieba word segmentation tool to segment text content, and use the pre-trained Word2Vec word vector model to map text segmentation and policy keywords to word vector space; For each segmentation word vector, calculate its cosine similarity with each keyword vector;

[0035] Among them, m and n are both positive integers, indicating the number of keywords;

[0036] When there is a word segmentation vector with [keyword1, keyword2, ..., keyword n ]When the cosine similarity of any keyword vector in is 1, the processing policy is selected as switching to manual;

[0037] When there is a word segmentation vector and [keyword1, Keyword2…, Keyword m ]When the cosine similarity of any keyword vector in is 1, the processing policy is to request more information;

[0038] When the above two situations exist at the same time, the processing policy is to switch to manual; when the above two situations do not exist at the same time, the processing policy is to match the question answer;

[0039] Information verification is used to verify the information obtained by making further information requests to users when the text content involves user privacy information. The verification method is:

[0040] Use the hash algorithm on the user's original private information to obtain a hash value of fixed length; use the same hash algorithm on the private information input by the user to obtain a hash value of the same length; perform an XOR operation on the hash value of the user's original private information and the hash value generated by the private information input by the user. If the result is 0, the verification is passed, otherwise the verification fails;

[0041] After verification, the text is matched with questions and answers; when verification fails, the user is informed and the information is requested again.

[0042] In step S3, the matching threshold is set to a; the question-answer matching method is:

[0043] Use the SBERT model to convert the preset common question texts in the database into vectors of fixed dimensions; use the same SBERT model to generate vectors of the same dimension for the text content;

[0044] Calculate the cosine similarity between the text content generation vector and the preset common problem generation vector in the database respectively; select the cosine similarity S with the largest value max ;

[0045] When S max >a, select S max Respond to users with vector-based preset questions and answers;

[0046] In step S4, when S max When ≤a, the pre-trained model BERT is used to generate reply text based on the analysis of text intent, content, and sentiment.

[0047] In step S5, a linear SVM is used to predict the speech content emotion classification, and the specific method is as follows:

[0048] Collect speech data with different emotional states;

[0049] Extract volume features and their corresponding emotional states from speech signals:

[0050] Collect N samples, each of which consists of a d-dimensional feature vector x i and a sentiment label y i Composition; among them, y i ∈{1, 2, ..., K}, i∈{1, 2, ..., N}, K is the total number of emotion categories, N is the number of samples, and d is the number of features;

[0051] For each emotion category, a binary linear SVM model is trained to label the category as positive and all other categories as negative.

[0052] For sentiment category k, construct the target vector y k :

[0053] When the sample x i Belongs to the kth type of emotion, then y ik =+1;

[0054] When the sample x i does not belong to the kth emotion, then y ik = -1;

[0055] Get K binary classifiers; for each binary classifier, minimize the objective function:

[0056]

[0057] Get the weight vector W of the linear SVM k , bias term b k ;

[0058] Among them, C is the regularization parameter;

[0059] For the new speech feature x new , for each sentiment category k, use the corresponding linear SVM model (w k , b k ) Calculate the decision function:

[0060] Predict x new The sentiment category of is the category with the largest decision function value:

[0061] Modify the reply content generated in step S5 and output the text according to the emotion obtained by classification and the text output template preset corresponding to the emotion;

[0062] In step S6, for the input in speech format, the Transformer TTS model is used to convert the content obtained in step S5 into text-to-speech output.

[0063] Compared with the prior art, the beneficial effects achieved by the present invention are: in the virtual connection management process, the use of linear SVM to analyze voice features and then classify user emotions can effectively improve the ability to recognize emotions; corresponding templates are generated according to different emotion classifications, and the replies are modified according to the templates. Fast and accurate emotion analysis and corresponding replies can significantly improve the user experience, enable users to experience more personalized services, and enhance user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0065] Figure 1 It is a flow chart of a virtual wiring management system based on a large language model of the present invention;

[0066] Figure 2 It is a schematic diagram of the steps of a virtual wiring management method based on a large language model of the present invention. DETAILED DESCRIPTION

[0067] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0068] See also Figure 1-Figure 2 ,The present invention provides a technical solution: a virtual wiring management system based on a large language model, the system includes an input module, a selection module, a speech analysis module, a text analysis module and an output module;

[0069] The input module is used for users to input text content and voice content, and convert the voice content into text; the selection module is used to perform preliminary matching based on the text of the input module to select the corresponding processing policy; the voice analysis module is used to analyze the user's emotional state based on the voice content input by the user; the text analysis module is used to understand the text content and analyze the user's intention and emotion based on the text content; the output module is used to generate text to reply to the user after understanding the user's input in combination with the user's intention and emotion;

[0070] The output end of the input module is connected to the input end of the selection module and the speech analysis module; the output end of the selection module is connected to the input end of the text analysis module and the output module; the output end of the speech analysis module is connected to the input end of the output module; the output end of the text analysis module is connected to the input end of the output module.

[0071] The input module includes a text interface unit, a voice interface unit and a text conversion unit;

[0072] The text interface unit is used to receive text content input by a user; the voice interface unit is used to receive voice content input by a user; the text conversion unit is used to convert the voice content input by a user into text;

[0073] The output end of the text interface unit is connected to the input end of the selection module; the output end of the voice interface unit is connected to the input ends of the text conversion unit and the voice analysis module; the output end of the text conversion unit is connected to the input end of the selection module.

[0074] The selection module includes a policy selection unit, a question-answer matching unit, an information request unit, an information verification unit, and a conversion manual unit;

[0075] The policy selection unit is used to select an appropriate processing policy for the text by matching keywords; the question-answer matching unit is used to match the text with the preset question; the information request unit is used to make further information requests to the user; the information verification unit is used to verify the correctness of the information obtained by the information request unit; the conversion manual unit is used to convert the interaction to manual;

[0076] The output end of the policy selection unit is connected to the input ends of the question and answer matching unit, the information request unit and the conversion manual unit; the output end of the question and answer request unit is connected to the input ends of the text analysis module and the output module; the output end of the information request unit is connected to the input end of the information verification unit; the output end of the information verification unit is connected to the input ends of the information request unit and the question and answer matching unit.

[0077] The speech analysis module includes a feature collection unit, a pre-training model unit and a classification prediction unit;

[0078] The feature collection unit is used to collect speech features of speech input; the pre-training model unit is used to train an emotion classification model according to the speech features and their corresponding emotion states; the classification prediction unit is used to train the features according to the pre-training model to obtain corresponding emotion classification;

[0079] The output end of the feature collection unit is connected to the input end of the pre-training model unit; the output end of the pre-training model unit is connected to the input end of the classification prediction unit; the output end of the classification prediction unit is connected to the input end of the output module.

[0080] The text analysis module includes an intention analysis unit, a text understanding unit and a sentiment analysis unit;

[0081] The intention analysis unit is used to perform matching analysis based on the text content to obtain the user intention; the text understanding unit is used to understand the text content; the sentiment analysis unit is used to analyze the sentiment state contained in the text content;

[0082] The output end of the intention classification unit is connected to the input end of the text understanding unit; the output end of the text understanding unit is connected to the input end of the sentiment analysis unit; the output end of the sentiment analysis unit is connected to the input end of the output module.

[0083] The output module includes a database unit, a text generation unit, a text output unit, a speech conversion unit and an output unit;

[0084] The database unit is used to store and access pre-set policy keywords, responses to some commonly used questions, and text generation templates corresponding to different emotions; the text generation unit is used to generate corresponding responses according to the user's input content and emotional state; the text output unit is used to output the responses generated by the text generation unit; the speech conversion unit is used to convert text content into speech content when the input format is speech; the output unit is used to output corresponding text and speech content according to the content format input by the user;

[0085] The output end of the database unit is connected to the input end of the text generation unit; the output end of the text generation unit is connected to the input end of the text output unit; the output end of the text output unit is connected to the input ends of the speech conversion unit and the output unit; the output end of the speech conversion unit is connected to the input end of the output unit.

[0086] A virtual wiring management method based on a large language model, the method comprising the following steps:

[0087] S1, receiving user input, collecting features of the voice content and converting it into text;

[0088] S2. Matching keywords on the user's input to select a corresponding processing policy;

[0089] S3. Set a matching threshold to match the text to questions and answers. When the matching degree is higher than the threshold, respond to the user based on the questions and their corresponding answers preset in the database.

[0090] S4. When the matching degree is not higher than the threshold, the user intention, text content and emotion are analyzed, and a reply text is generated according to the analysis results;

[0091] S5, modifying the text generated in step S4 according to the predicted speech content emotion classification and the text template corresponding to the emotion classification in the database;

[0092] S6. Output the text obtained in step S5 according to the input format.

[0093] In step S1, the Transformer ASR model is used to convert the speech content into text content;

[0094] In step S2, a processing policy is selected according to the matching user input keyword, and the specific method is as follows:

[0095] There are three types of processing policies: transfer to manual, request for more information, and question-answer matching;

[0096] Switch to manual policy Preset keywords [keyword1, keyword2, …, keyword n ]; Request more information policy preset keywords [Keyword1, Keyword2..., Keyword m ]; Use Jieba word segmentation tool to segment text content, and use the pre-trained Word2Vec word vector model to map text segmentation and policy keywords to word vector space; For each segmentation word vector, calculate its cosine similarity with each keyword vector;

[0097] Among them, m and n are both positive integers, indicating the number of keywords;

[0098] When there is a word segmentation vector with [keyword1, keyword2, ..., keyword n ]When the cosine similarity of any keyword vector in is 1, the processing policy is selected as switching to manual;

[0099] When there is a word segmentation vector and [Keyword1, Keyword2…, Keyword m ]When the cosine similarity of any keyword vector in is 1, the processing policy is to request more information;

[0100] When the above two situations exist at the same time, the processing policy is to switch to manual; when the above two situations do not exist at the same time, the processing policy is to match the question answer;

[0101] Information verification is used to verify the information obtained by making further information requests to users when the text content involves user privacy information. The verification method is:

[0102] Use the hash algorithm on the user's original private information to obtain a hash value of fixed length; use the same hash algorithm on the private information input by the user to obtain a hash value of the same length; perform an XOR operation on the hash value of the user's original private information and the hash value generated by the private information input by the user. If the result is 0, the verification is passed, otherwise the verification fails;

[0103] After verification, the text is matched with questions and answers; when verification fails, the user is informed and the information is requested again.

[0104] In step S3, the matching threshold is set to a; the question-answer matching method is:

[0105] Use the SBERT model to convert the preset common question texts in the database into vectors of fixed dimensions; use the same SBERT model to generate vectors of the same dimension for the text content;

[0106] Calculate the cosine similarity between the text content generation vector and the preset common problem generation vector in the database respectively; select the cosine similarity S with the largest value max ;

[0107] When S max > a, select S max Respond to users with vector-based preset questions and answers;

[0108] In step S4, when S max When ≤a, the pre-trained model BERT is used to generate reply text based on the analysis of text intent, content, and sentiment.

[0109] In step S5, a linear SVM is used to predict the speech content emotion classification, and the specific method is as follows:

[0110] Collect speech data with different emotional states;

[0111] Extract volume features and their corresponding emotional states from speech signals:

[0112] Collect N samples, each of which consists of a d-dimensional feature vector x i and a sentiment label y i Composition; among them, y i ∈{1, 2, ..., K}, i∈{1, 2, ..., N}, K is the total number of emotion categories, N is the number of samples, and d is the number of features;

[0113] For each emotion category, a binary linear SVM model is trained to label the category as positive and all other categories as negative.

[0114] For sentiment category k, construct the target vector y k :

[0115] When the sample x i Belongs to the kth type of emotion, then y ik =+1;

[0116] When the sample x i does not belong to the kth emotion, then y ik = -1;

[0117] Get K binary classifiers; for each binary classifier, minimize the objective function:

[0118]

[0119] Get the weight vector W of the linear SVM k , bias term b k ;

[0120] Among them, C is the regularization parameter;

[0121] For the new speech feature x new , for each sentiment category k, use the corresponding linear SVM model (w k , b k ) Calculate the decision function:

[0122] Predict x new The sentiment category of is the category with the largest decision function value:

[0123] Modify the reply content generated in step S5 and output the text according to the emotion obtained by classification and the text output template preset corresponding to the emotion;

[0124] In step S6, for the input in speech format, the Transformer TTS model is used to convert the content obtained in step S5 into text-to-speech output.

[0125] In this embodiment: the matching threshold a is set to 0.9;

[0126] The user inputs voice content, which is converted into text content: What are the functions of your latest mobile phone?

[0127] The speech characteristics are: basic frequency 215; sound intensity 0.82; speech rate 4.9;

[0128] There are two emotion categories: happy and sad;

[0129] The output templates corresponding to different sentiment classifications are:

[0130] Happy: It's a pleasure to serve you. We have already dealt with the [user issue] you mentioned, [generated text]. If there is anything else we can help you with, please feel free to contact us!

[0131] Sad: Regarding the [user issue] you mentioned, we have dealt with it, [generated text]. We hope to provide you with support and care. If there is anything else we can help you with, please feel free to contact us.

[0132] Switch to manual policy preset keywords [manual, real person]; Request more information policy preset keywords [balance, password];

[0133] FAQ 1: Why can’t I log into the system?

[0134] Question 1 reply: Please make sure your name and password are correct.

[0135] FAQ 2: How do I change my profile information?

[0136] Response to Question 2: Please go to “Profile” or “Menu” to make settings.

[0137] Jieba word segmentation tool is used to segment the text, and the segmentation result is: [Excuse me, what are the functions of your latest mobile phone];

[0138] Use the pre-trained Word2Vec word vector model to map text segmentation and policy keywords into the word vector space;

[0139] For each word vector of a segmentation, calculate its cosine similarity with each keyword vector;

[0140] If the cosine similarity between the word segmentation and any keyword vector is 1, the policy choice is question-answer matching;

[0141] Use the SBERT model to convert the preset common question texts in the database into vectors of fixed dimensions; use the same SBERT model to generate vectors of the same dimension for the text content:

[0142] Preset common problem 1: [0.9, 0.2, 1.4, -0.7, 0.6];

[0143] Preset common problem 2: [0.3, -1.1, 0.8, 0.5, 2.3];

[0144] Text content: [-0.4, 1.7, -0.9, 0.1, 1.0];

[0145] Calculate the cosine similarity between the text content generation vector and the preset common problem generation vector in the database respectively; select the cosine similarity S with the largest value max :

[0146] Common questions about text content and presets 1: S1 = -0.17;

[0147] Common problem 2 of text content and preset: S2 = -0.06;

[0148] S max =-0.06, S max ≤a, using the pre-trained model BERT to generate reply text based on the analysis of text intent, content and sentiment: Our latest mobile phone features...;

[0149] Based on the speech features and their corresponding emotion classification samples, a binary classifier is constructed; for each emotion category, a binary linear SVM model is trained;

[0150] Target vector y happy : Use linear SVM to minimize the objective function and get w happy =(0.5, 1.0, -0.6) and b happy =-2.5;

[0151] Target vector y sad : Use linear SVM to minimize the objective function and get w sad =(-0.4, 0.8, -0.5) and b sad =1.0;

[0152] For speech features, x new =(215, 0.82, 4.9), calculate the decision function value of each emotion category:

[0153]

[0154]

[0155] Select the class with the largest decision function value:

[0156] According to the trained linear SVM model, the speech features are predicted as the “happy” emotion category;

[0157] Output text according to the output template corresponding to the "happy" emotion category: I am happy to serve you. We have already dealt with the question about the functions of the latest mobile phone you mentioned. The functions of our latest mobile phone are... If there is anything else you need help with, please feel free to contact us!

[0158] For voice input, the Transformer TTS model is used to convert text to voice output.

[0159] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0160] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A virtual wiring management system based on a large language model, characterized in that: The system includes an input module, a selection module, a speech analysis module, a text analysis module and an output module; The input module is used for users to input text content and voice content, and convert the voice content into text; the selection module is used to perform preliminary matching based on the text of the input module to select a corresponding processing policy; The speech analysis module is used to analyze the user's emotional state according to the speech content input by the user; the text analysis module is used to understand the text content and analyze the user's intention and emotion according to the text content; the output module is used to generate text to reply to the user after understanding the user's input in combination with the user's intention and emotion; The output end of the input module is connected to the input end of the selection module and the speech analysis module; the output end of the selection module is connected to the input end of the text analysis module and the output module; the output end of the speech analysis module is connected to the input end of the output module; the output end of the text analysis module is connected to the input end of the output module.

2. A virtual wiring management system based on a large language model according to claim 1, characterized in that: The input module includes a text interface unit, a voice interface unit and a text conversion unit; The text interface unit is used to receive text content input by a user; the voice interface unit is used to receive voice content input by a user; the text conversion unit is used to convert the voice content input by a user into text; The output end of the text interface unit is connected to the input end of the selection module; the output end of the voice interface unit is connected to the input ends of the text conversion unit and the voice analysis module; the output end of the text conversion unit is connected to the input end of the selection module.

3. The virtual wiring management system based on a large language model according to claim 1, characterized in that: The selection module includes a policy selection unit, a question-answer matching unit, an information request unit, an information verification unit, and a conversion manual unit; The policy selection unit is used to select an appropriate processing policy for the text by matching keywords; the question-answer matching unit is used to match the text with the preset question; the information request unit is used to make further information requests to the user; the information verification unit is used to verify the correctness of the information obtained by the information request unit; the conversion manual unit is used to convert the interaction to manual; The output end of the policy selection unit is connected to the input ends of the question and answer matching unit, the information request unit and the conversion manual unit; the output end of the question and answer request unit is connected to the input ends of the text analysis module and the output module; the output end of the information request unit is connected to the input end of the information verification unit; the output end of the information verification unit is connected to the input ends of the information request unit and the question and answer matching unit.

4. The virtual wiring management system based on a large language model according to claim 1, characterized in that: The speech analysis module includes a feature collection unit, a pre-training model unit and a classification prediction unit; The feature collection unit is used to collect speech features of speech input; the pre-training model unit is used to train an emotion classification model according to the speech features and their corresponding emotion states; the classification prediction unit is used to train the features according to the pre-training model to obtain corresponding emotion classification; The output end of the feature collection unit is connected to the input end of the pre-training model unit; the output end of the pre-training model unit is connected to the input end of the classification prediction unit; the output end of the classification prediction unit is connected to the input end of the output module.

5. The virtual wiring management system based on a large language model according to claim 1, characterized in that: The text analysis module includes an intention analysis unit, a text understanding unit and a sentiment analysis unit; The intention analysis unit is used to perform matching analysis based on the text content to obtain the user intention; the text understanding unit is used to understand the text content; the sentiment analysis unit is used to analyze the sentiment state contained in the text content; The output end of the intention classification unit is connected to the input end of the text understanding unit; the output end of the text understanding unit is connected to the input end of the sentiment analysis unit; The output end of the sentiment analysis unit is connected to the input end of the output module.

6. The virtual wiring management system based on a large language model according to claim 1, characterized in that: The output module includes a database unit, a text generation unit, a text output unit, a speech conversion unit and an output unit; The database unit is used to store and access pre-set policy keywords, responses to some commonly used questions, and text generation templates corresponding to different emotions; The text generation unit is used to generate a corresponding reply according to the user's input content and emotional state; the text output unit is used to output the reply generated by the text generation unit; the speech conversion unit is used to convert the text content into speech content when the input format is speech; the output unit is used to output the corresponding text and speech content according to the content format input by the user; The output end of the database unit is connected to the input end of the text generation unit; the output end of the text generation unit is connected to the input end of the text output unit; the output end of the text output unit is connected to the input ends of the speech conversion unit and the output unit; the output end of the speech conversion unit is connected to the input end of the output unit.

7. A virtual wiring management method based on a large language model, characterized in that: The method comprises the following steps: S1, receiving user input, collecting features of the voice content and converting it into text; S2. Matching keywords on the user's input to select a corresponding processing policy; S3. Set a matching threshold to match the text to questions and answers. When the matching degree is higher than the threshold, respond to the user based on the questions and their corresponding answers preset in the database. S4. When the matching degree is not higher than the threshold, the user intention, text content and emotion are analyzed, and a reply text is generated according to the analysis results; S5, modifying the text generated in step S4 according to the predicted speech content emotion classification and the text template corresponding to the emotion classification in the database; S6. Output the text obtained in step S5 according to the input format.

8. The method for managing virtual wiring based on a large language model according to claim 7, characterized in that: In step S1, the Transformer ASR model is used to convert the speech content into text content; In step S2, a processing policy is selected according to the matching user input keyword, and the specific method is as follows: There are three types of processing policies: transfer to manual, request for more information, and question-answer matching; Switch to manual policy Preset keywords [keyword1, keyword2, ..., keyword n ]; Request more information policy preset keywords [Keyword1,Keyword2…,Keyword m ]; Use Jieba word segmentation tool to segment text content, and use the pre-trained Word2Vec word vector model to map text segmentation and policy keywords to word vector space; For each segmentation word vector, calculate its cosine similarity with each keyword vector; Among them, m and n are both positive integers, indicating the number of keywords; When there is a word segmentation vector and [keyword1, keyword2,…, keyword n ]When the cosine similarity of any keyword vector in is 1, the processing policy is selected as switching to manual; When there is a word segmentation vector and [keyword1,Keyword2...,Keyword m ]When the cosine similarity of any keyword vector in is 1, the processing policy is to request more information; When the above two situations exist at the same time, the processing policy is to switch to manual; when the above two situations do not exist at the same time, the processing policy is to match the question answer; Information verification is used to verify the information obtained by making further information requests to users when the text content involves user privacy information. The verification method is: Use the hash algorithm on the user's original private information to obtain a hash value of fixed length; use the same hash algorithm on the private information input by the user to obtain a hash value of the same length; perform an XOR operation on the hash value of the user's original private information and the hash value generated by the private information input by the user. If the result is 0, the verification is passed, otherwise the verification fails; After verification, the text is matched with questions and answers; when verification fails, the user is informed and the information is requested again.

9. The method for managing virtual wiring based on a large language model according to claim 8, characterized in that: In step S3, the matching threshold is set to a; the question-answer matching method is: Use the SBERT model to convert the preset common question texts in the database into vectors of fixed dimensions; use the same SBERT model to generate vectors of the same dimension for the text content; Calculate the cosine similarity between the text content generation vector and the preset common problem generation vector in the database respectively; select the cosine similarity S with the largest value max ; When S max >a, select S max Respond to users with vector-based preset questions and answers; In step S4, when S max When ≤a, the pre-trained model BERT is used to generate reply text based on the analysis of text intent, content, and sentiment.

10. The method for managing virtual wiring based on a large language model according to claim 9, characterized in that: In step S5, a linear SVM is used to predict the speech content emotion classification, and the specific method is as follows: Collect speech data containing different emotional states; Extract volume features and their corresponding emotional states from speech signals: Collect N samples, each of which consists of a d-dimensional feature vector x i and a sentiment label y i Composition; among them, y i ∈{1,2,…,K}, i∈{1,2,…,N}, K is the total number of emotion categories, N is the number of samples, and d is the number of features; For each emotion category, a binary linear SVM model is trained to label the category as positive and all other categories as negative. For sentiment category k, construct the target vector y k : When the sample x i Belongs to the kth type of emotion, then y ik =+1; When the sample x i does not belong to the kth emotion, then y ik = -1; Get K binary classifiers; for each binary classifier, minimize the objective function: Get the weight vector w of the linear SVM k , bias term b k ; Among them, C is the regularization parameter; For the new speech feature x new , for each sentiment category k, use the corresponding linear SVM model (w k ,b k ) Calculate the decision function: Predict x new The sentiment category of is the category with the largest decision function value: Modify the reply content generated in step S5 and output the text according to the emotion obtained by classification and the text output template preset corresponding to the emotion; In step S6, for the input in speech format, the Transformer TTS model is used to convert the content obtained in step S5 into text-to-speech output.

Citation Information

Cited By

  • Event processing method and system based on large language model

    CN121260185A