Short message template generation method and device

By performing intention recognition and semantic correction in the generation of SMS templates, combined with sensitive word identification and replacement, the problems of inefficient generation of SMS templates in the prior art are solved, and efficient and accurate SMS template generation is achieved.

CN119720978AActive Publication Date: 2025-03-28INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202311215949.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-20
Publication Date
2025-03-28
Estimated Expiration
2043-09-20

AI Technical Summary

Technical Problem

The existing methods of generating SMS templates are inefficient, and cannot effectively configure SMS templates that reflect the needs of deep bank customers, and are prone to errors.

Method used

By obtaining the initial statement in the SMS template, performing intention recognition, generating the sentence to be corrected, performing semantic recognition and correction, obtaining the sentence to be recommended, generating the SMS template in response to user confirmation, and performing sensitive words identification and replacement after the splicing is completed.

Benefits of technology

It realizes the generation of diversified SMS templates, improves the accuracy and timeliness of SMS templates, reduces the need for human participation, and improves efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119720978A_ABST
    Figure CN119720978A_ABST
Patent Text Reader

Abstract

The invention provides a short message template generation method and device, relates to the technical field of artificial intelligence, and can be used in the financial field or other technical fields. The method comprises the following steps: acquiring an initial statement in a short message template, and performing intention recognition on the initial statement; generating a to-be-corrected undertaking statement for undertaking the initial statement according to an intention recognition result, and performing semantic recognition correction on the to-be-corrected undertaking statement to obtain a to-be-recommended undertaking statement; in response to an undertaking statement which is confirmed by a user according to the undertaking statement to be recommended and is used for undertaking the initial statement, splicing the initial statement and the undertaking statement; and replacing the previous undertaking statement with the newly confirmed undertaking statements one by one, and performing intention recognition and subsequent steps until all statements are spliced, thereby obtaining the short message template. The device executes the method. According to the method and the device provided by the embodiment of the invention, diversified short message templates can be generated, and the accuracy and the timeliness of generating the short message templates are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and device for generating a short message template. Background Art

[0002] In order to better serve customers, banks need to send notification text messages to customers. Before this, they need to generate text messages based on text message templates. The text message templates simply leave some fields in the text message blank. These fields are usually customer information, such as customer name, customer bank card account number, etc. Therefore, the accuracy of the content of the generated text message templates is particularly important.

[0003] The existing method of generating SMS templates is that an SMS template applicant applies for the SMS template, then edits the SMS template, and then submits it to an SMS template reviewer for review. After the review is passed, the SMS template can be stored in the database for real-time call and generation of SMS content to send to customers.

[0004] However, with the increase in the types of banking services and the diversification of bank customer needs, the above-mentioned method of manually editing and reviewing templates is inefficient. The existing automated method for generating SMS templates also requires manual configuration. The configuration personnel are unable to configure SMS templates that can reflect the deep-level needs of bank customers, and SMS templates are prone to errors. Summary of the invention

[0005] In view of the problems in the prior art, the embodiments of the present invention provide a method and device for generating a short message template, which can at least partially solve the problems in the prior art.

[0006] In one aspect, the present invention provides a method for generating a short message template, comprising:

[0007] Obtaining an initial sentence in a text message template, and performing intent recognition on the initial sentence;

[0008] Generate a follow-up sentence to be corrected for following the initial sentence according to the intention recognition result, perform semantic recognition and correction on the follow-up sentence to be corrected, and obtain a follow-up sentence to be recommended;

[0009] In response to a follow-up sentence for following the initial sentence confirmed by the user according to the follow-up sentence to be recommended, concatenating the initial sentence with the follow-up sentence;

[0010] Replace the previous continuation sentence with the newly confirmed continuation sentence one by one, and perform intent recognition and subsequent steps until all sentences are spliced ​​together to obtain a text message template;

[0011] Among them, the first previous continuation statement is the initial statement.

[0012] The step of obtaining the initial statement in the SMS template includes:

[0013] The initial sentence in the SMS template is generated according to the SMS message type of the customer notification SMS.

[0014] The step of performing intent recognition on the initial sentence includes:

[0015] Performing intent recognition on the initial sentence based on a preset customer intent recognition model;

[0016] The preset customer intention recognition model is obtained by training a neural network model based on preset customer intention recognition sample data.

[0017] The step of performing semantic recognition and correction on the sentence to be corrected includes:

[0018] The semantic recognition and correction of the sentence to be corrected is performed based on the natural language processing N-gram model.

[0019] Wherein, after the step of splicing all the sentences and before the step of obtaining the SMS template, the SMS template generation method further includes:

