Message grading and sorting method and device, computer equipment and storage medium
By combining a lightweight pre-trained language model with a rule engine, the accuracy and efficiency issues of emergency message processing in customer service in the insurance industry were solved, achieving efficient message hierarchical sorting and improving customer satisfaction and enterprise service efficiency.
Patent Information
- Application Number
- CN202510782013.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-10-24
AI Technical Summary
Traditional message classification and sorting methods cannot balance accuracy and recognition efficiency, resulting in urgent messages being missed or delayed in customer service in the insurance industry, causing customer dissatisfaction and complaints.
A message hierarchy ranking method combining a lightweight pre-trained language model and a rule engine is adopted. The method obtains contextual semantic features through a text encoder, combines message time sequence and customer attribute features, dynamically assigns weights using an attention mechanism, and optimizes the method with a rule engine to generate accurate message priority ranking results.
It has significantly improved the response efficiency and service quality of customer service in the insurance industry, reduced the complaint rate, increased customer satisfaction, and ensured the timely processing of high-value and urgent messages.
Smart Images

Figure CN120832412A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of artificial intelligence, and particularly relates to a message hierarchical sorting method and device, computer equipment and a storage medium. BACKGROUND
[0002] With the acceleration of enterprise digital transformation, communication APP as an important communication tool in the insurance industry has been widely used in customer service and other fields. For example, insurance business involves a variety of products, each product has its specific terms and claim settlement process, and customers may encounter various problems in the process of consulting the quotation or claim settlement, such as unclear understanding of terms, complex claim settlement process, etc. These problems need the detailed explanation and guidance of the agent, but an agent may communicate with several customers at the same time, and often because of human negligence, urgent messages are missed or delayed, causing customer dissatisfaction and even complaints.
[0003] The traditional message hierarchical sorting method relies on artificial rules or simple machine learning models for message classification, but the processing effect of long text or polysemous words is limited, and the complex context cannot be understood, resulting in high misjudgment rate. In recent years, pre-training models based on Transformer (such as BERT) have shown excellent performance in natural language processing tasks, which can capture deep semantic text and improve classification accuracy, but the reasoning time is too long, and the simple model is fast but the accuracy is insufficient. SUMMARY
[0004] The purpose of the embodiments of the present application is to propose a message hierarchical sorting method, device, computer equipment and storage medium to solve the technical problem that the traditional message hierarchical sorting method cannot balance the accuracy and recognition efficiency.
[0005] In order to solve the above technical problems, the embodiments of the present application provide a message hierarchical sorting method, which adopts the technical scheme as follows:
[0006] A message hierarchical sorting method, the message hierarchical sorting method is applied to a message hierarchical sorting system, the message hierarchical sorting system includes a pre-constructed text encoder, a neural network structure and a sorting rule engine, the text encoder is constructed based on a lightweight pre-training language model, the neural network structure includes an attention layer and a full connection layer, and the message hierarchical sorting method includes:
[0007] Obtaining to-be-processed message data, wherein the to-be-processed message data includes message text, message sending time, customer ID and context conversation content;
[0008] The message text and the context conversation content are respectively imported into the text encoder to obtain context semantic features;
[0009] The message sending time and the customer ID are sequentially subjected to feature extraction, to obtain message timing features and customer attribute features;
[0010] The attention layer is used to respectively calculate attention weight values of the context semantic features, the message timing features and the customer attribute features;
[0011] The context semantic features, the message timing features and the customer attribute features are weighted and summed based on the attention weight values, to obtain message weighted features;
[0012] The message weighted features are subjected to emergency degree classification prediction through the full connection layer, to obtain a first hierarchical ranking result;
[0013] The to-be-processed message data is input into the ranking rule engine, to output a second hierarchical ranking result;
[0014] The first hierarchical ranking result is adjusted and optimized according to the second hierarchical ranking result, to obtain a message hierarchical ranking result.
[0015] To solve the above technical problems, the embodiment of the application further provides a message hierarchical ranking device, which adopts the technical scheme as follows:
[0016] A message hierarchical ranking device, which is used to execute the message hierarchical ranking method as described above, and comprises:
[0017] A data acquisition module, which is used to acquire to-be-processed message data, wherein the to-be-processed message data comprises message text, message sending time, customer ID and context conversation content;
[0018] A semantic feature module, which is used to respectively import the message text and the context conversation content into a text encoder, to obtain context semantic features;
[0019] A timing attribute module, which is used to sequentially extract features from the message sending time and the customer ID, to obtain message timing features and customer attribute features;
[0020] An attention weight module, which is used to respectively calculate attention weight values of the context semantic features, the message timing features and the customer attribute features through an attention layer;
[0021] A feature weighting module, which is used to weight and sum the context semantic features, the message timing features and the customer attribute features based on the attention weight values, to obtain message weighted features;
[0022] A first ranking module, which is used to perform emergency degree classification prediction on the message weighted features through a full connection layer, to obtain a first hierarchical ranking result;
[0023] The second sorting module is configured to input the to-be-processed message data into a sorting rule engine and output a second hierarchical sorting result.
[0024] The adjustment optimization module is configured to adjust and optimize the first hierarchical sorting result according to the second hierarchical sorting result to obtain a message hierarchical sorting result.
[0025] To solve the above technical problems, the embodiment of the application further provides a computer device, which adopts the technical scheme as follows:
[0026] A computer device comprises a memory and a processor, the memory stores computer readable instructions, and the processor executes the computer readable instructions to realize the steps of the message hierarchical sorting method according to any one of the above.
[0027] To solve the above technical problems, the embodiment of the application further provides a computer readable storage medium, which adopts the technical scheme as follows:
[0028] A computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by a processor to realize the steps of the message hierarchical sorting method according to any one of the above.
[0029] Compared with the prior art, the embodiment of the application has the following beneficial effects:
[0030] The application discloses a message hierarchical sorting method and device, a computer device and a storage medium, and belongs to the technical field of artificial intelligence, and is applied to an insurance business customer service system. The application constructs a communication software message intelligent hierarchical sorting method based on a combination of a lightweight pre-training language model and a rule engine, which significantly improves the response efficiency and service quality of enterprise communication software in the insurance industry customer service scene. The semantic understanding ability of the pre-training model is used to perform deep semantic modeling on customer messages and context, and message timing features and customer attribute features are fused, and the attention mechanism is used for dynamic weighting to effectively aggregate multi-dimensional features. On this basis, the rule engine is combined to perform hard constraint and weighted optimization on specific business logic, which improves the identification ability of the system for high-value customers and urgent scenes. Finally, through the cooperative mechanism of model prediction and rule adjustment, accurate message priority sorting results are generated and pushed to the customer service representative system in real time, so that the representative can prioritize high-priority problems, avoid missing and delayed responses, reduce complaint rates, and improve customer satisfaction and enterprise service efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0031] In order to more clearly illustrate the solutions in the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.
[0032] Figure 1 An exemplary system architecture diagram in which the present application can be applied is shown;
[0033] Figure 2 A flow chart of one embodiment of a message hierarchical ranking method according to the present application is shown;
[0034] Figure 3 A structural schematic diagram of one embodiment of a message hierarchical ranking device according to the present application is shown;
[0035] Figure 4 A structural schematic diagram of one embodiment of a computer device according to the present application is shown. DETAILED DESCRIPTION
[0036] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application; the description and the claims of the present application and the above-mentioned drawings in the specification illustrate the present application by way of example; the terms "comprise", "comprising", "include", "including", "have", "has", "contain", "containing", "include" or any other similar words herein are intended to cover a non-exclusive inclusion; the terms "first", "second" and the like in the description of the specification and the claims of the present application and the above-mentioned drawings are used to distinguish different objects, not to describe a particular order.
[0037] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase that the phrase in the specification appear in various places in the specification do not necessarily all refer to the same embodiment, or necessarily refer to different or alternative embodiments to each other. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with each other.
[0038] In order to make the person skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described in the following with reference to the drawings.
[0039] As Figure 1As shown, the system architecture 100 can include a terminal device 101, a network 102 and a server 103. The terminal device 101 can be a notebook computer 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is a medium for providing a communication link between the terminal device 101 and the server 103. The network 102 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0040] A user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0041] The terminal device 101 can be various electronic devices with a display screen and supporting web browsing, in addition to the notebook computer 1011, the tablet computer 1012 or the mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer and a desktop computer, etc.
[0042] The server 103 can be a server providing various services, such as a background server supporting the page displayed on the terminal device 101.
[0043] It should be noted that the message hierarchical ranking method provided by the embodiments of the present application is generally executed by a server / terminal device, and accordingly, the message hierarchical ranking device is generally provided in the server / terminal device.
[0044] It should be understood that Figure 1 The number of terminal devices, networks and servers in the above system is only illustrative, and the above system can have any number of terminal devices, networks and servers according to the needs of implementation.
[0045] With reference to Figure 2 , a flow chart of one embodiment of the message hierarchical ranking method according to the present application is shown. The message hierarchical ranking method is applied to a message hierarchical ranking system, the message hierarchical ranking system includes a pre-constructed text encoder, a neural network structure and a ranking rule engine. The text encoder is constructed based on a lightweight pre-trained language model. The neural network structure includes an attention layer and a fully connected layer. The message hierarchical ranking method includes:
[0046] S201, obtaining to-be-processed message data, wherein the to-be-processed message data includes message text, message sending time, customer ID and context conversation content;
[0047] Specifically, the system performs real-time acquisition of data, including message interaction records between the agent and the customer. The acquired message data not only contains the latest message text sent by the customer, but also includes the timestamp of the message, the identity of the sender (i.e., the customer ID) and the conversation history (context content) in which the message is located. The context conversation content generally includes all conversation records of the customer within a certain time window (such as the past 30 minutes or the last 5 messages), so as to comprehensively analyze the overall trend of the conversation and the evolution of the customer's emotion when performing feature extraction. In addition, the system can also perform automatic speech recognition (ASR) text processing on non-text messages (such as voice) at this stage to ensure that all information is analyzed in a unified text format.
[0048] In addition, in order to ensure the timeliness and privacy compliance of the data, the module should combine a message queue system (such as Kafka) and an encrypted transmission mechanism to securely store and distribute the original messages in real time as input sources for the hierarchical ranking model.
[0049] S202, respectively importing the message text and the context conversation content into a text encoder to obtain context semantic features;
[0050] Specifically, the extraction of text semantic vectors is realized through a lightweight pre-training model Distil BERT. The message text and its corresponding conversation history are input into the model, first for word segmentation and encoding processing, and then the corresponding vector representation is output through the encoder. Distil BERT retains the deep semantic representation capability in the BERT model, while greatly reducing the model parameter quantity, and is very suitable for use in customer service scenarios with high response delay requirements. The context semantic features not only include the semantic information of the current sentence, but also model the previous statements in the conversation, so that the system has certain context perception ability.
[0051] For example, if the previous text has mentioned that "the policy number has been sent three times without response", the system can identify that the customer is currently in an anxious or dissatisfied emotion, thereby improving the accuracy of the overall message urgency judgment. In addition, the vectors output by the encoder are formed into a semantic summary through average pooling or CLS site extraction.
[0052] S203, sequentially performing feature extraction on the message sending time and the customer ID to obtain message timing features and customer attribute features;
[0053] Specifically, this step extracts structured information from the time and customer dimensions respectively to assist the model in determining the importance of the message. The message sending time not only records the absolute timestamp, but also extracts relative time features such as whether it is non-working hours (e.g. 10pm), whether it is a holiday, the time interval from the last message, etc., thereby reflecting the customer's activity frequency and communication urgency. While the customer ID serves as a unique identifier, it can be linked to the customer's historical profile, including their level (e.g. VIP customer), complaint history, past service satisfaction score, and common consultation categories. These attributes reflect the customer's sensitivity to service and business value. During the feature extraction process, feature mapping (such as one-hot, embedding vectorization) or numerical normalization (such as Min-Max standardization) methods can be used to form a unified input format for the model to process. By integrating this information, the model can understand the differences in the same sentence in different contexts and with different customer identities, thereby more accurately predicting its urgency.
[0054] S204, calculating attention weight values of the context semantic features, message timing features and customer attribute features respectively through an attention layer;
[0055] Specifically, in this phase, the model will use attention mechanisms to assign different importance weights to the three types of features, thereby achieving dynamic perception before information fusion. The core idea of the attention mechanism is to allow the model to automatically learn which input information is more important in the current task. By constructing a trainable attention weight matrix, the context semantic features, message timing features and customer attribute features are scored respectively.
[0056] For example, in a conversation where the content is very ordinary, but it occurs at 2am and the customer is a VIP, the system may automatically assign higher attention values to time and customer attributes. Technically, multi-head attention mechanisms can be used to model different dimensions of information in parallel, and self-attention (Self-Attention) can be used to further strengthen the internal relationships between features. This step effectively improves the model's generalization ability and the ability to fuse multi-source heterogeneous data, providing dynamic adjustable parameters for feature fusion, making the final output result more targeted and flexible.
[0057] S205, weighting and summing the context semantic features, message timing features and customer attribute features based on the attention weight values to obtain message weighted features;
[0058] Specifically, after obtaining the attention weights of the three types of features, this step will integrate the features of different dimensions into a unified message weighted feature vector through weighted summation. This vector integrates information from the three dimensions of semantics, time and customer attributes, and dynamically balances each type of feature according to its weight in the current context.
[0059] For example, in a message from a high-value customer, even if the content emotion is neutral, if the system identifies that it has repeatedly asked questions without success in the past, it will enhance the importance of the context semantic features through the context weight assignment mechanism, thereby increasing the overall emergency level of the judgment tendency. In specific implementation, a matrix weighting summation method is used to linearly combine multiple feature vectors into a high-dimensional semantic fusion representation. This fused vector can be regarded as the "portrait" of the current message in the semantic, behavioral and identity dimensions.
[0060] S206, classifying and predicting the emergency level of the weighted features of the message through the fully connected layer to obtain a first hierarchical ranking result;
[0061] Specifically, in this step, the model inputs the weighted features obtained by the previous step fusion into a classification network containing several fully connected layers, and outputs the emergency level prediction of the current message. The fully connected layer structure includes linear transformation, nonlinear activation function (such as ReLU), Dropout layer (used to prevent overfitting), etc. The feature vector is gradually compressed or dimensionally upgraded, and finally the probability distribution of four classification results (such as urgent, high, medium, and low) is output through the softmax function. This probability vector can be used to infer the first round of hierarchical ranking level of the current message.
[0062] For example, if a message is predicted to be in the "urgent" category with a probability of 0.85, it will be labeled with a priority of 0. The model can use the cross-entropy loss function for training, supervised learning through historical manual annotation data, and constantly optimize the model parameters. This step is the most core prediction link in the entire system, providing a data-driven initial reference for the final ranking result, ensuring that the system has strong generalization ability and prediction accuracy.
[0063] S207, inputting the message data to be processed into the ranking rule engine to output a second hierarchical ranking result;
[0064] Specifically, this step initiates the business rule engine to review and supplement the first ranking result to achieve targeted optimization of model prediction. The ranking rule engine has a series of hard rules and soft rules built in, which are customized based on the actual operation needs of the enterprise. For example, hard rules such as "VIP customer messages are always set to urgent" and "message priority is automatically increased by one level during non-working hours" can directly override the model prediction results. Soft rules such as "the customer has repeatedly asked questions recently and has a high emotional score" are added to the model results through rule weighting. The engine can be flexibly configured based on DSL (Domain Specific Language) to allow operation personnel to quickly adjust the rule system without modifying the code. This step enhances the explainability of the result optimization by fusing the rule output with the model prediction result, ensuring a balance between "reasonableness" and "controllability" and improving business trust.
[0065] S208, adjusting and optimizing the first hierarchical ranking result according to the second hierarchical ranking result to obtain a message hierarchical ranking result.
[0066] Specifically, this step integrates the first hierarchical ranking result (model prediction) and the second hierarchical ranking result (rule adjustment) to generate the final message priority ranking result through adjustment.
[0067] For example, weighted fusion is used for adjustment. During the fusion process, the system sets the model weight coefficient w1 and the rule weight coefficient w2 (w1 + w2 = 1), and dynamically adjusts the proportion of these two weights according to different business scenarios. For example, in the case of strong model stability, the proportion of w1 can be increased, while in some high-sensitivity scenarios (such as during the launch of a new product), the proportion of w2 is increased to enhance controllability. Finally, the system will sort all pending messages according to the comprehensive score, and push the message queue to the customer service representative interface to ensure that the representative responds to high-value and high-risk customer requests first. Through this optimization mechanism, the system balances the generalization ability of the model and the business adaptability of the rule engine, realizes the deep integration of intelligent sorting and manual intervention, and improves the service efficiency and user satisfaction of the overall customer service system.
[0068] Further, the steps of respectively importing the message text and the context conversation content into the text encoder to obtain the context semantic features include:
[0069] The message text and the context conversation content are respectively subjected to word segmentation processing to obtain text segmentation and context segmentation;
[0070] The text segmentation is subjected to embedding representation using the text encoder to obtain a first vector sequence, and the context segmentation is subjected to embedding representation using the text encoder to obtain a second vector sequence;
[0071] The first vector sequence and the second vector sequence are spliced to obtain the context semantic feature.
[0072] In the embodiment, the message text and the context conversation content are respectively processed by word segmentation, so as to fully retain semantic units and facilitate embedding representation. After word segmentation, the message text and the context content are respectively input into the same lightweight pre-training language model Distil BERT for embedding calculation, to generate two groups of semantic vectors, i.e. the first vector sequence and the second vector sequence. These vectors retain the semantic information of the original text and express the semantic relationship of each word in the text in the form of dense numerical values. After obtaining the two groups of vectors, the semantic feature of the current message and its historical context information are fused by vector splicing to form a more comprehensive context semantic feature. The splicing method not only retains the local information of the message, but also enhances the understanding ability of the model to the context, which helps the model to more accurately judge the real intention of the current message of the customer and the urgency thereof. In addition, by uniformly using the same encoder, the system complexity can be reduced, the computing resource consumption can be reduced, and the processing efficiency can be improved.
[0073] Through the above steps, the semantic information between the message itself and the context can be fully fused, and the understanding accuracy of the model to the intention and urgency of the customer can be improved.
[0074] Further, the step of embedding representation of the context word segmentation by using the text encoder to obtain the second vector sequence specifically includes:
[0075] The position of the text word segmentation in the context conversation content is identified, and a position identifier is added in the context conversation content based on the position of the text word segmentation;
[0076] Based on the position identifier, the position information of the message text in the context conversation content is obtained;
[0077] The position information is encoded to obtain a position information sequence;
[0078] The context word segmentation is embedded and represented by using the text encoder to obtain a context word segmentation vector sequence;
[0079] The context word segmentation vector sequence and the position information sequence are spliced to obtain the second vector sequence.
[0080] In this embodiment, in order to enhance the understanding of the model to the context semantic structure and the relationship between the current message position, firstly, the specific position of each text segmentation in the context dialogue content needs to be identified, and an explicit position identifier is added at the corresponding position. These position identifiers not only record the relative order of each word in the whole context, but also can reflect the accurate position of the current message text in the dialogue history. Then, the position information of the message text in the context is extracted based on these identifiers, and is converted into a numerical vector sequence consistent with the dimension of the word vector (such as using a learnable position embedding or a sine position encoding) through a position encoding method. Subsequently, the text encoder is used to embed the segmentation of the context to generate a context semantic vector sequence. Finally, the context word vector sequence and the corresponding position information sequence are spliced by position to form a second vector sequence containing semantic information and position information.
[0081] For example, in the dialogue between the customer and the insurance customer service, the historical context includes the following messages: “I applied for a claim last week”, “but there is no result so far”, “can you help me check it?”. The message sent by the current customer is: “What's going on? I'm in a hurry!” When processing the context, the system first segments these historical messages, and identifies the position of each word in the whole dialogue, such as “I” is the 1st word in the first sentence, “apply” is the 2nd, and so on. The relative position of the word “hurry” in the current message in the whole dialogue is also marked and given an explicit position encoding. Subsequently, the system embeds each word of the context into a vector, and splices the word vector with its position vector to form a joint feature vector containing semantic and structural information. This processing method enables the model not only to understand that “hurry” represents a negative emotion, but also to clearly know that it appears at the end of the dialogue, so as to identify that it is the strong reaction of the customer to the unsolved problem, and the priority should be raised.
[0082] Through the above steps, the context semantic and position information can be effectively fused, and the perception ability of the model to the dialogue structure and context can be enhanced.
[0083] Further, the step of splicing the first vector sequence and the second vector sequence to obtain the context semantic feature includes:
[0084] aligning the dimensions of the first vector sequence and the second vector sequence;
[0085] splicing the first vector sequence and the second vector sequence after the dimension alignment to obtain the context semantic feature;
[0086] Further, the step of splicing the context segmentation vector sequence and the position information sequence to obtain the second vector sequence includes:
[0087] aligning dimensions of the context token vector sequence and the position information sequence;
[0088] concatenating the context token vector sequence and the position information sequence after the dimension alignment to obtain a second vector sequence.
[0089] In this embodiment, to ensure the consistency of semantic information and structural information in the vector space, first, the first vector sequence (i.e., the embedding vector of the current message text) and the second vector sequence (i.e., the embedding vector after concatenating the context and its position information) are subjected to dimension alignment processing. This process includes uniform dimension expansion, scaling or padding of vectors from different sources to meet the mathematical requirements of vector concatenation. For example, if the first vector is 256-dimensional and the second vector is 512-dimensional, it can be mapped to the same dimension (such as 512-dimensional) through a mapping function or a projection network. After the alignment is completed, the two vector sequences are concatenated at the word level or sequence level to form the overall semantic features that fuse the semantics of the current message and the context. In addition, when constructing the second vector sequence, the context semantic vector and the position vector also need to be aligned first to ensure that the semantic information of each word and its corresponding position information can be combined bit by bit. For example, the 300-dimensional word vector and the 64-dimensional position vector are uniformly expanded to the same dimension or directly concatenated to form a 364-dimensional enhanced semantic vector sequence. Through such a double alignment and concatenation strategy, the system can effectively preserve the semantic content and context structure, and further improve the recognition ability of the message intent, sentiment and context relationship.
[0090] Through the above steps, the unified fusion of context semantics and position information is realized, and the comprehensive processing ability of the model for multi-dimensional information is enhanced.
[0091] Further, the step of calculating the attention weight value of the context semantic feature, the message time sequence feature and the customer attribute feature through the attention layer respectively, specifically includes:
[0092] Based on the attention layer, the query vector, the key vector and the value vector corresponding to the context semantic feature, the message time sequence feature and the customer attribute feature are obtained respectively;
[0093] Calculate the feature vector similarity of the query vector and the key vector to obtain the feature similarity;
[0094] According to the feature similarity, the context semantic feature, the message time sequence feature and the customer attribute feature are respectively weighted to obtain the attention weight value.
[0095] In the present embodiment, in order to realize effective fusion of multi-dimensional heterogeneous features, attention mechanism is adopted to calculate the weight of context semantic features, message timing features and customer attribute features respectively, so as to highlight the feature information that contributes most to the current message urgency judgment. Specifically, the system first generates corresponding query vector (Query), key vector (Key) and value vector (Value) for each type of feature based on the attention layer. The query vector is used to represent the attention target of the current model, and the key vector is calculated by point product with the query vector and then normalized by Softmax to generate the similarity between each feature and the query target, i.e. the attention weight. This similarity reflects the importance of each type of feature in the current scenario. Then, the corresponding value vector is weighted and summed using the attention weight to obtain the final feature representation vector. This method allows the model to dynamically adjust the attention degree to different features, for example, when the customer repeatedly consults the same question, the model can automatically increase the weight of the context semantic; while identifying high-value customers or non-working hours consultation requests, the attention to customer attributes and timing features is increased, thereby improving the accuracy and intelligence of the overall judgment.
[0096] Through the above steps, the model can automatically focus on key information and improve the perception ability of message urgency under multi-feature fusion.
[0097] Further, the step of weighting and summing the context semantic features, message timing features and customer attribute features based on the attention weight value to obtain the message weighted features, specifically includes:
[0098] Obtain the weighted context semantic features, message timing features and customer attribute features;
[0099] Respectively perform point product operation on the context semantic features, message timing features and customer attribute features and the corresponding value vectors to obtain semantic feature value vectors, message timing feature value vectors and customer attribute feature value vectors;
[0100] Vector splicing is performed on the semantic feature value vectors, message timing feature value vectors and customer attribute feature value vectors to obtain the message weighted features.
[0101] In the embodiment, after obtaining the attention weights of the contextual semantic features, message timing features and customer attribute features, the system further weights the feature vectors using these weight values to extract the most representative message comprehensive features. First, the weighting results of each type of feature after attention layer calculation are obtained, i.e. the importance degree of each feature dimension in the current scene. Then, the weighted feature vector and its corresponding value vector are executed dot product operation, thereby obtaining three different types of feature value vectors: the semantic feature value vector reflects the implied sentiment and intent in the text and context, the timing feature value vector reflects the dynamic attributes such as message sending time and frequency, and the customer attribute feature value vector reflects the static information such as customer level and historical behavior. Through the dot product operation, the feature information can be further compressed, the key feature expression can be retained, and the redundancy can be reduced. Finally, the three types of feature value vectors after weighting and dot product processing are concatenated at the vector level to merge into a unified message weighted feature for the classification layer. The weighting fusion process not only improves the semantic integrity of the feature expression, but also strengthens the understanding ability of the model to the relationship between different types of features, providing a more fine and discriminative input representation for the urgency judgment.
[0102] Through the above steps, the multi-dimensional feature information is effectively integrated, and the discrimination accuracy and robustness of the model in the message urgency classification are improved.
[0103] Further, the step of inputting the to-be-processed message data into the sorting rule engine and outputting the second hierarchical sorting result includes:
[0104] obtaining the customer attribute sorting rule, the message timing sorting rule and the semantic sorting rule in the sorting rule engine;
[0105] using the customer attribute sorting rule, the message timing sorting rule and the semantic sorting rule to score the contextual semantic features, the message timing features and the customer attribute features in turn, and calculating the total score of the to-be-processed message data;
[0106] determining the second hierarchical sorting result according to the total score.
[0107] In this embodiment, the ranking rule engine, as an effective supplement to the AI model output result, can perform rule-based scoring and priority judgment on the message data to be processed based on preset business logic. Specifically, the system first calls three types of core rules from the rule engine: customer attribute ranking rules, message timing ranking rules, and semantic ranking rules. Among them, the customer attribute rules are used to identify high-value or sensitive customers (such as VIPs and high-frequency complaint users) and give them higher weights; the message timing rules focus on the time node and frequency of message sending (such as night, peak period, or multiple sending in a short time) to determine whether the customer is in an emergency state; the semantic ranking rules identify key emotional words or urgent words in the text to improve the urgency level. The system scores the corresponding features according to each type of rule, and combines the scores to calculate the total score, and then maps the second hierarchical ranking result according to the score interval. This method can flexibly adjust the rules and weights to adapt to different business strategies and service goals.
[0108] Through the above steps, the system has configurability and business adaptability, and the response priority of high-risk or high-value messages is improved.
[0109] Further, the step of adjusting and optimizing the first hierarchical ranking result according to the second hierarchical ranking result to obtain the message hierarchical ranking result, specifically includes:
[0110] Obtaining the forced rules in the ranking rule engine;
[0111] Identifying the item number corresponding to the forced rules in the second hierarchical ranking result to obtain the forced ranking item number;
[0112] Adjusting the corresponding forced ranking item number in the first hierarchical ranking result to the front row of the ranking result.
[0113] In this embodiment, the core purpose of this step is to optimize the model prediction result through business-driven forced rules, so as to ensure that the system has higher sensitivity and response ability to key scenarios in actual operation. Specifically, the system first obtains the pre-defined forced rules from the ranking rule engine, which usually include "VIP customer messages must be processed first", "messages containing keywords such as complaints and emergencies need to be responded immediately", and other business hard constraints. Then, the system identifies the item number in the second hierarchical ranking result that meets these rules, i.e. the forced ranking item number, and moves these messages in the first hierarchical ranking result to the front, and pushes them to the agent personnel first. This adjustment does not change the output logic of the model itself, but intervenes in the sorting and optimization of some important messages in the final sorting stage, so that the overall ranking result not only retains the intelligence of the model, but also has business controllability and rule constraint force, thereby meeting the high-demand service response standard.
[0114] Through the above steps, we can ensure that high-priority messages are not misjudged and omitted by the model, and achieve effective integration of business logic and model intelligent prediction results.
[0115] In the above-mentioned embodiments, the present application discloses a message hierarchical sorting method, which belongs to the field of artificial intelligence technology and is applied to insurance business customer service systems. By constructing an intelligent hierarchical sorting method for communication software messages based on a lightweight pre-trained language model and a rule engine, the present application significantly improves the response efficiency and service quality of enterprise communication software in customer service scenarios in the insurance industry. The semantic understanding capabilities of the pre-trained model are utilized to perform deep semantic modeling of customer messages and context, while simultaneously integrating message timing features with customer attribute features. Dynamic weighting is then achieved through an attention mechanism to achieve effective aggregation of multi-dimensional features. Furthermore, the rule engine is combined to impose hard constraints and weighted optimization on specific business logic, improving the system's ability to identify high-value customers and emergency scenarios. Ultimately, through a collaborative mechanism of model prediction and rule adjustment, accurate message prioritization results are generated and pushed to the customer service agent system in real time, enabling agents to prioritize high-priority issues, avoid missed and delayed responses, reduce complaint rates, and improve customer satisfaction and enterprise service efficiency.
[0116] In this embodiment, the message hierarchical sorting method is executed on the electronic device (eg Figure 1 The server shown in FIG. 1 may receive instructions or obtain data via a wired connection or a wireless connection. It should be noted that the wireless connection may include, but is not limited to, 3G / 4G connection, Wi-Fi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (Ultra Wide Band) connection, and other wireless connection methods currently known or to be developed in the future.
[0117] It should be emphasized that in order to further ensure the privacy and security of the above message information, the above message information can also be stored in a blockchain node.
[0118] The blockchain referred to in this application refers to a new application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of the information (to prevent counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer.
[0119] The embodiments of the present application can acquire and process related data based on artificial intelligence technology. The artificial intelligence (AI) is a theory, method, technology and application system for simulating, extending and expanding human intelligence by using a digital computer or a machine controlled by a digital computer, perceiving an environment, acquiring knowledge and using the knowledge to obtain optimal results.
[0120] The artificial intelligence basic technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. The artificial intelligence software technology mainly includes computer vision technology, robot technology, biometric identification technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.
[0121] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through computer readable instructions, and the computer readable instructions can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments of each method. Among them, the storage medium can be a non-volatile storage medium such as a magnetic disc, an optical disc, a read-only memory (ROM), or a random access memory (RAM).
[0122] It should be understood that, although each step in the flowchart of the accompanying drawings is displayed in sequence according to the direction of the arrow, these steps are not necessarily executed in sequence according to the direction of the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and they can be executed in other orders. Moreover, at least part of the steps in the flowchart of the accompanying drawings can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or sub-steps or stages of other steps.
[0123] Further referring to Figure 3 , as an implementation of the method shown in Figure 2 , the present application provides an embodiment of a message hierarchical sorting device, which corresponds to the method embodiment shown in Figure 2 , and the device can be specifically applied to various electronic devices.
[0124] As Figure 3As shown, the message hierarchical sorting device 300 described in the embodiment is used to execute the message hierarchical sorting method as described above, and the message hierarchical sorting device comprises:
[0125] The data acquisition module 301 is configured to acquire to-be-processed message data, wherein the to-be-processed message data comprises message text, message sending time, customer ID and context dialogue content;
[0126] The semantic feature module 302 is configured to respectively import the message text and the context dialogue content into a text encoder to obtain context semantic features;
[0127] The time sequence attribute module 303 is configured to sequentially perform feature extraction on the message sending time and the customer ID to obtain message time sequence features and customer attribute features;
[0128] The attention weight module 304 is configured to calculate attention weight values of the context semantic features, the message time sequence features and the customer attribute features through an attention layer respectively;
[0129] The feature weighting module 305 is configured to perform weighted summation on the context semantic features, the message time sequence features and the customer attribute features based on the attention weight values to obtain message weighted features;
[0130] The first sorting module 306 is configured to perform emergency degree classification prediction on the message weighted features through a fully connected layer to obtain a first hierarchical sorting result;
[0131] The second sorting module 307 is configured to input the to-be-processed message data into a sorting rule engine to output a second hierarchical sorting result;
[0132] The adjustment and optimization module 308 is configured to adjust and optimize the first hierarchical sorting result according to the second hierarchical sorting result to obtain a message hierarchical sorting result.
[0133] Further, the semantic feature module 302 specifically comprises:
[0134] The word segmentation processing unit is configured to perform word segmentation processing on the message text and the context dialogue content respectively to obtain text word segmentation and context word segmentation;
[0135] The embedding representation unit is configured to use the text encoder to perform embedding representation on the text word segmentation to obtain a first vector sequence, and use the text encoder to perform embedding representation on the context word segmentation to obtain a second vector sequence;
[0136] The vector splicing unit is configured to splice the first vector sequence and the second vector sequence to obtain the context semantic features.
[0137] Further, the embedding representation unit specifically comprises:
[0138] A position identification subunit is configured to identify a position of the text segmentation in the contextual dialogue content and add a position identifier in the contextual dialogue content based on the position of the text segmentation.
[0139] A position information subunit is configured to obtain position information of the message text in the contextual dialogue content based on the position identifier.
[0140] A position encoding subunit is configured to encode the position information to obtain a position information sequence.
[0141] A contextual segmentation embedding representation subunit is configured to use a text encoder to perform embedding representation on the contextual segmentation to obtain a contextual segmentation vector sequence.
[0142] A concatenation subunit is configured to concatenate the contextual segmentation vector sequence and the position information sequence to obtain a second vector sequence.
[0143] Further, the vector concatenation unit specifically includes:
[0144] A first dimension alignment subunit is configured to perform dimension alignment on the first vector sequence and the second vector sequence.
[0145] A first concatenation subunit is configured to concatenate the first vector sequence and the second vector sequence after the dimension alignment to obtain the contextual semantic feature.
[0146] Further, the concatenation subunit specifically includes:
[0147] A second dimension alignment subunit is configured to perform dimension alignment on the contextual segmentation vector sequence and the position information sequence.
[0148] A second concatenation subunit is configured to concatenate the contextual segmentation vector sequence and the position information sequence after the dimension alignment to obtain the second vector sequence.
[0149] Further, the attention weight module 304 specifically includes:
[0150] A preparation unit is configured to obtain query vectors, key vectors and value vectors corresponding to the contextual semantic feature, the message timing feature and the customer attribute feature based on the attention layer respectively.
[0151] A similarity calculation unit is configured to calculate feature vector similarity of the query vectors and the key vectors to obtain feature similarity.
[0152] A feature weighting unit is configured to perform weighting operation on the contextual semantic feature, the message timing feature and the customer attribute feature respectively according to the feature similarity to obtain attention weight values.
[0153] Further, the feature weighting module 305 specifically includes:
[0154] a feature acquisition unit, configured to acquire the weighted context semantic feature, the message timing feature and the customer attribute feature;
[0155] a vector dot product unit, configured to respectively perform dot product operations on the context semantic feature, the message timing feature and the customer attribute feature and corresponding value vectors to obtain a semantic feature value vector, a message timing feature value vector and a customer attribute feature value vector;
[0156] a weighted vector splicing unit, configured to splice the semantic feature value vector, the message timing feature value vector and the customer attribute feature value vector to obtain the message weighted feature.
[0157] Further, the second sorting module 307 specifically comprises:
[0158] a sorting rule acquisition unit, configured to acquire a customer attribute sorting rule, a message timing sorting rule and a semantic sorting rule in a sorting rule engine;
[0159] a scoring unit, configured to use the customer attribute sorting rule, the message timing sorting rule and the semantic sorting rule to sequentially score the context semantic feature, the message timing feature and the customer attribute feature, and calculate a total score of the to-be-processed message data;
[0160] a sorting unit, configured to determine a second hierarchical sorting result according to the total score.
[0161] Further, the adjustment optimization module 308 specifically comprises:
[0162] a mandatory rule acquisition unit, configured to acquire a mandatory rule in the sorting rule engine;
[0163] a mandatory sorting item order unit, configured to identify an item order corresponding to the mandatory rule in the second hierarchical sorting result to obtain a mandatory sorting item order;
[0164] a sorting item order adjustment unit, configured to adjust the corresponding mandatory sorting item order in the first hierarchical sorting result to a front row of the sorting result.
[0165] In the above embodiment, the application discloses a message hierarchical sequencing device, which belongs to the technical field of artificial intelligence and is applied to an insurance business customer service system. The application constructs a communication software message intelligent hierarchical sequencing method based on the combination of a lightweight pre-training language model and a rule engine, thereby significantly improving the response efficiency and service quality of enterprise communication software in the insurance industry customer service scene. The semantic understanding ability of the pre-training model is used to perform deep semantic modeling on customer messages and context, while message timing features and customer attribute features are fused, and the attention mechanism is used for dynamic weighting, thereby realizing effective aggregation of multi-dimensional features. On this basis, the rule engine is combined to perform hard constraint and weighted optimization on specific business logic, thereby improving the identification ability of the system for high-value customers and urgent scenes. Finally, through the cooperative mechanism of model prediction and rule adjustment, accurate message priority sequencing results are generated and pushed to the customer service representative system in real time, so that the representative can prioritize high-priority problems, avoid missing and delayed responses, reduce complaint rates, and improve customer satisfaction and enterprise service efficiency.
[0166] To solve the above technical problems, the embodiment of the application further provides a computer device. For details, please refer to Figure 4 , Figure 4 The basic structure block diagram of the computer device of the embodiment is shown in the figure.
[0167] The computer device 4 includes a memory 41, a processor 42 and a network interface 43 which are connected to each other through a system bus. It should be pointed out that only the computer device 4 with the memory 41, the processor 42 and the network interface 43 is shown in the figure, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented. Among them, those skilled in the art can understand that the computer device herein is a device capable of automatically performing numerical calculation and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0168] The computer device can be a desktop computer, a notebook computer, a palm computer and a cloud server, etc. The computer device can interact with the user through a keyboard, a mouse, a remote controller, a touchpad or a voice control device, etc.
[0169] The memory 41 includes at least one type of readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit and the external storage device of the computer device 4. In this embodiment, the memory 41 is generally used to store an operating system and various application software installed on the computer device 4, such as computer readable instructions of the message ranking method, etc. In addition, the memory 41 can also be used to temporarily store various data that have been output or will be output.
[0170] The processor 42 can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer readable instructions or process data stored in the memory 41, such as computer readable instructions of the message ranking method.
[0171] The network interface 43 can include a wireless network interface or a wired network interface, and is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0172] The present application also provides an embodiment, i.e., to provide a computer device, which includes a memory and a processor, the memory stores computer readable instructions, and the processor executes the computer readable instructions to implement the steps of the user insurance demand evaluation method as described above, i.e., to implement:
[0173] The application discloses a message hierarchical ranking method, and relates to the technical field of message hierarchical ranking.
[0174] Obtaining to-be-processed message data, wherein the to-be-processed message data comprises message text, message sending time, customer ID and context dialogue content;
[0175] Respectively importing the message text and the context dialogue content into a text encoder to obtain context semantic features;
[0176] Sequentially performing feature extraction on the message sending time and the customer ID to obtain message time sequence features and customer attribute features;
[0177] Calculating attention weight values of the context semantic features, the message time sequence features and the customer attribute features through an attention layer;
[0178] Performing weighted summation on the context semantic features, the message time sequence features and the customer attribute features based on the attention weight values to obtain message weighted features;
[0179] Performing emergency degree classification prediction on the message weighted features through a full connection layer to obtain a first hierarchical ranking result;
[0180] Inputting the to-be-processed message data into a ranking rule engine to output a second hierarchical ranking result;
[0181] Adjusting and optimizing the first hierarchical ranking result according to the second hierarchical ranking result to obtain a message hierarchical ranking result.
[0182] The application further provides another implementation, namely providing a computer readable storage medium, the computer readable storage medium stores computer readable instructions, the computer readable instructions can be executed by at least one processor, so that the at least one processor executes the steps of the message hierarchical ranking method as described above, namely realizes:
[0183] The application discloses a message hierarchical ranking method, and relates to the technical field of message hierarchical ranking.
[0184] Obtaining to-be-processed message data, wherein the to-be-processed message data comprises message text, message sending time, customer ID and context dialogue content;
[0185] The message text and the context conversation content are respectively imported into a text encoder to obtain context semantic features;
[0186] The message sending time and the customer ID are sequentially subjected to feature extraction to obtain message timing features and customer attribute features;
[0187] The attention layer is used to calculate attention weight values of the context semantic features, the message timing features and the customer attribute features respectively;
[0188] The context semantic features, the message timing features and the customer attribute features are subjected to weighted summation based on the attention weight values to obtain message weighted features;
[0189] The message weighted features are subjected to emergency degree classification prediction through the fully connected layer to obtain a first hierarchical ranking result;
[0190] The to-be-processed message data is input into the ranking rule engine to output a second hierarchical ranking result;
[0191] The first hierarchical ranking result is adjusted and optimized according to the second hierarchical ranking result to obtain a message hierarchical ranking result.
[0192] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and a necessary general hardware platform, and of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, an optical disk), and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the methods described in the various embodiments of the present application.
[0193] The application is operable with numerous general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, and / or configurations that can be suitable for use with the application include personal computers, server computers, handheld or laptop devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like, that perform particular tasks or implement particular abstract data types. The application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.
[0194] It should be noted that the non-company software tools or components appearing in various embodiments of the application are only illustrative, and do not represent actual use.
[0195] Obviously, the above-described embodiments are only some of the embodiments of the application, and are not all the embodiments of the application. The preferred embodiments of the application are given in the drawings, but do not limit the patent scope of the application. The application can be implemented in many different forms, and conversely, the purpose of providing these embodiments is to make the disclosure of the application more thorough and comprehensive. Although the application is described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions recorded in the foregoing specific embodiments, or equivalently replace some of the technical features. Any equivalent structure made by using the content of the specification and drawings, directly or indirectly used in other related technical fields, is also within the patent protection scope of the application.
Claims
1. A method of message prioritization, the method comprising: The message ranking method is applied to a message ranking system, the message ranking system comprising a pre-constructed text encoder, a neural network structure and a ranking rule engine, the text encoder being constructed based on a lightweight pre-trained language model, the neural network structure comprising an attention layer and a fully connected layer, and the message ranking method comprising: obtaining to-be-processed message data, wherein the to-be-processed message data comprises message text, message sending time, customer ID and context conversation content; respectively importing the message text and the context conversation content into the text encoder to obtain context semantic features; sequentially performing feature extraction on the message sending time and the customer ID to obtain message time sequence features and customer attribute features; calculating attention weight values of the context semantic features, the message time sequence features and the customer attribute features through the attention layer; performing weighted summation on the context semantic features, the message time sequence features and the customer attribute features based on the attention weight values to obtain message weighted features; performing emergency degree classification prediction on the message weighted features through the fully connected layer to obtain a first ranking result; inputting the to-be-processed message data into the ranking rule engine to output a second ranking result; adjusting and optimizing the first ranking result according to the second ranking result to obtain a message ranking result.
2. The message prioritization method of claim 1, wherein, The step of respectively importing the message text and the context conversation content into the text encoder to obtain context semantic features comprises: performing word segmentation processing on the message text and the context conversation content to obtain text segmentation and context segmentation; using the text encoder to perform embedding representation on the text segmentation to obtain a first vector sequence, and using the text encoder to perform embedding representation on the context segmentation to obtain a second vector sequence; splicing the first vector sequence and the second vector sequence to obtain the context semantic features.
3. The message prioritization method of claim 2, wherein, The step of using the text encoder to perform embedding representation on the context segmentation to obtain a second vector sequence comprises: identifying a position of the text segmentation in the context conversation content, and adding a position identifier in the context conversation content based on the position of the text segmentation; based on the position identifier, obtaining position information of the message text in the context conversation content; encoding the position information to obtain a position information sequence; using the text encoder to perform embedding representation on the context segmentation to obtain a context segmentation vector sequence; splicing the context segmentation vector sequence and the position information sequence to obtain the second vector sequence.
4. The message prioritization method of claim 3, wherein, The step of splicing the first vector sequence and the second vector sequence to obtain the context semantic features comprises: performing dimension alignment on the first vector sequence and the second vector sequence; splicing the first vector sequence and the second vector sequence after the dimension alignment to obtain the context semantic features. The step of splicing the context token vector sequence and the position information sequence to obtain the second vector sequence specifically comprises: dimension alignment is performed on the context token vector sequence and the position information sequence; the context token vector sequence and the position information sequence after the dimension alignment are spliced to obtain the second vector sequence.
5. The message prioritization method of claim 1, wherein, The step of calculating the attention weight value of the context semantic feature, the message timing feature and the customer attribute feature by the attention layer specifically comprises: query vectors, key vectors and value vectors corresponding to the context semantic feature, the message timing feature and the customer attribute feature are obtained based on the attention layer; a feature vector similarity of the query vector and the key vector is calculated to obtain a feature similarity; the context semantic feature, the message timing feature and the customer attribute feature are respectively weighted according to the feature similarity to obtain the attention weight value.
6. The message prioritization method of claim 5, wherein, The step of performing weighted summation on the context semantic feature, the message timing feature and the customer attribute feature based on the attention weight value to obtain a message weighted feature specifically comprises: the context semantic feature, the message timing feature and the customer attribute feature after weighting are obtained; dot product operations are respectively performed on the context semantic feature, the message timing feature and the customer attribute feature and the corresponding value vectors to obtain semantic feature value vectors, message timing feature value vectors and customer attribute feature value vectors; vector splicing is performed on the semantic feature value vectors, the message timing feature value vectors and the customer attribute feature value vectors to obtain the message weighted feature.
7. The message prioritization method of claim 1, wherein, The step of inputting the to-be-processed message data into the sorting rule engine and outputting a second hierarchical sorting result specifically comprises: customer attribute sorting rules, message timing sorting rules and semantic sorting rules in the sorting rule engine are obtained; the context semantic feature, the message timing feature and the customer attribute feature are sequentially scored using the customer attribute sorting rules, the message timing sorting rules and the semantic sorting rules, and a total score of the to-be-processed message data is calculated; the second hierarchical sorting result is determined according to the total score; The step of adjusting and optimizing the first hierarchical sorting result according to the second hierarchical sorting result to obtain a message hierarchical sorting result specifically comprises: a forced rule in the sorting rule engine is obtained; a term number corresponding to the forced rule in the second hierarchical sorting result is identified to obtain a forced sorting term number; the forced sorting term number in the first hierarchical sorting result is adjusted to the front row of the sorting result.
8. A message prioritization apparatus, characterized by: The message hierarchical sorting device is used to execute the message hierarchical sorting method in any one of claims 1-7, and the message hierarchical sorting device comprises: a data acquisition module configured to acquire to-be-processed message data, wherein the to-be-processed message data comprises a message text, a message sending time, a customer ID and context conversation content; a semantic feature module configured to respectively import the message text and the context dialogue content into the text encoder to obtain context semantic features; a time sequence attribute module configured to sequentially extract features from the message sending time and the customer ID to obtain message time sequence features and customer attribute features; an attention weight module configured to calculate attention weight values of the context semantic features, the message time sequence features, and the customer attribute features through the attention layer; a feature weighting module configured to perform weighted summation on the context semantic features, the message time sequence features, and the customer attribute features based on the attention weight values to obtain message weighted features; a first ranking module configured to perform emergency degree classification prediction on the message weighted features through the fully connected layer to obtain a first hierarchical ranking result; a second ranking module configured to input the to-be-processed message data into the ranking rule engine to output a second hierarchical ranking result; an adjustment optimization module configured to adjust and optimize the first hierarchical ranking result according to the second hierarchical ranking result to obtain a message hierarchical ranking result.
9. A computer device, comprising: a memory and a processor, the memory storing computer readable instructions, and the processor implementing the steps of the message hierarchical ranking method according to any one of claims 1 to 7 when executing the computer readable instructions.
10. A computer-readable storage medium, characterized in that, a computer readable storage medium storing computer readable instructions, and the computer readable instructions implementing the steps of the message hierarchical ranking method according to any one of claims 1 to 7 when executed by a processor.
Citation Information
Cited By
Conversation message queue management system based on large model cluster
CN121187825A
