Financial problem determination method and device, electronic equipment and computer program product
By constructing an undirected graph to identify customer trends, the problems of low recognition accuracy and cumbersome processes in the existing customer service system are solved, achieving more efficient customer service.
Patent Information
- Application Number
- CN202510786397.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-09-16
AI Technical Summary
When dealing with complex or novel issues, the existing customer service system has low recognition accuracy and cumbersome processing procedures, resulting in long waiting times for customers and affecting the efficiency and quality of financial services.
By obtaining the communication records between customers and business personnel, using the attention model to process the communication text, constructing an undirected graph, identifying customer trend issues, and improving recognition accuracy and service efficiency.
It improves the accuracy of identifying customer consultation issues, optimizes service processes, and enhances customer satisfaction and operational efficiency.
Smart Images

Figure CN120653745A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology, and specifically, to a method, device, electronic device and computer program product for determining financial problems. Background Art
[0002] In the increasingly digital financial industry, corporate websites serve as a key channel for interaction between customers and financial institutions, handling a massive volume of online customer service requests. Consequently, customer service systems have become indispensable tools, enabling instant responses to customer inquiries, streamlining service processes, and enhancing the customer experience. However, traditional customer service models are inefficient when handling complex and emerging issues.
[0003] The current online customer service process follows the following model: when customers visit a financial institution's website seeking help, they initially interact with a chatbot, which explores the customer's intent through a series of preset questions and then categorizes their request into specific product or service categories. Once the intent is determined, the chatbot forwards the request to a customer service representative specifically responsible for the corresponding product. Although this process is automated to a certain extent, the robot's recognition of customer intent is often limited by its built-in limited rules and simple labeling system. In actual operation, customer service personnel still need to spend considerable time to deeply understand the customer's specific needs and problem background. This process may involve lengthy conversations and information collection, thereby extending the overall service response time.
[0004] Furthermore, existing customer service request processing systems, particularly those that rely on simple tagging and keyword matching, can quickly categorize common inquiries to a certain extent, but struggle to accurately identify and categorize complex or novel questions. This often eludes existing systems, forcing customer service personnel to manually interpret and analyze reams of conversation logs to determine the customer's true needs. This process is not only time-consuming but also easily leads to prolonged wait times and reduced customer satisfaction. These delays are even more pronounced during periods of surging demand or unprecedented issues, impacting the overall efficiency and quality of financial services.
[0005] There are technical problems in related technologies such as low recognition accuracy and complicated processing procedures when identifying financial issues consulted by customers. No effective solution has been proposed yet. Summary of the Invention
[0006] The main purpose of this application is to provide a method, device, electronic device and computer program product for determining financial problems, so as to solve the technical problems in related technologies such as low recognition accuracy and complicated processing procedures when identifying financial problems consulted by customers.
[0007] To achieve the above objectives, according to one aspect of the present application, a method for identifying financial issues is provided. The method comprises: obtaining communication records sent by a customer, processing the communication records to obtain M communication texts, wherein the communication records are records of communications between the customer and a financial service provider regarding financial services, each communication text is associated with a moment in time, and M is a positive integer; processing the M communication texts using an attention model to obtain conversation vectors, and constructing an undirected graph based on the conversation vectors, wherein the undirected graph is used to indicate similarities between the M communication texts; and determining the customer's trending issues based on the undirected graph, wherein the trending issues are financial issues associated with the communication records.
[0008] Furthermore, the M communication texts are processed using the attention model to obtain a dialogue vector, including: preprocessing the M communication texts to obtain M processed communication texts, and inputting the M processed communication texts into a language recognition model to output M word embedding sequences, wherein the preprocessing method includes at least one of the following: text cleaning, word segmentation processing, and unifying text length; obtaining a position index of each communication text, and calculating a position embedding vector of each communication text according to each position index to obtain M position embedding vectors, wherein each position index refers to the amount of text between each communication text and the first reply information of the business person; and constructing a dialogue vector by the attention model based on the M word embedding sequences and the M position embedding vectors.
[0009] Furthermore, the attention model constructs a dialogue vector based on M word embedding sequences and M position embedding vectors, including: encoding each word embedding sequence to obtain M initial embedding vectors, adding the position embedding vectors and the initial embedding vectors from the same communication text to obtain M sentence embedding vectors; processing each sentence embedding vector according to a preset function to obtain M groups of attention vectors; the attention model calculates the attention weight of each sentence embedding vector based on each group of attention vectors to obtain M attention weights; and performing weighted summation processing on the M sentence embedding vectors using the M attention weights to obtain a dialogue vector.
[0010] Furthermore, M attention weights are used to perform weighted summation processing on the M sentence embedding vectors to obtain a dialogue vector, including: calculating the mean of the M sentence embedding vectors to obtain a mean vector, and calculating the covariance matrix of the M sentence embedding vectors to obtain a covariance matrix; performing singular value decomposition on the covariance matrix to obtain an orthogonal matrix and a diagonal matrix, and obtaining a whitening matrix through the orthogonal matrix and the diagonal matrix; for a sentence embedding vector, calculating the difference between the sentence embedding vector and the mean vector to obtain a difference vector, and calculating the product of the difference vector and the whitening matrix to obtain a whitened embedding vector; using M attention weights to perform weighted summation processing on the M whitened embedding vectors to obtain an initial dialogue vector, and transforming the initial dialogue vector through a fully connected layer to obtain a dialogue vector, wherein the fully connected layer is associated with an activation function.
[0011] Furthermore, constructing an undirected graph based on the conversation vector includes: extracting M whitened embedding vectors from the conversation vector, and constructing an initial adjacency matrix based on the M whitened embedding vectors; combining the M whitened embedding vectors in pairs to obtain Y groups of embedding vector pairs, and calculating the cosine similarity of each group of embedding vector pairs to obtain Y similarity data, wherein each group of embedding vector pairs includes two whitened embedding vectors, and Y is a positive integer; obtaining a similarity threshold, and adjusting the initial adjacency matrix based on the similarity threshold and the Y similarity data to obtain an undirected graph.
[0012] Furthermore, the initial adjacency matrix is adjusted according to the similarity threshold and Y similarity data to obtain an undirected graph, including: judging whether the Y similarity data are greater than the similarity threshold, and if there are K similarity data greater than the similarity threshold, obtaining K groups of embedding vector pairs corresponding to the K similarity data; for one group of embedding vector pairs in the K groups of embedding vector pairs, setting the edges associated with one group of embedding vector pairs in the initial adjacency matrix as a first parameter; setting the edges associated with YK groups of embedding vector pairs corresponding to YK similarity data in the initial adjacency matrix as a second parameter, wherein the first parameter is greater than the second parameter, K is less than or equal to Y, and K is a positive integer; adjusting the initial adjacency matrix based on the first parameter and the second parameter to obtain a target adjacency matrix, and constructing an undirected graph based on the target adjacency matrix, wherein the nodes in the undirected graph represent the communication text corresponding to each whitened embedding vector in the target adjacency matrix, and the edges in the undirected graph represent the parameters set for each group of embedding vector pairs.
[0013] Furthermore, determining the trend problem of the customer based on the undirected graph includes: obtaining the topological distance and attenuation factor between every two nodes in the undirected graph to obtain Y topological distances and Y attenuation factors; calculating the centrality based on the Y topological distances and Y attenuation factors to obtain Y centrality data, wherein each centrality data includes matching centrality data and mismatching centrality data; for a whitened embedding vector, calculating the square of the matching centrality data associated with the whitened embedding vector to obtain a trend score, and calculating the mismatching centrality data associated with the whitened embedding vector through the filtering factor to obtain an emerging score; determining the cluster centers of M communication texts based on the M trend scores and the M emerging scores; obtaining the communication text corresponding to the cluster center to obtain the target text, and generating trend problems based on the target text.
[0014] To achieve the above objectives, according to another aspect of the present application, a device for determining financial issues is provided. The device includes: an acquisition unit for acquiring communication records sent by a customer, processing the communication records to obtain M communication texts, wherein a communication record refers to a record of communication between a customer and a financial service provider regarding financial services, each communication text is associated with a moment, and M is a positive integer; a processing unit for processing the M communication texts using an attention model to obtain conversation vectors, and constructing an undirected graph based on the conversation vectors, wherein the undirected graph is used to indicate similarities between the M communication texts; and a determination unit for determining the customer's trending issues based on the undirected graph, wherein the trending issues refer to financial issues associated with the communication records.
[0015] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, which includes a stored executable program, wherein when the executable program runs, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned methods for determining financial issues.
[0016] According to another aspect of an embodiment of the present invention, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory stores an executable program, and the processor is configured to run the program, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above-mentioned methods for determining financial issues.
[0017] According to another aspect of an embodiment of the present invention, a computer program product is provided. The computer program product includes a computer program, wherein when the computer program is executed by a processor, any one of the above-mentioned methods for determining a financial problem is implemented.
[0018] In an embodiment of the present application, a method for determining financial problems is adopted. By obtaining communication records sent by customers, the communication records are processed to obtain M communication texts, wherein the communication records refer to records of communication between customers and business personnel regarding financial business, each communication text is associated with a moment, and M is a positive integer; the M communication texts are processed using an attention model to obtain dialogue vectors, and an undirected graph is constructed based on the dialogue vectors, wherein the undirected graph is used to indicate the similarity between the M communication texts; the customer's trend problems are determined according to the undirected graph, wherein the trend problems refer to financial problems associated with the communication records, which solves the technical problems of low recognition accuracy and cumbersome processing procedures in the related technology when identifying financial problems consulted by customers. By using the attention model to process the communication texts between customers and business personnel, a dialogue vector is obtained, and an undirected graph is constructed based on the dialogue vector. Finally, the customer's trend problems are determined according to the undirected graph, thereby achieving the technical effect of improving the accuracy of identifying customer consultation problems and improving service efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:
[0020] Figure 1 is a hardware block diagram of a computer terminal (or mobile device) for implementing a method for determining a financial problem;
[0021] Figure 2 is a flowchart of a method for determining a financial problem according to an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a processing method of an attention model provided in an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of an optional method for determining a financial problem provided in an embodiment of the present application;
[0024] Figure 5 is a schematic diagram of a device for determining a financial problem according to an embodiment of the present application;
[0025] Figure 6 This is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units 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.
[0028] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data for analysis, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set up between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0029] It should be noted that the collected information used in this application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse use.
[0030] Example 1
[0031] According to an embodiment of the present application, an embodiment of a method for determining a financial problem is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0032] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 It is a hardware structure diagram of a computer terminal (or mobile device) for implementing a method for determining financial problems, such as Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more ( Figure 1 The computer system 102 includes a processor 102 (the processor 102 may include but is not limited to a microcontroller unit (MCU) or a programmable logic device (FPGA)), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, the computer system 102 may include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS), a network interface, a keyboard, a cursor control device, a power supply, and / or a camera. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0033] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0034] Memory 104 can be used to store software programs and modules for application software, such as the program instructions / data storage device corresponding to the financial problem determination method in the embodiments of the present application. Processor 102 executes the software programs and modules stored in memory 104 to perform various functional applications and data processing, thereby implementing the financial problem determination method described above. Memory 104 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory located remotely from processor 102, which can be connected to computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0035] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission device 106 includes a network interface controller (NIC) and a network interface, which can be connected to other network devices via a base station to enable communication with the Internet. In one embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0036] The display may be, for example, a touch screen liquid crystal display (LCD), which enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0037] Under the above operating environment, this application provides Figure 2 The method for determining financial problems shown. Figure 2 is a flow chart of a method for determining a financial problem according to an embodiment of the present application. Figure 2 As shown, the method includes the following steps:
[0038] Step S201: Acquire the communication records sent by the customer, process the communication records, and obtain M communication texts, wherein the communication records refer to the records of communication between the customer and the business personnel regarding financial business, each communication text is associated with a time, and M is a positive integer.
[0039] Specifically, in order to consult relevant issues in the financial field, customers can consult business personnel on the financial website of the financial institution. At this time, the customer first communicates with an artificial intelligence robot or business personnel. The robot or business personnel asks questions to the customer to determine the intention of their request, and then determines the service the customer needs based on the intention. Therefore, in order to more accurately identify the financial issues communicated by the customer and the subsequent communication trends, that is, to determine the financial topics that require services, the communication records between the customer and the business personnel can be obtained first. Since the original communication records obtained contain multiple formats and noise, such as emoticons, abbreviations, spelling errors, etc., it is necessary to preprocess the communication records, remove the noise data in the records, and perform word segmentation, and then associate each communication record with the specific time of occurrence to ensure that the communication texts are arranged in chronological order, and divide the continuous conversations into independent communication texts, thereby obtaining multiple communication texts, where each communication text refers to every sentence communicated between the customer and the business personnel.
[0040] In step S202 , the M communication texts are processed using an attention model to obtain a dialogue vector, and an undirected graph is constructed based on the dialogue vector, wherein the undirected graph is used to indicate the similarity between the M communication texts.
[0041] Specifically, after obtaining multiple communication texts, since the main issues of customer requests usually appear in the first few sentences of the interaction between the customer and the business personnel, in order to identify customer messages near the initial response of the business personnel, the language recognition model constructed by the deep learning model can first be used to convert the communication text into word embeddings to generate sentence embedding vectors. Then, the attention model is used to add attention weights to the sentence embedding vectors corresponding to each communication text, thereby helping to focus on the most important information fragments, rather than treating all inputs equally. The sentence embedding vectors are then weighted and summed based on the attention weights to obtain a weighted vector specific to the text, that is, the conversation vector. It should be noted that in order to make the sentence expression more consistent, the sentence embedding vectors can be subjected to feature whitening, that is, by returning the mean to zero and diagonalizing the covariance, the coordinates of the feature space are converted to a nearly orthogonal basis, thereby improving the accuracy of the cosine similarity calculation.
[0042] Furthermore, the whitened embedding vectors in the above conversation vectors are used as nodes, and the edges between two nodes are determined based on the cosine similarity of the whitened embedding vectors, thereby constructing an undirected graph. At this time, the implicit connection between the communication texts can be determined through the topological structure of the undirected graph. For example, the centrality of a node can measure its relative importance in the graph.
[0043] Step S203 : determining the customer's trending issues based on the undirected graph, wherein the trending issues refer to financial issues associated with the communication records.
[0044] Specifically, after constructing an undirected graph based on the dialogue vector, since the nodes in the undirected graph can refer to the sentence embedding vectors corresponding to the communication text, the nodes are connected through the cosine similarity between the sentence embedding vectors. If the cosine similarity of two communication texts exceeds the set threshold, it indicates that the two texts are related, that is, the edges in the undirected graph represent the similarity between the texts.
[0045] Furthermore, undirected graphs can be used to capture discussions about the same topic across different texts, forming communities or clusters of problem nodes. At this point, the centrality of the undirected graph (such as decaying centrality) can be calculated to identify emerging issues and trends in the communication texts. Emerging issues are represented by high-centrality nodes that suddenly appear in the graph, while trending issues can refer to nodes that consistently maintain high centrality, extensive connections, and stability. It should be noted that centrality is used to measure the importance of each node in the graph. For example, decaying centrality evaluates the relative importance of a node by considering the path length and number of paths between nodes. This means that issues that are frequently mentioned and closely related to other issues will have higher centrality values.
[0046] It should be noted that in the process of identifying trend problems, two time windows can be set first, such as the "current time window" and the "previous time window", and then by comparing the centrality changes of the same problem in these two windows, it can be judged whether it constitutes a trend, that is, calculating the attenuation centrality of each problem in the current time window and the attenuation centrality in the previous window. If the attenuation centrality of a problem in the current time window is much greater than the attenuation centrality of the previous window, and the corresponding score exceeds the set trend threshold, then the problem can be considered to be a trend problem.
[0047] In addition, to prevent similar topics from being mistakenly labeled as multiple independent trends, a community detection algorithm (such as the Louvain algorithm or a density-based clustering algorithm) can be used to analyze the topological structure of the graph and cluster similar problem nodes. Then, the node with the highest centrality is selected from each cluster as the representative problem of the cluster, thereby obtaining a more refined and comprehensive trend analysis result. After clustering is completed, the graph distance between cluster centers must be checked to ensure that they are far enough apart in the graph to avoid trend identification being too focused on a few highly similar problems. Instead, a wider range of topics should be covered to ensure that the identified trends cover the diverse needs and concerns of customers.
[0048] The embodiment of the present application provides a method for determining financial problems, which obtains communication records sent by customers, processes the communication records, and obtains M communication texts, wherein the communication records refer to the records of communication between customers and business personnel regarding financial business, each communication text is associated with a moment, and M is a positive integer; the M communication texts are processed using an attention model to obtain dialogue vectors, and an undirected graph is constructed based on the dialogue vectors, wherein the undirected graph is used to indicate the similarity between the M communication texts; the customer's trend problems are determined according to the undirected graph, wherein the trend problems refer to financial problems associated with the communication records, and the technical problems of low recognition accuracy and cumbersome processing procedures in identifying financial problems consulted by customers in related technologies are solved. The communication texts of communication between customers and business personnel are processed by using an attention model to obtain dialogue vectors, and an undirected graph is constructed based on the dialogue vectors. Finally, the customer's trend problems are determined according to the undirected graph, thereby achieving the technical effect of improving the accuracy of identifying problems consulted by customers and improving service efficiency.
[0049] Optionally, in the method for determining financial problems provided in an embodiment of the present application, M communication texts are processed using an attention model to obtain a dialogue vector, including: preprocessing the M communication texts to obtain M processed communication texts, and inputting the M processed communication texts into a language recognition model to output M word embedding sequences, wherein the preprocessing method includes at least one of the following: text cleaning, word segmentation processing, and unifying text length; obtaining the position index of each communication text, calculating the position embedding vector of each communication text based on each position index, and obtaining M position embedding vectors, wherein each position index refers to the amount of text between each communication text and the first reply information of the business personnel; and constructing a dialogue vector by the attention model based on the M word embedding sequences and the M position embedding vectors.
[0050] Specifically, after obtaining multiple communication texts based on communication records, in order to obtain the most important information from these communication texts, the communication texts can first be preprocessed to remove noise in the text, standardize the text format, and convert the text into a form that the machine learning model can understand. For example, the communication text may contain non-text elements such as punctuation, numbers, special characters, etc. At this time, unnecessary elements can be removed by using regular expressions or other text processing tools, leaving pure text content, thereby improving the training efficiency and prediction accuracy of the model; in addition, each communication text can be decomposed into words or tokens to more accurately understand the customer's true intentions; the lengths of communication texts can easily differ. In order to ensure the consistency of the input data, the number of sentences or tokens of all communication texts can be made to reach the same value by zero padding or truncation.
[0051] Furthermore, after obtaining multiple pre-processed communication texts, a language recognition model constructed using a deep learning model can be used to perform word embedding processing on each processed communication text. In this case, the DistilBERT (Bidirectional Encoder Representations from Transformers) model can be used as a language recognition model to convert each communication text into a form that the model can understand. It should be noted that since the DistilBERT model requires input to be text that has been word segmented and vectorized, each sentence can be treated as a time slice when pre-processing the communication text, and special start and end markers can be added to the communication text to ensure that the model only receives one sentence per time slice, so that each sentence can be embedded. In this way, the processed communication text is encoded to produce a deeper sentence embedding representation, that is, the above text is converted into the form of word embeddings. In this way, the word embedding layer maps each word to a fixed-size vector. At this time, the word embedding sequence not only contains word-level information, but also incorporates the influence of sentence structure and context.
[0052] It should be noted that the traditional language recognition model represents text as a two-dimensional tensor Q∈R Nat×Nwe , where N at is the number of tokens in the text, N we is the dimension of word embedding, and the number of tokens refers to the number of words or characters contained in a communication text. The above-mentioned DistilBERT model built based on deep learning represents each communication text as a three-dimensional tensor Q∈R Nas ×Nst×Nwe , where N as is the total number of communication texts in the communication record, N st is the number of tokens in each communication text, N we Refers to the word embedding dimension. Finally, the tensor Q output by the language recognition model ′ ∈R Nas×Nse In the as As a vector of communication text, each vector has N se Dimension.
[0053] Furthermore, since customer questions in communication texts often appear at the front, in order to consider the relative position of sentences in the conversation, the position information (i.e., position index) of each communication text can also be obtained, and the range of the position index can be from -N as To +N as, which indicates the number of sentences between the current communication text and the business person's first response. For example, if a communication record contains 10 communication texts, and the business person's first response appears after the fifth sentence, the position indexes of the first four communication texts are -4, -3, -2, and -1 respectively. The position index of the sentence where the business person's response is located is 0, and the position indexes of the subsequent communication texts are 1, 2, 3, 4, etc. Index -5 means that the communication text is five steps before the business person's first sentence, and +5 means it is five steps after the business person's first sentence. Press N as Move index, index is N as The communication text is the first sentence of the business person. The allowed index range is 0 to +2N as , to avoid negative indexes. Then, the position embedding vector of each communication text is calculated according to each position index, and the corresponding position embedding vector is obtained. That is, for the communication text with position index i (that is, for the i-th communication text), the position embedding vector E i The pth component of i (2p) and E i (2p+1) is determined, where E i (2p) = sin(i / 10000 2p / dpos ), E i (2p+1)=cos(i / 10000 2p / dpos ), where d pos is the dimension of the embedding vector, and p represents the dimension index in the positional encoding vector, ranging from [0, d pos / 2). For example, d pos =6, then p can be 0, 1, 2. When i=0, the position encoding vector is (0, 1, 0, 1, 0, 1).
[0054] Furthermore, after obtaining the above position embedding vector, the word embedding sequence and the position embedding vector can be combined using the attention model, that is, by adding Q i ′ and E i , the position information of the communication text in the communication record is integrated into the embedding representation to obtain the dialogue vector.
[0055] This embodiment performs semantic encoding through a language recognition model, then enhances contextual information through position embedding, and finally obtains effective sentence representation through an attention mechanism, that is, a dialogue vector. This enables the dialogue vector to accurately reflect the inherent structure and meaning of the communication text, thereby significantly improving the accuracy of problem identification and trend analysis.
[0056] Optionally, in the method for determining financial issues provided in an embodiment of the present application, the attention model constructs a dialogue vector based on M word embedding sequences and M position embedding vectors, including: encoding each word embedding sequence to obtain M initial embedding vectors, adding the position embedding vector and the initial embedding vector from the same communication text to obtain M sentence embedding vectors; processing each sentence embedding vector according to a preset function to obtain M groups of attention vectors; the attention model calculates the attention weight of each sentence embedding vector based on each group of attention vectors to obtain M attention weights; and using the M attention weights to perform weighted summation processing on the M sentence embedding vectors to obtain a dialogue vector.
[0057] Specifically, after obtaining the word embedding sequence S output by the language recognition model i And after the position embedding vector is obtained based on the position index, Figure 3 is a schematic diagram of a processing method of an attention model provided in an embodiment of the present application, such as Figure 3 As shown, it should be noted that after each communication text is converted into a word embedding sequence, a three-dimensional tensor S corresponding to the communication record can be generated based on the word embedding sequence. i The three-dimensional tensor can represent the text structure of the communication text, which contains the structural information of the entire conversation. After being processed by the language recognition model, an embedding vector can be generated for each text. Therefore, the nth token in the three-dimensional tensor is represented by the tensor symbol (S i ;T n ) and uses the language recognition model Σ to process each word in the communication text, that is, the neural network is embedded in the sequence S i And the language recognition model ∑, after the language recognition model outputs the word embedding sequence, it can continue to encode each word embedding sequence through the language recognition model to output the initial embedding vector Q i ′ Then embed the position from the same communication text into vector E i With the above initial embedding vector Q i ′ Add them together to get the sentence embedding vector Q containing position information i , that is, Q i =Q i ′ +E i , where i = 1, 2,…, M.
[0058] Furthermore, after using the Softmax function as the preset function, each sentence embedding vector is processed using the Softmax function to obtain the attention vector. It should be noted that the sentence-level attention is composed of the following formula: in, is the query vector, is the key vector, is a value tensor, which can be defined Attention value is a vector, and The sum of its elements is equal to 1, and V i Equivalent to Q i , the query vector (Query Vector) and the value vector (ValueVector) are both sentence embedding matrices with position information, that is, they can be composed of sentence embedding vectors, and the key vector is a parameter vector. Therefore, each sentence embedding vector is used as a value vector, and it can also be used as a key vector and query vector. The Softmax function uses the above vector and DistilBERT's multi-head attention mechanism to calculate the relative importance of each sentence in the entire conversation, and then obtain the attention vector Among them, σ i The vector refers to the attention weight of each sentence embedding vector, is a value vector. At this time, each set of attention vectors can determine the attention weight of each sentence embedding vector. Finally, a linear classifier is used to perform a weighted summation of the attention weights and sentence embedding vectors to obtain the dialogue vector.
[0059] It should be noted that a dense layer K with a Softmax activation function is applied to all sentence embedding vectors Q i To calculate the attention weight σ i , each communication text is represented as a vector (2D tensor The attention vector is a linear combination of all communication texts, subject to ∑ i σ i = 1 constraint, and finally is passed to a fully connected layer with a Softmax activation function to predict the product or service related to the communication record, and the attention weight σ i It can reflect the importance of each communication text in determining the product or service, and can assign higher weights to communication texts containing more key information.
[0060] This embodiment uses an attention model to determine the conversation vector, thereby enhancing the semantic features of the embedded sequence, enabling it to better reflect the deeper meaning of the sentence and identify the structure and flow of the conversation, thereby more accurately locating the problem, reducing the processing of irrelevant information, and improving efficiency.
[0061] Optionally, in the method for determining financial issues provided in an embodiment of the present application, M sentence embedding vectors are weighted and summed using M attention weights to obtain a dialogue vector, including: calculating the mean of the M sentence embedding vectors to obtain a mean vector, and calculating the covariance matrix of the M sentence embedding vectors to obtain a covariance matrix; performing singular value decomposition on the covariance matrix to obtain an orthogonal matrix and a diagonal matrix, and obtaining a whitening matrix through the orthogonal matrix and the diagonal matrix; for a sentence embedding vector, calculating the difference between the sentence embedding vector and the mean vector to obtain a difference vector, and calculating the product of the difference vector and the whitening matrix to obtain a whitened embedding vector; using M attention weights to perform weighted summation on the M whitened embedding vectors to obtain an initial dialogue vector, and transforming the initial dialogue vector through a fully connected layer to obtain a dialogue vector, wherein the fully connected layer is associated with an activation function.
[0062] It should be noted that after obtaining the attention weights and sentence embedding vectors, in order to better reflect the essential semantic similarities between sentences and more accurately identify problem trends and emerging issues in customer requests, the sentence embedding vectors can be subjected to feature whitening processing, thereby significantly improving the model's understanding of the text and ensuring that the sentence embedding vectors are more evenly distributed across feature dimensions, thereby improving the performance of distance metrics such as cosine similarity and making vector-based comparisons more accurate and robust.
[0063] Specifically, we can first calculate the mean vector and covariance matrix of all sentence embedding vectors, where the mean vector can represent the average position of all vectors in the data set, and the covariance matrix can represent the variance of the data in each dimension and the correlation between dimensions. In order to achieve whitening, we can use the feature normalization method to process the mean and covariance matrix calculated above. The goal of whitening is to transform the data into a feature space so that the variance of the data in all dimensions is equal and the dimensions are independent of each other, that is, the set The mean of is set to zero and the covariance matrix is set to the identity matrix.
[0064] Therefore, when the goal is to diagonalize the covariance matrix, the covariance matrix can be subjected to singular value decomposition to obtain an orthogonal matrix, a diagonal matrix, and a right singular matrix (the matrix is the transpose of the orthogonal matrix), wherein the diagonal matrix can contain the singular values of the covariance matrix, that is, the covariance matrix can be expressed as the product of an orthogonal basis and related singular values, that is, by decomposing the covariance matrix into an orthogonal matrix and a diagonal matrix, the features can be decoupled so that the original data space is converted into an orthogonal basis space, in which the feature dimensions are independent of each other and have the same variance.
[0065] Furthermore, the covariance matrix is decoupled, that is, the whitening matrix W that can transform the sentence embedding vector into an isotropic coordinate system is calculated based on the orthogonal matrix and diagonal matrix obtained after singular value decomposition. The whitening matrix W of the diagonalized covariance matrix K is: Among them, U is an orthogonal matrix and A is a diagonal matrix. Then the whitening matrix is used to process the embedding vector of each sentence. That is, the whitened embedding vector can be calculated by the following formula: Among them, μ represents the mean vector, W represents the whitening matrix, {Z i , the mean of {i=1~N} is equal to zero, that is, the covariance matrix is equal to the identity matrix I. At this time, the whitened embedding vector can be used as the embedding vector of the i-th communication text.
[0066] Furthermore, after obtaining the whitened embedding vector, the attention weights obtained from the attention model can be used to perform weighted summation on these vectors to obtain the initial dialogue vector. In order to further refine the dialogue vector, the initial dialogue vector can be transformed through a fully connected layer to obtain the dialogue vector.
[0067] This embodiment performs feature whitening on sentence embedding vectors, and through decorrelation and normalized variance, makes the whitened embedding vectors more evenly distributed in the feature space, with similar dynamic range and mutual independence in all dimensions. The model is no longer constrained by differences in feature scales, thereby improving the model's robustness in processing highly diverse and complex text data, helping to more accurately identify similar problems and potential trends in communication texts, thereby optimizing customer service processes and improving customer satisfaction and operational efficiency.
[0068] Optionally, in the method for determining financial problems provided in an embodiment of the present application, constructing an undirected graph based on the conversation vector includes: extracting M whitened embedding vectors from the conversation vector, and constructing an initial adjacency matrix based on the M whitened embedding vectors; combining the M whitened embedding vectors in pairs to obtain Y groups of embedding vector pairs, calculating the cosine similarity of each group of embedding vector pairs to obtain Y similarity data, wherein each group of embedding vector pairs includes two whitened embedding vectors, and Y is a positive integer; obtaining a similarity threshold, and adjusting the initial adjacency matrix based on the similarity threshold and the Y similarity data to obtain an undirected graph.
[0069] It should be noted that an undirected graph is a mathematical structure consisting of a set of nodes and a set of edges, used to represent relationships between objects. Therefore, to analyze the similarity between communication texts, we first obtain multiple communication texts and their corresponding whitened embedding vectors, filtered by the attention model using attention weights. These whitened embedding vectors are then used to construct an initial adjacency matrix, treating each whitened embedding vector as a node in the undirected graph. The whitened embedding vectors are then paired to obtain multiple embedding vector pairs. The cosine similarity between the two whitened embedding vectors in each pair is calculated, resulting in multiple similarity data.
[0070] After obtaining multiple similarity data, it can be determined based on the similarity data whether to add an edge between two nodes. The cosine similarity value is between -1 and 1. The closer the value is to 1, the more similar the two vectors are; the closer the value is to -1, the less similar the two vectors are. A value of 0 indicates that the two vectors are orthogonal, that is, there is no semantic association. By calculating the cosine similarity, the degree of semantic association between texts can be quantified. If the similarity data between two nodes is higher than a preset similarity threshold, an edge is added between the two nodes. The relationship between the edges is then recorded in the above-mentioned initial adjacency matrix, where the initial adjacency matrix is a two-dimensional array that can represent the connection relationship between nodes in the graph, where each row corresponds to a node and each column corresponds to a node. If there is an edge between node i and node j, the value at the corresponding position of the initial adjacency matrix (the element in the i-th row and j-th column and the element in the j-th row and i-th column) is adjusted to 1, indicating that there is a connection between node i and node j, otherwise it is 0. Then, an undirected graph is constructed by the initial adjacency matrix, where the node represents the communication text and the edge represents the semantic association between the communication texts.
[0071] This embodiment constructs an undirected graph by using the cosine similarity between whitened embedded vectors, and then analyzes and identifies emerging issues and trends in customer requests based on the topological structure of the undirected graph. For example, by calculating the centrality of the undirected graph, the key nodes in the graph, that is, the core issues in the customer requests, are identified, thereby improving the accuracy and robustness of topological data analysis, and enhancing customer satisfaction and response speed.
[0072] Optionally, in the method for determining financial problems provided in an embodiment of the present application, the initial adjacency matrix is adjusted according to the similarity threshold and Y similarity data to obtain an undirected graph, including: judging whether the Y similarity data are greater than the similarity threshold, and if there are K similarity data greater than the similarity threshold, obtaining K groups of embedding vector pairs corresponding to the K similarity data; for a group of embedding vector pairs in the K groups of embedding vector pairs, setting the edges associated with a group of embedding vector pairs in the initial adjacency matrix as a first parameter; setting the edges associated with YK groups of embedding vector pairs corresponding to YK similarity data in the initial adjacency matrix as a second parameter, wherein the first parameter is greater than the second parameter, K is less than or equal to Y, and K is a positive integer; adjusting the initial adjacency matrix based on the first parameter and the second parameter to obtain a target adjacency matrix, and constructing an undirected graph based on the target adjacency matrix, wherein the nodes in the undirected graph represent the communication text corresponding to each whitened embedding vector in the target adjacency matrix, and the edges in the undirected graph represent the parameters set for each group of embedding vector pairs.
[0073] Specifically, after calculating the similarity data of each set of embedding vector pairs, the sentences with significant semantic associations can be screened using the similarity threshold. If the similarity data between two nodes is higher than a preset similarity threshold, that is, the similarity data between the two whitened embedding vectors in a set of embedding vector pairs is high, then an edge can be added between the nodes corresponding to the two vectors, and then the relationship of the edge is recorded in the above-mentioned initial adjacency matrix, where the initial adjacency matrix is a two-dimensional array that can represent the connection relationship between the nodes in the graph, where each row corresponds to a node and each column corresponds to a node. If there is an edge between node i and node j, the value at the corresponding position of the initial adjacency matrix (the element in the i-th row and j-th column and the element in the j-th row and i-th column) is adjusted to the first parameter (which can be 1), indicating that there is a connection between node i and node j; if the similarity data between the two nodes is lower than the preset similarity threshold, that is, the similarity data between the two whitened embedding vectors in a set of embedding vector pairs is low, then the corresponding position of the initial adjacency matrix needs to be set to the second parameter, for example, it can be set to 0, to ensure that high-similarity sentence pairs are strongly connected in the graph, while low-similarity sentence pairs are weakly connected.
[0074] Finally, an undirected graph can be constructed from the target adjacency matrix after adjusting the parameters. That is, the initial adjacency matrix is adjusted based on the first and second parameters to obtain the target adjacency matrix, and then an undirected graph is constructed from the target adjacency matrix. In this case, the nodes represent the whitened embedding vectors corresponding to the communication texts, the edges represent the semantic associations between the communication texts, and the edge weights are determined by the set first or second parameters, reflecting the strength of the semantic associations between sentences. It should be noted that in an undirected graph, the aggregation (clustering) and dispersion (isolated nodes) of nodes can characterize the distribution and evolution of problems in the communication texts. Tightly connected node clusters represent recurring themes or trending problems, while isolated or weakly connected nodes represent unique or emerging problems. By comparing the undirected graph structures under different time windows, the dynamic changes of problems can be analyzed, and trending and emerging problems can be identified. Trending problems are reflected by the persistent high centrality and strong connections of nodes, while emerging problems are identified by the emergence of new node clusters or a sudden increase in node centrality. After identifying trending and emerging issues, financial institutions can adjust their customer service strategies accordingly. For example, they can develop standardized processes for handling trending issues and provide more personalized services for emerging issues, thereby shortening response times and improving customer satisfaction.
[0075] This embodiment constructs an undirected graph by screening through similarity thresholds, which can enhance the correlation between high-similarity sentence pairs, so that the undirected graph can more clearly and accurately reflect the semantic structure and key information of the communication text, thereby ensuring efficient handling of trending issues and timely response to emerging issues, thereby improving the overall service quality and customer experience.
[0076] Optionally, in the method for determining financial problems provided in an embodiment of the present application, determining a customer's trend problem based on an undirected graph includes: obtaining the topological distance and attenuation factor between every two nodes in the undirected graph to obtain Y topological distances and Y attenuation factors; calculating the centrality based on the Y topological distances and Y attenuation factors to obtain Y centrality data, wherein each centrality data includes matching centrality data and mismatching centrality data; for a whitened embedding vector, calculating the square of the matching centrality data associated with the whitened embedding vector to obtain a trend score, calculating the mismatching centrality data associated with the whitened embedding vector by filtering the factor and the whitened embedding vector to obtain an emerging score; determining the cluster center of M communication texts based on the M trend scores and the M emerging scores; obtaining the communication text corresponding to the cluster center to obtain the target text, and generating a trend problem based on the target text.
[0077] After constructing an undirected graph that reflects the semantic associations in financial services communication, trends (i.e., hot issues that are continuously discussed) and emerging issues (i.e., topics that have recently emerged and are gradually attracting attention) in the undirected graph can be identified, so that trend issues are jointly constituted by trends and emerging issues. For example, trend issues are characterized by being frequently discussed within a certain period of time, and their mention rate and relevance gradually increase over time. Therefore, a threshold can be set to filter out nodes with high centrality, and the issues represented by these nodes are regarded as trend issues; at the same time, since the centrality value will be affected by the scale and structure of the graph, it is also necessary to ensure that the threshold setting can exclude background noise and only focus on issues that have indeed increased significantly.
[0078] Specifically, since nodes with more adjacent nodes in an undirected graph represent more similar problems, centrality is an important topological property of a node, which describes the importance of the node in the graph. Therefore, the path-based decay centrality can be calculated through the undirected graph first. Among them, decay centrality evaluates the relative importance of a node by considering the path length and number of paths between nodes, that is, the ability to connect to other nodes through the graph path, the position and influence of the node in the network. The higher the centrality, the more similar problems there are, and the more popular the problem where the node is located. The undirected graph is represented by the adjacency matrix A, where A(i, j) = 1 if the node cos(z i ,z j )≥α, then the node n in graph G i The decay centrality of can be determined by the following formula:
[0079]
[0080] Where N(G) is the set of nodes in the undirected graph, |N(G)| is the total number of nodes in the undirected graph, the decay factor β can be set to 0<β<1, the greater the distance, the smaller the contribution; d represents the topological distance between nodes i and j, that is, the number of edges in the shortest path between nodes in the graph. The shorter the path, the closer the semantic relationship between the nodes; the normalization factor ensures that the centrality N(n i ) is independent of the size of the graph, and the numerator is determined by the exponent d(n i ,n j )-1 is determined. When nodes i and j are directly connected, the result is Questions with higher decaying centrality mean that the graph has more similar questions.
[0081] Since time is an additional attribute of the node corresponding to each communication text, the matching centrality C can be determined according to the time window by decaying the centrality. + and mismatch centrality C -Among them, matching centrality can measure the similarity connection of the content nodes of the unified test paper window, which can reflect the discussion heat and focus in the current window, while mismatching centrality can measure the similarity connection across time windows, that is, measure the node connection strength between cross-time windows, which can reflect the heat change with the previous window. The two types of centrality data can be determined by the following formula:
[0082]
[0083] Among them, C(n i )=C + (n i )+C - (n i ), w i refers to the time window to which node i belongs, C + Only when two nodes belong to the same time window are they considered, and C - Considering the contributions from different windows, which decay exponentially with increasing distance, node j can reach node i through intermediate nodes in the same or different time windows; [w i =w j ] and [w i ≠w j ] represents an indicator function. If the statement in it is true, that is, when nodes i and j belong to the same time window W, then the value corresponding to [···] is 1, if it is false, it is 0.
[0084] Furthermore, after obtaining the two types of centrality data, the decay centrality of matching and mismatching can be used to effectively identify emerging issues and trends in customer requests. The trend refers to the main issues of customers with large trend scores (i.e., high-frequency hot issues). At this time, the trend score is calculated by the following formula: S t =C + 2 A larger value indicates a more popular question, which can amplify the importance of popular questions and help identify questions that continue to grow and become more prominent in customer requests over time. Emerging questions refer to the main questions of customers with a large emerging score (that is, new hot questions). In this case, the emerging score is calculated using the following formula: It should be noted that the trend score S t Calculate the number of similar questions in the graph in the current time window, by (C + -C - ) / C represents the difference in centrality contributed by the previous time window and the current time window, where C + +C -= C. The emerging score ranges between -1 and +1, where -1 and +1 correspond to centrality coming entirely from the previous and current time windows, respectively, while 0 indicates equal contribution from both time windows. To avoid identifying unimportant small clusters, an additional screening factor tanh is introduced. 2 (C + / γ), where γ is a filter factor that controls the strength of the filter and applies weight to the emerging score, so when C + When ≤γ, tanh 2 (C + / γ) drops to 0, when C + ≥γ, tanh 2 (C + / γ) to 1, it can highlight the small cluster problem with a surge in discussion. For example, if the C + If the C of a node is high, it means that the problem is a high-frequency trend problem. + Significantly higher than C - , it indicates that the corresponding problems suddenly increase in the current time window, which may be an emerging problem.
[0085] Furthermore, since similar sentences can form clusters, the neighbors of high centrality nodes often have high centrality. In order to avoid locating the same cluster multiple times, that is, to avoid repeated identification of similar problems, it is necessary to ensure that the two centers are far enough apart. First, the node with the largest S t (for trend) or S e The node with the highest score (for emerging) is designated as the cluster center, and its surrounding neighbors with a graph distance of less than or equal to 3 are designated as cluster members. The next cluster center is then searched for the node with the second highest score that is at least 4 graph distances away from any known cluster. This process is repeated until the desired number of clusters is obtained. Finally, the cluster centers are used to identify emerging issues and trends in customer requests. That is, from the high-scoring text in the trend score, the cluster center is selected as the trend, and from the high-scoring text in the emerging score, the cluster center is also selected as the emerging issue. Then, the trend issue is obtained from the emerging issues and trends.
[0086] This embodiment constructs an undirected graph and maps sentence embedding vectors to its nodes. It then quantifies the importance of sentences through topological analysis technology. This can more accurately understand customer needs and concerns, shorten customer waiting time and processing time, and improve service efficiency.
[0087] The embodiment of the present application also provides a method for determining financial issues. Figure 4 is a schematic diagram of an optional method for determining financial issues provided in an embodiment of the present application, such as Figure 4 As shown, the method includes:
[0088] To more accurately identify the financial issues communicated by customers and subsequent communication trends, that is, to determine the financial topics that require services, we can first obtain a data set, that is, obtain the communication records between customers and business personnel. Since the original communication records obtained contain multiple formats and noise, it is necessary to preprocess the communication records at this time, associate each communication record with the specific time of occurrence, ensure that the communication texts are arranged in chronological order, and thus obtain multiple independent communication texts.
[0089] Furthermore, since the main issues in a customer request usually appear in the first few sentences of the interaction between the customer and the business person, in order to identify customer messages near the initial response of the business person, the communication text can first be processed using a language recognition model to perform sentence embedding processing to generate a sentence embedding vector. The sentence attention model is then used to add attention weights to the sentence embedding vector corresponding to each communication text, thereby helping to focus on the most important information fragments. The sentence embedding vectors are then weighted and summed based on the attention weights to obtain a weighted vector specific to the text, that is, a conversation vector. It should be noted that in order to make the sentence expression more consistent, the sentence embedding vector can be subjected to feature whitening processing, that is, by returning the mean to zero and diagonalizing the covariance, the coordinates of the feature space are converted to a nearly orthogonal basis, thereby improving the accuracy of the cosine similarity calculation.
[0090] Furthermore, the whitened embedding vectors in the conversation vectors are used as nodes, and the edges between two nodes are determined based on the cosine similarity of the whitened embedding vectors, thereby constructing an undirected graph. Since the nodes in the undirected graph can refer to the sentence embedding vectors corresponding to the communication text, the nodes are connected through the cosine similarity between the sentence embedding vectors. If the cosine similarity between two communication texts exceeds a set threshold, it indicates that the two texts are related. In other words, the edges in the undirected graph represent the similarity between the texts. Therefore, the centrality of the undirected graph (such as decaying centrality) can be calculated to identify emerging issues and trends in the communication texts.
[0091] This embodiment can improve customer satisfaction by predicting problem trends in customer service requests and adjusting service strategies in a timely manner, while optimizing internal resource allocation and improving efficiency.
[0092] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0093] Example 2
[0094] The present application also provides a device for determining a financial problem. It should be noted that the device for determining a financial problem in the present application can be used to execute the method for determining a financial problem provided in the present application. The following describes the device for determining a financial problem provided in the present application.
[0095] According to an embodiment of the present application, a device for implementing the above-mentioned method for determining financial issues is also provided. Figure 5 is a schematic diagram of a device for determining a financial problem according to an embodiment of the present application, such as Figure 5 As shown, the device includes: an acquisition unit 50, a processing unit 51, and a determination unit 52.
[0096] An acquisition unit 50 is configured to acquire communication records sent by a customer and process the communication records to obtain M communication texts, wherein a communication record is a record of communication between a customer and a financial service provider regarding financial services, each communication text is associated with a time, and M is a positive integer;
[0097] a processing unit 51 configured to process the M communication texts using an attention model to obtain dialogue vectors, and construct an undirected graph based on the dialogue vectors, wherein the undirected graph is used to indicate similarities between the M communication texts;
[0098] The determining unit 52 is configured to determine the customer's trending issues based on the undirected graph, wherein the trending issues refer to financial issues associated with the communication records.
[0099] The financial problem determination device provided in the embodiment of the present application obtains the communication records sent by the customer through the acquisition unit 50, processes the communication records, and obtains M communication texts, wherein the communication record refers to the record of the customer's communication with the business personnel regarding financial business, each communication text is associated with a moment, and M is a positive integer; the processing unit 51 uses the attention model to process the M communication texts to obtain a dialogue vector, and constructs an undirected graph based on the dialogue vector, wherein the undirected graph is used to indicate the similarity between the M communication texts; the determination unit 52 determines the customer's trend problem based on the undirected graph, wherein the trend problem refers to the financial problem associated with the communication record, and solves the technical problems of low recognition accuracy and cumbersome processing procedures in the related technology when identifying the financial problems consulted by the customer. By using the attention model to process the communication texts between the customer and the business personnel, a dialogue vector is obtained, and an undirected graph is constructed based on the dialogue vector. Finally, the customer's trend problem is determined according to the undirected graph, thereby achieving the technical effect of improving the accuracy of identifying the problems consulted by the customer and improving service efficiency.
[0100] Optionally, in the financial problem determination device provided in the embodiment of the present application, the processing unit 51 includes: a first processing module, used to preprocess M communication texts to obtain M processed communication texts, and input the M processed communication texts into a language recognition model to output M word embedding sequences, wherein the preprocessing method includes at least one of the following: text cleaning, word segmentation processing, and unified text length; a first acquisition module, used to obtain the position index of each communication text, calculate the position embedding vector of each communication text according to each position index, and obtain M position embedding vectors, wherein each position index refers to the amount of text between each communication text and the first reply information of the business personnel; a construction module, used to construct a dialogue vector based on the M word embedding sequences and the M position embedding vectors by the attention model.
[0101] Optionally, in the financial problem determination device provided in the embodiment of the present application, the processing unit 51 includes: an encoding module, used to encode each word embedding sequence to obtain M initial embedding vectors, and add the position embedding vectors derived from the same communication text to the initial embedding vectors to obtain M sentence embedding vectors; a second processing module, used to process each sentence embedding vector according to a preset function to obtain M groups of attention vectors; a first calculation module, used to calculate the attention weight of each sentence embedding vector according to each group of attention vectors by the attention model to obtain M attention weights; a third processing module, used to perform weighted summation processing on the M sentence embedding vectors using the M attention weights to obtain a dialogue vector.
[0102] Optionally, in the financial problem determination device provided in the embodiment of the present application, the processing unit 51 includes: a second calculation module, used to calculate the mean of M sentence embedding vectors to obtain a mean vector, and calculate the covariance matrix of the M sentence embedding vectors to obtain a covariance matrix; a decomposition module, used to perform singular value decomposition on the covariance matrix to obtain an orthogonal matrix and a diagonal matrix, and obtain a whitening matrix through the orthogonal matrix and the diagonal matrix; a third calculation module, used to calculate the difference between the sentence embedding vector and the mean vector for a sentence embedding vector to obtain a difference vector, and calculate the product of the difference vector and the whitening matrix to obtain a whitened embedding vector; a fourth processing module, used to perform weighted summation processing on the M whitened embedding vectors using M attention weights to obtain an initial dialogue vector, and transform the initial dialogue vector through a fully connected layer to obtain a dialogue vector, wherein the fully connected layer is associated with an activation function.
[0103] Optionally, in the financial problem determination device provided in the embodiment of the present application, the processing unit 51 includes: an extraction module, used to extract M whitened embedding vectors from the dialogue vector, and construct an initial adjacency matrix based on the M whitened embedding vectors; a combination module, used to combine the M whitened embedding vectors in pairs to obtain Y groups of embedding vector pairs, calculate the cosine similarity of each group of embedding vector pairs, and obtain Y similarity data, wherein each group of embedding vector pairs includes two whitened embedding vectors, and Y is a positive integer; a second acquisition module, used to obtain a similarity threshold, adjust the initial adjacency matrix based on the similarity threshold and the Y similarity data, and obtain an undirected graph.
[0104] Optionally, in the financial problem determination device provided in the embodiment of the present application, the processing unit 51 includes: a judgment module, used to judge whether Y similarity data are greater than a similarity threshold, and if there are K similarity data greater than the similarity threshold, obtain K groups of embedding vector pairs corresponding to the K similarity data; a first setting module, used to set the edges associated with a group of embedding vector pairs in the initial adjacency matrix as a first parameter for a group of embedding vector pairs in the K groups of embedding vector pairs; a second setting module, used to set the edges associated with YK groups of embedding vector pairs corresponding to YK similarity data in the initial adjacency matrix as a second parameter, wherein the first parameter is greater than the second parameter, K is less than or equal to Y, and K is a positive integer; an adjustment module, used to adjust the initial adjacency matrix based on the first parameter and the second parameter to obtain a target adjacency matrix, and construct an undirected graph based on the target adjacency matrix, wherein the nodes in the undirected graph represent the communication text corresponding to each whitened embedding vector in the target adjacency matrix, and the edges in the undirected graph represent the parameters set for each group of embedding vector pairs.
[0105] Optionally, in the financial problem determination device provided in the embodiment of the present application, the determination unit 52 includes: a third acquisition module, used to obtain the topological distance and attenuation factor between each two nodes in the undirected graph, and obtain Y topological distances and Y attenuation factors; a fourth calculation module, used to calculate the centrality based on the Y topological distances and Y attenuation factors, and obtain Y centrality data, wherein each centrality data includes matching centrality data and mismatching centrality data; a fifth calculation module, used to calculate the square of the matching centrality data associated with a whitened embedding vector for a whitened embedding vector, to obtain a trend score, and calculate the mismatching centrality data associated with the whitened embedding vector by filtering the factor and the whitened embedding vector to obtain an emerging score; a determination module, used to determine the cluster center of M communication texts based on M trend scores and M emerging scores; a fourth acquisition module, used to obtain the communication text corresponding to the cluster center, obtain the target text, and generate a trend problem based on the target text.
[0106] It should be noted that the acquisition unit 50, processing unit 51, and determination unit 52 described above correspond to steps S201 to S203 in Example 1. The examples and application scenarios implemented by the above units and corresponding steps are the same, but are not limited to the contents disclosed in the above Example 1. It should be noted that the above modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above units can also be part of a device and can be run in the computer terminal 10 provided in Example 1.
[0107] Example 3
[0108] The embodiment of the present application may provide a computer terminal, which may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal or an electronic device.
[0109] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of a computer network.
[0110] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the method for determining financial problems: obtaining communication records sent by customers, processing the communication records to obtain M communication texts, wherein the communication records refer to records of communication between customers and business personnel regarding financial business, each communication text is associated with a moment, and M is a positive integer; using the attention model to process the M communication texts to obtain dialogue vectors, and constructing an undirected graph based on the dialogue vectors, wherein the undirected graph is used to indicate the similarity between the M communication texts; determining the customer's trend problems based on the undirected graph, wherein the trend problems refer to financial problems associated with the communication records.
[0111] Optionally, the computer terminal can execute the program code of the following steps in the method for determining financial problems: preprocessing M communication texts to obtain M processed communication texts, and inputting the M processed communication texts into a language recognition model to output M word embedding sequences, wherein the preprocessing method includes at least one of the following: text cleaning, word segmentation, and unified text length; obtaining the position index of each communication text, calculating the position embedding vector of each communication text based on each position index, and obtaining M position embedding vectors, wherein each position index refers to the amount of text between each communication text and the first reply information of the business personnel; and constructing a dialogue vector based on the M word embedding sequences and the M position embedding vectors by the attention model.
[0112] Optionally, the computer terminal may execute the program code of the following steps in the method for determining financial problems: encoding each word embedding sequence to obtain M initial embedding vectors, adding the position embedding vectors from the same communication text to the initial embedding vectors to obtain M sentence embedding vectors; processing each sentence embedding vector according to a preset function to obtain M groups of attention vectors; calculating the attention weight of each sentence embedding vector according to each group of attention vectors by the attention model to obtain M attention weights; and performing weighted summation processing on the M sentence embedding vectors using the M attention weights to obtain a dialogue vector.
[0113] Optionally, the computer terminal may execute the program code of the following steps in the method for determining financial problems: calculating the mean of M sentence embedding vectors to obtain a mean vector, and calculating the covariance matrix of the M sentence embedding vectors to obtain a covariance matrix; performing singular value decomposition on the covariance matrix to obtain an orthogonal matrix and a diagonal matrix, and obtaining a whitening matrix by calculating the orthogonal matrix and the diagonal matrix; for a sentence embedding vector, calculating the difference between the sentence embedding vector and the mean vector to obtain a difference vector, and calculating the product of the difference vector and the whitening matrix to obtain a whitened embedding vector; performing weighted summation processing on the M whitened embedding vectors using M attention weights to obtain an initial dialogue vector, and transforming the initial dialogue vector through a fully connected layer to obtain a dialogue vector, wherein the fully connected layer is associated with an activation function.
[0114] Optionally, the computer terminal may execute the program code of the following steps in the method for determining a financial problem: extracting M whitened embedding vectors from the conversation vector, and constructing an initial adjacency matrix based on the M whitened embedding vectors; performing pairwise combinations of the M whitened embedding vectors to obtain Y groups of embedding vector pairs, and calculating the cosine similarity of each group of embedding vector pairs to obtain Y similarity data, wherein each group of embedding vector pairs includes two whitened embedding vectors, and Y is a positive integer; obtaining a similarity threshold, and adjusting the initial adjacency matrix based on the similarity threshold and the Y similarity data to obtain an undirected graph.
[0115] Optionally, the computer terminal can execute the program code of the following steps in the method for determining financial problems: determine whether Y similarity data are greater than a similarity threshold, and if there are K similarity data greater than the similarity threshold, obtain K groups of embedding vector pairs corresponding to the K similarity data; for one group of embedding vector pairs in the K groups of embedding vector pairs, set the edges associated with one group of embedding vector pairs in the initial adjacency matrix as a first parameter; set the edges associated with YK groups of embedding vector pairs corresponding to YK similarity data in the initial adjacency matrix as a second parameter, wherein the first parameter is greater than the second parameter, K is less than or equal to Y, and K is a positive integer; adjust the initial adjacency matrix based on the first parameter and the second parameter to obtain a target adjacency matrix, and construct an undirected graph based on the target adjacency matrix, wherein the nodes in the undirected graph represent the communication text corresponding to each whitened embedding vector in the target adjacency matrix, and the edges in the undirected graph represent the parameters set for each group of embedding vector pairs.
[0116] Optionally, the computer terminal can execute the program code of the following steps in the method for determining financial problems: obtaining the topological distance and attenuation factor between every two nodes in an undirected graph to obtain Y topological distances and Y attenuation factors; calculating the centrality based on the Y topological distances and Y attenuation factors to obtain Y centrality data, wherein each centrality data includes matching centrality data and mismatching centrality data; for a whitened embedding vector, calculating the square of the matching centrality data associated with the whitened embedding vector to obtain a trend score, and calculating the mismatching centrality data associated with the whitened embedding vector by filtering the factor and the whitened embedding vector to obtain an emerging score; determining the cluster centers of M communication texts based on the M trend scores and the M emerging scores; obtaining the communication text corresponding to the cluster center to obtain the target text, and generating a trend problem based on the target text.
[0117] Optionally, Figure 6 This is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 6 As shown, the electronic device may include: one or more ( Figure 6 Only one is shown) processor 602, memory 604, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0118] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the financial problem determination method and apparatus in the embodiments of the present application. The processor executes the software programs and modules stored in the memory to perform various functional applications and data processing, thereby implementing the financial problem determination method described above. The memory can include high-speed random access memory (RAM) and can also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory can further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0119] The processor may call the information and application programs stored in the memory through the transmission device to execute the above steps in the above method for determining financial issues.
[0120] The embodiment of the present application provides a solution for identifying financial problems. By obtaining communication records sent by customers and processing the communication records, M communication texts are obtained, wherein the communication records refer to the records of communication between customers and business personnel regarding financial business, each communication text is associated with a moment, and M is a positive integer; the M communication texts are processed using an attention model to obtain a dialogue vector, and an undirected graph is constructed based on the dialogue vector, wherein the undirected graph is used to indicate the similarity between the M communication texts; the customer's trend problem is determined based on the undirected graph, wherein the trend problem refers to the financial problem associated with the communication record, which solves the technical problems of low recognition accuracy and cumbersome processing procedures in the related art when identifying the financial problems consulted by customers. By using the attention model to process the communication texts between customers and business personnel, a dialogue vector is obtained, and an undirected graph is constructed based on the dialogue vector. Finally, the customer's trend problem is determined based on the undirected graph, thereby achieving the technical effect of improving the accuracy of identifying customer consultation problems and improving service efficiency.
[0121] It can be understood by those skilled in the art that Figure 6 The structure shown is for illustration only, and the electronic device may also be a terminal device such as a smart phone, a tablet computer, a PDA, a mobile Internet device (MID), or a PAD. Figure 6 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 6 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 6 Different configurations shown.
[0122] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0123] Example 4
[0124] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the method for determining the financial problem provided in the first embodiment.
[0125] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0126] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: obtaining communication records sent by the customer, processing the communication records to obtain M communication texts, wherein the communication records refer to records of communication between the customer and the business personnel regarding financial business, each communication text is associated with a moment, and M is a positive integer; using the attention model to process the M communication texts to obtain dialogue vectors, and constructing an undirected graph based on the dialogue vectors, wherein the undirected graph is used to indicate the similarity between the M communication texts; determining the customer's trend issues based on the undirected graph, wherein the trend issues refer to financial issues associated with the communication records.
[0127] The present application also provides a computer program product which, when executed on a data processing device, is adapted to execute the steps of the method for determining a financial problem.
[0128] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0129] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0130] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0131] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0132] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0133] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program code.
[0134] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for determining a financial problem, characterized in that: include: Obtaining communication records sent by the customer, processing the communication records to obtain M communication texts, wherein the communication records are records of communication between the customer and the business personnel regarding financial business, each communication text is associated with a time, and M is a positive integer; Processing the M communication texts using an attention model to obtain a conversation vector, and constructing an undirected graph based on the conversation vector, wherein the undirected graph is used to indicate similarities between the M communication texts; Determine the customer's trending issues based on the undirected graph, wherein the trending issues refer to financial issues associated with the communication records.
2. The method according to claim 1, characterized in that The M communication texts are processed using the attention model to obtain the conversation vectors including: Preprocessing the M communication texts to obtain M processed communication texts, and inputting the M processed communication texts into a language recognition model to output M word embedding sequences, wherein the preprocessing method includes at least one of the following: text cleaning, word segmentation, and text length unification; Obtaining the position index of each communication text, and calculating the position embedding vector of each communication text based on each position index to obtain M position embedding vectors, where each position index refers to the number of texts between each communication text and the first reply message of the business person; The attention model constructs the dialogue vector according to the M word embedding sequences and the M position embedding vectors.
3. The method according to claim 2, characterized in that Constructing the conversation vector by the attention model according to the M word embedding sequences and the M position embedding vectors includes: Encode each word embedding sequence to obtain M initial embedding vectors, and add the position embedding vectors from the same communication text to the initial embedding vector to obtain M sentence embedding vectors; Process each sentence embedding vector according to the preset function to obtain M groups of attention vectors; The attention model calculates the attention weight of each sentence embedding vector according to each group of attention vectors, and obtains M attention weights; The M attention weights are used to perform weighted summation processing on the M sentence embedding vectors to obtain the dialogue vector.
4. The method according to claim 3, characterized in that The M sentence embedding vectors are weighted and summed using the M attention weights to obtain the dialogue vector, including: Calculate the mean of the M sentence embedding vectors to obtain a mean vector, and calculate the covariance matrix of the M sentence embedding vectors to obtain a covariance matrix; Performing singular value decomposition on the covariance matrix to obtain an orthogonal matrix and a diagonal matrix, and calculating a whitening matrix through the orthogonal matrix and the diagonal matrix; For a sentence embedding vector, calculating the difference between the sentence embedding vector and the mean vector to obtain a difference vector, and calculating the product of the difference vector and the whitening matrix to obtain a whitened embedding vector; Performing weighted summation processing on the M whitened embedding vectors using the M attention weights to obtain an initial conversation vector, and transforming the initial conversation vector through a fully connected layer to obtain the conversation vector, wherein the fully connected layer is associated with an activation function.
5. The method according to claim 1, characterized in that Constructing an undirected graph based on the conversation vector includes: Extracting M whitened embedding vectors from the conversation vector, and constructing an initial adjacency matrix based on the M whitened embedding vectors; Combining the M whitened embedding vectors in pairs to obtain Y sets of embedding vector pairs, calculating the cosine similarity of each embedding vector pair to obtain Y similarity data, where each embedding vector pair includes two whitened embedding vectors, and Y is a positive integer; A similarity threshold is obtained, and the initial adjacency matrix is adjusted according to the similarity threshold and the Y similarity data to obtain the undirected graph.
6. The method according to claim 5, characterized in that Adjusting the initial adjacency matrix according to the similarity threshold and the Y similarity data to obtain the undirected graph includes: Determine whether the Y similarity data are greater than the similarity threshold; if there are K similarity data greater than the similarity threshold, obtain K sets of embedding vector pairs corresponding to the K similarity data; For a set of embedding vector pairs among the K sets of embedding vector pairs, setting an edge associated with the set of embedding vector pairs in the initial adjacency matrix as a first parameter; Setting the edges associated with YK groups of embedding vector pairs corresponding to YK similarity data in the initial adjacency matrix as the second parameter, wherein the first parameter is greater than the second parameter, K is less than or equal to Y, and K is a positive integer; The initial adjacency matrix is adjusted based on the first parameter and the second parameter to obtain a target adjacency matrix, and the undirected graph is constructed according to the target adjacency matrix, wherein the nodes in the undirected graph represent the communication text corresponding to each whitened embedding vector in the target adjacency matrix, and the edges in the undirected graph represent the parameters set for each group of embedding vector pairs.
7. The method according to claim 1, characterized in that The problem of determining the customer's trend according to the undirected graph includes: Obtaining the topological distance and attenuation factor between every two nodes in the undirected graph to obtain Y topological distances and Y attenuation factors; Calculating centrality according to the Y topological distances and the Y attenuation factors to obtain Y centrality data, wherein each centrality data includes matching centrality data and mismatching centrality data; For a whitened embedding vector, calculating the square of the matching centrality data associated with the whitened embedding vector to obtain a trend score, and calculating the emerging score by filtering the unmatched centrality data associated with the whitened embedding vector; determining cluster centers of the M communication texts according to the M trend scores and the M emerging scores; The communication text corresponding to the cluster center is obtained to obtain the target text, and the trend question is generated based on the target text.
8. A device for determining financial problems, characterized in that: include: an acquiring unit, configured to acquire communication records sent by a customer, process the communication records, and obtain M communication texts, wherein the communication records are records of communication between the customer and a business person regarding financial services, each communication text is associated with a time, and M is a positive integer; a processing unit, configured to process the M communication texts using an attention model to obtain a conversation vector, and construct an undirected graph based on the conversation vector, wherein the undirected graph is used to indicate similarities between the M communication texts; A determining unit is configured to determine a trending problem of the customer based on the undirected graph, wherein the trending problem refers to a financial problem associated with the communication record.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the computer-readable storage medium is located is controlled to execute the method for determining a financial problem according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: a memory storing an executable program; A processor is configured to run the program, wherein the program, when running, executes the method for determining a financial problem according to any one of claims 1 to 7.
11. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method for determining a financial problem according to any one of claims 1 to 7 are implemented.