[0020] Identify sensitive words in all the sentences that have been spliced ​​together;

[0021] If it is determined that the sensitive word identification result contains a sensitive word, a replacement word that can replace the sensitive word is generated;

[0022] In response to a confirmation action triggered by the user according to the replacement word, the sensitive word is replaced with the replacement word.

[0023] The step of identifying sensitive words on all the sentences that have been spliced ​​together includes:

[0024] Perform word segmentation on all the concatenated sentences to obtain each word segment;

[0025] Each segmented word is compared with the preset sensitive words in the preset sensitive word library one by one, and the segmented words found in the preset sensitive word library are used as sensitive words.

[0026] Wherein, after the step of obtaining the SMS template, the SMS template generation method further includes:

[0027] Acquire customer information, classify and identify the customer information, and obtain classified customer information;

[0028] Each classification information is added to the corresponding position in the SMS template to obtain the SMS content to be sent to the customer.

[0029] In one aspect, the present invention provides a device for generating a short message template, comprising:

[0030] The recognition unit is used to obtain the initial sentence in the SMS template and perform intent recognition on the initial sentence;

[0031] A correction unit, configured to generate a follow-up sentence to be corrected for following the initial sentence according to the intention recognition result, and to perform semantic recognition and correction on the follow-up sentence to be corrected to obtain a follow-up sentence to be recommended;

[0032] a concatenation unit, configured to concatenate the initial sentence with the continuation sentence in response to a continuation sentence confirmed by the user according to the continuation sentence to be recommended for continuation of the initial sentence;

[0033] A generation unit, used to replace the previous continuation sentence with the newly confirmed continuation sentence one by one, and perform intent recognition and subsequent steps until all sentences are spliced ​​together to obtain a short message template;

[0034] Among them, the first previous continuation statement is the initial statement.

[0035] In another aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory, and a bus, wherein:

[0036] The processor and the memory communicate with each other via the bus;

[0037] The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the following method:

[0038] Obtaining an initial sentence in a text message template, and performing intent recognition on the initial sentence;

[0039] Generate a follow-up sentence to be corrected for following the initial sentence according to the intention recognition result, perform semantic recognition and correction on the follow-up sentence to be corrected, and obtain a follow-up sentence to be recommended;

[0040] In response to a follow-up sentence for following the initial sentence confirmed by the user according to the follow-up sentence to be recommended, concatenating the initial sentence with the follow-up sentence;

[0041] Replace the previous continuation sentence with the newly confirmed continuation sentence one by one, and perform intent recognition and subsequent steps until all sentences are spliced ​​together to obtain a text message template;

[0042] Among them, the first previous continuation statement is the initial statement.

[0043] An embodiment of the present invention provides a non-transitory computer-readable storage medium, including:

[0044] The non-transitory computer-readable storage medium stores computer instructions, which cause the computer to execute the following method:

[0045] Obtaining an initial sentence in a text message template, and performing intent recognition on the initial sentence;

[0046] Generate a follow-up sentence to be corrected for following the initial sentence according to the intention recognition result, perform semantic recognition and correction on the follow-up sentence to be corrected, and obtain a follow-up sentence to be recommended;

[0047] In response to a follow-up sentence for following the initial sentence confirmed by the user according to the follow-up sentence to be recommended, concatenating the initial sentence with the follow-up sentence;

[0048] Replace the previous continuation sentence with the newly confirmed continuation sentence one by one, and perform intent recognition and subsequent steps until all sentences are spliced ​​together to obtain a text message template;

[0049] Among them, the first previous continuation statement is the initial statement.

[0050] The SMS template generation method and device provided in the embodiment of the present invention obtain an initial sentence in the SMS template, perform intent recognition on the initial sentence; generate a to-be-corrected continuation sentence for the initial sentence according to the intent recognition result, perform semantic recognition and correction on the to-be-corrected continuation sentence to obtain a to-be-recommended continuation sentence; in response to a continuation sentence for the initial sentence confirmed by the user according to the to-be-recommended continuation sentence, splice the initial sentence and the continuation sentence; replace the previous continuation sentence with the newly confirmed continuation sentences one by one, perform intent recognition and subsequent steps until all sentences are spliced ​​together to obtain the SMS template; wherein the first previous continuation sentence is the initial sentence, and a variety of SMS templates can be generated, and the accuracy and timeliness of the generated SMS templates are guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0052] Figure 1 The present invention is a flowchart of a method for generating a short message template according to an embodiment of the present invention.

[0053] Figure 2 It is a structural diagram of a device for generating a short message template provided by an embodiment of the present invention.

