Streaming message processing method and device based on large model and related equipment
Patent Information
- Application Number
- CN202411304014.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-20
Smart Images

Figure CN119172341A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to the fields of large models and artificial intelligence, and can be applied to scenarios such as intelligent assistants and intelligent searches. Background Art
[0002] Currently, many work operations are completed through instant messaging tools. However, when there are too many chat messages, some messages may be missed. Take insurance policies as an example. For insurance policies, a salesperson may be connected to multiple groups. Sometimes there are too many group messages. Every day, each salesperson has to sort out a large number of business orders and needs to flip through the chat records with each customer to place an order. The probability of error increases and takes up a lot of time. Summary of the invention
[0003] The present disclosure provides a streaming message processing method, apparatus and related equipment based on a large model.
[0004] According to one aspect of the present disclosure, a streaming message processing method based on a large model is provided, comprising:
[0005] Get the message flow of the target session ID of the instant messaging tool;
[0006] Extract keywords from the message stream based on the big model;
[0007] Based on keywords, multiple conversation messages in the message flow are associated with corresponding task topics.
[0008] According to another aspect of the present disclosure, a streaming message processing device based on a large model is provided, comprising:
[0009] An acquisition module, used to acquire a message stream of a target session identifier of an instant messaging tool;
[0010] The extraction module is used to extract keywords from the message stream based on the big model;
[0011] The processing module is used to associate multiple conversation messages in the message flow with corresponding task topics based on keywords.
[0012] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0013] at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] 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 execute any method in the embodiments of the present disclosure.
[0016] 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 the computer to execute any method according to the embodiments of the present disclosure.
[0017] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements any method according to the embodiments of the present disclosure when executed by a processor.
[0018] In the disclosed embodiment, based on the field extraction task that the big model is really good at, it is proposed to extract key fields from the big model, and perform streaming message segmentation based on the key fields to associate conversation messages with different task topics. The big model can understand natural language to achieve accurate division of streaming messages, so that it can sort out keywords from streaming messages based on the strong understanding ability of sentences based on the big model, and significantly improve the accuracy of capturing keywords from group chat messages. Especially in the case of frequent switching of task topics in the conversation (that is, messages of multiple task topics are interspersed alternately), based on the disclosed embodiment, it has a better message segmentation and recognition effect, so that different conversation messages can be assigned to corresponding task topics, thereby helping sales staff to improve work efficiency.
[0019] 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
[0020] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0021] Figure 1 It is a flowchart of a streaming message processing method based on a large model according to an embodiment of the present disclosure;
[0022] Figure 2 is another flow chart of a streaming message processing method based on a large model according to an embodiment of the present disclosure;
[0023] Figure 3 is a schematic diagram of a message set according to an embodiment of the present disclosure;
[0024] Figure 4 is a schematic diagram of a streaming message processing method based on a large model according to an embodiment of the present disclosure;
[0025] Figure 5 is another schematic diagram of a streaming message processing method based on a large model according to an embodiment of the present disclosure;
[0026] Figure 6is another schematic diagram of a streaming message processing method based on a large model according to an embodiment of the present disclosure;
[0027] Figure 7 is another flow chart of a streaming message processing method based on a large model according to an embodiment of the present disclosure;
[0028] Figure 8 is a structural diagram of a streaming message processing device based on a large model according to an embodiment of the present disclosure;
[0029] Fig. 9 It is a block diagram of an electronic device used to implement the streaming message processing method based on a large model according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] 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 of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0031] The terms "first", "second", etc. in this disclosure are used to distinguish similar objects, and are not necessarily used to describe a specific order or precedence. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, including a series of steps or units. The method, system, product or device is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] Since instant messaging tools are probably just daily chat software, their main function is to provide the convenience of chat sessions. Therefore, when using instant messaging tools as a business tool, it is not possible to change the user's usage habits, which means that it is impossible to make the conversation messages in instant messaging tools follow a more standardized format to help sort out valuable information and improve work efficiency. At the same time, instant messaging tools do not have the ability to use message cards to save the step of natural language processing.
[0033] Therefore, there is a need for a method that can efficiently sort out the chat content in instant messaging tools, so as to assist instant messaging tools to become intelligent assistants or transaction assistants that help people sort out important information.
[0034] In view of this, the present disclosure provides a streaming message processing method based on a large model, such as Figure 1 As shown, it can be implemented as follows:
[0035] S101, obtaining a message flow of a target session identifier of an instant messaging tool.
[0036] Each target session identifier corresponds to a chat window, and a chat window may include two or more persons. When multiple persons have a chat in a chat window with the same session identifier, it is a group chat.
[0037] In addition, the target object (such as an insurance policy salesperson) may be connected to multiple chat windows, and the message flows in each chat window correspond to different session IDs (Identity document, unique identification number). Different session IDs represent different communication paths, and different communication paths correspond to different chat windows. Therefore, it is necessary to sort out the message flows in different chat windows based on the target session ID.
[0038] S102, extracting keywords from the message flow based on the big model.
[0039] Among them, the large model can be a large language model (LLMs). Large language models refer to a specific type of large model that is specifically used to process text data. This type of model is a natural language processing model based on a neural network, which can be used to generate, understand and process text data. Large language models can have tens of billions of parameters, can generate high-quality text, and can be used for various natural language processing tasks, such as question answering, text generation, dialogue systems, etc.
[0040] The large language model has good reasoning ability and small sample learning ability. The large language model can understand the model on a large scale or can be trained on a large number of samples. Based on the large model, accurate semantic understanding can be achieved.
[0041] In addition, the form of the message in the message stream is multimodal, for example, it can be text, picture, video, voice, etc. Therefore, the big model used in the embodiment of the present disclosure can also be a multimodal big model.
[0042] In addition, text content can be extracted from non-text mode messages so that the large language model can extract keywords from them. For example, voice messages can be converted into text messages to obtain keywords.
[0043] Optical Character Recognition (OCR) can be used to process the picture / video message, extract the text message from the picture, and then obtain the keywords.
[0044] Regardless of the form in which the message is presented, in the embodiments of the present disclosure, it can be processed into a text form, and then a large language model is used to extract keywords for subsequent matching task topic operations.
[0045] S103, based on the keywords, associating multiple conversation messages in the message flow with corresponding task topics.
[0046] During implementation, the keywords required for the task subject can be set according to the actual task requirements. For example, taking an insurance policy as an example, the task subject can include the unique identifier and name of the insured.
[0047] The keywords that should be included in the task subject can be manually set by the salesperson, or mined from the task data with the help of the understanding ability of the big model, and then manually confirmed. The subject fields that should be included in the task subject can be determined based on the actual situation, and then the understanding ability of the big model can be used to extract keywords from the message to fill in the subject fields in the task subject, which is not limited in the embodiments of the present disclosure.
[0048] In the disclosed embodiment, based on the fact that the big model is really good at field extraction tasks, it is proposed that the big model extract keywords, and perform streaming message segmentation based on key fields to associate conversation messages with different task topics. The big model can accurately understand natural language, and sort out keywords from streaming messages based on the big model's strong understanding of sentence patterns, thereby significantly improving the accuracy of capturing keywords from group chat messages. Especially in the case of frequent switching of task topics in a conversation (i.e., messages of multiple task topics are interspersed alternately), based on the disclosed embodiment, message segmentation can be better achieved to assign different conversation messages to corresponding task topics, thereby helping to improve message processing efficiency.
[0049] In some embodiments, keywords are extracted from the message stream based on the big model, which can be specifically implemented as follows:
[0050] Step A1, filtering the message stream to obtain multiple conversation messages.
[0051] Among them, the filtering operation may exemplarily include filtering out messages without user IDs, messages with inefficient expressions (exemplarily, such as "haha", etc.), useless advertising content, emoticons, etc.
[0052] Step A2: input multiple conversation messages into the large model to extract keywords of the multiple conversation messages.
[0053] During implementation, since the keywords in the subject are the useful information for task topic matching, the large model can be used to perform grammatical analysis on the conversation message, determine the subject, and extract keywords from the subject to complete the subsequent message segmentation. Extracting transaction messages corresponding to the subject is particularly applicable, so that messages corresponding to the same subject can be aggregated into the same task topic to complete the message processing of the unified subject.
[0054] In the disclosed embodiment, the interactive information that needs to be processed can be retained based on the filtering operation, and then based on the large model's strong ability to understand sentence patterns, the keywords of multiple conversation messages can be accurately extracted, thereby reducing the amount of data that the large model needs to process and improving the efficiency of subsequent division of messages into corresponding task topics.
[0055] In some embodiments, multiple conversation messages are input into a large model to extract keywords of the multiple conversation messages, such as Figure 2 As shown, it can be implemented as:
[0056] S201, filtering out messages to be analyzed from multiple conversation messages.
[0057] Each of the multiple conversation messages may be used as a message to be analyzed.
[0058] S202, constructing prompt information of a large model based on the message to be analyzed; the prompt information includes a target requirement, and the target requirement prompts the large model for the message used to modify the subject field, and the modified subject field does not need to be extracted.
[0059] Among them, the subject field is a field that must be included in the task subject. Each session message in the message flow is divided based on the task subject. Different subject fields represent different task subjects, and different task subjects represent different tasks. If the value of the subject field of the same task subject has been determined, the task subject is unique in the subsequent processing. On this basis, if the modified subject field is extracted, when the modified subject field is used to match the task subject, it is very likely that the corresponding task subject cannot be correctly matched, which may cause errors in message segmentation. Therefore, there is no need to extract the modified subject field.
[0060] For example, the previous conversation message is "Zhang San, license plate number A777**, third party insurance", and the subject field is extracted from the conversation message to establish the task subject "Zhang San, license plate number A777**". Then, the conversation message sent is "Zhang San's license plate number is changed to Beijing A888**". In the case of the aforementioned task subject with the subject field of "Zhang San, license plate number A777**", Zhang San is useful information and can be used to match the subject field, while Beijing A888** belongs to the modified information. When extracting this field, since the keyword "Beijing A888**" does not appear in the task subject corresponding to "Zhang San", extracting this keyword may result in failure to match the task subject corresponding to "Zhang San, license plate number A777**". In order to avoid errors, the keyword of the modified subject field does not need to be extracted.
[0061] S203: extracting keywords corresponding to the message to be analyzed from the message to be analyzed based on the prompt information.
[0062] In the disclosed embodiment, considering that the modified content does not belong to keywords, the target requirements obtained based on this method can avoid the problem of large models extracting unnecessary keywords, which leads to matching anomalies. This method can enable the large model to accurately extract the keywords actually needed, so as to segment the conversations that actually belong to the same task into the same task topic, ensure the accuracy of subsequent matching task topics, and improve the accuracy of message flow segmentation.
[0063] In some embodiments, the aforementioned prompt information is input into a large model for processing to obtain keywords. Based on the keywords, multiple conversation messages in the message stream are associated with corresponding task topics, which can be implemented as follows:
[0064] Step B1, classify multiple conversation messages in the message flow according to the message senders to obtain a message set from the same message sender.
[0065] During implementation, since each task corresponds to a task topic, when the chat window is a group chat, there may be situations where multiple tasks send messages crosswise. Therefore, based on the principle of dialogue continuity, it is necessary to separate the messages of the same task as much as possible, so that the conversation messages belonging to the same task can be divided into the message set of the same message sender.
[0066] In the embodiment of the present disclosure, in order to cluster messages of the same task into one set as much as possible, the message set is obtained by classifying according to the message senders.
[0067] When implementing, Figure 3 As shown in the figure, the gray box is message sender 1, and the black box is message sender 2, and there is cross-sending of messages between the two. Since messages from the same message sender are most likely to be about the same task topic, taking insurance policies as an example, the same policy is filled out by the same user, so the messages can be divided by message sender so that the messages with the same task topic can be gathered into the same message set as much as possible.
[0068] In some embodiments, multiple conversation messages in a message stream are classified according to message senders to obtain a message set from the same message sender, which can be implemented as follows: multiple conversation messages in a message stream are classified according to message senders to obtain multiple messages from the same message sender; based on the length of the time window, messages within the current time window are intercepted from multiple messages from the same message sender to obtain a message set.
[0069] The length of the time window may be a fixed value or a variable length, so as to ensure that the same session is divided into the same time window as much as possible.
[0070] Or Figure 3As shown, the grey box is the message sender 1 and the black box is the message sender 2. After dividing the session messages based on the message sender, the streaming messages of the same message sender are further divided using a time window. By using the time window, it can be ensured that each useful session message in the message stream is processed without omission, and the integrity of a session is maintained as much as possible.
[0071] In the embodiments of the present disclosure, dividing messages based on a time window can capture the semantic expressions of the same message sender over time, so as to accurately assign messages of different tasks to the corresponding task topics in the later stage.
[0072] Step B2, assign at least one session message in the message set of the same message sender to the corresponding task topic.
[0073] Exemplarily, as Figure 3 shown, "Zhang San 111111111111111111 Yu A777** 2015-8-20 full insurance" in message set 1 can be assigned to the task topic with the keyword "Zhang San". The processing methods of other session messages are the same. The specific matching method will be described later, and the embodiments of the present disclosure will not elaborate here.
[0074] In the embodiments of the present disclosure, following the principle of session continuity, dividing messages based on the sender greatly improves the accuracy of matching with task topics.
[0075] In summary, in the embodiments of the present disclosure, the way to obtain the message set is to first divide based on the same message sender, and then obtain the message set based on the time window.
[0076] In some other embodiments, it is also possible to first divide the streaming messages in the chat window based on the time window, then divide based on the message sender, and then assign the session messages of the same message sender to the corresponding task topics according to keywords.
[0077] It can be understood that in the embodiments of the present disclosure, the order of dividing messages using the message sender and the time window is not limited.
[0078] In some embodiments, assigning at least one session message in the message set of the same message sender to the corresponding task topic can be implemented as:
[0079] Step C1, obtain the message to be assigned from the message set;
[0080] When implemented, obtaining the message to be assigned from the message set can be implemented as: obtaining the message to be assigned from the message set based on the message timestamp.
[0081] Specifically, it can be understood that based on the time sequence of each conversation message in the message set, the message to be allocated is determined. For example, the conversation messages in the message set include message 1, message 2, and message 3 in the order of sending time. It is necessary to first determine message 1 as the message to be allocated, and then determine message 2 as the message to be allocated, and then match them in sequence based on the time sequence. That is, each conversation message in the message set will follow the operations of step C1 to step C3, but there are certain requirements on the execution order.
[0082] In the disclosed embodiment, the messages may be processed according to the principle of conversation continuity in consideration of the time sequence of the messages, so as to improve the accuracy of matching the task subject.
[0083] Step C2, matching the keywords of the message to be assigned with the task subject set.
[0084] Step C3: when the keyword matches any task topic in the task topic set, the message to be assigned is assigned to the any task topic.
[0085] For example, task topic 1 includes Zhang San, A777**, and task topic 2 includes Li Si, Tianjin AC34**. When the keyword "Zhang San" is detected from the message to be assigned, it is determined that the message to be assigned belongs to task topic 1.
[0086] In the disclosed embodiment, the corresponding task subject is determined based on keyword matching, thereby achieving full process automation from obtaining a message to classifying the message into a corresponding task subject, thereby saving human resources.
[0087] In some embodiments, when the keyword does not match the task topic set, a reference topic is obtained; the reference topic is the task topic associated with the previous message of the message to be assigned in the message set; when it is determined based on the keyword that there is no conflict between the message to be assigned and the reference topic, the message to be assigned is assigned to the reference topic.
[0088] During implementation, the absence of conflict can be understood as the absence of conflict between the non-empty fields in the message to be assigned and the task subject. For example, the key fields included in task subject 1 include "user name, license plate number, user unique identifier". The user name "Zhang San" is extracted in the first session message, and the task subject is filled in based on this as "User name: Zhang San, license plate number: empty field, user unique identifier: empty field". The keyword "Zhang Si" is extracted in the subsequent session message. This keyword corresponds to the "user name" field in the task subject, but the field value of "user name" in the task subject is "Zhang San", and the "user name" field in the message to be matched is "Zhang Si". Obviously, the values of the same non-empty field are different, so there is a conflict between the non-empty fields in the message to be assigned and the task subject.
[0089] Specifically, since it is a group chat message, there may be a situation where multiple users cross - send messages for different tasks. Continuing as Figure 4 shown, the message sender A sends messages including Message 1: "Zhang San 111111111111111111 Yu A777** 2015 - 8 - 20 full insurance", Message 2: "Li Si 222222222222222222 Jing CD34** 2016 - 8 - 20", Message 3: "Compulsory insurance, third - party liability insurance (1 million)", Message 4: "Zhang San's medical insurance". Extract the keywords of each message, including Message 1: "Zhang San, 111111111111111111, Yu A777**", Message 2: "Li Si, 222222222222222222, Jing CD34**", Message 3: "None, none, none", Message 4: "Zhang San, none".
[0090] Match the messages of the same message sender in Figure 4 sequentially. In this case, it is considered that Message 3: "Compulsory insurance, third - party liability insurance (1 million)" cannot match any task theme. Therefore, it is possible to continue to judge whether there is a conflict with the task theme (i.e., the reference theme) corresponding to the previous message closest to this message. Continuing as Figure 4 shown, the reference theme is the task theme with keywords "Li Si", "222222222222222222", and "Jing CD34**". Since the theme field of Message 3 is "None, none, none", it can be found that there are no different non - empty fields between the keywords of these two messages. Therefore, Message 3 has no conflict with the reference theme, and thus it can be reasonably classified into this reference theme.
[0091] In the embodiments of the present disclosure, considering that the actual use of instant messaging tools is mainly for convenient communication, combined with the user experience, the embodiments of the present disclosure can automatically and accurately achieve streaming message merging on the basis of not changing the user's usage habits, so as to sort out the message content under different task themes.
[0092] In some embodiments, in the case where it is determined that there is a conflict between the message to be assigned and the reference theme based on keywords, a new task theme is constructed based on the keywords; the message to be assigned is assigned to the new task theme.
[0093] During implementation, when it is determined that the message to be assigned does not match any task theme in the task theme set and there is a conflict with the reference theme, that is, the task theme set does not include the task theme corresponding to the message to be assigned, it is confirmed that this message belongs to a new task theme. Therefore, a new task theme can be created and the newly created task theme can be updated to the task theme set to achieve automatic expansion of the task theme set.
[0094] Exemplarily, such as Figure 4In message 4, "Wang Wu Medical Insurance", in this case, no task topic matching the message was found in the task topic set, and the keyword of the message is "Wang Wu, none", and the keywords of the last topic in the task topic set are "Li Si", "222222222222222222", and "Beijing CD34**", so there is a conflict between the two. Therefore, it is necessary to create a new task topic and update it to the task topic set.
[0095] In the disclosed embodiment, when it is determined that the message to be assigned does not match any task topic in the task topic set and there is a conflict with the reference topic, a new task topic is created to store the current message to be assigned, thereby ensuring the comprehensiveness of the message and avoiding missing any message.
[0096] In summary, the keywords of the message to be assigned are matched with the task subject set. Figure 5 As shown,
[0097] S501, traverse the task topic set from back to front based on the time sequence.
[0098] That is, the creation time of the task topic set defines the chronological order of the task topic set. Traversing the task topic set from back to front in chronological order follows the principle of session continuity and is conducive to dividing messages with truly critical information into reasonable task topics.
[0099] For example, the subject "Zhang San" may match multiple task topics, but based on the principle of conversation continuity, it can be classified into the task topic with the latest creation time.
[0100] S502, for the traversed task subject, determine whether the task subject matches the keyword of the current message to be assigned, and if the corresponding task subject is matched, execute S503; if it is determined that the corresponding subject is not matched, execute S504;
[0101] S503, merging the to-be-assigned message into the corresponding task topic;
[0102] S504, determining whether there is a conflict with the reference subject, if there is no conflict, executing S505, if there is a conflict, executing S506;
[0103] S505, according to the principle of dialogue continuity, merge into the last reference topic;
[0104] S506, creating a new task topic and inserting it at the end of the task topic set.
[0105] In some embodiments, when the same task topic contains multiple messages, key fields required for the same task topic are extracted from the multiple messages; when the key fields required for the same task topic are extracted, the same task topic is sent as a topic stream.
[0106] During implementation, due to the customer's usage habits of chatting, messages may be sent in segments. For example, one message states that Zhang San needs to buy car insurance, and another message adds Zhang San's license plate number. Therefore, the messages can be processed sequentially based on the time sequence, and the keywords belonging to the same task topic can be extracted. After the extraction is completed, the content in the same task topic can be processed into a topic stream.
[0107] In the disclosed embodiment, key fields belonging to the same task theme are taken as a theme stream, so that different tasks are transmitted to subsequent processes for processing in the form of segmented information streams.
[0108] In summary, when there are multiple task topics in the task topic set, the specific implementation of message segmentation using keyword matching is as follows: Figure 6 As shown. After grouping the chat window messages by message sender, when using time windows for division, the message pipeline is the streaming messages of the same message sender. Gray represents the session messages outside the time window, that is, historical messages, and white represents the messages within the time window, that is, the messages that need to be processed in the current batch. When processing the messages in the current time window, the historical messages of each task topic ( Figure 6 The gray rectangle in the figure is organized into a historical context ( Figure 6 ), keyword matching can be performed based on the historical context and the conversation messages in the current time window to segment the current conversation messages into corresponding task topics. Afterwards, the task topics for the newly added conversation messages can be used as the task topics in the current topic set. For the task topics in the current topic set, the key elements required for the task can be extracted based on the newly added conversation messages.
[0109] During implementation, a watermark may be provided in the disclosed embodiment, and the watermark is used to mark the processing progress of streaming messages, such as recording the unique identifier of the last message processed in the streaming messages. Thus, when the messages are processed in batches the next time, the messages to be processed, that is, the messages within the current time window, are accurately obtained from the streaming messages based on the watermark. In addition, the watermark can also be used to filter task topics for newly added conversation messages. For example, the watermark is identified by the unique identifier of the conversation message. As the number of conversation messages increases, the unique identifiers of the conversation messages in the same group chat window gradually increase. Thus, the task topics of conversation messages with a number greater than the watermark can be filtered and added to the chat group. Figure 6 The current theme collection.
[0110] For ease of understanding, the solutions provided in the embodiments of the present disclosure are as follows Figure 7 As shown, taking the insurance policy as an example, the subject in the insurance policy is an important topic keyword, which can be implemented as follows:
[0111] S701, extracting a batch of session messages from the message stream according to the time window;
[0112] S702, performing syntactic analysis on each conversation message in the batch to extract the subject;
[0113] S703, extracting keywords of the subject field from the subject;
[0114] S704, determining whether the keyword of the conversation message matches the task subject set, and if it is determined that there is a corresponding task subject, executing S705; if it is determined that there is no corresponding subject, executing S706;
[0115] S705, merging the conversation message into the corresponding task topic;
[0116] S706, determining whether there is a conflict between the keyword of the conversation message and the reference topic, if there is no conflict, executing S707, if there is a conflict, executing S708;
[0117] S707, according to the principle of dialogue continuity, merge into the last reference topic;
[0118] S708, creating a new task topic and inserting it into the end of the task topic set;
[0119] S709, filtering out topics with newly added conversation messages from the task topic set; and completing the content under the task topic based on the newly added conversation messages.
[0120] For example, for an insurance policy, all the elements required for an insurance policy are constructed in the form of a knowledge graph. Each element is extracted from the conversation messages aggregated into the task topic of the insurance policy.
[0121] Based on the same technical concept, the embodiment of the present disclosure also provides a streaming message processing device 800 based on a large model, such as Figure 8 As shown, including:
[0122] An acquisition module 801 is used to acquire a message flow of a target session identifier of an instant messaging tool;
[0123] An extraction module 802, used to extract keywords from the message flow based on the big model;
[0124] The processing module 803 is used to associate multiple conversation messages in the message flow with corresponding task topics based on keywords.
[0125] In some embodiments, the extraction module includes:
[0126] A filtering unit, used to filter the message stream to obtain multiple session messages;
[0127] The extraction unit is used to input the multiple conversation messages into the large model to extract keywords of the multiple conversation messages.
[0128] In some embodiments, the extraction unit is used to:
[0129] Filter out messages to be analyzed from multiple conversation messages;
[0130] Prompt information for building a large model based on the message to be analyzed; the prompt information includes a target requirement, and the target requirement prompts the large model for the message used to modify the subject field, and the modified subject field does not need to be extracted;
[0131] Based on the prompt information, keywords corresponding to the message to be analyzed are extracted from the message to be analyzed.
[0132] In some embodiments, the processing module includes:
[0133] A classification unit, used to classify multiple conversation messages in the message flow according to message senders to obtain a message set from the same message sender;
[0134] The matching unit is used to assign at least one conversation message in a message set of the same message sender to a corresponding task topic.
[0135] In some embodiments, the matching unit is configured to:
[0136] Get the message to be assigned from the message set;
[0137] Matching the keywords of the message to be assigned with the task subject set;
[0138] When the keyword matches any task topic in the task topic set, the message to be assigned is assigned to any task topic.
[0139] In some embodiments, the system further includes a first matching module for:
[0140] If the keyword does not match the task subject set, obtain a reference subject; the reference subject is the task subject associated with the previous message of the message to be assigned in the message set;
[0141] When it is determined based on the keyword that there is no conflict between the message to be allocated and the reference topic, the message to be allocated is allocated to the reference topic.
[0142] In some embodiments, a second matching module is further included, which is used to:
[0143] In the case where it is determined based on the keywords that the message to be assigned conflicts with the reference topic, a new task topic is constructed based on the keywords;
[0144] Assign the message to be assigned to the new task topic.
[0145] In some embodiments, the matching unit is specifically configured to:
[0146] Get the message to be assigned from the message set based on the message timestamp.
[0147] In some embodiments, the classification unit is used to:
[0148] Classify multiple conversation messages in the message flow according to the message senders to obtain multiple messages from the same message sender;
[0149] Based on the time window length, messages within the current time window are intercepted from multiple messages from the same message sender to obtain a message set.
[0150] In some embodiments, a sending module is further included, which is used to:
[0151] When the same task topic contains multiple messages, extract the key fields required for the same task topic from the multiple messages;
[0152] When the key fields required for the same task subject are extracted, the same task subject is sent as a subject stream.
[0153] For the description of specific functions and examples of each module and submodule of the device in the embodiment of the present disclosure, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.
[0154] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0155] 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.
[0156] Fig. 9A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, 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 assistants, 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.
[0157] like Fig. 9 As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0158] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0159] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 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 901 performs the various methods and processes described above, such as a streaming message processing method based on a large model. For example, in some embodiments, the streaming message processing method based on a large model may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the streaming message processing method based on the large model described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the large model-based streaming message processing method in any other appropriate manner (for example, by means of firmware).
[0160] 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.
[0161] 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 data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be 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.
[0162] 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.
[0163] 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).
[0164] 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 communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0165] 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.
[0166] 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.
[0167] 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 principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A streaming message processing method based on a large model, comprising: Get the message flow of the target session ID of the instant messaging tool; Extracting keywords from the message stream based on the big model; Based on the keywords, multiple conversation messages in the message flow are associated with corresponding task topics.
2. The method according to claim 1, wherein: The extracting keywords from the message flow based on the big model includes: Performing a filtering operation on the message flow to obtain the plurality of session messages; The plurality of conversation messages are input into the large model to extract keywords of the plurality of conversation messages.
3. The method according to claim 2, wherein: The step of inputting the plurality of conversation messages into the large model to extract keywords of the plurality of conversation messages includes: Filtering the messages to be analyzed from the multiple conversation messages; Prompt information for constructing the large model based on the message to be analyzed; the prompt information includes a target requirement, and the target requirement prompts the large model that for a message used to modify a subject field, the modified subject field does not need to be extracted; Based on the prompt information, keywords corresponding to the message to be analyzed are extracted from the message to be analyzed.
4. The method according to any one of claims 1 to 3, wherein: The associating the plurality of conversation messages in the message stream to corresponding task topics based on the keyword includes: Classifying the multiple conversation messages in the message flow according to message senders to obtain a message set from the same message sender; At least one conversation message in the message set of the same message sender is assigned to a corresponding task topic.
5. The method according to claim 4, wherein: The allocating at least one conversation message in the message set of the same message sender to a corresponding task topic includes: Obtaining a message to be distributed from the message set; Matching the keywords of the message to be assigned with the task subject set; In the case where the keyword matches any task topic in the task topic set, the message to be assigned is assigned to any task topic.
6. The method according to claim 5, further comprising: When the keyword does not match the task theme set, obtaining a reference theme; The reference topic is the task topic associated with the previous message of the message to be assigned in the message set; When it is determined based on the keyword that there is no conflict between the message to be allocated and the reference topic, the message to be allocated is allocated to the reference topic.
7. The method according to claim 6, further comprising: In the case where it is determined based on the keyword that the message to be assigned conflicts with the reference topic, constructing a new task topic based on the keyword; The message to be assigned is assigned to the new task topic.
8. The method according to claim 5, wherein: The obtaining the message to be distributed from the message set includes: Based on the message timestamp, the to-be-allocated message is obtained from the message set.
9. The method according to claim 4, wherein: The multiple conversation messages in the message flow are classified according to message senders to obtain a message set from the same message sender, including: Classifying the multiple conversation messages in the message flow according to message senders to obtain multiple messages from the same message sender; Based on the time window length, the messages within the current time window are intercepted from the multiple messages from the same message sender to obtain the message set.
10. The method according to any one of claims 1 to 9, further comprising: When the same task topic contains multiple messages, extract key fields required for the same task topic from the multiple messages; When the key fields required for the same task subject are extracted, the same task subject is sent as a subject stream.
11. A streaming message processing device based on a large model, comprising: An acquisition module, used to acquire a message stream of a target session identifier of an instant messaging tool; An extraction module, used for extracting keywords from the message flow based on a large model; The processing module is used to associate the multiple conversation messages in the message flow with corresponding task topics based on the keywords.
12. The device according to claim 11, wherein The extraction module comprises: A filtering unit, configured to filter the message stream to obtain the plurality of session messages; The extraction unit is used to input the multiple conversation messages into the large model to extract keywords of the multiple conversation messages.
13. The device according to claim 12, wherein: The extraction unit is specifically used for: Filtering the messages to be analyzed from the multiple conversation messages; Prompt information for constructing the large model based on the message to be analyzed; the prompt information includes a target requirement, and the target requirement prompts the large model that for a message used to modify a subject field, the modified subject field does not need to be extracted; Based on the prompt information, keywords corresponding to the message to be analyzed are extracted from the message to be analyzed.
14. The device according to any one of claims 11 to 13, wherein: The processing module comprises: A classification unit, used to classify the multiple conversation messages in the message flow according to the message senders, and obtain a message set from the same message sender; The matching unit is used to assign at least one conversation message in the message set of the same message sender to a corresponding task topic.
15. The device according to claim 14, wherein: The matching unit is specifically used for: Obtaining a message to be distributed from the message set; Matching the keywords of the message to be assigned with the task subject set; In the case where the keyword matches any task topic in the task topic set, the message to be assigned is assigned to any task topic.
16. The device according to claim 15, further comprising a first matching module, specifically configured to: In the case where the keyword does not match the task subject set, a reference subject is obtained; the reference subject is the task subject associated with the previous message of the message to be assigned in the message set; When it is determined based on the keyword that there is no conflict between the message to be allocated and the reference topic, the message to be allocated is allocated to the reference topic.
17. The device according to claim 16, further comprising a second matching module, configured to: In the case where it is determined based on the keyword that the message to be assigned conflicts with the reference topic, constructing a new task topic based on the keyword; The message to be assigned is assigned to the new task topic.
18. The device according to claim 15, wherein: The matching unit is specifically used for: Based on the message timestamp, the to-be-allocated message is obtained from the message set.
19. The device according to claim 14, wherein: The classification unit is specifically used for: Classifying the multiple conversation messages in the message flow according to message senders to obtain multiple messages from the same message sender; Based on the time window length, the messages within the current time window are intercepted from the multiple messages from the same message sender to obtain the message set.
20. The apparatus according to any one of claims 11 to 19, further comprising a sending module, configured to: When the same task topic contains multiple messages, extract key fields required for the same task topic from the multiple messages; When the key fields required for the same task subject are extracted, the same task subject is sent as a subject stream.
21. 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 10.
22. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-10.
23. 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 10.
