Dialogue anomaly detection method and device, computer equipment and storage medium
By building Prompt in the smart cockpit scenario and using deep learning technology for dialogue anomaly detection, the problem of low automated detection efficiency in human-computer interaction in smart cockpits is solved, dialogue system performance evaluation and improvement is achieved, and detection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202410478137.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-19
- Publication Date
- 2024-08-23
AI Technical Summary
Existing technologies are not efficient in automated detection of human-machine dialogue in smart cockpit scenarios, especially in terms of massive dialogue log data processing and multi-round data annotation, which require a large amount of manual intervention and are difficult to cope with rapid response and real-time detection requirements.
By obtaining the dialogue logs in the vehicle-machine system, constructing prompts and inputting the trained dialogue detection model, deep learning technology is used to accelerate dialogue data mining, achieve dialogue anomaly detection, and improve the efficiency of automated detection.
It improves the human-computer interaction experience in the smart cockpit, enables performance evaluation and improvement of the current car-machine dialogue system, reduces the need for manual annotation of data, and improves the automation efficiency and accuracy of dialogue detection.
Smart Images

Figure CN118538243A
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer device, storage medium and computer program product for detecting anomalies in conversations. Background Art
[0002] As the user's usage scenarios in the smart cockpit scenario become richer, the cockpit itself has a good audio and sensor system, and voice interaction has expanded the cockpit's usage scenarios. With the maturity and implementation of multi-zone interaction, a large amount of human-computer dialogue data has enriched the optimization of voice models and greatly improved the convenience of human-computer interaction. Traditional dialogue systems use rule templates to match user intentions and responses, but this method requires a large number of matching templates to identify user intentions, and incremental intentions require the matching templates to be updated again. It is an unbounded way to expand, and more and more dialogue detection methods require a lot of manpower to comb the rules. At present, most smart cars rely on deep learning-based methods to identify user intentions. The data training method uses a small amount of manual annotation to achieve efficient intent recognition. The addition of large model technology has given deep learning-based intent recognition a better space to play.
[0003] How to better detect the effectiveness of human-computer dialogue, including the recognition of intent and the optimization of responses, is the biggest problem currently encountered. Traditional manpower-based screening and detection are increasingly unable to cope with massive amounts of dialogue log data. Deep learning-based dialogue detection services require a large amount of manual work to label multiple rounds of data. When there is less labeled multi-round data, how to perform automated detection of human-computer dialogue is a problem that needs to be solved.
[0004] With the increasing cloud computing power and model compression and quantization technology, cloud computing power can also well support the relevant large-scale detection model training and application deployment. The method of log automatic detection based on large models by manually annotating a small number of multi-round dialogue samples is currently a good implementation method. The model calculates the multi-round logs of users in real time in the cloud, and counts problems by outputting dashboards, which facilitates real-time detection of the performance of the current model and rapid response to problematic dialogues. The ability to mine problems in voice dialogues is an important indicator of the technological advancement of the display cockpit, which can greatly improve the user experience of the smart cockpit.
[0005] Currently, the efficiency of automated detection of human-computer dialogue is not high. Summary of the invention
[0006] Based on this, it is necessary to provide a dialogue anomaly detection method, device, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency of automated detection of human-computer dialogue in response to the above technical problems.
[0007] In a first aspect, the present application provides a method for detecting anomalies in a conversation, comprising:
[0008] Obtain the conversation log in the vehicle system; the conversation log includes the cockpit voice conversation data;
[0009] Build prompts based on conversation logs;
[0010] Input Prompt into the trained dialogue detection model to obtain the dialogue detection results output by the trained dialogue detection model; the dialogue detection results include abnormal dialogues, abnormal labels, and optimized sentences corresponding to the abnormal dialogues.
[0011] In one embodiment, obtaining a conversation log in a vehicle system includes:
[0012] Get the authorization information of the current user;
[0013] When the authorization information meets the authorization requirements, the corresponding conversation log in the vehicle system is obtained according to the user information of the current user.
[0014] In one embodiment, constructing a prompt according to a dialog log includes:
[0015] Performing intent recognition on the conversation log to obtain at least one conversation intent included in the conversation log;
[0016] For each dialogue intent, obtain a corresponding set of dialogue sentences in the dialogue log;
[0017] Construct the Prompt structure according to each set of dialogue sentences to obtain Prompt.
[0018] In one embodiment, the method of obtaining the trained dialogue detection model includes:
[0019] Obtain a training set; the training set includes multiple sample prompts, each sample prompt includes a sample abnormal dialogue, a sample abnormal label, and a sample optimization statement; the sample abnormal label is used to characterize the error type of the sample abnormal dialogue;
[0020] Based on the training set, transfer learning is used to train the large model base to obtain a trained dialogue detection model.
[0021] In one embodiment, obtaining a training set includes:
[0022] Get sample conversation data;
[0023] Perform intent recognition on the sample conversation data to obtain the standard conversation intent of the sample conversation data;
[0024] Compare the standard conversation intention with the sample conversation intention recognized by the vehicle computer system in the sample conversation data to determine whether there is any abnormality in the sample conversation intention;
[0025] When the sample conversation intention is abnormal, the sample conversation data is used as a sample abnormal conversation, and the corresponding sample abnormal label and sample optimization statement are added to the sample abnormal conversation;
[0026] Obtain training sample data based on sample abnormal dialogues, corresponding sample abnormal labels, and sample optimization statements;
[0027] Construct the Prompt structure according to the training sample data to obtain the sample Prompt;
[0028] Obtain a training set based on multiple sample prompts.
[0029] In one embodiment, obtaining sample conversation data includes:
[0030] According to the sample conversation log, obtain the original conversation data;
[0031] The original conversation data is desensitized to obtain sample conversation data; the desensitization process is used to remove user privacy data in the original conversation data, and the user privacy data includes user name, ID number, telephone number and user address.
[0032] In a second aspect, the present application also provides a conversation anomaly detection device, comprising:
[0033] An acquisition module is used to acquire the conversation log in the vehicle system; the conversation log includes the cockpit voice conversation data;
[0034] Construction module, used to build prompts based on conversation logs;
[0035] The detection module is used to input Prompt into the trained dialogue detection model to obtain the dialogue detection results output by the trained dialogue detection model; the dialogue detection results include abnormal dialogues, abnormal labels and optimized sentences corresponding to the abnormal dialogues.
[0036] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0037] Obtain the conversation log in the vehicle system; the conversation log includes the cockpit voice conversation data;
[0038] Build prompts based on conversation logs;
[0039] Input Prompt into the trained dialogue detection model to obtain the dialogue detection results output by the trained dialogue detection model; the dialogue detection results include abnormal dialogues, abnormal labels, and optimized sentences corresponding to the abnormal dialogues.
[0040] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0041] Obtain the conversation log in the vehicle system; the conversation log includes the cockpit voice conversation data;
[0042] Build prompts based on conversation logs;
[0043] Input Prompt into the trained dialogue detection model to obtain the dialogue detection results output by the trained dialogue detection model; the dialogue detection results include abnormal dialogues, abnormal labels, and optimized sentences corresponding to the abnormal dialogues.
[0044] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0045] Obtain the conversation log in the vehicle system; the conversation log includes the cockpit voice conversation data;
[0046] Build prompts based on conversation logs;
[0047] Input Prompt into the trained dialogue detection model to obtain the dialogue detection results output by the trained dialogue detection model; the dialogue detection results include abnormal dialogues, abnormal labels, and optimized sentences corresponding to the abnormal dialogues.
[0048] The above-mentioned conversation anomaly detection method, device, computer equipment, storage medium and computer program product obtain the conversation log in the vehicle system; the conversation log includes the cockpit voice conversation data; construct the prompt according to the conversation log; input the prompt into the trained conversation detection model to obtain the conversation detection result output by the trained conversation detection model; the conversation detection result includes abnormal conversation, abnormal label and optimized sentence corresponding to the abnormal conversation. By integrating deep learning technology to accelerate the implementation of conversation data mining, enhance the experience of human-computer interaction in the intelligent cockpit scenario, improve the efficiency of automatic detection of human-computer conversation, realize the automatic performance evaluation of the current vehicle-computer conversation system, and the subsequent specific improvement content, so as to improve the experience of human-computer interaction in the cockpit. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 A diagram showing an application environment of a method for detecting anomalies in a conversation in an embodiment;
[0051] Figure 2 1 is a flow chart of a method for detecting anomalies in a conversation in one embodiment;
[0052] Figure 3 is a workflow diagram of conversation anomaly detection in one embodiment;
[0053] Figure 4 is a structural block diagram of a conversation anomaly detection device in one embodiment;
[0054] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] The conversation anomaly detection method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0057] In an exemplary embodiment, Figure 2 As shown, a method for detecting anomalies in a conversation is provided. Figure 1 The terminal 102 in the example is used as an example to illustrate, including the following steps 202 to 206. Among them:
[0058] Step 202, obtaining a conversation log in the vehicle system; the conversation log includes cockpit voice conversation data.
[0059] Optionally, the terminal obtains the user's authorized cockpit voice conversation log data, including but not limited to the user's voice interaction data for vehicle control, multimedia, navigation, etc.
[0060] Step 204: construct a Prompt according to the conversation log.
[0061] Optionally, the terminal constructs a detection Prompt structure for the user's latest conversation log data. This structure is basically consistent with the structure used in conversation detection model training.
[0062] Step 206, inputting Prompt into the trained dialogue detection model to obtain the dialogue detection result output by the trained dialogue detection model; the dialogue detection result includes abnormal dialogue, abnormal label and optimized sentence corresponding to the abnormal dialogue.
[0063] Optionally, the terminal inputs Prompt into the trained dialogue detection model, because the dialogue detection model has learned the data rules in this structure and can output new human-computer dialogue data in a fixed manner. The dialogue detection model identifies the problematic dialogue interaction data in Prompt, adds abnormal labels, generates corresponding optimization statements, and outputs the dialogue detection results. For example: {Please check the following content: User: Turn off comfort heating, Car computer identification result: Rejection result, Car computer determines user intention: freechat, please output in the Json format of {'label': '...', 'Question optimization': '...'}, if there is no problem with the input, just output a null value.} format, so that the constructed user interaction detection Prompt can be input into the large model in step 4 for label and question optimization output, and the large model will output the result of {'label': 'Car control should not be rejected', 'Question optimization': 'Turn off seat heating'}.
[0064] The terminal can pre-build a large model for dialogue detection, mainly by leveraging the idea of transfer learning (SFT supervised pre-training), using domain data to inject domain knowledge of dialogue detection into the open source large model, so that the open source large model can have the ability to detect human-computer interaction dialogues, and finally pre-process the user's real-time interaction data, and construct the processed single-discussion dialogue into a prompt to output the dialogue detection results, forming a dashboard of the detection results.
[0065] In the above-mentioned conversation anomaly detection method, the conversation log in the vehicle system is obtained; the conversation log includes the cockpit voice conversation data; the prompt is constructed according to the conversation log; the prompt is input into the trained conversation detection model to obtain the conversation detection result output by the trained conversation detection model; the conversation detection result includes abnormal conversations, abnormal labels and optimized sentences corresponding to abnormal conversations. By integrating deep learning technology to accelerate the implementation of conversation data mining, enhance the experience of human-computer interaction in the smart cockpit scenario, improve the efficiency of automated detection of human-computer conversations, realize the automated performance evaluation of the current vehicle-computer conversation system, and the subsequent specific improvements to enhance the experience of human-computer interaction in the cockpit.
[0066] In one embodiment, obtaining the conversation log in the vehicle system includes: obtaining authorization information of the current user; and obtaining the corresponding conversation log in the vehicle system according to the user information of the current user when the authorization information meets the authorization requirements.
[0067] Optionally, before obtaining the conversation log, the terminal needs to obtain log reading permission first. It can obtain authorization information based on the currently logged-in user information, or use a verification code to perform authorization verification, or use the user to upload ID card information to perform authorization verification. Only when the authorization information is obtained can the conversation log that matches the user in the authorization information be obtained.
[0068] In this embodiment, after obtaining the authorization information of the current user, and when the authorization information meets the authorization requirements, the conversation log of the current user in the vehicle system is obtained, which can improve data security and protect user information privacy.
[0069] In one embodiment, constructing a Prompt based on a conversation log includes: performing intent recognition on the conversation log to obtain at least one conversation intent included in the conversation log; for each conversation intent, obtaining a corresponding set of conversation sentences in the conversation log; and constructing a Prompt structure based on each set of conversation sentences to obtain a Prompt.
[0070] Alternatively, if Figure 3 As shown in the figure, by batch building the detection prompt structure for the user's latest conversation log, the user's conversation content is split into: | User: Sunroof opened to 20%, vehicle computer recognition result: Not rejected, vehicle computer reply: The network condition is not good, try again later. To understand the content, please output it in the Json format of {'label': '...', 'question optimization': '...'}. | format, so that the constructed user interaction detection prompt can be input into the large model in step 4 for label and question optimization output, and the result is: {'label': 'network problem', 'question optimization': 'Sunroof adjusted to 20%'}.
[0071] In this embodiment, multiple rounds of prompts are constructed based on the conversation log, and the conversation log data can be converted into a Prompt structure, which is convenient for subsequent detection and processing of the data using a conversation detection model.
[0072] In one embodiment, a method for obtaining a trained dialog detection model includes:
[0073] According to the sample conversation log, the original conversation data is obtained; the original conversation data is desensitized to obtain the sample conversation data; the desensitization is used to remove the user privacy data in the original conversation data, and the user privacy data includes the user name, ID number, telephone number and user address.
[0074] Perform intent recognition on the sample conversation data to obtain the standard conversation intent of the sample conversation data; compare the standard conversation intent with the sample conversation intent recognized by the vehicle system in the sample conversation data to determine whether the sample conversation intent is abnormal; if the sample conversation intent is abnormal, use the sample conversation data as a sample abnormal conversation, and add the corresponding sample abnormal label and sample optimization statement to the sample abnormal conversation; obtain training sample data based on the sample abnormal conversation, the corresponding sample abnormal label and the sample optimization statement; construct the Prompt structure based on the training sample data to obtain the sample Prompt; obtain the training set based on multiple sample Prompts. The training set includes multiple sample Prompts, each sample Prompt includes a sample abnormal conversation, a sample abnormal label and a sample optimization statement; the sample abnormal label is used to characterize the error type of the sample abnormal conversation;
[0075] Based on the training set, transfer learning is used to train the large model base to obtain a trained dialogue detection model.
[0076] Optionally, the authorized conversation detection data is desensitized to remove user privacy data. User privacy data includes but is not limited to name, ID number, phone number, and other data that can locate the user. The purpose is to prevent the large model from learning data with private information and to learn general data as much as possible.
[0077] In order to enable the large model to detect problems in the conversation, it is necessary to build manual tags and corresponding interpretations based on the interaction data. Figure 3As shown, the organized user conversation data is labeled and annotated. Each user conversation in multiple rounds of conversations needs to be detected and annotated separately. The data required to build the training prompt includes the user's conversation input, the response result of the vehicle computer, the intention recognition of the vehicle computer, etc. Abnormal labels can include but are not limited to: text recognition error, should not be rejected, should be rejected, command understanding error, network problem, no problem, etc. Optimized sentences can include but are not limited to: it should be to open the window, not to turn on the music and other explanatory descriptions, so as to increase the understanding of data judgment. For example, in a conversation with multiple interactions, the vehicle computer will judge the intention every time, so we will annotate the data every time. The specific labels include: text recognition error, should not be rejected, should be rejected, command understanding error, network problem, no problem, etc., as well as the interpretation of the manual annotation of this conversation, such as: it should be to open the window, not to turn on the music and other explanatory descriptions, so as to increase the understanding of data judgment;
[0078] Build a large model for dialogue detection, and use fine-tuning to manually annotate a small number of multi-round dialogue labels and interpretations in step 2; use the strategy of transfer learning (SFT, short for supervised fine-tuning) to transfer and learn the knowledge of human-computer dialogue from the open source large model base (this base includes but is not limited to Llama, Baichuan, ChatGLM, etc.), learn the specific relationship between human-computer dialogue and annotation, and the reasons for annotation. For example, we built the training data for migration, such as: {“You are a car-machine dialogue detection master. You can detect the inappropriate places where the car-machine responds to the user and output the detection results. Please check the following content: User: Play Angel Children’s Choir, The car computer's identification result: rejection result, the car computer's reply: I didn't understand what you meant, I will keep improving. Please test the above content. ": "Label: Media should not be rejected, question optimization: Play Angel Children's Choir"}, by building the relevant dialogue data Prompt structure, the big model has the ability to understand and annotate dialogues, so that the fine-tuned big model can detect user interactive dialogues and give specific explanations according to the labels, and can give reasoning results similar to our annotations.
[0079] In this embodiment, deep learning technology is integrated to accelerate the implementation of dialogue data mining, enhance the human-computer interaction experience in the smart cockpit scenario, and realize automated performance evaluation of the current vehicle-computer dialogue system, as well as subsequent specific improvements to enhance the human-computer interaction experience in the cockpit. The automated human-computer dialogue detection method based on large model technology can use less manually annotated data, thus realizing the evaluation of human-computer dialogue and dashboard output.
[0080] In an exemplary embodiment, a method for training a conversation detection model includes:
[0081] According to the sample conversation log, the original conversation data is obtained; the original conversation data is desensitized to obtain the sample conversation data; the desensitization is used to remove the user privacy data in the original conversation data, and the user privacy data includes the user name, ID number, telephone number and user address.
[0082] Perform intent recognition on the sample conversation data to obtain the standard conversation intent of the sample conversation data; compare the standard conversation intent with the sample conversation intent recognized by the vehicle system in the sample conversation data to determine whether the sample conversation intent is abnormal; if the sample conversation intent is abnormal, use the sample conversation data as a sample abnormal conversation, and add the corresponding sample abnormal label and sample optimization statement to the sample abnormal conversation; obtain training sample data based on the sample abnormal conversation, the corresponding sample abnormal label and the sample optimization statement; construct the Prompt structure based on the training sample data to obtain the sample Prompt; obtain the training set based on multiple sample Prompts. The training set includes multiple sample Prompts, each sample Prompt includes a sample abnormal conversation, a sample abnormal label and a sample optimization statement; the sample abnormal label is used to characterize the error type of the sample abnormal conversation;
[0083] Based on the training set, transfer learning is used to train the large model base to obtain a trained dialogue detection model.
[0084] In an exemplary embodiment, a method for detecting anomalies in a conversation includes:
[0085] Obtain the authorization information of the current user; if the authorization information meets the authorization requirements, obtain the corresponding conversation log in the vehicle system according to the user information of the current user. The conversation log includes the cockpit voice conversation data.
[0086] Perform intent recognition on the conversation log to obtain at least one conversation intent included in the conversation log; for each conversation intent, obtain a corresponding set of conversation sentences in the conversation log; construct a Prompt structure according to each set of conversation sentences to obtain a Prompt.
[0087] Input Prompt into the trained dialogue detection model to obtain the dialogue detection results output by the trained dialogue detection model; the dialogue detection results include abnormal dialogues, abnormal labels, and optimized sentences corresponding to the abnormal dialogues.
[0088] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0089] Based on the same inventive concept, the embodiment of the present application also provides a conversation anomaly detection device for implementing the conversation anomaly detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more conversation anomaly detection device embodiments provided below can refer to the limitations of the conversation anomaly detection method above, and will not be repeated here.
[0090] In an exemplary embodiment, Figure 4 As shown, a conversation anomaly detection device 400 is provided, comprising: an acquisition module 401, a construction module 402 and a detection module 403, wherein:
[0091] The acquisition module 401 is used to acquire the conversation log in the vehicle system; the conversation log includes the cockpit voice conversation data.
[0092] The construction module 402 is used to construct a Prompt according to the conversation log.
[0093] The detection module 403 is used to input Prompt into the trained dialogue detection model to obtain the dialogue detection result output by the trained dialogue detection model; the dialogue detection result includes abnormal dialogue, abnormal label and optimized sentence corresponding to the abnormal dialogue.
[0094] In one embodiment, the acquisition module 401 is also used to acquire the authorization information of the current user; when the authorization information meets the authorization requirements, the corresponding conversation log in the vehicle system is acquired according to the user information of the current user.
[0095] In one embodiment, construction module 402 is also used to perform intent recognition on the conversation log to obtain at least one conversation intent included in the conversation log; for each conversation intent, obtain a corresponding set of conversation statements in the conversation log; and construct a Prompt structure according to each set of conversation statements to obtain a Prompt.
[0096] In one embodiment, the apparatus further comprises:
[0097] The training module 404 is used to obtain a training set; the training set includes multiple sample prompts, each sample prompt includes a sample abnormal dialogue, a sample abnormal label and a sample optimization statement; the sample abnormal label is used to characterize the error type of the sample abnormal dialogue; according to the training set, the large model base is trained using transfer learning to obtain a trained dialogue detection model.
[0098] In one embodiment, the training module 404 is also used to obtain sample conversation data; perform intent recognition on the sample conversation data to obtain a standard conversation intent for the sample conversation data; compare the standard conversation intent with the sample conversation intent recognized by the vehicle system in the sample conversation data to determine whether there is an abnormality in the sample conversation intent; if there is an abnormality in the sample conversation intent, use the sample conversation data as a sample abnormal conversation, and add a corresponding sample abnormal label and a sample optimization statement to the sample abnormal conversation; obtain training sample data based on the sample abnormal conversation, the corresponding sample abnormal label and the sample optimization statement; construct a Prompt structure based on the training sample data to obtain a sample Prompt; and obtain a training set based on multiple sample Prompts.
[0099] In one embodiment, the training module 404 is also used to obtain original conversation data based on the sample conversation log; desensitize the original conversation data to obtain sample conversation data; the desensitization process is used to remove user privacy data in the original conversation data, and the user privacy data includes user name, ID number, telephone number and user address.
[0100] Each module in the above-mentioned conversation anomaly detection device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0101] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile 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 the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store conversation log data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a conversation anomaly detection method is implemented.
[0102] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0103] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining a conversation log in a vehicle system; the conversation log includes cockpit voice conversation data; constructing a Prompt according to the conversation log; inputting the Prompt into a trained conversation detection model to obtain a conversation detection result output by the trained conversation detection model; the conversation detection result includes abnormal conversations, abnormal labels, and optimized statements corresponding to the abnormal conversations.
[0104] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining authorization information of the current user; and obtaining the corresponding conversation log in the vehicle system according to the user information of the current user when the authorization information meets the authorization requirements.
[0105] In one embodiment, when the processor executes the computer program, the following steps are also implemented: performing intent recognition on the conversation log to obtain at least one conversation intent included in the conversation log; for each conversation intent, obtaining a corresponding set of conversation statements in the conversation log; and constructing a Prompt structure according to each set of conversation statements to obtain a Prompt.
[0106] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining a training set; the training set includes multiple sample prompts, each sample prompt includes a sample abnormal dialogue, a sample abnormal label and a sample optimization statement; the sample abnormal label is used to characterize the error type of the sample abnormal dialogue; according to the training set, the large model base is trained using transfer learning to obtain a trained dialogue detection model.
[0107] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining sample conversation data; performing intent recognition on the sample conversation data to obtain a standard conversation intent for the sample conversation data; comparing the standard conversation intent with the sample conversation intent recognized by the vehicle system in the sample conversation data to determine whether there is an abnormality in the sample conversation intent; in the case that there is an abnormality in the sample conversation intent, using the sample conversation data as a sample abnormal conversation, and adding a corresponding sample abnormal label and a sample optimization statement to the sample abnormal conversation; obtaining training sample data based on the sample abnormal conversation, the corresponding sample abnormal label and the sample optimization statement; constructing a Prompt structure based on the training sample data to obtain a sample Prompt; and obtaining a training set based on multiple sample Prompts.
[0108] In one embodiment, when the processor executes the computer program, it also implements the following steps: obtaining original conversation data based on the sample conversation log; desensitizing the original conversation data to obtain sample conversation data; the desensitizing process is used to remove user privacy data in the original conversation data, and the user privacy data includes user name, ID number, telephone number and user address.
[0109] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining a conversation log in a vehicle system; the conversation log includes cockpit voice conversation data; constructing a Prompt according to the conversation log; inputting the Prompt into a trained conversation detection model to obtain a conversation detection result output by the trained conversation detection model; the conversation detection result includes abnormal conversations, abnormal labels, and optimized statements corresponding to the abnormal conversations.
[0110] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining authorization information of the current user; and obtaining the corresponding conversation log in the vehicle system according to the user information of the current user when the authorization information meets the authorization requirements.
[0111] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: performing intent recognition on the conversation log to obtain at least one conversation intent included in the conversation log; for each conversation intent, obtaining a corresponding set of conversation statements in the conversation log; and constructing a Prompt structure according to each set of conversation statements to obtain a Prompt.
[0112] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a training set; the training set includes multiple sample prompts, each sample prompt includes a sample abnormal dialogue, a sample abnormal label and a sample optimization statement; the sample abnormal label is used to characterize the error type of the sample abnormal dialogue; according to the training set, the large model base is trained using transfer learning to obtain a trained dialogue detection model.
[0113] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining sample conversation data; performing intent recognition on the sample conversation data to obtain a standard conversation intent for the sample conversation data; comparing the standard conversation intent with the sample conversation intent recognized by the vehicle system in the sample conversation data to determine whether there is an abnormality in the sample conversation intent; in the case that there is an abnormality in the sample conversation intent, using the sample conversation data as a sample abnormal conversation, and adding a corresponding sample abnormal label and a sample optimization statement to the sample abnormal conversation; obtaining training sample data based on the sample abnormal conversation, the corresponding sample abnormal label and the sample optimization statement; constructing a Prompt structure based on the training sample data to obtain a sample Prompt; and obtaining a training set based on multiple sample Prompts.
[0114] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the sample conversation log, original conversation data is obtained; the original conversation data is desensitized to obtain sample conversation data; the desensitization process is used to remove user privacy data in the original conversation data, and the user privacy data includes user name, ID number, telephone number and user address.
[0115] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the following steps: obtaining a conversation log in a vehicle system; the conversation log includes cockpit voice conversation data; constructing a Prompt according to the conversation log; inputting the Prompt into a trained conversation detection model to obtain a conversation detection result output by the trained conversation detection model; the conversation detection result includes abnormal conversations, abnormal labels, and optimized statements corresponding to the abnormal conversations.
[0116] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining authorization information of the current user; and obtaining the corresponding conversation log in the vehicle system according to the user information of the current user when the authorization information meets the authorization requirements.
[0117] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: performing intent recognition on the conversation log to obtain at least one conversation intent included in the conversation log; for each conversation intent, obtaining a corresponding set of conversation statements in the conversation log; and constructing a Prompt structure according to each set of conversation statements to obtain a Prompt.
[0118] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a training set; the training set includes multiple sample prompts, each sample prompt includes a sample abnormal dialogue, a sample abnormal label and a sample optimization statement; the sample abnormal label is used to characterize the error type of the sample abnormal dialogue; according to the training set, the large model base is trained using transfer learning to obtain a trained dialogue detection model.
[0119] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining sample conversation data; performing intent recognition on the sample conversation data to obtain a standard conversation intent for the sample conversation data; comparing the standard conversation intent with the sample conversation intent recognized by the vehicle system in the sample conversation data to determine whether there is an abnormality in the sample conversation intent; in the case that there is an abnormality in the sample conversation intent, using the sample conversation data as a sample abnormal conversation, and adding a corresponding sample abnormal label and a sample optimization statement to the sample abnormal conversation; obtaining training sample data based on the sample abnormal conversation, the corresponding sample abnormal label and the sample optimization statement; constructing a Prompt structure based on the training sample data to obtain a sample Prompt; and obtaining a training set based on multiple sample Prompts.
[0120] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the sample conversation log, original conversation data is obtained; the original conversation data is desensitized to obtain sample conversation data; the desensitization process is used to remove user privacy data in the original conversation data, and the user privacy data includes user name, ID number, telephone number and user address.
[0121] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0122] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0123] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0124] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for detecting anomalies in conversation, characterized in that: The method comprises: Acquire a conversation log in the vehicle system; the conversation log includes cockpit voice conversation data; Construct a prompt based on the conversation log; The Prompt is input into a trained dialogue detection model to obtain a dialogue detection result output by the trained dialogue detection model; the dialogue detection result includes an abnormal dialogue, an abnormal label, and an optimized statement corresponding to the abnormal dialogue.
2. The method according to claim 1, characterized in that The obtaining of the conversation log in the vehicle system includes: Get the authorization information of the current user; When the authorization information meets the authorization requirement, the corresponding conversation log in the vehicle system is obtained according to the user information of the current user.
3. The method according to claim 1, characterized in that: The step of constructing a prompt according to the conversation log includes: Performing intent recognition on the conversation log to obtain at least one conversation intent included in the conversation log; For each dialogue intention, obtaining a corresponding set of dialogue sentences in the dialogue log; A Prompt structure is constructed according to each set of dialogue sentences to obtain the Prompt.
4. The method according to claim 1, characterized in that: The method for obtaining the trained dialogue detection model includes: Obtain a training set; the training set includes multiple sample prompts, each sample prompt includes a sample abnormal dialogue, a sample abnormal label and a sample optimization statement; the sample abnormal label is used to characterize the error type of the sample abnormal dialogue; According to the training set, transfer learning is used to train the large model base to obtain the trained dialogue detection model.
5. The method according to claim 4, characterized in that The obtaining of the training set comprises: Get sample conversation data; Performing intent recognition on the sample conversation data to obtain a standard conversation intent of the sample conversation data; Comparing the standard conversation intention with the sample conversation intention recognized by the vehicle computer system in the sample conversation data to determine whether the sample conversation intention is abnormal; In the case where the sample conversation intention is abnormal, the sample conversation data is used as a sample abnormal conversation, and a corresponding sample abnormal label and a sample optimization statement are added to the sample abnormal conversation; Acquire training sample data according to the sample abnormal dialogue, the corresponding sample abnormal label and the sample optimization statement; Construct a Prompt structure according to the training sample data to obtain a sample Prompt; The training set is obtained according to a plurality of sample prompts.
6. The method according to claim 5, characterized in that The obtaining of sample conversation data includes: According to the sample conversation log, obtain the original conversation data; The original conversation data is desensitized to obtain the sample conversation data; the desensitization is used to remove user privacy data in the original conversation data, and the user privacy data includes user name, ID number, telephone number and user address.
7. A conversation anomaly detection device, characterized in that: The device comprises: An acquisition module, used to acquire a conversation log in the vehicle system; the conversation log includes cockpit voice conversation data; A construction module, used to construct a prompt according to the conversation log; The detection module is used to input the prompt into a trained dialogue detection model to obtain a dialogue detection result output by the trained dialogue detection model; the dialogue detection result includes an abnormal dialogue, an abnormal label, and an optimized statement corresponding to the abnormal dialogue.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