[0054] Figure 3 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention. It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other arbitrarily.

[0056] Figure 1 is a flow chart of a method for generating a short message template according to an embodiment of the present invention. Figure 1 As shown, the method for generating a short message template provided by an embodiment of the present invention includes:

[0057] Step S1: obtaining an initial sentence in a text message template, and performing intent recognition on the initial sentence.

[0058] Step S2: generating a to-be-corrected successor sentence for succeeding the initial sentence according to the intention recognition result, performing semantic recognition and correction on the to-be-corrected successor sentence to obtain a to-be-recommended successor sentence.

[0059] Step S3: In response to the user confirming a follow-up sentence for following the initial sentence based on the follow-up sentence to be recommended, the initial sentence and the follow-up sentence are concatenated.

[0060] Step S4: replace the previous continuation sentence with the newly confirmed continuation sentence one by one, and perform intent recognition and subsequent steps until all sentences are spliced ​​together to obtain a short message template;

[0061] Among them, the first previous continuation statement is the initial statement.

[0062] In the above step S1, the device obtains the initial sentence in the SMS template and performs intent recognition on the initial sentence. The device can be a computer device that executes the method, etc. It should be noted that the customer-related data involved in the embodiment of the present invention are all authorized by the user. The initial sentence can be the first sentence in the SMS template. Intent recognition can be understood as what the customer thinks of after browsing the initial sentence. For example, after seeing the amount of salary paid, the customer can think of using these funds to purchase financial products to increase income, or can think of using these funds to purchase items that he has always wanted to buy, etc.

[0063] The obtaining of the initial statement in the SMS template includes:

[0064] The initial statement in the SMS template is generated according to the SMS message type of the customer notification SMS message. The SMS message type may include a customer account balance change notification type and a customer care notification type.

[0065] Taking the customer account balance change notification type as an example, the initial statement in the generated SMS template can be as follows:

[0066] "You deposited xx yuan into your account ending in xxxx, and the current balance is xx yuan."

[0067] The performing intention recognition on the initial sentence includes:

[0068] The intention of the initial sentence is recognized based on a preset customer intention recognition model; the initial sentence can be input into the preset customer intention recognition model, and the output result of the preset customer intention recognition model is used as the customer's intention recognition result.

[0069] The preset customer intention recognition model is obtained by training a neural network model based on the preset customer intention recognition sample data. It should be noted that the preset customer intention recognition sample data is not limited to the data of a certain customer, and may include the data of customers with different backgrounds. For example, when customer A browses to the payment amount of 10,000 yuan, his intention is to go shopping on a certain APP; when customer B browses to the payment amount of 30,000 yuan, his intention is to go shopping in a certain offline mall and buy fund products.

[0070] These sample data of different customers can better stimulate customers' diverse needs, encourage them to try different consumption methods, and cultivate different consumption habits.

[0071] The sample data can be labeled and then the neural network model can be trained.

[0072] You can choose a convolutional neural network for subsequent feature extraction and training. Convolutional Neural Network (CNN): CNN is a neural network that can process text data. It extracts features from text data through convolution operations.

[0073] Feature extraction: Use four operations such as convolution, activation function, pooling, and dimensionality adjustment to extract features for subsequent modeling and analysis.

[0074] Model training: Use the labeled training data to train the model to learn the probability distribution of the model's intent for the text data. During the training process, CNN will continuously adjust its internal parameters to improve the accuracy of the model.

[0075] Model evaluation: Use test data to evaluate the model to determine the performance and accuracy of the model. When the training accuracy and test accuracy exceed 99%, it can be put into use.

[0076] Model deployment: Use the trained model to make predictions on new text data to identify its intent.

[0077] In the above step S2, the device generates a follow-up sentence to be corrected for following the initial sentence according to the intention recognition result, performs semantic recognition and correction on the follow-up sentence to be corrected, and obtains a follow-up sentence to be recommended. Each intention recognition result can correspond to at least one follow-up sentence to be corrected. Referring to the above example, if the customer wants to buy a financial product, a follow-up sentence to be corrected can be generated to provide the customer with the financial product; if the customer wants to buy an item on the APP, the name and download address of the APP recommended to the customer can be generated.

[0078] Since the continuation sentence to be corrected may have problems such as incoherent sentences, it is necessary to perform semantic recognition and correction on it, and the continuation sentence to be corrected after the correction is completed will be used as the continuation sentence to be recommended to the user.

[0079] The performing semantic recognition and correction on the to-be-corrected continuation sentence includes:

