Method and device for retrieving financial complaint cases based on subject features
By introducing topic-related word vectors into the input layer of the pre-trained model, and combining them with vector indexing algorithms and text matching models, the problem that traditional financial complaint case retrieval models cannot learn cross-text topic features is solved, thus achieving more efficient and accurate financial complaint case retrieval.
Patent Information
- Application Number
- CN202311321253.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-10-12
AI Technical Summary
Traditional financial complaint case retrieval models are unable to learn cross-text topic features, resulting in inaccurate retrieval results.
By introducing topic information word vectors into the input layer of the pre-trained model, and using a vector indexing algorithm for coarse ranking and a text matching model for fine ranking, combined with pre-training, a technical matching method with topic information word vectors is generated. The technical method for generating the matching method includes an input vector composed of word vectors, position vectors and topic information word vectors, which is then input into the text matching module to determine the matching score.
It improves the accuracy and efficiency of financial complaint case retrieval, avoids the problem of insufficient natural language understanding in traditional methods, and provides a more efficient and accurate solution.
Smart Images

Figure CN117171368B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The embodiment of the present application relates to the technical field of deep learning, in particular to a financial complaint case retrieval method and device based on theme features. BACKGROUND
[0002] With the development of the financial market and the introduction of various financial products, the number of financial complaints is increasing, and financial institutions are facing great pressure and challenges in handling complaints. In order to better handle financial complaint cases and improve the service quality and efficiency of financial institutions, the financial field has put forward new demands for complaint case retrieval technology.
[0003] After receiving customer complaints, financial complaint handling personnel can quickly and accurately retrieve relevant historical complaints and corresponding solutions through a complaint case retrieval system. This system facilitates financial staff to analyze similar complaint cases and provides historical cases for reference when new employees solve complaint problems.
[0004] However, the traditional financial complaint case retrieval model can only learn the semantic information of each sentence itself and cannot learn the theme features across texts, so the retrieval results are often not accurate enough.
[0005] Therefore, there is an urgent need for a financial complaint case retrieval method based on theme features. SUMMARY
[0006] In order to solve the problem that the traditional financial complaint case retrieval model cannot learn the theme features across texts, resulting in inaccurate retrieval results, the embodiment of the present application provides a financial complaint case retrieval method and device based on theme features.
[0007] In a first aspect, the embodiment of the present application provides a financial complaint case retrieval method based on theme features, which comprises:
[0008] performing coarse retrieval on the case to be retrieved using a vector index algorithm to obtain a plurality of similar cases of the case to be retrieved;
[0009] generate a text pair for the case to be retrieved and each similar case, and input a plurality of text pairs into a pre-trained text matching model; wherein the text matching model is generated based on a pre-training model, and the pre-training model comprises an input layer and a text matching module, the input layer is used to generate an input vector composed of a word vector, a position vector, a segmentation vector and a theme information word vector, and the input vector is input into the text matching module;
[0010] obtain the matching score of each text pair to determine the final target case according to the matching score.
[0011] In a second aspect, the embodiments of the present application further provide a device for retrieving a financial complaint case based on a theme feature, which comprises:
[0012] a coarse sorting unit configured to perform coarse retrieval on the case to be retrieved by using a vector index algorithm to obtain a plurality of similar cases of the case to be retrieved;
[0013] a fine sorting unit configured to generate a text pair for the case to be retrieved and each similar case respectively, and input the plurality of text pairs into a pre-trained text matching model, wherein the text matching model is generated by training a pre-training model, and the pre-training model comprises an input layer and a text matching module, the input layer is configured to generate an input vector composed of a word vector, a position vector, a segmentation vector and a theme information vector, and input the input vector into the text matching module;
[0014] a determination unit configured to obtain a matching score of each text pair, and determine a final target case according to the matching score.
[0015] In a third aspect, the embodiments of the present application further provide a computing device comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in any of the embodiments of the present application.
[0016] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium storing a computer program, wherein the computer program, when executed in a computer, causes the computer to execute the method described in any of the embodiments of the present application.
[0017] The embodiments of the present application provide a method and device for retrieving a financial complaint case based on a theme feature, by introducing a theme information vector into an input layer of a pre-training model, so that the pre-training model can learn the theme feature across texts, and then the text matching model generated by training can more accurately perform text matching on the text pair composed of the case to be retrieved and each similar case, thereby improving the accuracy and efficiency of the financial complaint case retrieval. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. The drawings described in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creating any creative labor.
[0019] Figure 1 is a flowchart of a method for retrieving a financial complaint case based on a theme feature provided by an embodiment of the present application.
[0020] Figure 2 is a hardware architecture diagram of a computing device provided by an embodiment of the present application;
[0021] Figure 3 is a structure diagram of a financial complaint case retrieval device based on topic features provided by an embodiment of the present application. DETAILED DESCRIPTION
[0022] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the drawings of the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application, and all other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative effort belong to the scope of the present application.
[0023] The specific implementation of the above concept will be described below.
[0024] Reference is made to Figure 1 The embodiments of the present application provide a financial complaint case retrieval method based on topic features, which comprises the following steps.
[0025] In step 100, a vector index algorithm is used to perform coarse retrieval on the case to be retrieved, to obtain a plurality of similar cases of the case to be retrieved.
[0026] In step 102, the case to be retrieved and each similar case generate a text pair, and the plurality of text pairs are input into a pre-trained text matching model. The text matching model is generated by training based on a pre-training model. The pre-training model comprises an input layer and a text matching module. The input layer is used to generate an input vector composed of a word vector, a position vector, a segmentation vector and a topic information word vector, and input the input vector into the text matching module.
[0027] In step 104, the matching scores of the text pairs are obtained to determine the final target case according to the matching scores.
[0028] In the embodiments of the present application, the topic information word vector is introduced into the input layer of the pre-training model, so that the pre-training model can learn the topic features across texts. Therefore, the text matching model generated by training can more accurately perform text matching on the text pairs composed of the case to be retrieved and each similar case, thereby improving the accuracy and efficiency of financial complaint case retrieval.
[0029] For step 100:
[0030] In some embodiments, step 100 can comprise:
[0031] inputting the case to be searched into the word2vec model to obtain an initial vector of the case to be searched;
[0032] finding, by using a vector index algorithm, initial vectors similar to the initial vector of the case to be searched from a linked list node library to obtain a plurality of similar cases of the case to be searched; each node in the linked list node library stores an initial vector of each case text in the case library.
[0033] In this embodiment, the linked list node library needs to be generated in the rough sorting stage. After the case texts in the case library are converted into corresponding initial vectors, the initial vectors are stored in each linked list node. In this embodiment, in order to facilitate the rough sorting retrieval by the vector index algorithm in the later stage, the word2vec model is introduced. As the name implies, the word2vec model is a lightweight neural network for converting words into vectors. Each case text in the case library is input into the word2vec model in turn, and the average of the word vectors of each word in each case text can be used as an initial vector of the case text. Then, after the vectorization of all the complaint case texts in the case library, the initial vectors can be stored in each linked list node to generate the linked list node library.
[0034] Similarly, the case to be searched is input into the word2vec model to obtain an initial vector of the case to be searched. Then, the problem can be converted into how to find K vectors most similar to the initial vector of the case to be searched in the vector space. In this embodiment, the vector index algorithm of HNSW (Hierarchical Navigable Small World, hierarchical navigable small world) is used to divide the linked list into many layers; the bottom layer has all the nodes, and then each node is divided into the upper layer index with a certain probability, so that the upper layer usually has fewer nodes. Therefore, in the retrieval process of HNSW, a large step is first searched in the high layer, and then a small step is searched in the low layer. In this embodiment, after trial and adjustment, the finally selected parameters are: ef=2000, m=64, size=256. Among them, the parameter ef is a control parameter in the search process, used to balance the search speed and search accuracy; the parameter m is the maximum number of connections allowed for each node in the index structure; and size is the size of the index structure. By using the HNSW method, the rough sorting stage can obtain K similar cases of the case to be searched. Among them, K is much smaller than the number of case texts in the case library, and K is 20 in this embodiment.
[0035] For step 102:
[0036] In some embodiments, the text matching model is generated by training in the following manner:
[0037] generate a word vector library with topic information by using a Bert language model and a text clustering algorithm;
[0038] Obtaining a plurality of text sample pairs labeled with a label; wherein the text sample pair comprises a first text and a second text, and the label is used to represent whether the first text and the second text are similar;
[0039] For each text sample pair, the following is performed: inputting the text sample pair into the pre-training model, the input layer of the pre-training model being based on the word vector library, generating the topic information word vector of the text sample pair, and adding the topic information word vector and the word vector, position vector and segmentation vector of the text sample pair to form an input vector;
[0040] The input vector is input into the text matching module of the pre-training model to adjust the network parameters of the pre-training model using the output of the text matching module and the corresponding label of the text sample pair;
[0041] Until the desired text matching model is obtained.
[0042] In this embodiment, first, the Bert language model and the text clustering algorithm are used to generate the word vector library with topic information. Specifically, the case texts in the case library are first vectorized using the Bert language model. Then, the vectors of the case texts are clustered to obtain various topics, such as poor employee attitude, account transaction problem, bank card or credit card, activity marketing, etc., and a word vector library with topic information is generated according to the frequency of the words appearing in each topic.
[0043] In this embodiment, the xf2021 text matching dataset is used as the training set of the text matching model, which consists of 3 columns, namely the first text, the second text and the label. The first text and the second text of each row form a text sample pair, and the label is 1 if the first text and the second text are similar, otherwise the label is 0. Each text sample pair is input into the pre-training model, and the input layer of the pre-training model first generates the word vector, position vector and segmentation vector of the text sample pair based on each text sample pair. Then, all the words in the text sample pair are matched from the word vector library to obtain the topic information word vector of the text sample pair. Then, the input vector is input into the text matching module of the pre-training model by adding the topic information word vector and the word vector, position vector and segmentation vector of the text sample pair. Then, the network parameters of the pre-training model are adjusted using the output of the text matching module and the corresponding label of the text sample pair, until the desired text matching model is obtained. Therefore, the present scheme can introduce the topic information word vector into the input layer of the pre-training model, so that the pre-training model can learn the topic features across texts, thereby better completing the text matching task in the fine arrangement stage.
[0044] In some embodiments, a word vector library with topic information is generated using a Bert language model and a text clustering algorithm, including:
[0045] The case texts in the case library are classified by topic using the Bert language model and the text clustering algorithm, and a topic vector corresponding to each topic is obtained to generate a topic matrix.
[0046] The importance of each word in the case library in each topic is calculated to generate an importance matrix.
[0047] The importance matrix is normalized to obtain a weight matrix; wherein the weight matrix contains the weight of each word in each topic.
[0048] The topic matrix and the weight matrix are multiplied to obtain a word vector library with topic information; wherein each word vector in the word vector library is a vector representation of the word in the topic dimension.
[0049] In this embodiment, the case texts in the case library can be vectorized using the Bert language model, and then the vectors of the case texts are clustered by text to obtain various topics, such as poor employee attitude, account transaction problem, bank card or credit card, activity marketing, etc. The topic vector of each topic is generated according to the case texts corresponding to each topic, and the topic vectors of all topics are used to form a topic matrix. The number of rows of the topic matrix is the number of topics, and one row represents the topic vector of one topic. In this embodiment, the final clustering topic number is 50, and the column of the topic matrix is the dimension of embedding (768 in this application), i.e. the dimension of the topic matrix is 50x768.
[0050] Then, the importance of each word in each topic needs to be calculated to generate an importance matrix. The number of rows of the importance matrix is the number of words in the word table, and the number of columns is the number of topics. For example, the i-th row and j-th column represents the importance of word i in topic j; by normalizing each row of the importance matrix, the weight of each word in each topic can be obtained, i.e. a weight matrix. For example, the i-th row and j-th column represents the weight of word i in topic j; by matrix multiplication of the weight matrix and the topic matrix, a word vector library with topic information (number of words, column of embedding dimension) can be obtained. Wherein, a row vector is a vector representation of a word in the topic dimension.
[0051] In some embodiments, before classifying the case texts in the case library by topic using the Bert language model and the text clustering algorithm, it further includes:
[0052] Case texts with missing important fields in the case library are excluded;
[0053] Unify the format of field data of case text in the case base;
[0054] Chinese word segmentation is performed on the case text by using a word segmentation tool with a financial field vocabulary.
[0055] In the present embodiment, before subject classification is performed on the case text in the case base by using a Bert language model and a text clustering algorithm, the case text needs to be cleaned and preprocessed. The preprocessing method can at least include the following three steps:
[0056] (1) Eliminate case text with missing important fields. If a complaint text is missing important fields such as complaint content, complaint result, and handling time, the case text is deleted.
[0057] (2) Unify the format. For example, different formats of dates (such as 2022-07-01, 22-07-01, 07 / 01 / 2022, etc.) in the complaint case text are unified to facilitate subsequent analysis.
[0058] (3) Chinese word segmentation. Chinese word segmentation is to divide the complaint sentence into words to facilitate the expansion of subsequent analysis and mining. For example, “the customer reflects the complaint about receiving a credit card message” will be divided into “customer, reflect, about, receive, credit card, message, problem, of, complaint”. It is noted that there may be some industry-specific terms in the complaint sentence. This makes the word segmentation tool unable to directly identify all important words. Therefore, on the basis of sorting out the bank field vocabulary and the financial complaint field vocabulary, these field vocabularies are added to the word segmentation tool to solve the problem of inaccurate segmentation of industry-specific terms in financial complaint cases.
[0059] In some embodiments, the step of “performing subject classification on the case text in the case base by using a Bert language model and a text clustering algorithm to obtain a subject vector corresponding to each subject to generate a subject matrix” can include:
[0060] Inputting the case text in the case base into the Bert language model in sequence to obtain a text vector of each case text;
[0061] Performing dimensionality reduction on the text vector by using a UMAP algorithm to perform clustering on the dimensionally reduced text vector by using a HDBSCAN algorithm to generate a plurality of subjects;
[0062] Generating a subject vector of the current subject by using the dimensionally reduced text vector corresponding to each subject to generate a subject matrix.
[0063] In the present embodiment, the Bert language model contains a self-attention mechanism, so the Bert language model can learn the context features of the text and better capture the semantic information in the text. Therefore, in the present embodiment, the Bert language model is used to vectorize the case texts in the case library to obtain the text vectors of each case text. Then, the UMAP algorithm is used to reduce the dimensionality of the text vectors. The UMAP algorithm can better maintain the manifold structure of the data and has good effects on the visualization and clustering of high-dimensional vectors. Next, the HDBSCAN algorithm is used to cluster the reduced dimension text vectors. The reason for using this method to cluster is that text data usually has high dimension and complex structure, and traditional clustering algorithms may not be able to handle this complexity well, and traditional clustering algorithms need to specify the number of topics in advance, which undoubtedly increases the labor. The HDBSCAN algorithm can automatically cluster to determine the number of topics through parameter trial and adjustment. The present embodiment finally selects the number of topics as 50. After clustering, the topic vector of the current topic is generated by using the reduced dimension text vectors included in each topic cluster, and the topic vectors of the 50 topics are obtained and composed into a topic matrix.
[0064] In some embodiments, the importance of each word in each topic is calculated by the following formula:
[0065]
[0066] In the formula, W x,c is the importance of word x in topic c, f x,c is the frequency of word x in topic c, f x is the frequency of word x in all topics, and A is the average number of words in each topic.
[0067] In the present embodiment, the +1 in the formula is to ensure that the result of the formula is always positive. Through the above formula, the importance of each word in each topic can be accurately calculated, and the word vector library with topic information can be further accurately generated.
[0068] In summary, the training process of the text matching model is as follows.
[0069] After the text matching model is generated in the training manner according to any of the above embodiments, K copies of the case to be retrieved are generated, and K text pairs are formed by combining the K copies of the case to be retrieved with the K similar cases obtained in step 100. Then, the K text pairs are input into the trained text matching model for fine ranking to obtain the matching scores of the K text pairs. Therefore, the embodiment of the present application introduces the topic information into the input layer of the pre-trained model, so that the text matching model can not only learn the text features of the current case text, but also learn the topic features of other case texts under the same topic. Compared with the method of using a common pre-trained model for case retrieval, the pre-trained model with the topic information can capture the topic features of similar cases, which will improve the accuracy of case retrieval.
[0070] For step 104:
[0071] The text matching model outputs the matching scores of the K text pairs, which can be presented to the user in descending order of the matching scores as the final retrieval result, so that the user can determine the final target case according to the matching scores.
[0072] The embodiment of the present application avoids the problems of insufficient natural language understanding ability and inability to handle complex situations in the traditional method, and provides a more efficient, accurate and convenient solution for financial institutions. From the perspective of human cost, the present application can avoid the cumbersome process of manual retrieval of cases, and improve the work efficiency of financial complaint handling personnel.
[0073] In the fine ranking task in the retrieval process, the accuracy rate of the common Bert pre-trained model in matching the Chinese text test pairs of the xf2021 data set is 89.8%, while the accuracy rate of the pre-trained model combined with the topic embedding information according to the embodiment of the present application is 91.1%. It can be seen that the embodiment of the present application can improve the accuracy of financial complaint case retrieval.
[0074] As shown in Figure 2 , Figure 3 The embodiment of the present application provides a retrieval device for financial complaint cases based on topic features. The device embodiment can be realized by software, or by hardware or a combination of software and hardware. From the hardware layer, as shown in Figure 2 , it is a hardware architecture diagram of a computing device where the device for retrieving financial complaint cases based on topic features according to the embodiment of the present application is located. In addition to the processor, memory, network interface and non-volatile memory shown in Figure 2 , the computing device where the device is located in the embodiment can usually include other hardware, such as a forwarding chip responsible for processing packets, etc. Taking the software implementation as an example, as shown in Figure 3As shown, as a logical device, it is formed by the CPU of the computing device where it is located to read the corresponding computer program in the non-volatile memory into the memory for running. The device provided by the embodiment is a device for retrieving financial complaint cases based on theme features, and the device comprises:
[0075] The coarse sorting unit 301 is configured to perform coarse retrieval on the to-be-retrieved cases by using a vector index algorithm to obtain a plurality of similar cases of the to-be-retrieved cases.
[0076] The fine sorting unit 302 is configured to generate a text pair for each of the to-be-retrieved cases and each of the similar cases, and input a plurality of text pairs into a pre-trained text matching model. The text matching model is generated based on a pre-training model. The pre-training model comprises an input layer and a text matching module. The input layer is configured to generate an input vector by adding a word vector, a position vector, a segmentation vector, and a theme information word vector, and input the input vector into the text matching module.
[0077] The determination unit 303 is configured to obtain a matching score of each text pair, and determine a final target case according to the matching score.
[0078] In an embodiment of the present application, the text matching model of the fine sorting unit 302 is generated by the following method:
[0079] A word vector library with theme information is generated by using a Bert language model and a text clustering algorithm.
[0080] A plurality of text sample pairs labeled with labels are obtained. Each text sample pair comprises a first text and a second text, and the label is used to represent whether the first text and the second text are similar.
[0081] For each text sample pair, the following is performed: the text sample pair is input into a pre-training model. The input layer of the pre-training model is based on the word vector library to generate a theme information word vector of the text sample pair, and the theme information word vector is added to the word vector, the position vector, and the segmentation vector of the text sample pair to form an input vector.
[0082] The input vector is input into the text matching module of the pre-training model, so as to adjust the network parameters of the pre-training model by using the output of the text matching module and the corresponding label of the text sample pair.
[0083] Until the text matching model meeting the expectation is obtained.
[0084] In an embodiment of the present application, when the fine sorting unit 302 generates the word vector library with theme information by using the Bert language model and the text clustering algorithm, it is configured to:
[0085] The case texts in the case library are classified by topics by using a Bert language model and a text clustering algorithm, and a topic matrix is generated by obtaining a topic vector corresponding to each topic;
[0086] The importance of each word in each topic in the case library is calculated, and an importance matrix is generated;
[0087] The importance matrix is normalized to obtain a weight matrix; wherein the weight matrix contains the weight of each word in each topic;
[0088] The topic matrix and the weight matrix are multiplied to obtain a word vector library with topic information; wherein each word vector in the word vector library is a vector representation of the word in the topic dimension.
[0089] In an embodiment of the application, when the fine sorting unit 302 performs classification of case texts in the case library by topics by using a Bert language model and a text clustering algorithm, and generates a topic matrix by obtaining a topic vector corresponding to each topic, it is used for:
[0090] The case texts in the case library are sequentially input into the Bert language model to obtain a text vector of each case text;
[0091] The text vectors are dimensionally reduced by using a UMAP algorithm, and the dimensionally reduced text vectors are clustered by using an HDBSCAN algorithm to generate a plurality of topics;
[0092] The topic vector of the current topic is generated by using the dimensionally reduced text vector corresponding to each topic to generate the topic matrix.
[0093] In an embodiment of the application, the importance of each word in each topic in the fine sorting unit 302 is calculated by the following formula:
[0094]
[0095] In the formula, W x,c is the importance of the word x in the topic c, f x,c is the frequency of the word x appearing in the topic c, f x is the frequency of the word x appearing in all topics, and A is the average number of words in each topic.
[0096] In an embodiment of the application, before the fine sorting unit 302 performs classification of case texts in the case library by topics by using a Bert language model and a text clustering algorithm, it is also used for:
[0097] The case texts with missing important fields in the case library are removed;
[0098] Uniform the format of field data of case text in the case library;
[0099] The case text is subjected to Chinese word segmentation by using a word segmentation tool with a financial field vocabulary.
[0100] In an embodiment of the present application, the rough sorting unit 301 is configured to perform:
[0101] The case to be searched is input into the word2vec model to obtain an initial vector of the case to be searched.
[0102] The vector index algorithm is used to search for an initial vector similar to the initial vector of the case to be searched from the linked list node library to obtain a plurality of similar cases of the case to be searched; each node in the linked list node library stores an initial vector of each case text in the case library.
[0103] It can be understood that the structure shown in the embodiment of the present application does not constitute a specific limitation on the financial complaint case retrieval device based on the theme feature. In other embodiments of the present application, the financial complaint case retrieval device based on the theme feature can include more or fewer components than the diagram, or combine certain components, or split certain components, or different component arrangements. The components shown in the diagram can be implemented in hardware, software, or a combination of software and hardware.
[0104] The information interaction, execution process, and the like between the modules in the device described above are based on the same concept as the method embodiments of the present application, and the specific content can be referred to the description in the method embodiments of the present application, which will not be described here.
[0105] The embodiment of the present application also provides a computing device including a memory and a processor, the memory stores a computer program, and the processor implements the method for retrieving a financial complaint case based on a theme feature in any embodiment of the present application when executing the computer program.
[0106] The embodiment of the present application also provides a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program makes the processor execute the method for retrieving a financial complaint case based on a theme feature in any embodiment of the present application when being executed by the processor.
[0107] Specifically, a system or device equipped with a storage medium can be provided, the storage medium stores a software program code for realizing the functions of any of the above embodiments, and the computer (or CPU or MPU) of the system or device reads out and executes the program code stored in the storage medium.
[0108] In this case, the program code read from the storage medium can itself implement the functions of any of the above-described embodiments, and the program code and the storage medium which stores the program code form part of the present application.
[0109] Embodiments of the storage medium for supplying the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk such as a CD-ROM, CD-R, CD-RW, a DVD-ROM, a DVD-RAM, a DVD- RW, a DVD+RW, a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer through a communication network.
[0110] It is obvious that, not only the program code read by the computer, but also the operating system or the like operating on the computer based on the instructions of the program code can perform part or all of the actual operations to realize the functions of any of the above-described embodiments.
[0111] Furthermore, it is understood that the program code read from the storage medium is written into the memory provided in the expansion board inserted into the computer or the memory provided in the expansion module connected to the computer, and then part or all of the actual operations are performed by the CPU or the like mounted on the expansion board or the expansion module based on the instructions of the program code to realize the functions of any of the above-described embodiments.
[0112] It is to be noted that the terms such as first and second are used herein merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Also, the terms "including", "comprising" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements does not include only those elements recited, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus.
[0113] It is understood by those skilled in the art that all or part of the steps of the above-described method embodiments can be completed by program instruction related hardware, and the aforementioned program can be stored in a computer readable storage medium, and the program performs the steps of the above-described method embodiments when executed; and the aforementioned storage medium includes ROM, RAM, magnetic disk or optical disk and various storage media which can store program code.
[0114] It should be pointed out finally that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit the same; and although the present application has been described in detail with reference to the foregoing embodiments, it should be appreciated by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features thereof can be replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for retrieving financial complaint cases based on subject features, characterized in that, The method comprises the following steps: performing rough retrieval on a case to be retrieved by using a vector index algorithm to obtain a plurality of similar cases of the case to be retrieved; generating a text pair of the case to be retrieved and each similar case, and inputting a plurality of text pairs into a pre-trained text matching model; wherein the text matching model is generated by training based on a pre-training model, the pre-training model comprises an input layer and a text matching module, the input layer is used to generate an input vector composed of a word vector, a position vector, a segmentation vector and a topic information word vector, and the input vector is input into the text matching module; obtaining a matching score of each text pair to determine a final target case according to the matching score; the text matching model is generated by training in the following manner: generating a word vector library with topic information by using a Bert language model and a text clustering algorithm; obtaining a plurality of text sample pairs labeled with labels; wherein the text sample pair comprises a first text and a second text, and the label is used to represent whether the first text and the second text are similar; for each text sample pair, the following steps are performed: inputting the text sample pair into a pre-training model, the input layer of the pre-training model generates a topic information word vector of the text sample pair based on the word vector library, and the topic information word vector is added to the word vector, the position vector and the segmentation vector of the text sample pair to form an input vector; inputting the input vector into the text matching module of the pre-training model to adjust the network parameters of the pre-training model by using the output of the text matching module and the label corresponding to the text sample pair; until a text matching model meeting the expectation is obtained; the method of generating a word vector library with topic information by using a Bert language model and a text clustering algorithm comprises: performing topic classification on case texts in a case library by using a Bert language model and a text clustering algorithm to obtain a topic vector corresponding to each topic to generate a topic matrix; calculating the importance of each word in each topic in the case library to generate an importance matrix; normalizing the importance matrix to obtain a weight matrix; wherein the weight matrix contains the weight of each word in each topic; multiplying the topic matrix and the weight matrix to obtain a word vector library with topic information; wherein each word vector in the word vector library is a vector representation of the word in the topic dimension; the importance of each word in each topic is calculated by the following formula: where W x,c is the importance of the term x in the topic c, tf x,c is the frequency of the term x in the topic c, f x is the frequency of the term x in all topics, A is the average number of terms per topic.
2. The method of claim 1, wherein, performing topic classification on case texts in a case library by using a Bert language model and a text clustering algorithm to obtain a topic vector corresponding to each topic to generate a topic matrix, comprising: inputting the case texts in the case library into the Bert language model one by one to obtain a text vector of each case text; performing dimension reduction on the text vectors by using a UMAP algorithm to cluster the dimension-reduced text vectors by using an HDBSCAN algorithm to generate a plurality of topics; generating a topic vector of the current topic by using the dimension-reduced text vector corresponding to each topic to generate a topic matrix.
3. The method of claim 1, wherein, Before the case texts in the case library are classified by the Bert language model and the text clustering algorithm, the method further comprises: eliminating case texts with missing important fields in the case library; unifying the format of field data of the case texts in the case library; performing Chinese word segmentation on the case texts by using a word segmentation tool with a financial field vocabulary.
4. The method according to any one of claims 1 to 3, characterized in that, The rough retrieval of the case to be searched is performed by using a vector index algorithm to obtain several similar cases of the case to be searched, comprising: inputting the case to be searched into a word2vec model to obtain an initial vector of the case to be searched; finding an initial vector similar to the initial vector of the case to be searched from a linked list node library by using a vector index algorithm to obtain several similar cases of the case to be searched; wherein each node in the linked list node library stores an initial vector of each case text in the case library.
5. A device for retrieving financial complaint cases based on subject characteristics, for implementing the method according to any one of claims 1 to 4, characterized in that, comprising: a rough retrieval unit configured to perform rough retrieval of the case to be searched by using a vector index algorithm to obtain several similar cases of the case to be searched; a fine retrieval unit configured to generate a text pair for the case to be searched and each similar case, and input the several text pairs into a pre-trained text matching model; wherein the text matching model is generated by training a pre-training model, and the pre-training model comprises an input layer and a text matching module, the input layer is configured to generate an input vector composed of a word vector, a position vector, a segmentation vector and a topic information word vector, and input the input vector into the text matching module; a determination unit configured to obtain a matching score of each text pair to determine a final target case according to the matching score.
6. A computing device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method of any one of claims 1-4 when executing the computer program.
7. A computer-readable storage medium storing a computer program, wherein the computer program, when executed in a computer, causes the computer to perform the method of any one of claims 1-4.
Citation Information
Patent Citations
Intention classification method and device, electronic equipment and computer readable storage medium
CN113792818A
Application log analysis method and device, equipment and storage medium
CN114610881A