Dialogue processing method and device based on large language model and electronic equipment
Through a large language model combining target dialogue data with reference dialogue data and identification rules, abnormal behaviors in dialogue data are identified, solving the accuracy and efficiency of abnormal behavior recognition, ensuring user safety and platform trust.
Patent Information
- Application Number
- CN202411320412.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-17
AI Technical Summary
With the increase in dialogue data, the number of abnormal behaviors (such as malicious speech, violations, false information, etc.) has increased, bringing security risks to users and platforms. How to identify these abnormal behaviors has become an urgent problem to be solved.
By obtaining the target dialogue data to be processed, determining the reference dialogue data matching it, and obtaining the recognition rules for identifying the abnormal behavior type, the abnormal behavior recognition results of the target dialogue data are determined based on the reference dialogue data and the recognition rules.
It improves the accuracy and efficiency of identifying abnormal behaviors in dialogue data, ensures the safety of users' personal property, promptly reminds users of abnormal behaviors, and reduces economic losses and trust damage.
Smart Images

Figure CN119150839A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to technical fields such as deep learning, large language models, and natural language processing, and in particular to a dialogue processing method, device, and electronic device based on a large language model. Background Art
[0002] With the rapid development of digital technology, conversation data has been widely used in many fields, including customer service, online communication, social media interaction, etc. However, with the increase of conversation data, abnormal behaviors have also increased, bringing many security risks to users and platforms. Abnormal behaviors (such as malicious speech, violations, false information, etc.) have also increased, bringing many security risks to users and platforms. Abnormal behavior may not only cause users' economic losses and personal information leakage, but also damage the platform's reputation and user trust. Therefore, how to identify abnormal behaviors in conversation data has become a problem that needs to be solved urgently. Summary of the invention
[0003] The present disclosure provides a conversation processing method, device and electronic device based on a large language model.
[0004] According to one aspect of the present disclosure, a conversation processing method based on a large language model is provided, the method comprising: obtaining target conversation data to be processed; determining reference conversation data matching the target conversation data; obtaining recognition rules for determining abnormal behavior types of the reference conversation data; and determining abnormal behavior recognition results of the target conversation data according to the reference conversation data and the recognition rules through a first large language model.
[0005] According to another aspect of the present disclosure, a conversation processing device based on a large language model is provided, the device comprising: a first acquisition module, used to acquire target conversation data to be processed; a first determination module, used to determine reference conversation data matching the target conversation data; a second acquisition module, used to acquire recognition rules for determining abnormal behavior types of the reference conversation data; and a second determination module, used to determine abnormal behavior recognition results of the target conversation data according to the reference conversation data and the recognition rules through the first large language model.
[0006] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the dialogue processing method based on the large language model proposed above in the present disclosure.
[0007] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the dialog processing method based on a large language model proposed above in the present disclosure.
[0008] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps of the dialog processing method based on a large language model proposed above in the present disclosure.
[0009] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0011] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;
[0012] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure;
[0013] Figure 3 is a schematic diagram according to a third embodiment of the present disclosure;
[0014] Figure 4 is a schematic diagram according to a fourth embodiment of the present disclosure;
[0015] Figure 5 is a schematic diagram according to a fifth embodiment of the present disclosure;
[0016] Figure 6 It is a schematic block diagram of an electronic device used to implement the conversation processing method based on a large language model according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0017] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0018] Figure 1This is a schematic diagram according to the first embodiment of the present disclosure. It should be noted that the conversation processing method based on a large language model in the embodiment of the present disclosure can be applied to a conversation processing device based on a large language model, which can be an electronic device, or can be configured in an electronic device so that the electronic device can perform a data processing function. In the following embodiments, the execution subject is an electronic device as an example for explanation.
[0019] Among them, the electronic device can be any device with computing capabilities, such as a personal computer (PC), a mobile terminal, a server, etc. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, a smart speaker, a server, a server cluster, and other hardware devices with various operating systems, touch screens and / or display screens.
[0020] like Figure 1 As shown, the dialogue processing method based on the large language model may include the following steps:
[0021] Step 101: Obtain target conversation data to be processed.
[0022] The target dialogue data is any dialogue data to be processed in the dialogue processing device.
[0023] For example, a conversation identification request from a terminal device may be received, and conversation data in the conversation identification request may be used as target conversation data to be processed.
[0024] For another example, when a terminal device is making a call, if the user authorizes the conversation recognition device to identify abnormal behavior in the conversation data involved in the current call, the conversation data involved in the current call can be used as target conversation data to be processed.
[0025] It should be noted that the above-mentioned conversation data is collected with the user's consent, complies with relevant laws and regulations, and does not violate public order and good customs.
[0026] Step 102: Determine reference conversation data that matches the target conversation data.
[0027] In one embodiment of the present application, a possible implementation method of step 102 is: determining the matching degree between each conversation data in a preset conversation database and the target conversation data, and selecting conversation data with a matching degree greater than a preset matching degree threshold from the conversation data database as reference conversation data for matching the target conversation data.
[0028] The preset matching degree threshold is preset according to actual needs.
[0029] In one embodiment of the present application, another possible implementation of step 102 is: determining the degree of match between each conversation data in a preset conversation database and the target conversation data, and selecting the conversation data with the highest degree of match from the preset conversation database as reference conversation data for matching the target conversation data.
[0030] Step 103: Obtain identification rules for determining abnormal behavior types of reference conversation data.
[0031] The identification rule refers to a rule used to identify the abnormal behavior type in the reference conversation data.
[0032] Among them, the abnormal behavior types in this embodiment may include but are not limited to fraudulent behavior (for example, credit card fraud, insurance fraud, telecommunications fraud), illegal behavior, false information (for example, false listings, etc.), etc. This embodiment does not specifically limit the abnormal behavior types.
[0033] Step 104 , determining the abnormal behavior recognition result of the target conversation data through the first language model according to the reference conversation data and the recognition rule.
[0034] In one embodiment of the present application, a possible implementation method for determining the abnormal behavior recognition result of the target conversation data through the first large language model according to the reference conversation data and the recognition rules is as follows: fill in the corresponding positions in the prompt word template according to the reference conversation data, the recognition rules and the target conversation data to obtain the prompt words, input the prompt words into the first large language model, and obtain the abnormal behavior recognition result of the target conversation data.
[0035] The prompt word is used to indicate that abnormal behavior is identified on the target conversation data using the reference conversation data and the identification rule as an example.
[0036] Among them, it can be understood that when the prompt word is input into the first largest language model, the first largest language model can use the reference conversation data in the prompt word and the recognition rule as an example, and through its own capabilities, perform abnormal behavior recognition on the target conversation data to accurately obtain the abnormal behavior recognition result of the target conversation data.
[0037] It can be understood that the abnormal behavior recognition result of the target conversation data can be: the abnormal behavior type exists in the target conversation data, or the abnormal behavior type does not exist in the target conversation data.
[0038] In this embodiment, the prompt words are used to guide the first language model to more accurately understand the task requirements, so that based on the reference conversation data and the recognition rules, the abnormal behavior of the target conversation data is accurately identified to obtain the abnormal behavior recognition result of the target conversation data.
[0039] The conversation processing method based on the large language model of the embodiment of the present disclosure obtains the target conversation data to be processed, obtains the reference conversation data matching the target conversation data, obtains the recognition rule for determining the abnormal behavior type of the reference conversation data, and adopts the first large language model to determine the abnormal behavior recognition result of the target conversation data according to the reference conversation data and the recognition rule. Thus, the abnormal behavior recognition of the target conversation data is performed by the first large language model in combination with the reference conversation data matching the target conversation data to be processed and the recognition rule for determining the abnormal behavior type of the reference conversation data, so that the abnormal behavior recognition result of the target conversation data can be accurately determined, thereby improving the accuracy of obtaining the abnormal behavior result of the conversation data.
[0040] To clearly illustrate the process of determining reference conversation data that matches the target conversation data, Figure 2 This process is described exemplarily.
[0041] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure.
[0042] like Figure 2 As shown, the method may include the following steps:
[0043] Step 201: Obtain target conversation data to be processed.
[0044] It should be noted that, for the specific description of step 201, reference may be made to the relevant descriptions in other embodiments, which will not be repeated here.
[0045] Step 202: Determine the representation information of the target conversation data.
[0046] In this embodiment, the target conversation data may be subjected to characterization processing to obtain characterization information of the target conversation data.
[0047] It should be noted that the representation information can be represented by a representation vector.
[0048] For example, the target conversation data may be represented by a vector, and the representation vector of the target conversation data may be used as the representation information of the target conversation data.
[0049] Step 203: Acquire a target reference representation that matches the representation information from a preset representation library.
[0050] In one embodiment of the present application, a possible implementation method for obtaining a target reference representation that matches the representation information from a preset representation library is: determining the degree of match between the representation information and each reference representation in the preset representation library; and selecting a reference representation with a degree of match greater than or equal to a preset degree of match threshold from the preset representation library as the target reference representation. Thus, based on the degree of match, the target reference representation that matches the representation information is accurately obtained from the preset representation library.
[0051] The preset matching degree threshold is a matching degree preset according to actual needs. For example, the preset matching threshold is 0.8 or 0.9.
[0052] In one embodiment of the present application, a possible implementation method for obtaining a target reference representation that matches the representation information from a preset representation library is: determining the degree of match between the representation information and each reference representation in the preset representation library; and selecting the reference representation with the highest degree of match from the preset representation library as the target reference representation. Thus, based on the degree of match, the target reference representation that matches the representation information is accurately obtained from the preset representation library.
[0053] Step 204: Use the conversation data corresponding to the target reference representation as reference conversation data.
[0054] Step 205: Obtain identification rules for determining abnormal behavior types of reference conversation data.
[0055] Step 206, determining the abnormal behavior recognition result of the target conversation data through the first language model according to the reference conversation data and the recognition rule.
[0056] It should be noted that, for the specific description of steps 204-206, reference may be made to the relevant description in other embodiments, which will not be repeated here.
[0057] In this embodiment, after obtaining the target conversation data to be processed, the target reference representation matching the representation information is obtained from the preset representation library in combination with the representation information of the target conversation data, and the conversation data corresponding to the target reference representation is used as the reference conversation data. Thus, the reference conversation data matching the conversation data is determined by the matching degree between the representations, which can capture the deep meaning and context information of the conversation data, rather than just the surface character matching, so that the obtained reference conversation data is more accurate, thereby improving the accuracy of the abnormal behavior recognition result of the determined target conversation data. In addition, calculating the matching degree by representation is more efficient. Therefore, determining the reference conversation data matching the target conversation data based on the matching degree between the representations can improve the efficiency of obtaining the reference conversation data, thereby improving the efficiency of the abnormal behavior recognition result of the target conversation data determined later.
[0058] In order to clearly understand the present disclosure, Figure 3 The method of this embodiment is described exemplarily.
[0059] Figure 3 is a schematic diagram according to a third embodiment of the present disclosure.
[0060] like Figure 3 As shown, the method may include:
[0061] Step 301: Obtain target conversation data to be processed.
[0062] Step 302: summarize the target conversation data to obtain a summary result of the target conversation data.
[0063] In one embodiment of the present application, in order to conveniently and accurately obtain the summary result of the target conversation data, the target conversation data can be summarized and processed by the second largest language model to obtain the summary result of the target conversation data. Thus, the summary result of the target conversation data is accurately and conveniently obtained by the second largest language model.
[0064] It should be noted that the first large language model and the second large language model in this embodiment may be the same large language model, or different large language models, and this embodiment does not specifically limit this.
[0065] Step 303: Perform characterization processing on the summary result to obtain characterization information.
[0066] In this embodiment, the summary result may be represented by a vector, and the representation vector of the summary result is used as the representation information.
[0067] Step 304: Acquire a target reference representation that matches the representation information from a preset representation library.
[0068] It should be noted that, for the specific description of step 304, reference may be made to the relevant descriptions in other embodiments, which will not be repeated here.
[0069] Step 305: Use the conversation data corresponding to the target reference representation as reference conversation data.
[0070] In an exemplary embodiment, based on the correspondence between the pre-stored representation data and the conversation data, the conversation data corresponding to the target reference representation may be acquired, and the acquired conversation data may be used as the reference conversation data.
[0071] Step 306: Obtain identification rules for determining abnormal behavior types of reference conversation data.
[0072] It should be noted that, for the specific description of step 306, reference may be made to the relevant descriptions in other embodiments, which will not be repeated here.
[0073] Step 307, determining the abnormal behavior recognition result of the summary result through the first language model according to the reference conversation data and the recognition rule.
[0074] In this embodiment, the reference conversation data, the recognition result and the summary result can be filled into the corresponding positions in the prompt word template to obtain the prompt word; the prompt word is input into the first language model to obtain the abnormal behavior recognition result of the summary result. Thus, through the prompt word, the first language model is guided to understand the task requirements more accurately, so as to accurately identify the abnormal behavior of the summary result based on the reference conversation data and the recognition rule, and obtain the abnormal behavior recognition result of the summary result.
[0075] Step 308: Determine the abnormal behavior recognition result of the target conversation data according to the abnormal behavior recognition result of the summary result.
[0076] As an example, the abnormal behavior recognition result of the summary result can be directly used as the abnormal behavior recognition result of the target conversation data.
[0077] In this embodiment, after obtaining the target conversation data to be processed, the target conversation data is summarized to obtain the summary result of the target conversation data, and the summary result is characterized to obtain the characterization information. Thus, by characterizing the summary result of the target conversation data, the characterization information of the target conversation data can be accurately obtained while reducing the time required for characterizing the entire target conversation data, thereby improving the efficiency of obtaining the abnormal behavior recognition result of the target conversation data later.
[0078] Based on any of the above embodiments, in order to ensure the safety of the user's personal property, when the abnormal behavior recognition result indicates that the target conversation data contains an abnormal behavior type, the method can also obtain the account information that provides the target conversation data, and send a reminder message to the terminal device corresponding to the account information, wherein the reminder message is used to remind that the target conversation data contains an abnormal behavior type. Thus, the corresponding user can easily know that the target conversation data contains the abnormal behavior type through the reminder message.
[0079] For example, in an online conversation or a phone call scenario, the abnormal behavior type is fraud. If it is determined that fraud exists in the conversation data, in order to ensure the safety of the user's personal property, a reminder message can be sent to the terminal device provided to the conversation data, so that the corresponding user can be informed of the existence of fraud in the conversation data through the reminder message.
[0080] In some exemplary implementations, in order to enable the emergency contact set by the user to remind the user in time, the emergency contact information pre-set in the account information is obtained accordingly; and a reminder message is sent through a specified notification method according to the emergency contact information. Thus, the emergency contact is informed of the abnormal behavior recognition result of the conversation data in time, and the corresponding user is reminded in time to avoid economic losses to the user.
[0081] It should be noted that the reminder information may also include the account information and / or relevant information of the user corresponding to the account information, such as name information and current location information.
[0082] It should be noted that the notification method in this embodiment refers to the specific method used to send reminder information to the user corresponding to the emergency contact information. For example, the notification method may include: telephone, text message or email, etc. This embodiment does not specifically limit the notification method.
[0083] In order to clearly understand this application, Figure 4 This embodiment is described exemplarily.
[0084] Figure 4 It is a schematic diagram according to the fourth embodiment of the present disclosure. It should be noted that in this embodiment, the representation information is represented in the form of a vector.
[0085] like Figure 4 As shown, the method may include:
[0086] Step 401: receiving a recognition request, wherein the recognition request includes: voice conversation data to be processed.
[0087] Step 402: Perform speech recognition on the speech dialogue data to be processed by a speech recognition service to obtain recognized text content.
[0088] Step 403, summarize the text content through the summary service to obtain a summary result.
[0089] In this embodiment, the summary service may summarize the text content based on the second largest language model to obtain a summary result.
[0090] Step 404: vectorize the summary result through the word representation service to obtain a representation vector.
[0091] In this embodiment, the word representation service can use word embedding technology to vectorize the words in the summary result to obtain a representation vector of the summary result.
[0092] Step 405 , obtaining a target representation vector that matches the representation vector in a preset representation vector library, and obtaining a reference summary result of the reference conversation data corresponding to the target representation vector.
[0093] In one embodiment of the present application, the degree of match between each candidate representation vector in a preset representation vector library and the representation vector is determined, and a representation vector in the preset representation vector library whose degree of match with the representation vector is greater than or equal to a preset matching degree threshold is used as a target representation vector, or, the candidate representation vector with the highest degree of match in the preset representation vector library is used as the target representation vector.
[0094] It should be noted that the reference summary result is obtained by summarizing the reference conversation data.
[0095] Among them, the target representation vector is obtained by vector representation of the reference summary result of the corresponding reference dialogue data.
[0096] The reference conversation data refers to conversation data for which abnormal behavior types have been determined.
[0097] In some examples, in order to clearly understand the process of constructing the representation vector library, the process of constructing the representation vector library is exemplarily described below: reference conversation data can be obtained, and the reference conversation data can be summarized to obtain a reference summary result, and a representation vector of the reference summary result can be determined, and a representation vector library can be constructed based on the reference summary result and its corresponding representation vector.
[0098] Step 406: Obtain identification rules for determining abnormal behavior types of reference conversation data.
[0099] In this embodiment, the identification rule for determining the abnormal behavior type of the reference conversation data may be obtained based on a pre-established correspondence between the abnormal behavior type and the identification rule.
[0100] As an example, the correspondence between reference conversation data, reference summary results of the reference data conversation, and abnormal behavior types can be pre-saved in a Mongo database, so that the reference conversation data corresponding to the reference summary result and the abnormal behavior type of the reference conversation data can be obtained through the correspondence.
[0101] Step 407 , determining an abnormal behavior recognition result of the summary result through the first language model according to the reference summary result and the recognition rule, and using the abnormal behavior recognition result of the summary result as the abnormal behavior recognition result of the target dialogue data.
[0102] Step 408, when the abnormal behavior identification result indicates that the target conversation data contains the abnormal behavior type, the notification service is called to send an alarm message corresponding to the abnormal behavior type through a specified notification method according to the emergency contact information.
[0103] In this embodiment, emergency contact information and a specified notification method may be obtained based on the user account, and warning information corresponding to the abnormal behavior type may be sent through the specified notification method according to the emergency contact information.
[0104] Among them, the correspondence between the user account, its bound emergency contact information, and the specified notification method can be pre-saved in the Mongo database.
[0105] In this embodiment, through the first large language model, combined with the reference summary results matching the target conversation data to be processed and the identification rules for determining the abnormal behavior type of the reference summary results, the target conversation data is identified for abnormal behavior, and the abnormal behavior identification results of the target conversation data can be accurately determined, thereby improving the accuracy of obtaining the abnormal behavior results of the conversation data.
[0106] In addition, the abnormal behavior identification result of the target conversation data can also be provided to the corresponding user, and the user can be prompted to determine whether the abnormal behavior type in the abnormal behavior identification result is accurate. If it is inaccurate, the target abnormal behavior type provided by the user for the target conversation data can be obtained, and based on the target conversation data and the target abnormal behavior type corresponding to the target conversation data, the target conversation data and its corresponding target abnormal behavior type can be added to the corresponding relationship between the preset conversation data and its abnormal behavior type, and the summary result of the target conversation data and its representation vector can be added to the representation vector library.
[0107] In order to implement the above embodiments, the present disclosure also provides a dialog processing device based on a large language model.
[0108] Figure 5 is a schematic diagram according to a fifth embodiment of the present disclosure.
[0109] like Figure 5 As shown, the large language model-based dialogue processing device 50 may include: a first acquisition module 501, a first determination module 502, a second acquisition module 503, and a second determination module 504, wherein:
[0110] The first acquisition module 501 is used to acquire target conversation data to be processed.
[0111] The first determining module 502 is used to determine reference dialogue data that matches the target dialogue data.
[0112] The second acquisition module 503 is used to acquire an identification rule for determining an abnormal behavior type of the reference conversation data.
[0113] The second determination module 504 is used to determine the abnormal behavior recognition result of the target dialogue data according to the reference dialogue data and the recognition rule through the first large language model.
[0114] As a possible implementation of the embodiment of the present disclosure, the first determining module 502 includes:
[0115] The first determining unit is used to determine the representation information of the target dialogue data.
[0116] The acquisition unit is used to acquire a target reference representation matching the representation information from a preset representation library.
[0117] The second determining unit is configured to use the dialogue data corresponding to the target reference representation as reference dialogue data.
[0118] As a possible implementation of the embodiment of the present disclosure, the acquisition unit is specifically configured to:
[0119] Determine the matching degree between the representation information and each reference representation in a preset representation library;
[0120] From a preset representation library, a reference representation with a matching degree greater than or equal to a preset matching degree threshold is selected as a target reference representation.
[0121] As a possible implementation manner of the embodiment of the present disclosure, the first determination unit is specifically used to: perform summary processing on the target dialogue data to obtain a summary result of the target dialogue data; and perform characterization processing on the summary result to obtain characterization information.
[0122] As a possible implementation manner of the embodiment of the present disclosure, the first determination unit is specifically used to: summarize the target dialogue data through the second largest language model to obtain a summary result of the target dialogue data.
[0123] As a possible implementation method of the embodiment of the present disclosure, the second determination module 504 is specifically used to: fill the reference conversation data, recognition results and summary results into corresponding positions in the prompt word template to obtain prompt words; input the prompt words into the first language model to obtain abnormal behavior recognition results of the summary results; determine the abnormal behavior recognition results of the target conversation data according to the abnormal behavior recognition results of the summary results.
[0124] As a possible implementation method of the embodiment of the present disclosure, the second determination module 504 is specifically used to: fill in the corresponding positions in the prompt word template according to the reference conversation data, the recognition rules and the target conversation data to obtain the prompt word; input the prompt word into the first large language model to obtain the abnormal behavior recognition result of the target conversation data.
[0125] As a possible implementation of the embodiment of the present disclosure, the device may further include:
[0126] The first reminder module is used to obtain the account information providing the target conversation data and send a reminder message to the terminal device corresponding to the account information when the abnormal behavior identification result indicates that there is an abnormal behavior type in the target conversation data, wherein the reminder information is used to remind that there is an abnormal behavior type in the target conversation data.
[0127] As a possible implementation of the embodiment of the present disclosure, the device may further include:
[0128] The second reminder module is used to obtain the emergency contact information pre-set in the account information, and send reminder information through a specified notification method according to the emergency contact information.
[0129] It should be noted that the aforementioned explanation of the embodiment of the dialogue processing method based on the large language model is also applicable to the embodiment of the data device and will not be repeated here.
[0130] The conversation processing device based on the large language model of the embodiment of the present disclosure obtains the reference conversation data matching the target conversation data after obtaining the target conversation data to be processed, obtains the recognition rule for determining the abnormal behavior type of the reference conversation data, and uses the first large language model to determine the abnormal behavior recognition result of the target conversation data according to the reference conversation data and the recognition rule. Thus, by using the first large language model, in combination with the reference conversation data matching the target conversation data to be processed and the recognition rule for determining the abnormal behavior type of the reference conversation data, the target conversation data is recognized for abnormal behavior, and the abnormal behavior recognition result of the target conversation data can be accurately determined, thereby improving the accuracy of obtaining the abnormal behavior result of the conversation data.
[0131] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are all carried out with the user's consent, comply with the relevant laws and regulations, and do not violate public order and good morals.
[0132] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0133] Figure 6It is a schematic block diagram of an electronic device for implementing the large language model-based dialogue processing method of an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0134] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0135] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0136] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as a dialog processing method based on a large language model. For example, in some embodiments, the dialog processing method based on a large language model may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the dialog processing method based on the large language model described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to execute the dialog processing method based on a large language model in any other appropriate manner (for example, by means of firmware).
[0137] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0138] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable large language model-based dialog processing device, so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0139] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0140] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0141] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0142] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0143] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0144] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A conversation processing method based on a large language model, comprising: Get the target conversation data to be processed; determining reference conversation data matching the target conversation data; Obtaining an identification rule for determining an abnormal behavior type of the reference conversation data; The abnormal behavior recognition result of the target conversation data is determined by the first large language model according to the reference conversation data and the recognition rule.
2. The method according to claim 1, wherein: The determining of reference dialogue data matching the target dialogue data comprises: Determining representation information of the target conversation data; Acquire a target reference representation matching the representation information from a preset representation library; The conversation data corresponding to the target reference representation is used as the reference conversation data.
3. The method according to claim 2, wherein: The acquiring, from a preset representation library, a target reference representation matching the representation information includes: Determining a degree of match between the representation information and each reference representation in the preset representation library; From the preset representation library, a reference representation whose matching degree is greater than or equal to a preset matching degree threshold is selected as the target reference representation.
4. The method according to any one of claims 1 to 3, wherein: The determining of the representation information of the target conversation data includes: Summarizing the target conversation data to obtain a summary result of the target conversation data; The summary result is subjected to characterization processing to obtain the characterization information.
5. The method according to claim 4, wherein: The summarizing the target conversation data to obtain a summary result of the target conversation data includes: The target dialogue data is summarized and processed by the second largest language model to obtain a summary result of the target dialogue data.
6. The method according to claim 4, wherein: The determining, by using the first language model, the abnormal behavior recognition result of the target dialogue data according to the reference dialogue data and the recognition rule, includes: Fill the reference dialogue data, the recognition result and the summary result into corresponding positions in the prompt word template to obtain a prompt word; Inputting the prompt word into the first language model to obtain an abnormal behavior recognition result of the summary result; The abnormal behavior recognition result of the target conversation data is determined according to the abnormal behavior recognition result of the summary result.
7. The method according to claim 1, wherein: The determining, by using the first language model, the abnormal behavior recognition result of the target dialogue data according to the reference dialogue data and the recognition rule, includes: Fill the corresponding positions in the prompt word template according to the reference dialogue data, the recognition rule and the target dialogue data to obtain the prompt word; The prompt word is input into the first large language model to obtain an abnormal behavior recognition result of the target dialogue data.
8. The method according to any one of claims 1 to 7, wherein: The method further comprises: When the abnormal behavior identification result indicates that the abnormal behavior type exists in the target conversation data, the account information providing the target conversation data is obtained, and a reminder message is sent to the terminal device corresponding to the account information, wherein the reminder message is used to remind the existence of the abnormal behavior type in the target conversation data.
9. The method according to claim 8, wherein: The method further comprises: Obtain emergency contact information pre-set in the account information; The reminder information is sent through a specified notification method according to the emergency contact information.
10. A dialog processing device based on a large language model, comprising: A first acquisition module, used to acquire target conversation data to be processed; A first determining module, configured to determine reference dialogue data matching the target dialogue data; A second acquisition module, used to acquire an identification rule for determining an abnormal behavior type of the reference conversation data; The second determination module is used to determine the abnormal behavior recognition result of the target dialogue data according to the reference dialogue data and the recognition rule through the first large language model.
11. The device according to claim 10, wherein: The first determining module includes: A first determining unit, configured to determine representation information of the target conversation data; An acquisition unit, configured to acquire a target reference representation matching the representation information from a preset representation library; The second determining unit is configured to use the dialogue data corresponding to the target reference representation as the reference dialogue data.
12. The device according to claim 11, wherein The acquisition unit is specifically used for: Determining a degree of match between the representation information and each reference representation in the preset representation library; From the preset representation library, a reference representation whose matching degree is greater than or equal to a preset matching degree threshold is selected as the target reference representation.
13. The device according to any one of claims 10 to 12, wherein: The first determining unit is specifically configured to: Summarizing the target conversation data to obtain a summary result of the target conversation data; The summary result is subjected to characterization processing to obtain the characterization information.
14. The device according to claim 13, wherein: The first determining unit is specifically configured to: The target dialogue data is summarized and processed by the second largest language model to obtain a summary result of the target dialogue data.
15. The device according to claim 13, wherein: The second determining module is specifically used to: Fill the reference dialogue data, the recognition result and the summary result into corresponding positions in the prompt word template to obtain a prompt word; Inputting the prompt word into the first language model to obtain an abnormal behavior recognition result of the summary result; The abnormal behavior recognition result of the target conversation data is determined according to the abnormal behavior recognition result of the summary result.
16. The device according to claim 10, wherein: The second determining module is specifically used to: Fill the corresponding positions in the prompt word template according to the reference dialogue data, the recognition rule and the target dialogue data to obtain the prompt word; The prompt word is input into the first large language model to obtain an abnormal behavior recognition result of the target dialogue data.
17. The device according to any one of claims 10 to 16, wherein: The device also includes: The first reminder module is used to obtain the account information that provides the target conversation data when the abnormal behavior identification result indicates that the abnormal behavior type exists in the target conversation data, and send a reminder message to the terminal device corresponding to the account information, wherein the reminder message is used to remind the existence of the abnormal behavior type in the target conversation data.
18. The device according to claim 17, wherein: The device also includes: The second reminder module is used to obtain the emergency contact information pre-set in the account information, and send the reminder information through a specified notification method according to the emergency contact information.
19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1 to 9.
21. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 9.