[0080] The semantic recognition and correction of the to-be-corrected continuation sentence is performed based on the natural language processing N-gram model. The natural language processing N-gram model is more suitable for judging whether the sentence content is fluent for a large-scale corpus.

[0081] N-gram operates the content of the text in a sliding window of size N bytes, forming a sequence of byte fragments of length N.

[0082] First, the text message content is divided into a phrase combination of length 1, a phrase combination of length 2, and a phrase combination of length 3. There are a total of 3 phrase combinations of different lengths.

[0083] Count the number of occurrences of each phrase from the corpus. First, calculate the probability of different combinations of phrases with a length of 1, such as: {"now", "at that time", "remaining", "amount", "for"}, which can be divided into {"the current balance is"}, {"the current balance at that time is"}, {"the current amount at that time is remaining"}, etc. Use the probability calculation formula to calculate its probability. The sentence with the highest probability is the normal sentence.

[0084] Similarly, the probability of different combinations of phrases of length 2 and 3 are calculated, and the normal sentences obtained after the calculation of the three phrase combinations of different lengths are compared to see if they are the same. If they are the same, the sentence is confirmed to be reasonable, and the sentence recommendation can be completed for the user to generate a text message template.

[0085] In step S3, the device splices the initial statement with the follow-up statement in response to the user confirming the follow-up statement for following the initial statement according to the follow-up statement to be recommended. The user may be a bank staff, specifically a person applying for SMS templates, or a person reviewing SMS templates.

[0086] Referring to the above example, the follow-up statement after "You deposited xx yuan into your account ending in xxxx, and the current balance is xx yuan" can be "Our bank currently has a wealth management product with an annualized return of XX, so hurry up if you want to purchase it", or "A certain APP currently has an appreciation event for new and old users. If you want to participate, please click the link below to download it."

[0087] If the user confirms "Our bank currently has a financial product with a return of XX after years, buy it as soon as possible", the concatenated sentence will be "You deposited XX yuan into your account ending in xxxx, and the current balance is XX yuan". "Our bank currently has a financial product with a return of XX after years, buy it as soon as possible".

[0088] In the above step S4, the device replaces the previous continuation sentence with the newly confirmed continuation sentence one by one, and performs intent recognition and subsequent steps until all sentences are spliced ​​together to obtain a text message template;

[0089] Among them, the first previous continuation statement is the initial statement. Referring to the above example, if a customer browses to "Our bank currently has a financial product with a return of XX after years, buy it as soon as possible", he may have a need to buy it, but he also wants to know more about the detailed information of the product. In this case, you can replace the previous continuation statement "You deposited XX yuan in your account ending in xxxx, and the current balance is XX yuan" with "Our bank currently has a financial product with a return of XX after years, buy it as soon as possible". Perform intention recognition on "Our bank currently has a financial product with a return of XX after years, buy it as soon as possible", perform semantic recognition and correction on the continuation statement to be corrected generated for the customer's possible purchase demand, and the continuation statement to be recommended can be "Our senior financial consultant will contact you later, thank you for your support".

[0090] If the user confirms "A senior financial consultant from our bank will contact you later, thank you for your support", add "A senior financial consultant from our bank will contact you later, thank you for your support" after "Our bank currently has a financial product with a return of XX after years, please purchase as soon as possible".

[0091] Then replace the previous continuation statement "Our bank currently has a financial product with a return of XX after the year, please hurry if you want to buy it" with "Our bank's senior financial consultant will contact you later, thank you for your support". Perform intent recognition on "Our bank's senior financial consultant will contact you later, thank you for your support". At this time, the customer's intent cannot be recognized, so the iterative replacement of the continuation statement can be terminated. The complete concatenation of the statements is as follows:

[0092] "You have deposited xx yuan into your account ending in xxxx, and the current balance is xx yuan. Our bank currently has a financial product with a return of XX after years, so please hurry if you want to purchase it. A senior financial consultant from our bank will contact you later, thank you for your support." The complete sentences above are the SMS template.

[0093] After the step of splicing all the sentences and before the step of obtaining the SMS template, the SMS template generation method further includes:

[0094] The sensitive word identification is performed on all the sentences that have been spliced ​​together. The sensitive word identification is performed on all the sentences that have been spliced ​​together, including:

[0095] Perform word segmentation processing on all the concatenated sentences to obtain each word segmentation; the word segmentation processing can be performed using an existing word segmentation method.

[0096] Each segmented word is compared with the preset sensitive words in the preset sensitive word library one by one, and the segmented words found in the preset sensitive word library are used as sensitive words. The preset sensitive word library can be added, deleted, modified, and other operations to maintain the preset sensitive words therein.

