Marketing activity name identification method and device, equipment, medium and program product
By using a combination of detection model and dictionary tree in marketing campaign name recognition, the problem of low accuracy in marketing campaign name recognition in the prior art is solved, and the accurate identification of complex and diverse marketing campaign names is achieved.
Patent Information
- Application Number
- CN202411628222.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, the identification accuracy of marketing activity names is low, mainly because deep learning model training requires sufficient labeling corpus, but the marketing activity name is complex and the number of names is large, resulting in poor model training effect.
By entering the work order data to be identified into the marketing activity name detection model, the detection result is obtained, and when the test result is positive, the dictionary tree is used for matching processing, the marketing activity substring is obtained, and the target marketing activity name is then identified based on the similarity calculation. .
It improves the accuracy of identification of marketing campaign names, can effectively process abbreviations, spoken words, typos, etc. in work order data, and ensures that the identified target marketing campaign name is an accurate standard name.
Smart Images

Figure CN119476293A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of named entity recognition, and in particular to a marketing activity name recognition method, device, equipment, medium and program product. Background Art
[0002] Marketing campaign name recognition is an upstream task for marketing campaign early warning. For example, before determining the customer complaint rate of a marketing campaign, it is necessary to first identify the marketing campaign name. That is, only when the marketing campaign name is accurately identified can early warning analysis be carried out in a timely manner. Therefore, accurate identification of marketing campaign names is a technical requirement that urgently needs to be realized.
[0003] At present, named entity recognition is performed based on deep learning methods, that is, feature extraction and entity recognition of text is performed through a neural network model, so that the corresponding named entities are directly output through the deep learning model. However, the training of the deep learning model requires sufficient annotated corpus to achieve accurate recognition, and the names of marketing activities are complex, the number of names is large, the character lengths of the names vary greatly, and new activity names are constantly appearing. Therefore, in the named entity recognition scenario of marketing activity names, it is impossible to provide sufficient annotated corpus for training, resulting in poor model training results, and then resulting in reduced recognition accuracy of marketing activity names; at the same time, in the rapidly generated work order data, the marketing activity names may contain abbreviations, colloquial words or typos, etc. Directly outputting the corresponding named entity through the deep learning model may not be able to output the marketing activity name, or may not be able to output the accurate marketing activity name, resulting in reduced recognition accuracy of the marketing activity name. Therefore, how to improve the recognition accuracy of marketing activity names is a technical problem that needs to be solved urgently. Summary of the invention
[0004] The present invention provides a marketing campaign name recognition method, device, equipment, medium and program product, which are used to solve the defect of low recognition accuracy of marketing campaign names in the prior art and realize high-accuracy marketing campaign name recognition.
[0005] The present invention provides a marketing activity name recognition method, comprising: Inputting the work order data to be identified into a marketing campaign name detection model to obtain a marketing campaign name detection result output by the marketing campaign name detection model; the marketing campaign name detection result includes a first detection result indicating that the work order data includes a marketing campaign name or a second detection result indicating that the work order data does not include a marketing campaign name; In the case where the marketing campaign name detection result includes the first detection result, matching processing is performed on the work order data based on a dictionary tree to obtain a marketing campaign substring; the dictionary tree is constructed based on a plurality of preset standard marketing campaign names, and the marketing campaign substring is a standard marketing campaign name composed of a number of characters in the dictionary tree; Based on the text data in the work order data that matches the marketing campaign substring and the marketing campaign substring, similarity calculation is performed to obtain a similarity result, and based on the similarity result, a target marketing campaign name corresponding to the work order data is identified; the target marketing campaign name is at least one of the multiple preset standard marketing campaign names; The marketing campaign name detection model is trained based on sample work order data and marketing campaign name detection result labels corresponding to the sample work order data.
[0006] According to a marketing activity name recognition method provided by the present invention, the step of inputting the work order data to be recognized into a marketing activity name detection model to obtain a marketing activity name detection result output by the marketing activity name detection model comprises: Retrieving semantic interpretation data corresponding to the plurality of preset standard marketing campaign names from the knowledge base data; the knowledge base data includes semantic interpretation data corresponding to the plurality of standard marketing campaign names; Inputting the work order data and the semantic interpretation data corresponding to the plurality of preset standard marketing campaign names into a marketing campaign name detection model to obtain a marketing campaign name detection result output by the marketing campaign name detection model; The marketing campaign name detection model is trained based on sample work order data, the knowledge base data and the marketing campaign name detection result labels corresponding to the sample work order data.
[0007] According to a marketing campaign name recognition method provided by the present invention, the marketing campaign name detection model includes a feature extraction layer and a detection layer connected in sequence; the detection layer is used to obtain the marketing campaign name detection result based on the feature detection extracted by the feature extraction layer; the pooling layer in the feature extraction layer is used to: Based on the screening ratio, a plurality of target pooling values are screened out from the plurality of pooling values after pooling in descending order of the pooling values; a ratio of the plurality of target pooling values to the plurality of pooling values is the screening ratio, and the plurality of target pooling values are all greater than the pooling values among the plurality of pooling values except the plurality of target pooling values; The multiple target pooled values are used as outputs of the pooling layer.
[0008] According to a marketing activity name recognition method provided by the present invention, the screening ratio is determined based on the following method: Determining the screening ratio based on the ratio of the total number of high-frequency words in the work order data to the total number of words in the work order data; The high-frequency words are determined based on the following method: Determine each word in a plurality of historical work order data and the number of occurrences of each word; Based on the number of occurrences, the several high-frequency words are determined from the several words; the number of occurrences of any of the high-frequency words is greater than the number of occurrences of each word in the several words except the several high-frequency words.
[0009] According to a marketing campaign name recognition method provided by the present invention, the marketing campaign name detection model comprises a word embedding vector extraction layer, a feature extraction layer and a detection layer connected in sequence; the feature extraction layer is used to extract features from the output vector of the word embedding vector extraction layer; the detection layer is used to obtain the marketing campaign name detection result based on the feature detection extracted by the feature extraction layer; The word embedding vector extraction layer is used to: Perform word segmentation processing on the input data of the word embedding vector extraction layer to obtain each word segment of the input data; Extracting word embedding vectors of each word segment; Each of the word embedding vectors is used as the output of the word embedding vector extraction layer.
[0010] According to a marketing activity name recognition method provided by the present invention, after performing word segmentation processing on the input data of the word embedding vector extraction layer to obtain each word segment of the input data, the method further includes: Based on the position of each segmentation word in the input data, adjacent segmentations are associated to obtain an associated word; the associated word is a word associated with at least two segmentations, and the at least two segmentations are adjacent in the input data; The associated words are input into the feature extraction layer.
[0011] According to a marketing campaign name recognition method provided by the present invention, when the input data includes work order data and semantic interpretation data corresponding to the plurality of preset standard marketing campaign names, the feature extraction layer is specifically used to: Determining a number of word embedding vectors representing marketing activities from each of the word embedding vectors; Performing feature fusion on the plurality of word embedding vectors to obtain an updated word embedding vector representing the marketing activity; Updating the plurality of word embedding vectors in each of the word embedding vectors to the updated word embedding vectors to obtain each updated word embedding vector; Perform feature extraction on each updated word embedding vector.
[0012] According to a method for identifying a marketing campaign name provided by the present invention, the number of the marketing campaign substrings is N, the similarity calculation is performed based on the text data matching the marketing campaign substrings in the work order data and the marketing campaign substrings to obtain a similarity result, and the target marketing campaign name corresponding to the work order data is identified based on the similarity result, including: Determine K text data matching the N marketing activity substrings from the work order data; any marketing activity substring matches one text data, and the matching marketing activity substring and the text data have the same number of characters, and K is less than or equal to N; For the first of the K text data text data, determining the substrings corresponding to the first The text data has the same number of characters A standard campaign name based on the The text data are respectively similarity of the names of standard marketing activities, determine Similarity results; Less than or equal to N, is a positive integer less than or equal to K; based on The similarity results are used to identify the target marketing campaign name corresponding to the work order data.
[0013] According to a marketing activity name recognition method provided by the present invention, the The similarity results are used to identify the target marketing campaign name corresponding to the work order data, including: from Determine the maximum similarity among the similarity results; The preset standard marketing campaign name corresponding to the maximum similarity is determined as the target marketing campaign name.
[0014] The present invention also provides a marketing activity name recognition device, comprising: a name detection module, configured to input the work order data to be identified into a marketing campaign name detection model, and obtain a marketing campaign name detection result output by the marketing campaign name detection model; the marketing campaign name detection result includes a first detection result indicating that the work order data includes a marketing campaign name or a second detection result indicating that the work order data does not include a marketing campaign name; a substring matching module, configured to, when the marketing campaign name detection result includes the first detection result, perform matching processing on the work order data based on a dictionary tree to obtain a marketing campaign substring; the dictionary tree is constructed based on a plurality of preset standard marketing campaign names, and the marketing campaign substring is a standard marketing campaign name composed of a number of characters in the dictionary tree; a name recognition module, configured to perform similarity calculation based on the text data in the work order data that matches the marketing activity substring and the marketing activity substring to obtain a similarity result, and to identify a target marketing activity name corresponding to the work order data based on the similarity result; the target marketing activity name is at least one of the multiple preset standard marketing activity names; The marketing campaign name detection model is trained based on sample work order data and marketing campaign name detection result labels corresponding to the sample work order data.
[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned methods for identifying the name of a marketing activity is implemented.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for identifying the name of a marketing campaign as described in any one of the above is implemented.
[0017] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for identifying the name of a marketing campaign as described above is implemented.
[0018] The marketing campaign name recognition method, apparatus, device, medium and program product provided by the present invention input the work order data to be recognized into the marketing campaign name detection model, obtain the marketing campaign name detection result output by the marketing campaign name detection model, and the marketing campaign name detection result includes a first detection result indicating that the work order data includes the marketing campaign name or a second detection result indicating that the work order data does not include the marketing campaign name, thereby only detecting whether the work order data includes the marketing campaign name based on the marketing campaign name detection model, and not directly outputting the marketing campaign name, that is, the model only performs classification and does not perform named entity recognition, so there is no need to provide a large amount of annotated corpus for model training, and the detection accuracy of the marketing campaign name detection model can be ensured, thereby improving the recognition accuracy of the marketing campaign name. Afterwards, in the case where the marketing campaign name detection result includes the first detection result In this case, that is, on the basis of determining that the work order data includes the marketing campaign name, the work order data is matched based on the dictionary tree to obtain a marketing campaign substring, and the dictionary tree is constructed based on multiple preset standard marketing campaign names, and the marketing campaign substring is a standard marketing campaign name composed of several characters in the dictionary tree. After that, based on the text data in the work order data that matches the marketing campaign substring and the marketing campaign substring, a similarity calculation is performed to obtain a similarity result, and the target marketing campaign name corresponding to the work order data is identified based on the similarity result, and the target marketing campaign name is at least one of the multiple preset standard marketing campaign names, so that even if abbreviations, colloquial words, fewer words, more words, or typos may appear in the work order data, the target marketing campaign name finally obtained is an accurate standard marketing campaign name, thereby improving the recognition accuracy of the marketing campaign name. In summary, the present invention can improve the recognition accuracy of the marketing campaign name. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 It is a flow chart of the marketing activity name recognition method provided by the present invention.
[0021] Figure 2 It is a structural schematic diagram of the dictionary tree provided by the present invention.
[0022] Figure 3 It is a structural schematic diagram of a marketing activity name recognition device provided by the present invention.
[0023] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.
[0025] At present, named entity recognition is performed based on deep learning methods, that is, feature extraction and entity recognition of text is performed through a neural network model, so that the corresponding named entity is directly output through the deep learning model. However, the training of the deep learning model requires sufficient annotated corpus to achieve accurate recognition. Although the name of a marketing activity belongs to a named entity, it is different from other common named entities, such as names of people, places, and institutions, which can obtain a large amount of training data. Due to the complexity of marketing activity names, the large number of names, the large difference in the length of characters in the names, and the continuous emergence of new activity names, in the named entity recognition scenario of marketing activity names, it is impossible to provide sufficient annotated corpus for training, resulting in poor model training effect, and then resulting in reduced recognition accuracy of marketing activity names; at the same time, in the rapidly generated work order data, the marketing activity names may appear in abbreviations, colloquial words, or typos, etc. Directly outputting the corresponding named entity through the deep learning model may not be able to output the marketing activity name, or may not be able to output the accurate marketing activity name, resulting in reduced recognition accuracy of the marketing activity name. For example, during a customer service call, work order data needs to be generated quickly, so the marketing activity names may appear in abbreviations, colloquial words, or transcription errors. Therefore, how to improve the recognition accuracy of marketing campaign names is a technical problem that urgently needs to be solved.
[0026] In addition, current named entity recognition methods also include rule-based methods and statistics-based methods.
[0027] Among them, the rule-based method is to identify named entities through pre-defined rules and dictionaries. These rules are usually written manually by linguistic experts based on the grammatical and lexical characteristics of a specific language. Common rules include: using regular expressions to match strings in a specific format, such as dates, times, and phone numbers; using dictionaries to match known entity names, such as dictionaries of personal names, dictionaries of place names, etc.; combining context for pattern matching, such as identifying the name "Mr. So-and-so" in "Mr. So-and-so". The rule-based method can identify some marketing campaign names after corpus cleaning, but it requires manual organization of recognition templates, and new marketing campaigns are constantly emerging. In addition, the number of marketing campaigns in different provinces is very large, and human resources cannot meet the needs. That is, it is necessary to configure recognition templates for each marketing campaign, and users need to master regular matching technology, which requires too much manpower and leads to excessively high labor costs.
[0028] Among them, the statistical-based method mainly relies on the probabilistic model, that is, it is trained through a large amount of labeled data to identify named entities. However, this statistical model requires sufficient labeled corpus to achieve accurate recognition. Therefore, in the named entity recognition scenario of the marketing campaign name, it is unable to provide sufficient labeled corpus, which leads to reduced recognition accuracy of the marketing campaign name. At the same time, in the rapidly generated work order data, the marketing campaign name may contain abbreviations, colloquial words, or typos. Directly outputting the corresponding named entity through the statistical model may not be able to output the marketing campaign name, or may not be able to output the accurate marketing campaign name, resulting in reduced recognition accuracy of the marketing campaign name. Therefore, marketing campaign name recognition is different from traditional named entities and cannot provide sufficient corpus for training the model.
[0029] In view of the above problems, the present invention proposes the following embodiments. Figure 1-Figure 2 The marketing campaign name recognition method of the present invention is described.
[0030] Figure 1 is a flow chart of the marketing activity name recognition method provided by the present invention, such as Figure 1 As shown, the marketing campaign name recognition method includes the following steps 110, 120 and 130.
[0031] Step 110: input the work order data to be identified into a marketing campaign name detection model to obtain a marketing campaign name detection result output by the marketing campaign name detection model.
[0032] Here, the work order data refers to the work order data related to marketing activities. Exemplarily, the work order data refers to the recorded data of customer consultations, complaints, suggestions and other information received and processed through hotlines, networks and other channels, that is, the work order data records the customer's demands, solutions and processing results in detail, which is an important tool for enterprises to monitor and manage service quality, and is also one of the key indicators for evaluating marketing effectiveness. In one embodiment, the work order data is the data related to marketing activities recorded by customer service.
[0033] The marketing campaign name detection model is trained based on sample work order data and the marketing campaign name detection result labels corresponding to the sample work order data, that is, sample work order data is obtained and annotated to determine whether it contains a marketing campaign name, so as to train the marketing campaign name detection model.
[0034] The marketing campaign name detection result includes a first detection result indicating that the work order data includes the marketing campaign name or a second detection result indicating that the work order data does not include the marketing campaign name.
[0035] In a specific embodiment, the marketing campaign name detection model includes a feature extraction layer and a detection layer (classification layer) connected in sequence, the feature extraction layer is used to extract features from the input data of the model, and the detection layer is used to obtain the marketing campaign name detection result based on the feature detection extracted by the feature extraction layer.
[0036] In one embodiment, the work order data and the knowledge base data are input into the marketing campaign name detection model to obtain the marketing campaign name detection result output by the marketing campaign name detection model; the knowledge base data includes semantic interpretation data corresponding to multiple standard marketing campaign names; wherein the marketing campaign name detection model is trained based on the sample work order data, the knowledge base data and the marketing campaign name detection result labels corresponding to the sample work order data. Based on this, the semantic representation is improved by introducing prior knowledge, so that the model can pay more attention to whether the current work order data contains the marketing campaign name, thereby improving the recognition accuracy of the marketing campaign name.
[0037] Step 120 , when the marketing activity name detection result includes the first detection result, matching processing is performed on the work order data based on the dictionary tree to obtain a marketing activity substring.
[0038] The dictionary tree is constructed based on a plurality of preset standard marketing campaign names, and the marketing campaign substring is a standard marketing campaign name composed of a number of characters in the dictionary tree.
[0039] Here, a plurality of preset standard marketing campaign names may be set in advance. Further, the plurality of preset standard marketing campaign names are marketing campaign names to be identified provided by the user.
[0040] In a trie (Tree tree), each node represents a character, and the path from the root node to a certain node forms a string, that is, it can form a substring of a marketing activity.
[0041] In one embodiment, as Figure 2 shown, assume that the three preset standard marketing activity names are the First Marketing Activity A, the First Marketing Activity B, and the Second Marketing Activity A respectively. Then the child nodes of the root node root of the dictionary tree include "第" (Di), the child nodes of the node "第" include "一" (Yi) and "二" (Er), the child nodes of the node "一" include "营" (Ying), the child nodes of the node "二" include "营" (Ying), and so on. Based on this, the trie can generate multiple substrings, such as "First Marketing Activity A", "First Marketing Activity B", and "Second Marketing Activity A" respectively. For ease of understanding, the matched marketing activity substring may be "First Marketing Activity A", or it may be "First Marketing Activity B", or it may be "Second Marketing Activity A".
[0042] Exemplarily, assume that the trie is as Figure 2 shown. Assume that the work order data includes "First Marketing Activity A". Based on the trie, matching the work order data can obtain 3 marketing activity substrings, and the 3 marketing activity substrings are "First Marketing Activity A", "First Marketing Activity B", and "Second Marketing Activity A" respectively, that is, the complete standard marketing activity name is obtained by matching based on the prefix.
[0043] It should be understood that the marketing activity substring is only the possible marketing activity name corresponding to the initially recalled work order data. And recalling possible marketing activity substrings based on the trie can improve the speed of substring recall, and thus improve the recognition efficiency of marketing activity names.
[0044] In addition, in the case where the marketing activity name detection result includes the second detection result, no subsequent processing is required or it is prompted that the marketing activity name is not included, and the marketing activity name of the next work order data can be recognized.
[0045] In addition, if, based on the trie, the work order data cannot be matched, that is, no marketing activity substring is obtained, then no subsequent processing is required or it is prompted that the marketing activity name is not included, and the marketing activity name of the next work order data can be recognized.
[0046] Step 130: Based on the text data in the work order data that matches the marketing activity substring and the marketing activity substring, calculate a similarity result, and identify the target marketing activity name corresponding to the work order data based on the similarity result.
[0047] Specifically, the number of marketing activity substrings is N, and K text data matching the N marketing activity substrings are determined from the work order data, any marketing activity substring matches one text data, and K is less than or equal to N. Furthermore, the matching marketing activity substring and the text data have the same number of characters.
[0048] In one embodiment, for the first of the K text data Text data, based on The similarity between each of the text data and N marketing activity substrings is used to determine N similarity results; is a positive integer less than or equal to K; based on Similarity results are obtained to identify the target marketing campaign name corresponding to the work order data.
[0049] In one embodiment, from The maximum similarity is determined from the similarity results; and the standard marketing campaign name corresponding to the maximum similarity is determined as the target marketing campaign name.
[0050] In another embodiment, from A plurality of target similarities whose similarities are greater than a similarity threshold are determined from the similarity results; and standard marketing campaign names corresponding to the plurality of target similarities are determined as target marketing campaign names.
[0051] In another embodiment, in descending order of similarity, A preset number of target similarities are determined from the similarity results; and standard marketing campaign names corresponding to the target similarities are determined as target marketing campaign names.
[0052] Of course, there are other ways to The similarity results are used to determine the name of the target marketing campaign corresponding to the work order data, which will not be described one by one here.
[0053] In one embodiment, any similarity is calculated using a Levenshtein distance algorithm (edit distance algorithm), based on which the smaller the edit distance calculated, the greater the similarity between the two character strings.
[0054] In a specific embodiment, K text data matching N marketing activity substrings are determined from the work order data in sequence in the form of a sliding window.
[0055] Wherein, the target marketing campaign name is at least one of the plurality of preset standard marketing campaign names. Based on this, since the preset standard marketing campaign name is an accurate marketing campaign name, even if abbreviations, colloquial words, missing characters, extra characters or typos may appear in the work order data, the target marketing campaign name finally obtained is also an accurate standard marketing campaign name, thereby improving the recognition accuracy of the marketing campaign name, that is, being able to effectively handle spelling errors or minor character differences in the work order data, and being able to still recognize the correct marketing campaign name when the work order data is inaccurate or contains typos, thereby improving the robustness and adaptability of the marketing campaign name recognition.
[0056] Furthermore, the embodiment of the present invention can complete the assembly of the process in the form of a Pipeline (sales funnel) to form a marketing activity identification name result.
[0057] The marketing campaign name recognition method provided in the embodiment of the present invention inputs the work order data to be recognized into the marketing campaign name detection model, obtains the marketing campaign name detection result output by the marketing campaign name detection model, and the marketing campaign name detection result includes a first detection result indicating that the work order data includes the marketing campaign name or a second detection result indicating that the work order data does not include the marketing campaign name, thereby detecting whether the work order data includes the marketing campaign name only based on the marketing campaign name detection model, and does not directly output the marketing campaign name, that is, the model only performs classification and does not perform named entity recognition, thereby not needing to provide a large amount of annotated corpus for model training, and can also ensure the detection accuracy of the marketing campaign name detection model, thereby improving the recognition accuracy of the marketing campaign name, and then, in the case that the marketing campaign name detection result includes the first detection result, that is, in the On the basis of determining that the work order data includes the marketing campaign name, the work order data is matched based on the dictionary tree to obtain a marketing campaign substring, and the dictionary tree is constructed based on multiple preset standard marketing campaign names, and the marketing campaign substring is a standard marketing campaign name composed of several characters in the dictionary tree. Afterwards, based on the text data in the work order data that matches the marketing campaign substring and the marketing campaign substring, a similarity calculation is performed to obtain a similarity result, and the target marketing campaign name corresponding to the work order data is identified based on the similarity result, and the target marketing campaign name is at least one of the multiple preset standard marketing campaign names, so that even if abbreviations, colloquial words, fewer words, more words, or typos may appear in the work order data, the target marketing campaign name finally obtained is an accurate standard marketing campaign name, thereby improving the recognition accuracy of the marketing campaign name. In summary, the present invention can improve the recognition accuracy of the marketing campaign name.
[0058] Based on any of the above embodiments, in the method, the above step 110 includes step 111 and step 112.
[0059] Step 111: retrieve semantic interpretation data corresponding to the plurality of preset standard marketing activity names from the knowledge base data.
[0060] The knowledge base data includes semantic interpretation data corresponding to a plurality of standard marketing campaign names, that is, the knowledge base data is a knowledge base related to marketing campaigns, thereby introducing prior knowledge to improve semantic representation, so that the model can pay more attention to whether the current work order data contains marketing campaign names, thereby improving the recognition accuracy of marketing campaign names. In one embodiment, the knowledge base data can be determined based on expert experience, that is, the semantic interpretation data corresponding to each standard marketing campaign name is determined.
[0061] Considering that multiple preset standard marketing campaign names are the marketing campaign names to be identified, it is only necessary to retrieve the semantic interpretation data corresponding to the multiple preset standard marketing campaign names from the knowledge base data, thereby reducing the input data volume of the model, improving the detection efficiency of the marketing campaign names, and then improving the recognition efficiency of the marketing campaign names, and reducing the input of irrelevant data, improving the detection accuracy of the marketing campaign names, and then improving the recognition accuracy of the marketing campaign names.
[0062] Step 112: inputting the work order data and the semantic interpretation data corresponding to the plurality of preset standard marketing campaign names into a marketing campaign name detection model to obtain a marketing campaign name detection result output by the marketing campaign name detection model.
[0063] The marketing campaign name detection model is trained based on the sample work order data, the knowledge base data and the marketing campaign name detection result label corresponding to the sample work order data. That is, the sample work order data is obtained, and it is marked whether it contains the marketing campaign name, and combined with the knowledge base data to train the marketing campaign name detection model.
[0064] The marketing campaign name recognition method provided by the embodiment of the present invention retrieves semantic interpretation data corresponding to multiple preset standard marketing campaign names from the knowledge base data. Therefore, it is only necessary to retrieve semantic interpretation data corresponding to multiple preset standard marketing campaign names from the knowledge base data, thereby reducing the amount of input data of the model, improving the detection efficiency of the marketing campaign names, and further improving the recognition efficiency of the marketing campaign names, and reducing the input of irrelevant data, improving the detection accuracy of the marketing campaign names, and further improving the recognition accuracy of the marketing campaign names; and the knowledge base data includes semantic interpretation data corresponding to multiple standard marketing campaign names, and the work order data and the semantic interpretation data corresponding to the multiple preset standard marketing campaign names are input into the marketing campaign name detection model to obtain the marketing campaign name detection result output by the marketing campaign name detection model, thereby introducing prior knowledge and improving the semantic representation, so that there is no need to provide a large amount of annotated corpus (sample work order data) for model training, and the detection accuracy of the marketing campaign name detection model can also be ensured, thereby improving the recognition accuracy of the marketing campaign names, and enabling the marketing campaign name detection model to pay more attention to whether the current work order data contains the marketing campaign name, thereby improving the recognition accuracy of the marketing campaign name.
[0065] Based on any of the above embodiments, in this method, the marketing campaign name detection model includes a feature extraction layer and a detection layer connected in sequence; the detection layer is used to obtain the marketing campaign name detection result based on feature detection extracted by the feature extraction layer.
[0066] Here, the feature extraction layer is used to extract features from the input data.
[0067] Exemplarily, the detection layer (classification layer) includes a softmax activation function layer. Since the softmax activation function performs classification by outputting the probability of whether the name of the marketing campaign is contained, the probability value can be used to determine whether the name is contained. In one embodiment, when the probability value is greater than a preset probability threshold, it is determined that the name of the marketing campaign is contained. Furthermore, the preset probability threshold is determined based on the test work order data. The test of the test work order data proves that the preset probability threshold of 0.75 can make the overall effect of the marketing campaign name detection model the best, and can achieve a recall rate of 98%.
[0068] In one embodiment, the input data input to the marketing campaign name detection model is firstly text-encoded, and then the encoded text vector is input to the feature extraction layer. For example, the input data is encoded based on the one-hot encoding method, that is, the words are first numbered, and then if there is a word in the current text, it is 1, otherwise it is 0.
[0069] Wherein, the pooling layer in the feature extraction layer is used for: Based on the screening ratio, a plurality of target pooling values are screened out from the plurality of pooling values after pooling in descending order of the pooling values; a ratio of the plurality of target pooling values to the plurality of pooling values is the screening ratio, and the plurality of target pooling values are all greater than the pooling values among the plurality of pooling values except the plurality of target pooling values; The multiple target pooled values are used as outputs of the pooling layer.
[0070] Exemplarily, the pooling layer performs pooling value screening based on the following formula: ; In the formula, DLK represents multiple target pooling values obtained by screening; Represents multiple pooling values after pooling; Indicates the screening ratio; It means to filter out multiple target pooling values corresponding to the filtering ratio from the multiple pooling values after pooling in descending order of the pooling values.
[0071] It should be noted that in a neural network, the pooling layer is generally a maximum pooling layer or an average pooling layer, but the maximum pooling layer only takes the maximum value of multiple pooling values after pooling, resulting in the loss of the second highest weighted pooling value, while the average pooling layer takes the average value of multiple pooling values after pooling, which reduces the score of the high-weighted pooling value, making it difficult to show the importance of words in a differentiated manner. Therefore, the existing pooling method will reduce the detection accuracy of the marketing campaign name.
[0072] Here, the screening ratio is greater than 0 and less than 1, so that some pooling values are screened out from the multiple pooling values after pooling.
[0073] Specifically, the multiple pooling values after pooling are sorted in order from large to small according to the pooling values, and based on the screening ratio, multiple larger target pooling values are screened out from the sorted multiple pooling values, so that the ratio of the multiple target pooling values to the multiple pooling values is the screening ratio, and the multiple target pooling values are all greater than the pooling values of the multiple pooling values except the multiple target pooling values. Therefore, compared with the maximum pooling and the average pooling, more target pooling values are finally obtained, thereby retaining more feature information, and in addition to extracting the pooling value with the highest weight, the pooling value with the second highest weight can also be extracted by screening out the larger multiple target pooling values, thereby avoiding the loss of the second highest weight value due to the use of maximum pooling, thereby improving the detection accuracy of the marketing campaign name detection model, that is, improving the detection accuracy of the marketing campaign name.
[0074] It should be understood that any pooling layer in the feature extraction layer can be pooled in the above manner.
[0075] In one embodiment, the screening ratio is determined based on the ratio of the total number of high-frequency words in the work order data to the total number of words in the work order data.
[0076] In another embodiment, the screening ratio is a preset value.
[0077] In the marketing campaign name recognition method provided by the embodiment of the present invention, the pooling layer in the feature extraction layer in the marketing campaign name detection model is used to: based on the screening ratio, screen out multiple target pooling values from the multiple pooling values after pooling in order from large to small, and the ratio of the multiple target pooling values to the multiple pooling values is the screening ratio, the multiple target pooling values are all greater than the pooling values of the multiple pooling values except the multiple target pooling values, thereby obtaining more target pooling values, thereby retaining more feature information, and in addition to extracting the highest weighted pooling value, the second highest weighted pooling value can also be extracted by screening out the larger multiple target pooling values, thereby avoiding the loss of the second highest weighted value due to the use of maximum pooling, thereby improving the detection accuracy of the marketing campaign name detection model, that is, improving the detection accuracy of the marketing campaign name, and ultimately improving the recognition accuracy of the marketing campaign name.
[0078] Based on any of the above embodiments, in this method, the screening ratio is determined based on the following method: The screening ratio is determined based on the ratio of the total number of high-frequency words in the work order data to the total number of words in the work order data.
[0079] Specifically, the high-frequency words appearing in the work order data are determined, and the total number of the high-frequency words that appear is determined. For example, if the high-frequency words appear 3 times in the work order data, the total number of the words is 3. The ratio of the total number of the high-frequency words to the total number of the work order data can be directly determined as the screening ratio, or the ratio can be further processed to obtain the screening ratio.
[0080] Here, the total number of words in the work order data is the number of words in the word segmentation that appears in the work order data. In a specific embodiment, the work order data is firstly word segmented to obtain each word segmentation of the work order data, and then the total number of words in each word segmentation (i.e., the total number of words in the work order data) is determined, and the high-frequency words in each word segmentation are determined, thereby determining the total number of several high-frequency words in the work order data. Furthermore, after obtaining each word segmentation, irrelevant words such as stop words in each word segmentation can be removed.
[0081] The high-frequency words are determined based on the following method: Determine each word in a plurality of historical work order data and the number of occurrences of each word; Based on the number of occurrences, the several high-frequency words are determined from the several words; the number of occurrences of any of the high-frequency words is greater than the number of occurrences of each word in the several words except the several high-frequency words.
[0082] Here, the historical work order data can be updated all the time, that is, the historical work order data can be more and more, or the newer work order data can be continuously updated.
[0083] It should be understood that high-frequency words are words that appear relatively frequently in historical work order data, that is, the number of occurrences of high-frequency words is greater than the number of occurrences of any word except for some high-frequency words.
[0084] In one embodiment, based on a preset ratio and the number of occurrences of each word, a number of high-frequency words are determined from each word in descending order of the number of occurrences, that is, the ratio of the number of the high-frequency words to the number of each word is a preset ratio. For example, if the preset ratio is 25%, the high-frequency words are the top 25% words in the sorted historical work order data.
[0085] In another embodiment, based on the occurrence count threshold and the occurrence count of each word, several high-frequency words are determined from each word, that is, the occurrence count of any high-frequency word is greater than the occurrence count threshold.
[0086] It should be understood that dynamic pooling can be implemented through the embodiments of the present invention, and dynamic feature extraction can be implemented, that is, the pooling layer is a dynamic pooling layer, that is, the screening ratio is dynamically determined.
[0087] In the marketing campaign name recognition method provided by the embodiment of the present invention, several high-frequency words are determined based on the following method: each word in a plurality of historical work order data and the number of occurrences of each word are determined, and based on the number of occurrences, several high-frequency words are determined from each word, and the number of occurrences of any high-frequency word is greater than the number of occurrences of each word except the several high-frequency words, thereby determining several high-frequency words based on the historical work order data of the marketing campaign scenario, thereby improving the accuracy of determining the high-frequency words; at the same time, based on the ratio of the total number of high-frequency words in the work order data to the total number of words in the work order data, determining the screening ratio, thereby focusing on the high-frequency words in the current work order data to determine the screening ratio, that is, realizing real-time and dynamic screening ratio determination, improving the accuracy of determining the screening ratio, and then improving the detection accuracy of the marketing campaign name detection model, and ultimately improving the recognition accuracy of the marketing campaign name.
[0088] Based on any of the above embodiments, the marketing campaign name detection model includes a word embedding vector extraction layer, a feature extraction layer and a detection layer connected in sequence; the feature extraction layer is used to perform feature extraction on the output vector of the word embedding vector extraction layer; the detection layer is used to obtain the marketing campaign name detection result based on the feature detection extracted by the feature extraction layer.
[0089] In one embodiment, the input data input to the marketing campaign name detection model is firstly text encoded, and then the encoded text vector is input to the word embedding vector extraction layer.
[0090] Wherein, the word embedding vector extraction layer is used for: Perform word segmentation processing on the input data of the word embedding vector extraction layer to obtain each word segment of the input data; Extracting word embedding vectors of each word segment; Each of the word embedding vectors is used as the output of the word embedding vector extraction layer.
[0091] Here, the input data includes work order data. Further, the input data also includes knowledge base data, the knowledge base data includes semantic interpretation data corresponding to multiple standard marketing activity names, or the input data also includes semantic interpretation data corresponding to multiple preset standard marketing activity names.
[0092] In a specific embodiment, the input data is segmented using the Jieba segmentation method. Furthermore, a custom dictionary is set for segmentation to avoid separating the marketing activity names in the input data, thereby ensuring the accuracy of the detection of the marketing activity names.
[0093] Furthermore, after obtaining each participle of the input data, irrelevant words such as stop words in each participle are removed to obtain each cleaned participle.
[0094] In a specific embodiment, the word embedding vector (embedding) of each word segment is extracted through the word2vec model (word vector model).
[0095] The marketing campaign name recognition method provided by the embodiment of the present invention, the marketing campaign name detection model first includes a word embedding vector extraction layer, and the word embedding vector extraction layer is used to: perform word segmentation on the input data of the word embedding vector extraction layer to obtain each word segment of the input data, and extract the word embedding vector of each word segment, so as to firstly perform word segmentation on the input data and extract its word embedding vector, and then input the word embedding vector of each word segment into the feature extraction layer, so as to facilitate the feature extraction layer to better extract features, thereby improving the detection accuracy of the marketing campaign name detection model, and finally improving the recognition accuracy of the marketing campaign name.
[0096] Based on any of the above embodiments, after performing word segmentation processing on the input data of the word embedding vector extraction layer to obtain each word segmentation of the input data, the method further includes: Based on the position of each segmentation word in the input data, adjacent segmentations are associated to obtain an associated word; the associated word is a word associated with at least two segmentations, and the at least two segmentations are adjacent in the input data; The associated words are input into the feature extraction layer.
[0097] Here, there may be multiple associated words, and any associated word is a word obtained by combining the preceding and following participles.
[0098] In a specific embodiment, each participle is associated with the front and back, that is, for the first participle, it is associated with a preset number of participles after the first participle to obtain the associated word corresponding to the first participle, and for the second participle, it is associated with a preset number of participles before the second participle and a preset number of participles after the second participle to obtain the associated word corresponding to the second participle, and so on, to obtain the associated word corresponding to each participle.
[0099] Furthermore, the preset number is determined based on word segmentation conditions of multiple historical work order data, for example, the preset number is 3.
[0100] The marketing campaign name recognition method provided by the embodiment of the present invention, through the above-mentioned method, in addition to inputting the word embedding vector of each participle into the feature extraction layer, also inputs the associated words of each participle into the feature extraction layer, thereby further improving the semantic expression of the marketing campaign name, and then improving the detection accuracy of the marketing campaign name detection model, and ultimately improving the recognition accuracy of the marketing campaign name.
[0101] Based on any of the above embodiments, in this method, when the input data includes work order data and semantic interpretation data corresponding to the multiple preset standard marketing activity names, the feature extraction layer is specifically used to: Determining a number of word embedding vectors representing marketing activities from each of the word embedding vectors; Performing feature fusion on the plurality of word embedding vectors to obtain an updated word embedding vector representing the marketing activity; Updating the plurality of word embedding vectors in each of the word embedding vectors to the updated word embedding vectors to obtain each updated word embedding vector; Perform feature extraction on each updated word embedding vector.
[0102] In a specific embodiment, when the input data is segmented, it is possible to determine which word is the segmented word corresponding to the marketing activity, and then determine a number of word embedding vectors representing the marketing activity.
[0103] In a specific embodiment, a weighted average is performed on a plurality of word embedding vectors to obtain an updated word embedding vector representing a marketing activity, wherein each weight for weighted average may be the same.
[0104] The marketing campaign name recognition method provided in an embodiment of the present invention takes into account the introduction of prior knowledge, that is, the input data includes semantic interpretation data corresponding to multiple preset standard marketing campaign names. Based on this, the words representing the marketing activities can appear in the work order data and in the semantic interpretation data. Therefore, several word embedding vectors representing the marketing activities can be determined from each word embedding vector, and then the features of several word embedding vectors can be fused into an updated word embedding vector. Compared with extracting word embedding vectors based only on work order data, the semantic expression of the marketing activities is enriched, thereby improving the detection accuracy of the marketing campaign name detection model, and ultimately improving the recognition accuracy of the marketing campaign names.
[0105] Based on any of the above embodiments, in this method, the number of the marketing activity substrings is N, and the above step 130 includes: Determine K text data matching the N marketing activity substrings from the work order data; any marketing activity substring matches one text data, and the matching marketing activity substring and the text data have the same number of characters, and K is less than or equal to N; For the first of the K text data text data, determining the substrings corresponding to the first The text data has the same number of characters A standard campaign name based on the The text data are respectively similarity of the names of standard marketing activities, determine Similarity results; Less than or equal to N, is a positive integer less than or equal to K; based on The similarity results are used to identify the target marketing campaign name corresponding to the work order data.
[0106] It should be noted that in the above step 120, the work order data is matched based on the dictionary tree to obtain N marketing activity substrings, and then the text matching each marketing activity substring in the work order data can be known, and then the complete text data can be determined based on the number of characters in the marketing activity substring. For example, there is "First Marketing Activity" in the work order data, and the work order data is matched based on the dictionary tree to obtain three marketing activity substrings, namely "First Marketing Activity A", "First Marketing Activity B" and "Second Marketing Activity A". Based on this, the text matching any marketing activity substring in the work order data is "First Marketing Activity", and then based on the number of characters of the marketing activity substring, 7, the complete text data is determined to be "First Marketing Activity".
[0107] Considering that multiple marketing campaign substrings may match the same text data, based on this, K is less than or equal to N.
[0108] In a specific embodiment, K text data matching the N marketing campaign substrings are determined from the work order data in sequence in the form of a sliding window, so that the text data does not need to be separated from the work order data. That is, the sliding window is automatically set in sequence according to the character length of the marketing campaign substring to perform a mobile calculation of the similarity with the standard marketing campaign name (marketing campaign substring). More specifically, the length of the sliding window is determined according to the character length of the marketing campaign substring. For example, if the character length of the marketing campaign substring is 3, the length of the sliding window is also 3.
[0109] In one embodiment, any similarity is calculated using a Levenshtein distance algorithm (edit distance algorithm), based on which the smaller the edit distance calculated, the greater the similarity between the two character strings.
[0110] In one embodiment, from The maximum similarity is determined from the similarity results; and the standard marketing activity name corresponding to the maximum similarity is determined as the target marketing activity name. Based on this, the most matching target marketing activity name can be obtained, that is, the most accurate target marketing activity name can be obtained.
[0111] In another embodiment, from A plurality of target similarities whose similarities are greater than a similarity threshold are determined from the similarity results; and standard marketing campaign names corresponding to the plurality of target similarities are determined as target marketing campaign names.
[0112] In another embodiment, in descending order of similarity, A preset number of target similarities are determined from the similarity results; and standard marketing campaign names corresponding to the target similarities are determined as target marketing campaign names.
[0113] The marketing campaign name recognition method provided by the embodiment of the present invention can obtain the target marketing campaign name as an accurate and standard marketing campaign name even if abbreviations, colloquial words, missing characters, extra characters or typos appear in the work order data, thereby improving the recognition accuracy of the marketing campaign name. Text data, determine the substrings related to the first The text data has the same number of characters Standard campaign names based on The text data are respectively similarity of the names of standard marketing activities, determine There are multiple similarity results, so there is no need to calculate the similarity with M preset standard marketing campaign names, and there is no need to calculate the similarity with N marketing campaign substrings, thereby reducing the amount of calculation and improving the recognition efficiency of marketing campaign names.
[0114] Based on the above embodiments, in order to support the marketing campaign early warning system, the present invention only needs to provide multiple preset standard marketing campaign names to be identified, so as to quickly and accurately identify the marketing campaign names in massive work order data. Specifically, the model network structure based on prior knowledge + dynamic feature extraction is used to identify whether the marketing campaign name is contained, and the standard marketing campaign name is recalled through the dictionary tree and edit distance, thereby improving the recognition accuracy of the marketing campaign name. In addition, the model network structure based on prior knowledge + dynamic feature extraction has a good recognition effect in the marketing campaign scenario. Compared with the traditional text classification method, this method can introduce the knowledge base content and dynamically capture the context of the marketing campaign name according to the actual work order data. It is particularly suitable for processing short text and unstructured data in customer service scenarios, thereby improving the accuracy and efficiency of classification.
[0115] The marketing campaign name recognition device provided by the present invention is described below. The marketing campaign name recognition device described below and the marketing campaign name recognition method described above can be referenced to each other.
[0116] Figure 3 is a schematic diagram of the structure of the marketing activity name recognition device provided by the present invention, such as Figure 3 As shown, the marketing activity name recognition device includes a name detection module 310 , a substring matching module 320 and a name recognition module 330 .
[0117] The name detection module 310 is used to input the work order data to be identified into the marketing campaign name detection model to obtain the marketing campaign name detection result output by the marketing campaign name detection model; the marketing campaign name detection result includes a first detection result indicating that the work order data includes the marketing campaign name or a second detection result indicating that the work order data does not include the marketing campaign name.
[0118] The substring matching module 320 is used to match the work order data based on a dictionary tree to obtain a marketing campaign substring when the marketing campaign name detection result includes the first detection result; the dictionary tree is constructed based on multiple preset standard marketing campaign names, and the marketing campaign substring is a standard marketing campaign name composed of several characters in the dictionary tree.
[0119] The name identification module 330 is used to perform similarity calculation based on the text data in the work order data that matches the marketing campaign substring and the marketing campaign substring to obtain a similarity result, and identify the target marketing campaign name corresponding to the work order data based on the similarity result; the target marketing campaign name is at least one of the multiple preset standard marketing campaign names.
[0120] The marketing campaign name detection model is trained based on sample work order data and marketing campaign name detection result labels corresponding to the sample work order data.
[0121] The marketing campaign name recognition device provided in the embodiment of the present invention inputs the work order data to be recognized into the marketing campaign name detection model, obtains the marketing campaign name detection result output by the marketing campaign name detection model, and the marketing campaign name detection result includes a first detection result indicating that the work order data includes the marketing campaign name or a second detection result indicating that the work order data does not include the marketing campaign name, thereby only detecting whether the work order data includes the marketing campaign name based on the marketing campaign name detection model, and does not directly output the marketing campaign name, that is, the model only performs classification and does not perform named entity recognition, thereby not needing to provide a large amount of annotated corpus for model training, and can also ensure the detection accuracy of the marketing campaign name detection model, thereby improving the recognition accuracy of the marketing campaign name, and then, in the case that the marketing campaign name detection result includes the first detection result, that is, in the On the basis of determining that the work order data includes the marketing campaign name, the work order data is matched based on the dictionary tree to obtain a marketing campaign substring, and the dictionary tree is constructed based on multiple preset standard marketing campaign names, and the marketing campaign substring is a standard marketing campaign name composed of several characters in the dictionary tree. Afterwards, based on the text data in the work order data that matches the marketing campaign substring and the marketing campaign substring, a similarity calculation is performed to obtain a similarity result, and the target marketing campaign name corresponding to the work order data is identified based on the similarity result, and the target marketing campaign name is at least one of the multiple preset standard marketing campaign names, so that even if abbreviations, colloquial words, fewer words, more words, or typos may appear in the work order data, the target marketing campaign name finally obtained is an accurate standard marketing campaign name, thereby improving the recognition accuracy of the marketing campaign name. In summary, the present invention can improve the recognition accuracy of the marketing campaign name.
[0122] Based on any of the above embodiments, the name detection module 310 is further used for: Retrieving semantic interpretation data corresponding to the plurality of preset standard marketing campaign names from the knowledge base data; the knowledge base data includes semantic interpretation data corresponding to the plurality of standard marketing campaign names; Inputting the work order data and the semantic interpretation data corresponding to the plurality of preset standard marketing campaign names into a marketing campaign name detection model to obtain a marketing campaign name detection result output by the marketing campaign name detection model; The marketing campaign name detection model is trained based on sample work order data, the knowledge base data and the marketing campaign name detection result labels corresponding to the sample work order data.
[0123] Based on any of the above embodiments, the marketing campaign name detection model includes a feature extraction layer and a detection layer connected in sequence; the detection layer is used to obtain the marketing campaign name detection result based on the feature detection extracted by the feature extraction layer; the pooling layer in the feature extraction layer is used to: Based on the screening ratio, a plurality of target pooling values are screened out from the plurality of pooling values after pooling in descending order of the pooling values; a ratio of the plurality of target pooling values to the plurality of pooling values is the screening ratio, and the plurality of target pooling values are all greater than the pooling values among the plurality of pooling values except the plurality of target pooling values; The multiple target pooled values are used as outputs of the pooling layer.
[0124] Based on any of the above embodiments, the screening ratio is determined based on the following method: Determining the screening ratio based on the ratio of the total number of high-frequency words in the work order data to the total number of words in the work order data; The high-frequency words are determined based on the following method: Determine each word in a plurality of historical work order data and the number of occurrences of each word; Based on the number of occurrences, the several high-frequency words are determined from the several words; the number of occurrences of any of the high-frequency words is greater than the number of occurrences of each word in the several words except the several high-frequency words.
[0125] Based on any of the above embodiments, the marketing campaign name detection model includes a word embedding vector extraction layer, a feature extraction layer and a detection layer connected in sequence; the feature extraction layer is used to extract features from the output vector of the word embedding vector extraction layer; the detection layer is used to obtain the marketing campaign name detection result based on the feature detection extracted by the feature extraction layer; The word embedding vector extraction layer is used to: Perform word segmentation processing on the input data of the word embedding vector extraction layer to obtain each word segment of the input data; Extracting word embedding vectors of each word segment; Each of the word embedding vectors is used as the output of the word embedding vector extraction layer.
[0126] Based on any of the above embodiments, the device further includes a word segmentation association module, which is used to: Based on the position of each segmentation word in the input data, adjacent segmentations are associated to obtain an associated word; the associated word is a word associated with at least two segmentations, and the at least two segmentations are adjacent in the input data; The associated words are input into the feature extraction layer.
[0127] Based on any of the above embodiments, when the input data includes work order data and semantic interpretation data corresponding to the multiple preset standard marketing activity names, the feature extraction layer is specifically used to: Determining a number of word embedding vectors representing marketing activities from each of the word embedding vectors; Performing feature fusion on the plurality of word embedding vectors to obtain an updated word embedding vector representing the marketing activity; Updating the plurality of word embedding vectors in each of the word embedding vectors to the updated word embedding vectors to obtain each updated word embedding vector; Perform feature extraction on each updated word embedding vector.
[0128] Based on any of the above embodiments, the number of the marketing activity substrings is N, and the name recognition module 330 is further used to: Determine K text data matching the N marketing activity substrings from the work order data; any marketing activity substring matches one text data, and the matching marketing activity substring and the text data have the same number of characters, and K is less than or equal to N; For the first of the K text data text data, determining the substrings corresponding to the first The text data has the same number of characters A standard campaign name based on the The text data are respectively similarity of the names of standard marketing activities, determine Similarity results; Less than or equal to N, is a positive integer less than or equal to K; based on The similarity results are used to identify the target marketing campaign name corresponding to the work order data.
[0129] Based on any of the above embodiments, the name recognition module 330 is further used for: from Determine the maximum similarity among the similarity results; The preset standard marketing campaign name corresponding to the maximum similarity is determined as the target marketing campaign name.
[0130] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor (processor) 410 , a communication interface (Communications Interface) 420 , a memory (memory) 430 and a communication bus 440 , wherein the processor 410 , the communication interface 420 , and the memory 430 communicate with each other through the communication bus 440 . The processor 410 can call the logic instructions in the memory 430 to execute a marketing campaign name recognition method, which includes: inputting the work order data to be identified into a marketing campaign name detection model to obtain a marketing campaign name detection result output by the marketing campaign name detection model; the marketing campaign name detection result includes a first detection result indicating that the work order data includes a marketing campaign name or a second detection result indicating that the work order data does not include a marketing campaign name; when the marketing campaign name detection result includes the first detection result, matching the work order data based on a dictionary tree to obtain a marketing campaign substring; the dictionary tree is constructed based on multiple preset standard marketing campaign names, and the marketing campaign substring is a standard marketing campaign name composed of several characters in the dictionary tree; based on the text data in the work order data that matches the marketing campaign substring, and the marketing campaign substring, similarity calculation is performed to obtain a similarity result, and based on the similarity result, a target marketing campaign name corresponding to the work order data is identified; the target marketing campaign name is at least one of the multiple preset standard marketing campaign names; wherein the marketing campaign name detection model is trained based on sample work order data and the marketing campaign name detection result label corresponding to the sample work order data.
[0131] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a 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, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0132] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the marketing campaign name recognition method provided by the above methods, the method comprising: inputting the work order data to be identified into a marketing campaign name detection model, and obtaining a marketing campaign name detection result output by the marketing campaign name detection model; the marketing campaign name detection result includes a first detection result indicating that the work order data includes the marketing campaign name or a second detection result indicating that the work order data does not include the marketing campaign name; in the case where the marketing campaign name detection result includes the first detection result, The work order data is matched based on a dictionary tree to obtain a marketing campaign substring; the dictionary tree is constructed based on multiple preset standard marketing campaign names, and the marketing campaign substring is a standard marketing campaign name composed of several characters in the dictionary tree; based on the text data matching the marketing campaign substring in the work order data, and the marketing campaign substring, a similarity calculation is performed to obtain a similarity result, and a target marketing campaign name corresponding to the work order data is identified based on the similarity result; the target marketing campaign name is at least one of the multiple preset standard marketing campaign names; wherein the marketing campaign name detection model is trained based on sample work order data and marketing campaign name detection result labels corresponding to the sample work order data.
[0133] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the marketing campaign name recognition method provided by the above-mentioned methods, the method comprising: inputting work order data to be identified into a marketing campaign name detection model to obtain a marketing campaign name detection result output by the marketing campaign name detection model; the marketing campaign name detection result comprises a first detection result indicating that the work order data includes the marketing campaign name or a second detection result indicating that the work order data does not include the marketing campaign name; in a case where the marketing campaign name detection result includes the first detection result, matching the work order data based on a dictionary tree The marketing campaign substring is obtained by matching and processing; the dictionary tree is constructed based on multiple preset standard marketing campaign names, and the marketing campaign substring is a standard marketing campaign name composed of several characters in the dictionary tree; based on the text data matching the marketing campaign substring in the work order data, and the marketing campaign substring, a similarity calculation is performed to obtain a similarity result, and based on the similarity result, a target marketing campaign name corresponding to the work order data is identified; the target marketing campaign name is at least one of the multiple preset standard marketing campaign names; wherein the marketing campaign name detection model is trained based on sample work order data and the marketing campaign name detection result label corresponding to the sample work order data.
[0134] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0135] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for identifying a marketing activity name, characterized in that: include: Inputting the work order data to be identified into a marketing campaign name detection model to obtain a marketing campaign name detection result output by the marketing campaign name detection model; the marketing campaign name detection result includes a first detection result indicating that the work order data includes a marketing campaign name or a second detection result indicating that the work order data does not include a marketing campaign name; In the case where the marketing campaign name detection result includes the first detection result, matching processing is performed on the work order data based on a dictionary tree to obtain a marketing campaign substring; the dictionary tree is constructed based on a plurality of preset standard marketing campaign names, and the marketing campaign substring is a standard marketing campaign name composed of a number of characters in the dictionary tree; Based on the text data in the work order data that matches the marketing activity substring and the marketing activity substring, a similarity calculation is performed to obtain a similarity result, and based on the similarity result, a target marketing activity name corresponding to the work order data is identified; The target marketing campaign name is at least one of the plurality of preset standard marketing campaign names; The marketing campaign name detection model is trained based on sample work order data and marketing campaign name detection result labels corresponding to the sample work order data.
2. The marketing activity name recognition method according to claim 1, characterized in that: The step of inputting the work order data to be identified into the marketing activity name detection model to obtain the marketing activity name detection result output by the marketing activity name detection model includes: Retrieving semantic interpretation data corresponding to the plurality of preset standard marketing campaign names from the knowledge base data; the knowledge base data includes semantic interpretation data corresponding to the plurality of standard marketing campaign names; Inputting the work order data and the semantic interpretation data corresponding to the plurality of preset standard marketing campaign names into a marketing campaign name detection model to obtain a marketing campaign name detection result output by the marketing campaign name detection model; The marketing campaign name detection model is trained based on sample work order data, the knowledge base data and the marketing campaign name detection result labels corresponding to the sample work order data.
3. The marketing activity name recognition method according to claim 1, characterized in that: The marketing campaign name detection model includes a feature extraction layer and a detection layer connected in sequence; the detection layer is used to obtain the marketing campaign name detection result based on the feature detection extracted by the feature extraction layer; the pooling layer in the feature extraction layer is used to: Based on the screening ratio, a plurality of target pooling values are screened out from the plurality of pooling values after pooling in descending order of the pooling values; a ratio of the plurality of target pooling values to the plurality of pooling values is the screening ratio, and the plurality of target pooling values are all greater than the pooling values among the plurality of pooling values except the plurality of target pooling values; The multiple target pooled values are used as outputs of the pooling layer.
4. The marketing activity name recognition method according to claim 3, characterized in that: The screening ratio is determined based on the following method: Determining the screening ratio based on the ratio of the total number of high-frequency words in the work order data to the total number of words in the work order data; The high-frequency words are determined based on the following method: Determine each word in a plurality of historical work order data and the number of occurrences of each word; Based on the number of occurrences, the several high-frequency words are determined from the several words; the number of occurrences of any of the high-frequency words is greater than the number of occurrences of each word in the several words except the several high-frequency words.
5. The marketing activity name recognition method according to claim 1, characterized in that: The marketing campaign name detection model comprises a word embedding vector extraction layer, a feature extraction layer and a detection layer connected in sequence; the feature extraction layer is used to extract features from the output vector of the word embedding vector extraction layer; the detection layer is used to obtain the marketing campaign name detection result based on the feature detection extracted by the feature extraction layer; The word embedding vector extraction layer is used to: Perform word segmentation processing on the input data of the word embedding vector extraction layer to obtain each word segmentation of the input data; Extracting word embedding vectors of each word segment; Each of the word embedding vectors is used as the output of the word embedding vector extraction layer.
6. The marketing activity name recognition method according to claim 5, characterized in that: After performing word segmentation processing on the input data of the word embedding vector extraction layer to obtain each word segment of the input data, the method further includes: Based on the position of each segmentation word in the input data, adjacent segmentations are associated to obtain an associated word; the associated word is a word associated with at least two segmentations, and the at least two segmentations are adjacent in the input data; The associated words are input into the feature extraction layer.
7. The marketing activity name recognition method according to claim 5, characterized in that: In the case where the input data includes work order data and semantic interpretation data corresponding to the plurality of preset standard marketing activity names, the feature extraction layer is specifically used to: Determining a number of word embedding vectors representing marketing activities from each of the word embedding vectors; Performing feature fusion on the plurality of word embedding vectors to obtain an updated word embedding vector representing the marketing activity; Updating the plurality of word embedding vectors in each of the word embedding vectors to the updated word embedding vectors to obtain each updated word embedding vector; Perform feature extraction on each updated word embedding vector.
8. The marketing activity name recognition method according to claim 1, characterized in that: The number of the marketing activity substrings is N, the similarity calculation is performed based on the text data matching the marketing activity substrings in the work order data and the marketing activity substrings to obtain a similarity result, and the target marketing activity name corresponding to the work order data is identified based on the similarity result, including: Determine K text data matching the N marketing activity substrings from the work order data; any marketing activity substring matches one text data, and the matching marketing activity substring and the text data have the same number of characters, and K is less than or equal to N; For the first of the K text data text data, determining the substrings corresponding to the first The text data has the same number of characters A standard campaign name based on the The text data are respectively similarity of the names of standard marketing activities, determine Similarity results; Less than or equal to N, is a positive integer less than or equal to K; based on The similarity results are used to identify the target marketing campaign name corresponding to the work order data.
9. The marketing activity name recognition method according to claim 8, characterized in that: The basis The similarity results are used to identify the target marketing campaign name corresponding to the work order data, including: from Determine the maximum similarity among the similarity results; The standard marketing campaign name corresponding to the maximum similarity is determined as the target marketing campaign name.
10. A marketing activity name recognition device, characterized in that: include: a name detection module, configured to input the work order data to be identified into a marketing campaign name detection model, and obtain a marketing campaign name detection result output by the marketing campaign name detection model; the marketing campaign name detection result includes a first detection result indicating that the work order data includes a marketing campaign name or a second detection result indicating that the work order data does not include a marketing campaign name; a substring matching module, configured to, when the marketing campaign name detection result includes the first detection result, perform matching processing on the work order data based on a dictionary tree to obtain a marketing campaign substring; the dictionary tree is constructed based on a plurality of preset standard marketing campaign names, and the marketing campaign substring is a standard marketing campaign name composed of a number of characters in the dictionary tree; a name recognition module, configured to perform similarity calculation based on the text data in the work order data that matches the marketing activity substring and the marketing activity substring to obtain a similarity result, and to identify the name of the target marketing activity corresponding to the work order data based on the similarity result; The target marketing campaign name is at least one of the plurality of preset standard marketing campaign names; The marketing campaign name detection model is trained based on sample work order data and marketing campaign name detection result labels corresponding to the sample work order data.
11. 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 program, the marketing campaign name recognition method according to any one of claims 1 to 9 is implemented.
12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the marketing campaign name recognition method according to any one of claims 1 to 9 is implemented.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the marketing campaign name recognition method according to any one of claims 1 to 9 is implemented.