Financial email push method and device, electronic device, and storage medium
By extracting keywords and performing text vectorization on financial emails, and using natural language processing and machine learning technologies to match target keyword vectors with the system vector vocabulary, we solved the problem of errors and omissions caused by the large number of emails in the financial market and ensured the accurate delivery of important emails.
Patent Information
- Application Number
- CN202410724638.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-06-05
AI Technical Summary
The explosive growth in the number of emails in the financial market makes it easy for business and technical personnel to miss important emails, leading to information omissions and business risks.
By performing keyword extraction and text vectorization on financial emails, and utilizing natural language processing and machine learning technologies, we match the target keyword vector with the historical keyword vectors in the system vector lexicon, identify the target account, and send emails.
It effectively avoids the problems of wrong, missed or erroneous emails, ensures that important emails are accurately delivered to the target accounts, and enhances the value of the email notification system.
Smart Images

Figure CN118740915B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology or other related fields, and in particular to a method and device for pushing financial emails, an electronic device, and a storage medium. Background Art
[0002] In the financial market email system, email is an important tool for business communication and information transmission. It covers various transaction steps, transaction results (success, warning, failure), parameter configuration and updates, etc., and is sent to business personnel and technical personnel.
[0003] Currently, with the rapid growth of financial market business and product lines, the number of emails sent is exploding, and the current technical solutions are insufficient in coping with the explosive growth of emails: First, business personnel may miss some emails indicating failures in important links, resulting in the inability to make necessary responses in a timely manner; secondly, the financial market involves many product lines, and business personnel of corresponding products pay more attention to transaction dynamics emails related to their products, while technical personnel pay more attention to emails related to system technology. The sharp increase in the number of emails increases the difficulty of screening, and both parties can easily miss emails, which may lead to information omissions and business risks.
[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0005] The embodiments of the present invention provide a method and device for pushing financial emails, an electronic device, and a storage medium, so as to at least solve the technical problem in related technologies that there are many financial market emails and important emails are easily missed during the forwarding process.
[0006] According to one aspect of an embodiment of the present invention, a method for pushing financial emails is provided, including: extracting keywords from a target email to be sent in a financial system to obtain a target keyword set; performing text vectorization processing based on all keywords in the target keyword set to obtain a target keyword vector corresponding to the target email; performing similarity matching on the target keyword vector with M historical keyword vectors in a system vector vocabulary to obtain a matching result, wherein the matching result is used to record the historical keyword vector with the maximum similarity value to the target keyword vector, and M is a positive integer; determining a system user associated with the historical keyword vector recorded in the matching result and a target account of the system user, and sending the target email to the target account.
[0007] Furthermore, the step of extracting keywords from a target email to be sent in a financial system to obtain a target keyword set includes: obtaining the email content of the target email, wherein the email content includes: an email subject and an email text; performing word segmentation processing on the email content to obtain a word segmentation set corresponding to the target email, wherein T word segmentations are recorded in the word segmentation set, where T is a positive integer; determining R keywords in the word segmentation set based on a preset extraction strategy, wherein R is a positive integer less than or equal to T; extracting R of the keywords, and storing the R keywords in the target keyword set.
[0008] Furthermore, the step of determining R keywords in the word segmentation set based on a preset extraction strategy includes: for each of the word segmentations in the word segmentation set, calculating the key feature value of the word segmentation based on the preset extraction strategy; when the key feature value of the word segmentation is greater than or equal to a preset feature threshold, determining the word segmentation as the keyword; integrating all the keywords in the word segmentation set to obtain R keywords.
[0009] Furthermore, the step of calculating the key feature value of the segmentation word based on the preset extraction strategy includes: obtaining the position information of the segmentation word in the email content, and calculating the position feature value of the segmentation word based on the position information and a first preset formula; obtaining the word frequency value of the segmentation word in the email content, and substituting the word frequency value into a second preset formula to obtain the word frequency feature value of the segmentation word; obtaining the context index value of the segmentation word in the email content, and substituting the context index value into a third preset formula to obtain the context relationship feature value of the segmentation word, wherein the context index value is used to indicate the importance of the segmentation word in the context of a specified range; obtaining the inter-sentence word frequency value of the segmentation word, and substituting the inter-sentence word frequency value into a fourth preset formula to obtain the inter-sentence word frequency feature value of the segmentation word; substituting the position feature value, the word frequency feature value, the context relationship feature value and the inter-sentence word frequency feature value into the key feature calculation formula indicated by the preset extraction strategy to obtain the key feature value.
[0010] Furthermore, the context index value includes: a previous index value and a following index value, and the step of obtaining the context index value of the word in the email content includes: determining the target window word number S based on the specified range, wherein S is a specified numerical value that matches the specified range; extracting S previous window word segments in the previous direction and S following window word segments in the following direction from the word segmentation set based on the target window word segmentation number; determining the previous index value based on the S previous window word segments, wherein the previous index value refers to the number of different word segments appearing in the S previous window word segments; determining the following index value based on the S following window word segments, wherein the following index value refers to the number of different word segments appearing in the S following window word segments.
[0011] Furthermore, the system vector vocabulary is obtained through the following steps: for each system user in the financial system, obtain N read emails of the system user within a historical time period, where N is a positive integer; for each read email, perform keyword extraction on the read email to obtain a historical keyword set corresponding to the read email; perform text vectorization processing based on all historical keywords in the historical keyword set to obtain a historical keyword vector corresponding to the read email; integrate all the historical keyword vectors corresponding to the N read emails to obtain the system vector vocabulary.
[0012] Furthermore, the step of performing similarity matching between the target keyword vector and M historical keyword vectors in the system vector vocabulary to obtain a matching result includes: for each of the historical keyword vectors in the system vector vocabulary, calculating the Euclidean distance value between the target keyword vector and the historical keyword vector; determining the Euclidean distance value as the similarity value between the target keyword vector and the historical keyword vector; integrating the M similarity values between the target keyword vector and the M historical keyword vectors, and determining the maximum similarity value among the M similarity values; and generating the matching result based on the historical keyword vector corresponding to the maximum similarity value.
[0013] According to another aspect of an embodiment of the present invention, a push device for financial emails is also provided, including: an extraction unit, used to extract keywords from a target email to be sent in a financial system to obtain a target keyword set; a processing unit, used to perform text vectorization processing based on all keywords in the target keyword set to obtain a target keyword vector corresponding to the target email; a matching unit, used to perform similarity matching on the target keyword vector with M historical keyword vectors in a system vector vocabulary to obtain a matching result, wherein the matching result is used to record the historical keyword vector with the largest similarity value to the target keyword vector, and M is a positive integer; a sending unit, used to determine the system user associated with the historical keyword vector recorded in the matching result and the target account of the system user, and send the target email to the target account.
[0014] Furthermore, the extraction unit includes: a first acquisition module, used to obtain the email content of the target email, wherein the email content includes: an email subject and an email text; a word segmentation module, used to perform word segmentation processing on the email content to obtain a word segmentation set corresponding to the target email, wherein the word segmentation set records T word segments, and T is a positive integer; a first determination module, used to determine R keywords in the word segmentation set based on a preset extraction strategy, wherein R is a positive integer less than or equal to T; a first extraction module, used to extract R of the keywords, and store the R keywords in the target keyword set.
[0015] Furthermore, the first determination module includes: a first calculation submodule, used to calculate the key feature value of the segmentation for each of the segmentations in the segmentation set based on the preset extraction strategy; a first determination submodule, used to determine the segmentation as the keyword when the key feature value of the segmentation is greater than or equal to a preset feature threshold; and an integration submodule, used to integrate all the keywords in the segmentation set to obtain R keywords.
[0016] Furthermore, the calculation submodule includes: a second calculation submodule, which is used to obtain the position information of the segmentation word in the email content, and calculate the position feature value of the segmentation word based on the position information and the first preset formula; a first substitution submodule, which is used to obtain the word frequency value of the segmentation word in the email content, and substitute the word frequency value into the second preset formula to obtain the word frequency feature value of the segmentation word; a second substitution submodule, which is used to obtain the context index value of the segmentation word in the email content, and substitute the context index value into the third preset formula to obtain the context relationship feature value of the segmentation word, wherein the context index value is used to indicate the importance of the segmentation word in the context of a specified range; a third substitution submodule, which is used to obtain the inter-sentence word frequency value of the segmentation word, and substitute the inter-sentence word frequency value into the fourth preset formula to obtain the inter-sentence word frequency feature value of the segmentation word; a fourth substitution submodule, which is used to substitute the position feature value, the word frequency feature value, the context relationship feature value and the inter-sentence word frequency feature value into the key feature calculation formula indicated by the preset extraction strategy to obtain the key feature value.
[0017] Furthermore, the context index value includes: a previous index value and a following index value, and the second substitution submodule includes: a second determination submodule, used to determine the target window word count S based on the specified range, wherein S is a specified numerical value matching the specified range; an extraction submodule, used to extract S previous window word counts in the previous direction and S following window word counts in the following direction from the word set based on the target window word count; a third determination submodule, used to determine the previous index value based on the S previous window word counts, wherein the previous index value refers to the number of different word counts appearing in the S previous window word counts; a fourth determination submodule, used to determine the following index value based on the S following window word counts, wherein the following index value refers to the number of different word counts appearing in the S following window word counts.
[0018] Furthermore, the push device for financial emails also includes: a second acquisition module, used to obtain N read emails of each system user in the financial system within a historical time period, where N is a positive integer; a second extraction module, used to perform keyword extraction on each read email to obtain a historical keyword set corresponding to the read email; a processing module, used to perform text vectorization processing based on all historical keywords in the historical keyword set to obtain a historical keyword vector corresponding to the read email; a first integration module, used to integrate all the historical keyword vectors corresponding to the N read emails to obtain the system vector vocabulary.
[0019] Furthermore, the matching unit includes: a calculation module, used to calculate the Euclidean distance value between the target keyword vector and the historical keyword vector for each of the historical keyword vectors in the system vector vocabulary; a second determination module, used to determine the Euclidean distance value as the similarity value between the target keyword vector and the historical keyword vector; a second integration module, used to integrate the M similarity values of the target keyword vector and M historical keyword vectors, and determine the maximum similarity value among the M similarity values; a generation module, used to generate the matching result based on the historical keyword vector corresponding to the maximum similarity value.
[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned financial email push methods.
[0021] 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 is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-described methods for pushing financial emails.
[0022] In the present invention, a method for pushing financial emails is proposed. First, keywords are extracted from the target email to be sent in the financial system to obtain a target keyword set. Then, text vectorization processing is performed based on all keywords in the target keyword set to obtain a target keyword vector corresponding to the target email. Then, similarity matching is performed between the target keyword vector and M historical keyword vectors in the system vector vocabulary to obtain a matching result, wherein the matching result is used to record the historical keyword vector with the largest similarity value to the target keyword vector, M is a positive integer, and finally, the system user associated with the historical keyword vector recorded in the matching result and the target account of the system user are determined, and the target email is sent to the target account.
[0023] In the present invention, natural language processing technology is used to extract keywords from financial emails, and then text vectorization processing is used to convert the keywords in the target email into numerical vector representations, so that the financial system can use machine learning technology to perform similarity matching between text word vectors, determine the historical keyword vector in the system vector vocabulary that is most similar to the target keyword vector, and thus determine the system user associated with the historical keyword vector, and send the target email to the target account, avoiding the problem of wrong email sending, missing or erroneous email sending in the case of explosive growth of financial market emails, and thus solving the technical problem in related technologies that there are many financial market emails and it is easy to miss important emails during the forwarding process. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0025] Figure 1 is a flowchart of an optional method for pushing financial emails according to an embodiment of the present invention;
[0026] Figure 2 is a flowchart of an optional method for processing read emails in a financial system according to an embodiment of the present invention;
[0027] Figure 3 This is a flowchart of an optional method for pushing system emails according to an embodiment of the present invention;
[0028] Figure 4 is a schematic diagram of an optional financial email push device according to an embodiment of the present invention;
[0029] Figure 5 The figure is a hardware structure block diagram of an electronic device (or mobile device) for a method for pushing financial emails according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of 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 the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes 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.
[0032] To facilitate those skilled in the art to understand the present invention, some of the terms or nouns involved in the embodiments of the present invention are explained below:
[0033] Financial market refers to the general place where monetary funds lending, foreign exchange trading, securities trading, bond and stock issuance, and gold and other precious metals trading are carried out.
[0034] Euclidean distance, also known as Euclidean distance, measures the absolute distance between two points in multidimensional space.
[0035] It should be noted that the method and device for pushing financial emails in the present invention can be used in the field of financial technology when classifying and pushing financial market emails, and can also be used in any field other than the field of financial technology when classifying and pushing financial market emails. The application field of the method and device for pushing financial emails in the present invention is not limited.
[0036] 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 analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, processing, transmission, provision, disclosure, use and processing of relevant data must comply with the laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or institution through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or institution.
[0037] The information collection (e.g., user voice, video, and text collection) and analysis operations involved in the present invention have provided users with corresponding operation entrances when they are executed, allowing users to choose to agree or reject the automated decision results; if the user chooses to reject, the expert decision-making process will be entered.
[0038] The following embodiments of the present invention can be applied to various systems, applications, and devices that require financial market email classification and push notifications. They can analyze email content using natural language processing techniques to determine the intended recipients. The present invention uses natural language processing to extract keywords from financial emails and then converts the keywords in the target emails into numerical vector representations through text vectorization. This allows the financial system to use machine learning techniques to perform vector similarity matching and determine the target accounts to which the target emails should be sent.
[0039] The present invention will be described in detail below with reference to various embodiments.
[0040] Example 1
[0041] According to an embodiment of the present invention, an embodiment of a method for pushing financial emails is 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.
[0042] Figure 1 : is a flow chart of an optional method for pushing financial emails according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:
[0043] Step S101 : extract keywords from a target email to be sent in a financial system to obtain a target keyword set.
[0044] Step S102 : performing text vectorization processing based on all keywords in the target keyword set to obtain a target keyword vector corresponding to the target email.
[0045] Step S103 , performing similarity matching between the target keyword vector and M historical keyword vectors in the system vector vocabulary to obtain a matching result, wherein the matching result is used to record the historical keyword vector with the maximum similarity value to the target keyword vector, and M is a positive integer.
[0046] Step S104 : determining the system user associated with the historical keyword vector of the matching result record and the target account of the system user, and sending the target email to the target account.
[0047] Through the above steps, keywords can be extracted from the target email to be sent in the financial system to obtain a target keyword set, and then text vectorization processing can be performed based on all keywords in the target keyword set to obtain a target keyword vector corresponding to the target email. The target keyword vector is then matched with M historical keyword vectors in the system vector vocabulary for similarity to obtain a matching result, wherein the matching result is used to record the historical keyword vector with the largest similarity value to the target keyword vector, M is a positive integer, and finally the system user associated with the historical keyword vector recorded in the matching result and the target account of the system user are determined, and the target email is sent to the target account.
[0048] In an embodiment of the present invention, natural language processing technology is used to extract keywords from financial emails, and then text vectorization processing is used to convert the keywords in the target email into numerical vector representations, so that the financial system can use machine learning technology to perform similarity matching between text word vectors, determine the historical keyword vector in the system vector vocabulary that is most similar to the target keyword vector, and thus determine the system user associated with the historical keyword vector, and send the target email to the target account, avoiding the problem of wrong email sending, missing or erroneous email sending in the case of explosive growth of financial market emails, and thus solving the technical problem in related technologies that there are many financial market emails and important emails are easily missed during the forwarding process.
[0049] The embodiment of the present invention is described in detail below in conjunction with the above steps.
[0050] The implementing entity of the embodiment of the present invention can be a financial system or an email notification system connected to the financial system. It combines natural language processing technology and machine learning technology to perform keyword extraction, text vectorization and similarity matching on the outgoing emails of the financial system, determine the target users and system accounts associated with the outgoing emails in the financial system, and then implement email push.
[0051] Step S101 : extract keywords from a target email to be sent in a financial system to obtain a target keyword set.
[0052] Specifically, the target emails are usually used to record information on business, transactions, risk management, etc. related to the financial market, and may include: transaction notifications, which specifically refer to notifications on transaction execution status, such as successful transaction confirmation, order execution status, etc., which usually contain key transaction information, such as the transaction party, transaction volume, price, etc.; market dynamics, which specifically refer to the latest dynamics and trend analysis of the financial market, involving market index changes, industry trends, the impact of important events, etc.; risk warnings, which specifically refer to risk management warning information, such as abnormal trading behavior, potential risk events, etc., aimed at reminding the recipient to pay attention to possible risks; product promotion, which specifically refers to information about financial institutions promoting products or services, such as new product launches, promotional activities, etc., aimed at attracting customer attention and encouraging them to participate in related activities.
[0053] In order to convert the email content into a processable text form, analyze and understand the text, and extract key information to support subsequent applications and decisions, an embodiment of the present invention may need to pre-process the target email before performing keyword extraction, including at least a word segmentation operation, mainly performing word segmentation according to punctuation marks and special characters to obtain a word segmentation set corresponding to the target email. Optionally, step S101 includes: obtaining the email content of the target email, wherein the email content includes: an email subject and an email text; performing word segmentation on the email content to obtain a word segmentation set corresponding to the target email, wherein T word segmentations are recorded in the word segmentation set, where T is a positive integer; determining R keywords in the word segmentation set based on a preset extraction strategy, wherein R is a positive integer less than or equal to T; extracting R keywords, and storing the R keywords in the target keyword set.
[0054] Optionally, the step of determining R keywords in the word segmentation set based on a preset extraction strategy includes: for each word segmentation in the word segmentation set, calculating the key feature value of the word segmentation based on the preset extraction strategy; when the key feature value of the word segmentation is greater than or equal to a preset feature threshold, determining the word segmentation as a keyword; integrating all keywords in the word segmentation set to obtain R keywords.
[0055] Alternatively, the number of keywords U can be specified in advance, where U is an arbitrary positive integer. After calculating the key features of all word segments, they are arranged in a specified order (for example, from large to small) to form a key feature sequence, and the word segments corresponding to the U key feature values with larger numerical values in the sequence are selected and determined as keywords, and keyword extraction is performed.
[0056] It should be noted that in the process of keyword extraction, at least the feature values of the following dimensions need to be considered: position, word frequency, contextual relationship, and the frequency of occurrence of the segmentation word in a single sentence. Optionally, the step of calculating the key feature value of the segmentation word based on the preset extraction strategy includes: obtaining the position information of the segmentation word in the email content, and calculating the position feature value of the segmentation word based on the position information and the first preset formula; obtaining the word frequency value of the segmentation word in the email content, and substituting the word frequency value into the second preset formula to obtain the word frequency feature value of the segmentation word; obtaining the context index value of the segmentation word in the email content, and substituting the context index value into the third preset formula to obtain the contextual relationship feature value of the segmentation word, wherein the context index value is used to indicate the importance of the segmentation word in the context of a specified range; obtaining the inter-sentence word frequency value of the segmentation word, and substituting the inter-sentence word frequency value into the fourth preset formula to obtain the inter-sentence word frequency feature value of the segmentation word; substituting the position feature value, word frequency feature value, contextual relationship feature value, and inter-sentence word frequency feature value into the key feature calculation formula indicated by the preset extraction strategy to obtain the key feature value.
[0057] Regarding the position dimension, the closer the word is to the front of the entire text, the higher its importance. The embodiment of the present invention exemplarily provides a first preset formula: A P =log2(log2(2+x))), where A P It refers to the position feature value of the target word A, and x is the median position value of the target word A in the entire text. For example, the median position value of {1,2,3,4,5} is 3.
[0058] It should also be noted that the embodiment of the present invention exemplarily provides a second preset formula as follows: Among them, A F It refers to the word frequency value of the target word A, TF(A) is the number of times A appears in the target text, MeanTF is the average word frequency value frequency of all word segments in the target text, and δ is the standard deviation, which refers to the standard deviation of the average word frequency value frequency of all word segments.
[0059] In addition, it is also necessary to consider the inter-sentence word frequency feature of the target word segment A. The embodiment of the present invention exemplarily provides a fourth preset formula: Among them, A S is the inter-sentence frequency feature value of the target word A, SF(A) is the frequency of single sentences containing the target word A (i.e., the total number of single sentences containing A in the target text), S ALL Indicates the total number of sentences in the target text.
[0060] Finally, it is necessary to integrate the feature values of all the above dimensions to calculate the key feature value of the target word A. The embodiment of the present invention exemplarily provides a key feature calculation formula as follows: After calculating the key feature values of all word segments in the target text, keyword extraction is performed based on a preset threshold, and the extracted keywords are associated with the target users in a set order and then stored in the financial system.
[0061] Optionally, the context indicator value includes: a previous index value and a following index value, and the step of obtaining the context indicator value of a word in the email content includes: determining the number of target window word segments S based on a specified range, wherein S is a specified numerical value that matches the specified range; extracting S previous window word segments in the previous direction and S following window word segments in the following direction from the word segmentation set based on the number of target window word segments; determining the previous index value based on the S previous window word segments, wherein the previous index value refers to the number of different word segments appearing in the S previous window word segments; determining the following index value based on the S following window word segments, wherein the following index value refers to the number of different word segments appearing in the S following window word segments.
[0062] Regarding the contextual relationship dimension, in the embodiment of the present invention, by locating the window word in the context direction of the target word A, the importance of the target word A is defined by the contextual relationship feature value calculation formula. An exemplary third preset formula is provided as follows: Among them, A R Refers to the contextual relationship feature value of the target word A, WL refers to the previous index value (for example, when the number of target window word segments S is specified as 5, the number of different word segments in the 5 window word segments to the left of the target word A), WR refers to the following index value (that is, the number of different word segments in the 5 window word segments to the right of the target word A), and MaxTF represents the maximum value of all current word frequencies (the frequency of all window words that currently appear).
[0063] Step S102 : performing text vectorization processing based on all keywords in the target keyword set to obtain a target keyword vector corresponding to the target email.
[0064] Specifically, after obtaining the keywords, text vectorization can be performed according to the following steps: construct a vocabulary based on all keywords as the basis for text vectorization; for each keyword in the vocabulary, obtain the word frequency and inverse document frequency of the keyword in the target email, where word frequency refers to the number of times the keyword appears in the target email, and inverse document frequency refers to the inverse of word frequency, which is calculated as the number of times the keyword appears in the target email divided by the logarithm of the total number of words in the target email; according to the preset text vectorization method, each keyword is represented as a vector to obtain the target keyword vector; all target keyword vectors are normalized so that target keyword vectors of different lengths have the same scale.
[0065] Step S103 , performing similarity matching between the target keyword vector and M historical keyword vectors in the system vector vocabulary to obtain a matching result, wherein the matching result is used to record the historical keyword vector with the maximum similarity value to the target keyword vector, and M is a positive integer.
[0066] Optionally, the system vector vocabulary is obtained through the following steps: for each system user in the financial system, obtain N read emails of the system user within a historical time period, where N is a positive integer; for each read email, perform keyword extraction on the read email to obtain a historical keyword set corresponding to the read email; perform text vectorization processing based on all historical keywords in the historical keyword set to obtain a historical keyword vector corresponding to the read email; integrate all historical keyword vectors corresponding to the N read emails to obtain the system vector vocabulary.
[0067] Specifically, in the similarity matching process, the Euclidean distance value can be used to characterize the similarity between keyword vectors, and word vectors can be screened based on a preset distance value. Optionally, step S103 includes: for each historical keyword vector in the system vector vocabulary, calculating the Euclidean distance value between the target keyword vector and the historical keyword vector; determining the Euclidean distance value as the similarity value between the target keyword vector and the historical keyword vector; integrating the M similarity values of the target keyword vector and the M historical keyword vectors, and determining the maximum similarity value among the M similarity values; generating a matching result based on the historical keyword vector corresponding to the maximum similarity value.
[0068] Step S104 : determining the system user associated with the historical keyword vector of the matching result record and the target account of the system user, and sending the target email to the target account.
[0069] The embodiments of the present invention can push corresponding financial market emails based on user behavior, highlight important emails of related system users, enhance the value of the email notification system, and solve the problem that when a large number of emails appear, emails related to the corresponding users are ignored.
[0070] The present invention will be described below in conjunction with another specific embodiment.
[0071] In order to solve the problem that the corresponding personnel in the current financial market email system easily miss important emails due to the large number of emails, the embodiment of the present invention proposes an email push method, which is mainly divided into two parts. The first part is to record the subject and content of the email clicked by the user, record the keywords through keyword extraction and text vectorization technology, associate them with the target users, and store them in the financial system database; the second part is to extract the keywords of the newly generated emails to be sent by the financial system, perform similarity matching with the keyword vectors stored in the system, and then determine the relevant users.
[0072] Figure 2 FIG. 1 is a flow chart of an optional method for processing read emails in a financial system according to an embodiment of the present invention. Figure 2 As shown, the method includes the following steps:
[0073] 1. The subject and content of the emails that the system users have read within the specified time period are stored;
[0074] 2. Keyword extraction;
[0075] 3. Record the keywords of the emails read by the user into the financial system database.
[0076] It should be noted that before keyword extraction, the target email needs to be preprocessed, including at least word segmentation, mainly segmenting words according to punctuation marks and special characters to obtain a word segmentation set corresponding to the target email.
[0077] In the process of keyword extraction, at least the feature values of the following dimensions need to be considered: position, word frequency, contextual relationship, and the frequency of occurrence of segmented words in a single sentence.
[0078] Regarding the position dimension, the closer the word is to the front of the entire text, the more important it is. The reference formula is: A P =log2(log2(2+x))), where A P It refers to the position feature value of the target word A, and x is the median position value of the target word A in the entire text. For example, the median position value of {1,2,3,4,5} is 3.
[0079] Another thing to note is that the reference formula for calculating the frequency of the target word segmentation is: Among them, A F It refers to the word frequency value of the target word A, TF(A) is the number of times A appears in the target text, MeanTF is the average word frequency value frequency of all word segments in the target text, and δ is the standard deviation, which refers to the standard deviation of the average word frequency value frequency of all word segments.
[0080] Regarding the contextual relationship dimension, in the embodiment of the present invention, by locating the window word in the context direction of the target word A, the importance of the target word A is defined by the contextual relationship feature value calculation formula. The calculation reference formula is: Among them, A R It refers to the contextual relationship feature value of the target word A. WL|WR is the number of different words that appear when the window is 5 and the word position is moved left and right five times. MaxTF represents the maximum value of all current word frequencies (the word frequencies of all window words that currently appear).
[0081] In addition, the inter-sentence frequency characteristics of the target word A need to be considered. The reference formula is: Among them, A S , is the inter-sentence frequency feature value of the target word A, SF(A) is the frequency of single sentences containing the target word A (that is, the total number of single sentences containing A in the target text), S LLA Indicates the total number of sentences in the target text.
[0082] Finally, it is necessary to integrate the feature values of all the above dimensions to calculate the key feature value of the target word A. The reference formula is: After calculating the key feature values of all word segments in the target text, keyword extraction is performed based on a preset threshold, and the extracted keywords are associated with the target users in a set order and then stored in the financial system.
[0083] Figure 3 FIG. 1 is a flow chart of an optional method for pushing system emails according to an embodiment of the present invention. Figure 3 As shown, the method includes the following process:
[0084] 1. The system generates emails to be sent;
[0085] 2. Keyword extraction;
[0086] 3. Perform similarity matching with stored content to determine associated users;
[0087] 4. Send emails to associated users.
[0088] It should be noted that the keyword extraction step is mentioned in the above preprocessing step and will not be repeated here. In the similarity matching process, the Euclidean distance value can be used to represent the similarity between keyword vectors, and word vectors can be screened based on the preset distance value to determine the associated users and system accounts, and the emails to be sent can be pushed to the system accounts of the associated users.
[0089] The embodiments of the present invention can push corresponding financial market emails based on user behavior, highlight important emails of related system users, enhance the value of the email notification system, and solve the problem that when a large number of emails appear, emails related to the corresponding users are ignored.
[0090] The present invention is described below in conjunction with another optional embodiment.
[0091] Example 2
[0092] The financial email push device provided in this embodiment includes multiple implementation units, each implementation unit corresponding to each implementation step in the above-mentioned embodiment 1.
[0093] Figure 4 Schematic diagram of an optional financial email push device according to an embodiment of the present invention. Figure 4As shown, the device may include: an extracting unit 41, a processing unit 42, a matching unit 43, and a sending unit 44.
[0094] The extraction unit 41 is used to extract keywords from the target email to be sent in the financial system to obtain a target keyword set.
[0095] The processing unit 42 is configured to perform text vectorization processing based on all keywords in the target keyword set to obtain a target keyword vector corresponding to the target email.
[0096] The matching unit 43 is used to perform similarity matching between the target keyword vector and M historical keyword vectors in the system vector vocabulary to obtain a matching result, wherein the matching result is used to record the historical keyword vector with the maximum similarity value to the target keyword vector, and M is a positive integer.
[0097] The sending unit 44 is configured to determine the system user associated with the historical keyword vector of the matching result record and the target account of the system user, and send the target email to the target account.
[0098] The above-mentioned financial email push device can first extract keywords from the target email to be sent in the financial system through the extraction unit 41 to obtain a target keyword set, and then perform text vectorization processing based on all keywords in the target keyword set through the processing unit 42 to obtain a target keyword vector corresponding to the target email, and then perform similarity matching between the target keyword vector and M historical keyword vectors in the system vector vocabulary through the matching unit 43 to obtain a matching result, wherein the matching result is used to record the historical keyword vector with the largest similarity value with the target keyword vector, M is a positive integer, and finally determine the system user associated with the historical keyword vector recorded in the matching result and the target account of the system user through the sending unit 44, and send the target email to the target account.
[0099] In an embodiment of the present invention, natural language processing technology is used to extract keywords from financial emails, and then text vectorization processing is used to convert the keywords in the target email into numerical vector representations, so that the financial system can use machine learning technology to perform similarity matching between text word vectors, determine the historical keyword vector in the system vector vocabulary that is most similar to the target keyword vector, and thus determine the system user associated with the historical keyword vector, and send the target email to the target account, avoiding the problem of wrong email sending, missed sending or erroneous sending in the case of explosive growth of emails in the financial market, and thus solving the technical problem in related technologies that there are many financial market emails and important emails are easily missed during the forwarding process.
[0100] Optionally, the extraction unit includes: a first acquisition module, used to obtain the email content of the target email, wherein the email content includes: an email subject and an email text; a word segmentation module, used to perform word segmentation processing on the email content to obtain a word segmentation set corresponding to the target email, wherein the word segmentation set records T word segments, and T is a positive integer; a first determination module, used to determine R keywords in the word segmentation set based on a preset extraction strategy, wherein R is a positive integer less than or equal to T; a first extraction module, used to extract R keywords and store the R keywords in the target keyword set.
[0101] Optionally, the first determination module includes: a first calculation submodule, used to calculate the key feature value of each segmentation in the segmentation set based on a preset extraction strategy; a first determination submodule, used to determine the segmentation as a keyword when the key feature value of the segmentation is greater than or equal to a preset feature threshold; an integration submodule, used to integrate all keywords in the segmentation set to obtain R keywords.
[0102] Optionally, the calculation submodule includes: a second calculation submodule, which is used to obtain the position information of the segmentation word in the email content, and calculate the position feature value of the segmentation word based on the position information and the first preset formula; a first substitution submodule, which is used to obtain the word frequency value of the segmentation word in the email content, and substitute the word frequency value into the second preset formula to obtain the word frequency feature value of the segmentation word; a second substitution submodule, which is used to obtain the context index value of the segmentation word in the email content, and substitute the context index value into the third preset formula to obtain the context relationship feature value of the segmentation word, wherein the context index value is used to indicate the importance of the segmentation word in the context of a specified range; a third substitution submodule, which is used to obtain the inter-sentence word frequency value of the segmentation word, and substitute the inter-sentence word frequency value into the fourth preset formula to obtain the inter-sentence word frequency feature value of the segmentation word; a fourth substitution submodule, which is used to substitute the position feature value, word frequency feature value, context relationship feature value and inter-sentence word frequency feature value into the key feature calculation formula indicated by the preset extraction strategy to obtain the key feature value.
[0103] Optionally, the context index value includes: a previous index value and a following index value, and the second substitution submodule includes: a second determination submodule, used to determine the target window word count S based on a specified range, wherein S is a specified numerical value that matches the specified range; an extraction submodule, used to extract S previous window word counts in the previous direction and S following window word counts in the following direction from the word set based on the target window word count; a third determination submodule, used to determine the previous index value based on the S previous window word counts, wherein the previous index value refers to the number of different word counts appearing in the S previous window word counts; a fourth determination submodule, used to determine the following index value based on the S following window word counts, wherein the following index value refers to the number of different word counts appearing in the S following window word counts.
[0104] Optionally, the push device for financial emails also includes: a second acquisition module, used to obtain N read emails of each system user in the financial system within a historical time period, where N is a positive integer; a second extraction module, used to perform keyword extraction on each read email, and obtain a historical keyword set corresponding to the read email; a processing module, used to perform text vectorization processing based on all historical keywords in the historical keyword set, and obtain a historical keyword vector corresponding to the read email; a first integration module, used to integrate all historical keyword vectors corresponding to N read emails, and obtain a system vector vocabulary.
[0105] Optionally, the matching unit includes: a calculation module, used to calculate the Euclidean distance value between the target keyword vector and the historical keyword vector for each historical keyword vector in the system vector vocabulary; a second determination module, used to determine the Euclidean distance value as the similarity value between the target keyword vector and the historical keyword vector; a second integration module, used to integrate M similarity values between the target keyword vector and M historical keyword vectors, and determine the maximum similarity value among the M similarity values; a generation module, used to generate a matching result based on the historical keyword vector corresponding to the maximum similarity value.
[0106] The above-mentioned financial email push device can also include a processor and a memory. The above-mentioned extraction unit 41, processing unit 42, matching unit 43, sending unit 44, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0107] The processor includes a kernel that retrieves the corresponding program unit from memory. One or more kernels can be configured to perform a similarity match between a target keyword vector and M historical keyword vectors in a system vector vocabulary by adjusting kernel parameters. A matching result is obtained, and the system user associated with the historical keyword vector recorded in the matching result and the target account of the system user are determined. The target email is then sent to the target account.
[0108] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0109] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: performing keyword extraction on a target email to be sent in a financial system to obtain a target keyword set; performing text vectorization processing based on all keywords in the target keyword set to obtain a target keyword vector corresponding to the target email; performing similarity matching on the target keyword vector with M historical keyword vectors in a system vector vocabulary to obtain a matching result, wherein the matching result is used to record the historical keyword vector with the maximum similarity value to the target keyword vector, where M is a positive integer; determining the system user associated with the historical keyword vector recorded in the matching result and the target account of the system user, and sending the target email to the target account.
[0110] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the financial email push method of any one of the above-mentioned embodiments.
[0111] 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 is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the financial email push method of any one of the above-mentioned embodiments.
[0112] Figure 5 FIG. 1 is a hardware structure diagram of an electronic device (or mobile device) for a method for pushing financial emails according to an embodiment of the present invention. Figure 5 As shown, the electronic device may include one or more ( Figure 5 (As shown in the figure, 502a, 502b, ..., 502n are used) processor 502 (processor 502 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), memory 504 for storing data. In addition, it may also 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 I / O interface), a network interface, a keyboard, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 5 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 5 More or fewer components than shown, or with Figure 5 Different configurations shown.
[0113] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0114] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0115] 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 exemplary. For example, the division of units can be a logical function division. In actual implementation, there may be other division methods, such as 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.
[0116] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0117] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, 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.
[0118] 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 invention, 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. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. 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, etc. Various media that can store program codes.
[0119] The above is only a preferred embodiment of the present invention. 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 invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A method for pushing financial emails, characterized in that: include: For a target email to be sent in the financial system, obtaining email content of the target email; Performing word segmentation processing on the email content to obtain a word segmentation set corresponding to the target email; For each word in the word set, a key feature value of the word is calculated based on a preset extraction strategy; wherein the method includes: Obtaining position information of the segmented word in the email content, and calculating a position feature value of the segmented word based on the position information and a first preset formula; Obtaining a word frequency value of the word segment in the email content, and substituting the word frequency value into a second preset formula to obtain a word frequency feature value of the word segment; Obtaining a context index value of the segmented word in the email content, and substituting the context index value into a third preset formula to obtain a contextual relationship feature value of the segmented word, wherein the context index value is used to indicate the importance of the segmented word in the context of a specified range; Obtaining an inter-sentence word frequency value of the segmented word, and substituting the inter-sentence word frequency value into a fourth preset formula to obtain an inter-sentence word frequency feature value of the segmented word; Substituting the position feature value, the word frequency feature value, the contextual relationship feature value, and the inter-sentence word frequency feature value into the key feature calculation formula indicated by the preset extraction strategy to obtain the key feature value; If the key feature value of the segmented word is greater than or equal to a preset feature threshold, the segmented word is determined as a keyword; the keyword is extracted and stored in a target keyword set; Performing text vectorization processing based on all the keywords in the target keyword set to obtain a target keyword vector corresponding to the target email; Perform similarity matching on the target keyword vector and M historical keyword vectors in the system vector lexicon to obtain a matching result, wherein the matching result is used to record the historical keyword vector with the greatest similarity value to the target keyword vector, where M is a positive integer; Determine a system user associated with the historical keyword vector of the matching result record and a target account of the system user, and send the target email to the target account.
2. The push method according to claim 1, characterized in that: The email content includes: email subject and email text; the word segmentation set records T word segmentations, where T is a positive integer; the target keyword set stores R keywords, where R is a positive integer less than or equal to T.
3. The push method according to claim 1, characterized in that: The context indicator value includes: a previous context indicator value and a following context indicator value. The step of obtaining the context indicator value of the word segment in the email content includes: Determining a target window word segmentation number S based on the specified range, where S is a specified value that matches the specified range; Extracting S preceding window segmentations of the segmentation in the preceding direction and S following window segmentations in the following direction from the segmentation set according to the target window segmentation number; Determining the above index value based on the S above window segmentations, wherein the above index value refers to the number of different segmentations appearing in the S above window segmentations; The context index value is determined based on the S context window segmentations, wherein the context index value refers to the number of different segmentations appearing in the S context window segmentations.
4. The push method according to claim 1, characterized in that: The system vector vocabulary is obtained through the following steps: For each system user in the financial system, obtain N read emails of the system user in a historical time period, where N is a positive integer; For each of the read emails, extract keywords for the read email to obtain a historical keyword set corresponding to the read email; Performing text vectorization processing based on all historical keywords in the historical keyword set to obtain a historical keyword vector corresponding to the read email; All the historical keyword vectors corresponding to the N read emails are integrated to obtain the system vector vocabulary.
5. The push method according to claim 1, characterized in that: The step of performing similarity matching between the target keyword vector and M historical keyword vectors in the system vector vocabulary to obtain a matching result includes: For each of the historical keyword vectors in the system vector lexicon, calculating the Euclidean distance between the target keyword vector and the historical keyword vector; Determining the Euclidean distance value as the similarity value between the target keyword vector and the historical keyword vector; Integrating the M similarity values of the target keyword vector and the M historical keyword vectors, and determining a maximum similarity value among the M similarity values; The matching result is generated based on the historical keyword vector corresponding to the maximum similarity value.
6. A financial email push device, characterized in that: include: An extraction unit, configured to obtain the email content of a target email to be sent in the financial system; Performing word segmentation processing on the email content to obtain a word segmentation set corresponding to the target email; For each word in the word set, calculating a key feature value of the word based on a preset extraction strategy; Wherein, it includes: obtaining the position information of the segmentation word in the email content, and calculating the position feature value of the segmentation word based on the position information and a first preset formula; obtaining the word frequency value of the segmentation word in the email content, and substituting the word frequency value into a second preset formula to obtain the word frequency feature value of the segmentation word; obtaining the context index value of the segmentation word in the email content, and substituting the context index value into a third preset formula to obtain the context relationship feature value of the segmentation word, wherein the context index value is used to indicate the importance of the segmentation word in the context of a specified range; obtaining the inter-sentence word frequency value of the segmentation word, and substituting the inter-sentence word frequency value into a fourth preset formula to obtain the inter-sentence word frequency feature value of the segmentation word; substituting the position feature value, the word frequency feature value, the context relationship feature value and the inter-sentence word frequency feature value into the key feature calculation formula indicated by the preset extraction strategy to obtain the key feature value; when the key feature value of the segmentation word is greater than or equal to a preset feature threshold, determining the segmentation word as a keyword; extracting the keyword and storing it in a target keyword set; A processing unit, configured to perform text vectorization processing based on all the keywords in the target keyword set to obtain a target keyword vector corresponding to the target email; a matching unit, configured to perform similarity matching between the target keyword vector and M historical keyword vectors in a system vector lexicon to obtain a matching result, wherein the matching result is used to record the historical keyword vector having the greatest similarity value with the target keyword vector, where M is a positive integer; The sending unit is configured to determine a system user associated with the historical keyword vector of the matching result record and a target account of the system user, and send the target email to the target account.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for pushing financial emails according to any one of claims 1 to 5.
8. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the financial email push method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Mail processing method and device, computer equipment and storage medium
CN110417647A
Keyword generation method and device, storage medium and electronic equipment
CN117291182A