[0097] If it is determined that the sensitive word identification result contains a sensitive word, a replacement word that can replace the sensitive word is generated; the replacement word that can replace the sensitive word may include:

[0098] The sensitive word is input into the trained semantic analysis model, and at least one synonym of the sensitive word output by the semantic analysis model is used as a replacement word for the replaceable sensitive word.

[0099] In response to a confirmation action triggered by the user according to the replacement word, the sensitive word is replaced with the replacement word. The user can select and confirm a replacement word from at least one synonym to replace the sensitive word.

[0100] Before processing sensitive words, data preprocessing related steps may be included, such as:

[0101] Clean and preprocess the raw data, including removing stop words, punctuation marks, numbers and other irrelevant information, and performing word segmentation and stemming on character strings to facilitate subsequent keyword extraction and deduplication.

[0102] Keyword extraction: Extract keywords or phrases from cleaned text data. These keywords or phrases usually have semantic and contextual information and can be used for tasks such as search and sorting.

[0103] De-duplication: De-duplication of extracted keywords to avoid duplication and redundancy.

[0104] Sorting and filtering: Sort and filter the extracted keywords to determine whether sensitive words appear.

[0105] After the step of obtaining the SMS template, the SMS template generation method further includes:

[0106] Obtain customer information, classify and identify the customer information, and obtain classified customer information; the classified customer information may include customer name and customer account number, etc.

[0107] Each classification information is added to the corresponding position in the SMS template to obtain the SMS content to be sent to the customer. For example, the customer name and customer account number are added to "xx" or "XX" in the SMS template to obtain the SMS content to be sent to the customer.

[0108] The SMS template generation method provided by the embodiment of the present invention has the following beneficial technical effects:

[0109] 1. Through intent recognition, a variety of SMS templates can be generated, which helps to generate a variety of SMS notification messages and better serve customers.

[0110] 2. The accuracy of the content in the SMS template can be greatly improved through intent recognition, semantic recognition correction, and sensitive word recognition and replacement. Therefore, there is no need for both SMS template personnel and SMS template reviewers to participate in the SMS template generation work, which saves manpower.

[0111] In addition, the semantics of the sentences to be corrected are first determined through intention recognition to ensure the correctness of the logic between two adjacent sentences, and then the logical correctness of each sentence in the recommended sentences is ensured through semantic recognition and correction. After all sentences are spliced, sensitive words are identified and replaced to ensure that the words used in all sentences are reasonable and standardized. This achieves orderly identification from between sentences, to each sentence, and then to all words. The above identification order can further improve the timeliness of generating SMS templates.

[0112] 3. The method of human participation in confirmation and automatic generation of SMS templates can take into account both the timeliness and accuracy of template generation.

[0113] The SMS template generation method provided in the embodiment of the present invention obtains an initial sentence in the SMS template, performs intent recognition on the initial sentence; generates a to-be-corrected continuation sentence for the initial sentence according to the intent recognition result, performs semantic recognition and correction on the to-be-corrected continuation sentence to obtain a to-be-recommended continuation sentence; in response to a continuation sentence for the initial sentence confirmed by a user according to the to-be-recommended continuation sentence, splices the initial sentence and the continuation sentence; replaces the previous continuation sentence with the newly confirmed continuation sentences one by one, and performs intent recognition and subsequent steps until all sentences are spliced ​​together to obtain the SMS template; wherein the first previous continuation sentence is the initial sentence, and a variety of SMS templates can be generated, and the accuracy and timeliness of the generated SMS templates are guaranteed.

[0114] Further, the obtaining of the initial statement in the SMS template includes:

[0115] The initial sentence in the SMS template is generated according to the SMS message type of the customer notification SMS. The above-mentioned embodiment can be referred to for explanation and will not be described in detail.

[0116] The method for generating a short message template provided by the embodiment of the present invention can ensure the accuracy of the initial sentence in the generated short message template.

[0117] Further, the performing intention recognition on the initial sentence includes:

[0118] The intention of the initial sentence is recognized based on a preset customer intention recognition model; please refer to the above-mentioned embodiment for description and will not be repeated here.

[0119] The preset customer intention recognition model is obtained by training a neural network model based on preset customer intention recognition sample data. The above-mentioned embodiment can be referred to for explanation and will not be described in detail.

[0120] The SMS template generation method provided by the embodiment of the present invention can accurately identify customer intentions.

[0121] Furthermore, the semantic recognition and correction of the to-be-corrected continuation sentence includes:

[0122] The semantic recognition and correction of the to-be-corrected continuation sentence is performed based on the natural language processing N-gram model. The above-mentioned embodiment can be referred to for explanation and will not be described in detail.

[0123] The SMS template generation method provided by the embodiment of the present invention can ensure the semantic fluency of each sentence.

[0124] Furthermore, after the step of concatenating all the sentences and before the step of obtaining the SMS template, the SMS template generation method further includes:

[0125] Sensitive words are identified for all the sentences that have been spliced ​​together. This can be described with reference to the above embodiment and will not be described in detail.

[0126] If it is determined that the sensitive word identification result includes a sensitive word, a replacement word that can replace the sensitive word is generated; the above-mentioned embodiment can be referred to for description and will not be repeated here.

[0127] In response to the confirmation action triggered by the user according to the replacement word, the sensitive word is replaced with the replacement word. The above-mentioned embodiment can be referred to for explanation and will not be described in detail.

[0128] The SMS template generation method provided by the embodiment of the present invention can ensure that each word is accurate and compliant.

[0129] Furthermore, the sensitive word identification of all the sentences after splicing includes:

[0130] The word segmentation process is performed on all the concatenated sentences to obtain the word segments; the description may refer to the above embodiment and will not be repeated here.

[0131] Each segmented word is compared with the preset sensitive words in the preset sensitive word library one by one, and the segmented words found in the preset sensitive word library are used as sensitive words. The above embodiment can be referred to for explanation, and no further description is given.

[0132] The SMS template generation method provided by the embodiment of the present invention can efficiently complete sensitive word identification.

[0133] Furthermore, after the step of obtaining the SMS template, the SMS template generation method further includes:

[0134] Obtain customer information, classify and identify the customer information, and obtain classified customer information; refer to the above-mentioned embodiment for description, which will not be repeated here.

[0135] Each classification information is added to the corresponding position in the SMS template to obtain the SMS content to be sent to the customer. The above embodiment can be referred to for description and will not be repeated here.

[0136] The SMS template generation method provided by the embodiment of the present invention can efficiently obtain the SMS content to be sent to the customer.

[0137] It should be noted that the SMS template generation method provided in the embodiment of the present invention can be used in the financial field, and can also be used in any technical field other than the financial field. The embodiment of the present invention does not limit the application field of the SMS template generation method.

[0138] Figure 2 is a schematic diagram of the structure of a device for generating a short message template according to an embodiment of the present invention. Figure 2 As shown, the SMS template generation device provided by the embodiment of the present invention includes a recognition unit 201, a correction unit 202, a splicing unit 203 and a generation unit 204, wherein:

[0139] The identification unit 201 is used to obtain the initial sentence in the SMS template and perform intent identification on the initial sentence; the correction unit 202 is used to generate a follow-up sentence to be corrected for following the initial sentence according to the intent identification result, perform semantic identification and correction on the follow-up sentence to be corrected, and obtain a follow-up sentence to be recommended; the splicing unit 203 is used to respond to the follow-up sentence for following the initial sentence confirmed by the user according to the follow-up sentence to be recommended, and splice the initial sentence and the follow-up sentence; the generation unit 204 is used to replace the previous follow-up sentence with the newly confirmed follow-up sentences one by one, and perform intent identification and subsequent steps until all sentences are spliced ​​together to obtain the SMS template; wherein, the first previous follow-up sentence is the initial sentence.

[0140] Specifically, the identification unit 201 in the device is used to obtain the initial sentence in the SMS template and perform intent identification on the initial sentence; the correction unit 202 is used to generate a follow-up sentence to be corrected for following the initial sentence according to the intention identification result, perform semantic identification and correction on the follow-up sentence to be corrected, and obtain a follow-up sentence to be recommended; the splicing unit 203 is used to respond to the follow-up sentence for following the initial sentence confirmed by the user according to the follow-up sentence to be recommended, and splice the initial sentence and the follow-up sentence; the generation unit 204 is used to replace the previous follow-up sentence with the newly confirmed follow-up sentences one by one, and perform intent identification and subsequent steps until all sentences are spliced ​​together to obtain the SMS template; wherein, the first previous follow-up sentence is the initial sentence.

[0141] The SMS template generation device provided in the embodiment of the present invention obtains an initial sentence in the SMS template, performs intent recognition on the initial sentence; generates a to-be-corrected continuation sentence for the initial sentence according to the intent recognition result, performs semantic recognition and correction on the to-be-corrected continuation sentence to obtain a to-be-recommended continuation sentence; in response to a continuation sentence for the initial sentence confirmed by a user according to the to-be-recommended continuation sentence, splices the initial sentence and the continuation sentence; replaces the previous continuation sentence with the newly confirmed continuation sentences one by one, and performs intent recognition and subsequent steps until all sentences are spliced ​​together to obtain a SMS template; wherein the first previous continuation sentence is the initial sentence, and a variety of SMS templates can be generated, and the accuracy and timeliness of the generated SMS templates are guaranteed.

[0142] Furthermore, the identification unit 201 is specifically used for:

[0143] The initial sentence in the SMS template is generated according to the SMS message type of the customer notification SMS.

[0144] The SMS template generation device provided by the embodiment of the present invention can ensure the accuracy of the initial sentence in the generated SMS template.

[0145] Furthermore, the identification unit 201 is specifically used for:

[0146] Performing intent recognition on the initial sentence based on a preset customer intent recognition model;

[0147] The preset customer intention recognition model is obtained by training a neural network model based on preset customer intention recognition sample data.

[0148] The SMS template generation device provided by the embodiment of the present invention can accurately identify customer intentions.

[0149] Furthermore, the correction unit 202 is specifically used for:

[0150] The semantic recognition and correction of the sentence to be corrected is performed based on the natural language processing N-gram model.

[0151] The SMS template generation device provided by the embodiment of the present invention can ensure the semantic fluency of each sentence.

[0152] Furthermore, after the step of splicing all the sentences and before the step of obtaining the SMS template, the SMS template generating device is further used to:

[0153] Identify sensitive words in all the sentences that have been spliced ​​together;

[0154] If it is determined that the sensitive word identification result contains a sensitive word, a replacement word that can replace the sensitive word is generated;

[0155] In response to a confirmation action triggered by the user according to the replacement word, the sensitive word is replaced with the replacement word.

[0156] The SMS template generation device provided by the embodiment of the present invention can ensure that each word is accurate and compliant.

[0157] Furthermore, the SMS template generating device is also specifically used for:

[0158] Perform word segmentation on all the concatenated sentences to obtain each word segment;

[0159] Each segmented word is compared with the preset sensitive words in the preset sensitive word library one by one, and the segmented words found in the preset sensitive word library are used as sensitive words.

[0160] The SMS template generation device provided by the embodiment of the present invention can efficiently complete sensitive word identification.

[0161] Furthermore, after the step of obtaining the SMS template, the SMS template generating device is further used to:

[0162] Acquire customer information, classify and identify the customer information, and obtain classified customer information;

[0163] Each classification information is added to the corresponding position in the SMS template to obtain the SMS content to be sent to the customer.

[0164] The SMS template generation device provided by the embodiment of the present invention can efficiently obtain the content of the SMS to be sent to the customer.

[0165] The embodiments of the present invention provide an embodiment of a device for generating a text message template, which can be specifically used to execute the processing flow of the above-mentioned method embodiments. Its functions are not described in detail here, and reference can be made to the detailed description of the above-mentioned method embodiments.

[0166] Figure 3A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, such as Figure 3 As shown, the electronic device includes: a processor (processor) 301, a memory (memory) 302 and a bus 303;

[0167] The processor 301 and the memory 302 communicate with each other via a bus 303;

[0168] The processor 301 is used to call the program instructions in the memory 302 to execute the methods provided by the above method embodiments, for example, including:

[0169] Obtaining an initial sentence in a text message template, and performing intent recognition on the initial sentence;

[0170] Generate a follow-up sentence to be corrected for following the initial sentence according to the intention recognition result, perform semantic recognition and correction on the follow-up sentence to be corrected, and obtain a follow-up sentence to be recommended;

[0171] In response to a follow-up sentence for following the initial sentence confirmed by the user according to the follow-up sentence to be recommended, concatenating the initial sentence with the follow-up sentence;

[0172] Replace the previous continuation sentence with the newly confirmed continuation sentence one by one, and perform intent recognition and subsequent steps until all sentences are spliced ​​together to obtain a text message template;

[0173] Among them, the first previous continuation statement is the initial statement.

[0174] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can perform the methods provided by the above method embodiments, for example, including:

[0175] Obtaining an initial sentence in a text message template, and performing intent recognition on the initial sentence;

[0176] Generate a follow-up sentence to be corrected for following the initial sentence according to the intention recognition result, perform semantic recognition and correction on the follow-up sentence to be corrected, and obtain a follow-up sentence to be recommended;

[0177] In response to a follow-up sentence for following the initial sentence confirmed by the user according to the follow-up sentence to be recommended, concatenating the initial sentence with the follow-up sentence;

[0178] Replace the previous continuation sentence with the newly confirmed continuation sentence one by one, and perform intent recognition and subsequent steps until all sentences are spliced ​​together to obtain a text message template;

[0179] Among them, the first previous continuation statement is the initial statement.

[0180] This embodiment provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program enables the computer to execute the methods provided by the above method embodiments, for example, including:

[0181] Obtaining an initial sentence in a text message template, and performing intent recognition on the initial sentence;

[0182] Generate a follow-up sentence to be corrected for following the initial sentence according to the intention recognition result, perform semantic recognition and correction on the follow-up sentence to be corrected, and obtain a follow-up sentence to be recommended;

[0183] In response to a follow-up sentence for following the initial sentence confirmed by the user according to the follow-up sentence to be recommended, concatenating the initial sentence with the follow-up sentence;

[0184] Replace the previous continuation sentence with the newly confirmed continuation sentence one by one, and perform intent recognition and subsequent steps until all sentences are spliced ​​together to obtain a text message template;

[0185] Among them, the first previous continuation statement is the initial statement.

[0186] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0187] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0188] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0189] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0190] In the description of this specification, the description with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0191] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for generating a short message template, characterized in that: include: Obtaining an initial sentence in a text message template, and performing intent recognition on the initial sentence; Generate a follow-up sentence to be corrected for following the initial sentence according to the intention recognition result, perform semantic recognition and correction on the follow-up sentence to be corrected, and obtain a follow-up sentence to be recommended; In response to a follow-up sentence for following the initial sentence confirmed by the user according to the follow-up sentence to be recommended, concatenating the initial sentence with the follow-up sentence; Replace the previous continuation sentence with the newly confirmed continuation sentence one by one, and perform intent recognition and subsequent steps until all sentences are spliced ​​together to obtain a text message template; Among them, the first previous continuation statement is the initial statement.

2. The method for generating a short message template according to claim 1, characterized in that: The step of obtaining the initial statement in the SMS template includes: The initial sentence in the SMS template is generated according to the SMS message type of the customer notification SMS.

3. The method for generating a short message template according to claim 1, characterized in that: The performing intention recognition on the initial sentence includes: Performing intent recognition on the initial sentence based on a preset customer intent recognition model; The preset customer intention recognition model is obtained by training a neural network model based on preset customer intention recognition sample data.

4. The method for generating a short message template according to claim 1, characterized in that: The performing semantic recognition and correction on the to-be-corrected continuation sentence includes: The semantic recognition and correction of the sentence to be corrected is performed based on the natural language processing N-gram model.

5. The method for generating a short message template according to claim 1, characterized in that: After the step of splicing all the sentences and before the step of obtaining the SMS template, the SMS template generation method further includes: Identify sensitive words in all the sentences that have been spliced ​​together; If it is determined that the sensitive word identification result contains a sensitive word, a replacement word that can replace the sensitive word is generated; In response to a confirmation action triggered by the user according to the replacement word, the sensitive word is replaced with the replacement word.

6. The method for generating a short message template according to claim 5, characterized in that: The sensitive word identification of all the sentences completed by splicing includes: Perform word segmentation on all the concatenated sentences to obtain each word segment; Each segmented word is compared with the preset sensitive words in the preset sensitive word library one by one, and the segmented words found in the preset sensitive word library are used as sensitive words.

7. The method for generating a short message template according to any one of claims 1 to 6, characterized in that: After the step of obtaining the SMS template, the SMS template generation method further includes: Acquire customer information, classify and identify the customer information, and obtain classified customer information; Each classification information is added to the corresponding position in the SMS template to obtain the SMS content to be sent to the customer.

8. A device for generating a short message template, characterized in that: include: The recognition unit is used to obtain the initial sentence in the SMS template and perform intent recognition on the initial sentence; A correction unit, configured to generate a follow-up sentence to be corrected for following the initial sentence according to the intention recognition result, and to perform semantic recognition and correction on the follow-up sentence to be corrected to obtain a follow-up sentence to be recommended; a concatenation unit, configured to concatenate the initial sentence with the continuation sentence in response to a continuation sentence confirmed by the user according to the continuation sentence to be recommended for continuation of the initial sentence; A generation unit, used to replace the previous continuation sentence with the newly confirmed continuation sentence one by one, and perform intent recognition and subsequent steps until all sentences are spliced ​​together to obtain a short message template; Among them, the first previous continuation statement is the initial statement.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Article generation method and apparatus based on artificial intelligence

    CN107193792A

  • Corpus generation method, apparatus and device, and computer readable storage medium

    CN112597748A

  • Replay statement generation method and device, equipment and storage medium

    CN113326365A

  • Template generation method, storage medium and electronic device

    CN114676676A

  • Server and multi-language text semantic understanding method

    CN114706944A