A short message content auditing method, device, equipment, storage medium and product
By combining text segmentation and key scoring with semantic similarity calculation in SMS scenarios, the problem of inaccurate SMS content review is solved, achieving more efficient spam SMS filtering and legitimate SMS protection.
Patent Information
- Application Number
- CN202511374702.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-09-25
AI Technical Summary
Existing SMS content review methods fail to effectively consider SMS scenario classification, resulting in inaccurate review results and situations where spam messages are not blocked or legitimate messages are mistakenly blocked.
By segmenting the target SMS content into text, calculating the key scores of phrases, and combining this with a preset SMS scenario to calculate semantic similarity, a comprehensive similarity matrix is generated, enabling accurate review of SMS content.
It improves the accuracy of SMS content review, effectively filters spam SMS, avoids the accidental blocking of legitimate SMS, enhances user experience and personal and property safety, and reduces manpower review costs.
Smart Images

Figure CN120881581B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device, storage medium, and product for reviewing SMS content. Background Technology
[0002] With the vigorous development of the telecommunications industry, all industries need to push information to users via SMS to achieve the purpose of reminders and publicity. This requires major SMS platforms to strengthen the review of SMS content and do a good job in SMS classification and monitoring.
[0003] Existing SMS content review methods extract keywords from the SMS content and categorize them for review to determine the security of the SMS content. However, since the meaning or keyword expression of SMS content can be completely different in different scenarios, existing review methods do not take into account SMS scenario categorization, resulting in inaccurate SMS content review results and situations where spam is not blocked or legitimate messages are mistakenly blocked. Summary of the Invention
[0004] The purpose of this invention is to provide a method, apparatus, device, storage medium, and product for reviewing SMS content, which can review SMS content in conjunction with SMS scenarios and effectively improve the accuracy of SMS content review.
[0005] To achieve the above objectives, embodiments of the present invention provide a method for reviewing SMS content, including:
[0006] The target SMS content is segmented into several word groups;
[0007] Calculate the criticality score for each of the given phrases;
[0008] At least one keyword group is determined based on the key score;
[0009] Based on the keyword group, the key score, and several preset SMS scenarios, calculate the comprehensive similarity of the target SMS content in each SMS scenario;
[0010] The target SMS content is reviewed based on the keyword groups and the overall similarity of the target SMS content.
[0011] As an improvement to the above solution, the step of calculating the comprehensive similarity of the target SMS content in each of the SMS scenarios based on the keyword group, the key score, and several preset SMS scenarios includes:
[0012] Calculate the semantic similarity between each keyword group and several preset SMS scenarios to obtain a semantic similarity matrix;
[0013] Based on the key score of the keyword group and the semantic similarity matrix, the comprehensive similarity of the target SMS content in each SMS scenario is calculated.
[0014] As an improvement to the above scheme, the step of calculating the semantic similarity between each keyword and a preset SMS scenario to obtain a semantic similarity matrix includes:
[0015] Obtain preset SMS scenarios and the corresponding scenario phrases for each SMS scenario;
[0016] Based on each keyword group and each scenario phrase in the SMS context, a preset CNKI algorithm is used to calculate the semantic similarity between each keyword and each SMS context, resulting in a semantic similarity matrix.
[0017] As an improvement to the above scheme, the step of calculating the comprehensive similarity of the target SMS content in each SMS scenario based on the key score of the keyword group and the semantic similarity matrix includes:
[0018] Generate a key score vector based on the key scores of all the aforementioned keyword groups;
[0019] The product of the key score vector and the semantic similarity matrix is calculated to obtain the comprehensive similarity vector; wherein, the elements of the comprehensive similarity vector are the comprehensive similarity of the target SMS content in each SMS scenario.
[0020] As an improvement to the above scheme, the calculation of the criticality score for each phrase includes:
[0021] The TextRank score for each phrase is calculated using a pre-defined TextRank algorithm and used as a key score.
[0022] As an improvement to the above scheme, the step of calculating the TextRank score of each phrase using a preset TextRank algorithm as a key score includes:
[0023] Calculate the frequency characteristics of each of the aforementioned word groups;
[0024] Calculate the semantic features of each of the aforementioned phrases;
[0025] Using each of the aforementioned word groups as vertices, and calculating the weights of the edges between vertices based on the frequency features and the semantic features, a graph model is constructed.
[0026] Based on the graph model, the TextRank score of each word group is calculated iteratively until the preset score convergence condition is met, thus obtaining the criticality score of each word group.
[0027] As an improvement to the above scheme, the calculation of the frequency features of each of the above word groups includes:
[0028] Count the frequency of each of the aforementioned phrases in the target SMS content;
[0029] The frequency probability of each phrase is calculated based on the frequency of occurrence of each phrase and the total number of phrases, and is used as the frequency feature.
[0030] As an improvement to the above scheme, the computational semantic features of each of the aforementioned phrases include:
[0031] The Word2Vec word skipping model is used to calculate the normalized probability vector of each word group; wherein the normalized probability vector is composed of the frequency probabilities of the context words when the word group is the center word;
[0032] The difference between the highest frequency probability and the second highest frequency probability in the normalized probability vector is calculated and used as the semantic feature of the phrase.
[0033] As an improvement to the above solution, the text segmentation of the target SMS content yields several phrases, including:
[0034] Obtain the content of the target SMS message;
[0035] The target SMS content is segmented into several original word groups.
[0036] Stop words are removed from the original word groups to obtain several processed word groups.
[0037] This invention also provides a device for reviewing SMS content, comprising:
[0038] The SMS content segmentation module is used to segment the target SMS content into several word groups;
[0039] A key scoring module is used to calculate the key score for each of the aforementioned word groups;
[0040] A keyword group determination module is used to determine at least one keyword group based on the key score;
[0041] The comprehensive similarity calculation module is used to calculate the comprehensive similarity of the target SMS content in each of the SMS scenarios based on the keyword group, the key score, and several preset SMS scenarios.
[0042] The SMS content review module is used to review the target SMS content based on the keyword groups and the overall similarity of the target SMS content.
[0043] This invention also provides a device for reviewing SMS content, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the SMS content review method as described in any of the above embodiments.
[0044] This invention also provides a computer-readable storage medium, which includes a stored computer program, wherein the computer program, when running, controls the device where the computer-readable storage medium is located to execute the SMS content review method as described in any of the above embodiments.
[0045] This invention also provides a computer program product, which includes a computer program or computer instructions. When the computer program or computer instructions are executed by a processor, they implement the SMS content review method as described in any of the above embodiments.
[0046] Compared with existing technologies, the SMS content review method, apparatus, device, storage medium, and product disclosed in this invention, through keyword extraction, key score scoring, and preset SMS scenarios, achieves comprehensive similarity calculation between target SMS content and various SMS scenarios. It automatically matches the most probable SMS scenario for the target SMS content and combines the target SMS content with the comprehensive similarity in each SMS scenario for SMS content review. This effectively avoids SMS content review errors caused by focusing only on a single word or phrase while ignoring the actual application scenario, effectively improving the accuracy of SMS content review. It facilitates precise filtering of spam SMS messages while avoiding false blocking of legitimate SMS messages, effectively improving user experience and personal and property safety. Furthermore, automated keyword extraction and text classification reduce reliance on manual review, thereby lowering labor review costs. Attached Figure Description
[0047] Figure 1 This is a flowchart illustrating a method for reviewing SMS content provided in an embodiment of the present invention;
[0048] Figure 2 This is a schematic diagram of the structure of a text message content review device provided in an embodiment of the present invention;
[0049] Figure 3 This is a schematic diagram of the structure of a text message content review device provided in an embodiment of the present invention. Detailed Implementation
[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] In the description of this application, it should be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0052] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0053] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0054] See Figure 1 This is a flowchart illustrating a method for reviewing SMS content provided in an embodiment of the present invention. The present invention also provides a method for reviewing SMS content, including steps S11 to S15:
[0055] S11. Perform text segmentation on the target SMS content to obtain several word groups;
[0056] S12. Calculate the key score for each of the given phrases;
[0057] S13. Determine at least one keyword group based on the key score;
[0058] S14. Based on the keyword group, the key score, and several preset SMS scenarios, calculate the comprehensive similarity of the target SMS content in each SMS scenario;
[0059] S15. Review the target SMS content based on the keyword groups and the overall similarity of the target SMS content.
[0060] This invention is applicable to scenarios where SMS platforms review SMS content after a user sends an SMS message, in order to intercept spam messages and allow legitimate messages to be sent. In this invention, after receiving the target SMS content to be reviewed, the target SMS content is segmented into several word groups. It is understood that the text segmentation process can employ existing techniques, and is not specifically limited here.
[0061] Furthermore, keyword extraction and keyword classification are performed.
[0062] A preset algorithm is used to calculate the criticality score of each segmented word group. The criticality score is used to characterize the degree of criticality or importance of the word group in the target SMS content. The word groups are then sorted according to the criticality score, and the Top N word groups are selected as keyword groups.
[0063] Depending on the specific application, several SMS scenarios are pre-established, such as loan marketing scenarios, fraud scenarios, and normal notification scenarios. Based on the keyword groups and their key scores of the target SMS content, as well as the various SMS scenarios, a comprehensive similarity calculation is performed to obtain the comprehensive similarity score of the target SMS content in each SMS scenario. This comprehensive similarity score is used to characterize the similarity score of the target SMS content in each SMS scenario, thereby reflecting the SMS scenario where the target SMS content is most closely related.
[0064] Finally, by combining the keyword groups of the target SMS content and the overall similarity of the target SMS content in various SMS scenarios, the target SMS content is reviewed to determine whether it is a legitimate SMS or spam. It is understood that the review process for the target SMS content can be AI-based, manual, or a combination of AI review followed by manual secondary review; none of these methods affect the beneficial effects achieved by this invention, and therefore no specific limitations are imposed.
[0065] By employing the technical means of this invention, through keyword extraction, key score scoring, and preset SMS scenarios, a comprehensive similarity calculation is achieved between the target SMS content and various SMS scenarios. The most probable SMS scenario is automatically matched to the target SMS content, and SMS content is reviewed in conjunction with this scenario. This effectively avoids errors in SMS content review caused by focusing only on a single word or phrase while ignoring the actual application scenario, significantly improving the accuracy of SMS content review. This facilitates precise filtering of spam SMS messages while preventing the false blocking of legitimate SMS messages, effectively enhancing user experience and personal and property safety. Furthermore, automated keyword extraction and text classification reduce reliance on manual review, thereby lowering labor review costs.
[0066] As a preferred embodiment, the present invention further implements the above embodiments. Step S14, namely, calculating the comprehensive similarity of the target SMS content in each SMS scenario based on the keyword group, the key score, and several preset SMS scenarios, includes steps S141 and S142:
[0067] S141. Calculate the semantic similarity between each keyword group and several preset SMS scenarios to obtain a semantic similarity matrix;
[0068] S142. Calculate the comprehensive similarity of the target SMS content in each SMS scenario based on the key score of the keyword group and the semantic similarity matrix.
[0069] In this embodiment of the invention, an N×M semantic similarity matrix is calculated based on the N keyword groups and M SMS scenarios, as follows:
[0070]
[0071] Among them, the elements of the semantic similarity matrix This refers to the semantic similarity between the Mth SMS scenario and the Nth keyword group.
[0072] Based on the criticality scores of N keyword groups and the semantic similarity matrix, the comprehensive similarity of the target SMS content in each SMS scenario is calculated.
[0073] In a preferred embodiment, step S141, namely calculating the semantic similarity between each keyword and a preset SMS scenario to obtain a semantic similarity matrix, includes:
[0074] Obtain preset SMS scenarios and the corresponding scenario phrases for each SMS scenario;
[0075] Based on each keyword group and each scenario phrase in the SMS context, a preset CNKI algorithm is used to calculate the semantic similarity between each keyword and each SMS context, resulting in a semantic similarity matrix.
[0076] It should be noted that HowNet is a large-scale language knowledge base that believes the meaning of all words can be composed of "semantic primitives," which are the most basic and indivisible smallest semantic units. HowNet has constructed a sophisticated semantic description system containing more than 2,000 semantic primitives and has labeled the concepts represented by hundreds of thousands of Chinese and English words with semantic primitives.
[0077] In this embodiment of the invention, several SMS scenarios are pre-established according to different actual applications, such as marketing scenarios, fraud scenarios, and normal notification scenarios. Each SMS scenario corresponds to a scenario-based thesaurus, which includes several scenario phrases. For example, the scenario keywords for fraud scenarios include fraud, money transfer, verification code, and secure account, while the scenario keywords for marketing scenarios include marketing, credit loan, unsecured, and credit check.
[0078] Taking N keyword groups and M SMS scenarios and their corresponding word groups as input, the semantic similarity matrix is calculated using the HowNet algorithm. .
[0079] In a preferred embodiment, step S142, namely calculating the comprehensive similarity of the target SMS content in each SMS scenario based on the key score of the keyword group and the semantic similarity matrix, includes:
[0080] Generate a key score vector based on the key scores of all the aforementioned keyword groups;
[0081] The product of the key score vector and the semantic similarity matrix is calculated to obtain the comprehensive similarity vector; wherein, the elements of the comprehensive similarity vector are the comprehensive similarity of the target SMS content in each SMS scenario.
[0082] In this embodiment of the invention, a key scoring vector is generated. Each element of the critical scoring vector is a critical score for each of the N keyword groups.
[0083] The comprehensive similarity vector is obtained by multiplying the key score vector by the semantic similarity matrix, as shown in the following formula:
[0084]
[0085] Among them, the elements in the comprehensive similarity vector This refers to the overall similarity of the target SMS content in the Mth SMS scenario.
[0086] Using the technical means of embodiments of the present invention, a comprehensive similarity calculation method based on key score and CNKI semantics is proposed, which is beneficial to improving the accuracy of SMS scene classification of target SMS content.
[0087] As a preferred embodiment, the present invention is further implemented based on any of the above embodiments. Step 12, namely, calculating the criticality score of each phrase, includes step S121:
[0088] S121. Calculate the TextRank score for each phrase using a preset TextRank algorithm, and use it as a key score.
[0089] It should be noted that the TextRank keyword extraction method combines the internal structural information of a single text with the importance of words to both the single text and the text set as a whole. It uses average information entropy to measure the balance of a word's distribution in the text set and uses part-of-speech and positional features to calculate the importance of words to a single text.
[0090] In this embodiment of the invention, the TextRank algorithm is used to calculate the TextRank score of each phrase, which is used as the key score of the phrase to measure the importance of the phrase in the target SMS content.
[0091] In a preferred embodiment, step S121, namely calculating the TextRank score of each word group using a preset TextRank algorithm as a key score, includes:
[0092] Calculate the frequency characteristics of each of the aforementioned word groups;
[0093] Calculate the semantic features of each of the aforementioned phrases;
[0094] Using each of the aforementioned word groups as vertices, and calculating the weights of the edges between vertices based on the frequency features and the semantic features, a graph model is constructed.
[0095] Based on the graph model, the TextRank score of each word group is calculated iteratively until the preset score convergence condition is met, thus obtaining the criticality score of each word group.
[0096] This invention optimizes the TextRank algorithm for calculating the criticality score of a phrase by adopting a TextRank optimization algorithm based on multi-feature weighting. This algorithm uses the frequency features of words in the text and the semantic relationships between text sets to calculate the importance of nodes in a weighted manner. The semantic features of the phrase are determined by using Word2Vec to express the phrase as a word vector.
[0097] Preferably, calculating the frequency features of each of the word groups includes:
[0098] Count the frequency of each phrase in the target SMS content;
[0099] The frequency probability of each phrase is calculated based on the frequency of occurrence of each phrase and the total number of phrases, and is used as the frequency feature.
[0100] Specifically, in most text messages of 70 characters or less, a high frequency of a word indicates its importance within the message and its likelihood of being a keyword. The frequency probability of each word phrase is used as a frequency feature, as shown in the following formula:
[0101]
[0102] in, For phrases The frequency probability, For phrases The frequency of occurrence of in all phrases n This represents the number of all phrases.
[0103] Preferably, the calculated semantic features of each of the phrases include:
[0104] The Word2Vec word skipping model is used to calculate the normalized probability vector of each word group; wherein the normalized probability vector is composed of the frequency probabilities of the context words when the word group is the center word;
[0105] The difference between the highest frequency probability and the second highest frequency probability in the normalized probability vector is calculated and used as the semantic feature of the phrase.
[0106] Specifically, the semantic features of words with contextual relationships within text messages are also extremely important. Considering only the features of individual words in a model is insufficient; introducing semantically relevant keyword features can better express the meaning contained in the text. The word skipping model in the Word2Vec model can obtain the probability that context appears near the central word. For example, a window of 5 is used, meaning the two words before and after the central word are considered as context. The Word2Vec word skipping model is used to train semantic vectors for each word group, and word group semantics can be obtained through iteration of the Word2Vec model. The normalized probability vector:
[0107]
[0108] Take phrases The difference between the highest and second-highest probabilities of the context in the normalized probability vector is used as the representative word group. The semantic features are expressed in the formula:
[0109]
[0110] The semantic features can be expressed in the form of phrases. The relationship between the two closest contexts. The larger the difference, the more prominent the semantic connection between the head word and a certain context, and the less probability fluctuation caused by a single context.
[0111] Furthermore, a graph model is created based on all phrases, with the phrases serving as vertices in the graph model. The frequency features and semantic features calculated in the above two steps are used as phrases in the graph model. The vertex The weights of edges to vertices. Optionally, the weights of edges are the weights of the similarity between the frequency features and the semantic features of the two vertices.
[0112] Based on the graph model, the TextRank algorithm is used to iteratively calculate the TextRank score for each word group, with the following formula:
[0113]
[0114] in, For phrases The TextRank score of the vertex; For phrases that need updating The TextRank score of the vertex; Represents the phrase Vertex is the set of all vertices; d is the damping factor, which is 0.85.
[0115] Specifically, initial TextRank scores are set for all vertices. The first iteration uses the aforementioned formula to calculate the TextRank score for each vertex. If the preset score convergence condition is not met at this point, a second iteration uses the same formula. As the number of iterations increases, the edge weight differences gradually propagate to the TextRank scores until the preset score convergence condition is met, at which point the iteration stops. Optionally, the score convergence condition is that the absolute difference between the TextRank scores of all vertices and the TextRank scores of the previous iteration is less than a preset threshold, such as 0.0001.
[0116] After iteration, the final TextRank score of each vertex phrase is obtained, and the score is taken. TopN The phrases corresponding to are used as keyword phrases.
[0117] By employing the technical means of this invention, when the keywords in SMS content differ greatly in different scenarios, and considering the combined influence of semantic relationships and other features within a single text, the TextRank algorithm is optimized by calculating the frequency and semantic features of each phrase in the SMS content, and the keyness score of the phrases is performed, thereby improving the accuracy of keyword extraction.
[0118] As a preferred embodiment, the present invention further implements the above embodiments, and step S11, namely, the text segmentation of the target SMS content to obtain several word groups, includes steps S111 to S113:
[0119] S111, Obtain the target SMS content;
[0120] S112. Perform text segmentation on the target SMS content to obtain several original word groups after segmentation;
[0121] S113. Remove the stop words from the original word groups to obtain several processed word groups.
[0122] In this embodiment of the invention, the SMS content is generally received through a real SMS sending task. Before being sent to the channel, the SMS platform needs to review it to ensure that it will not disturb the target customer or receive complaints. Since most mainstream SMS platforms currently charge per message, for cost considerations, the number of characters in the SMS content generally will not exceed 70 characters, that is, it will not exceed the character limit of a single SMS message.
[0123] The received target SMS content is segmented into text. The main purpose of text segmentation is to break down the acquired SMS content into individual words.
[0124] Optionally, the jieba algorithm is used for word segmentation. There are mainly three modes in the jieba algorithm: accurate mode, full mode, and search engine mode. Among them, there are no redundant words in the accurate mode, and the accurate mode is preferably adopted in the embodiments of the present invention.
[0125] After text segmentation, a segmented word group will be obtained. However, this word group contains noise words without actual semantics such as "de" (的) and "shi" (是), that is, stop words. After removing these stop words, non-duplicated word groups can be obtained for subsequent keyword extraction and classification.
[0126] By adopting the technical means of the embodiments of the present invention and performing text segmentation and stop word removal on the target short message content, it is beneficial to accurately divide the short message content into several word groups of effective information, providing an effective data basis for subsequent keyword extraction, classification, and review.
[0127] See Figure 2 , which is a schematic structural diagram of an audit device for short message content provided by the embodiments of the present invention. The embodiments of the present invention provide an audit device 10 for short message content, including:
[0128] A short message content segmentation module 11, configured to perform text segmentation on the target short message content to obtain several word groups;
[0129] A key score calculation module 12, configured to calculate the key score of each of the word groups;
[0130] A keyword group determination module 13, configured to determine at least one keyword group according to the key score;
[0131] A comprehensive similarity calculation module 14, configured to calculate the comprehensive similarity of the target short message content in each of the short message scenarios according to the keyword group, the key score, and several preset short message scenarios;
[0132] A short message content audit module 15, configured to audit the target short message content according to the keyword group and the comprehensive similarity of the target short message content.
[0133] By employing the technical means of this invention, through keyword extraction, key score scoring, and preset SMS scenarios, a comprehensive similarity calculation is achieved between the target SMS content and various SMS scenarios. The most probable SMS scenario is automatically matched to the target SMS content, and SMS content is reviewed in conjunction with this scenario. This effectively avoids errors in SMS content review caused by focusing only on a single word or phrase while ignoring the actual application scenario, significantly improving the accuracy of SMS content review. This facilitates precise filtering of spam SMS messages while preventing the false blocking of legitimate SMS messages, effectively enhancing user experience and personal and property safety. Furthermore, automated keyword extraction and text classification reduce reliance on manual review, thereby lowering labor review costs.
[0134] In a preferred embodiment, the comprehensive similarity calculation module 14 includes:
[0135] The semantic similarity calculation unit is used to calculate the semantic similarity between each keyword group and several preset SMS scenarios to obtain a semantic similarity matrix.
[0136] The comprehensive similarity calculation unit is used to calculate the comprehensive similarity of the target SMS content in each SMS scenario based on the key score of the keyword group and the semantic similarity matrix.
[0137] In a preferred embodiment, the semantic similarity calculation unit is specifically used for:
[0138] Obtain preset SMS scenarios and the corresponding scenario phrases for each SMS scenario;
[0139] Based on each keyword group and each scenario phrase in the SMS context, a preset CNKI algorithm is used to calculate the semantic similarity between each keyword and each SMS context, resulting in a semantic similarity matrix.
[0140] In a preferred embodiment, the comprehensive similarity calculation unit is specifically used for:
[0141] Generate a key score vector based on the key scores of all the aforementioned keyword groups;
[0142] The product of the key score vector and the semantic similarity matrix is calculated to obtain the comprehensive similarity vector; wherein, the elements of the comprehensive similarity vector are the comprehensive similarity of the target SMS content in each SMS scenario.
[0143] In a preferred embodiment, the key scoring module 12 is specifically used for:
[0144] Calculate the frequency characteristics of each of the aforementioned word groups;
[0145] Calculate the semantic features of each of the aforementioned phrases;
[0146] Using each of the aforementioned word groups as vertices, and calculating the weights of the edges between vertices based on the frequency features and the semantic features, a graph model is constructed.
[0147] Based on the graph model, the TextRank score of each word group is calculated iteratively until the preset score convergence condition is met, thus obtaining the criticality score of each word group.
[0148] Preferably, calculating the frequency features of each of the word groups includes:
[0149] Count the frequency of each of the aforementioned phrases in the target SMS content;
[0150] The frequency probability of each phrase is calculated based on the frequency of occurrence of each phrase and the total number of phrases, and is used as the frequency feature.
[0151] Preferably, the calculated semantic features of each of the phrases include:
[0152] The Word2Vec word skipping model is used to calculate the normalized probability vector of each word group; wherein the normalized probability vector is composed of the frequency probabilities of the context words when the word group is the center word;
[0153] The difference between the highest frequency probability and the second highest frequency probability in the normalized probability vector is calculated and used as the semantic feature of the phrase.
[0154] In a preferred embodiment, the SMS content segmentation module 11 is specifically used for:
[0155] Obtain the content of the target SMS message;
[0156] The target SMS content is segmented into several original word groups.
[0157] Stop words are removed from the original word groups to obtain several processed word groups.
[0158] It should be noted that the SMS content review device provided in this embodiment of the invention is used to execute all the process steps of the SMS content review method in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0159] See Figure 3This is a schematic diagram of the structure of a text message content review device provided in an embodiment of the present invention. The present invention also provides a text message content review device 20, including a processor 21, a memory 22, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the text message content review method as described in any of the above embodiments.
[0160] This invention also provides a computer-readable storage medium, which includes a stored computer program, wherein the computer program, when running, controls the device where the computer-readable storage medium is located to execute the SMS content review method as described in any of the above embodiments.
[0161] This invention also provides a computer program product, which includes a computer program or computer instructions. When the computer program or computer instructions are executed by a processor, they implement the SMS content review method as described in any of the above embodiments.
[0162] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0163] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for reviewing SMS content, characterized in that, include: The target SMS content is segmented into several word groups; Calculate the criticality score for each of the given phrases; At least one keyword group is determined based on the key score; Based on the keyword group, the key score, and several preset SMS scenarios, calculate the comprehensive similarity of the target SMS content in each SMS scenario; The target SMS content is reviewed based on the keyword groups and the overall similarity of the target SMS content; The step of calculating the comprehensive similarity of the target SMS content in each of the SMS scenarios based on the keyword group, the key score, and several preset SMS scenarios includes: Calculate the semantic similarity between each keyword group and several preset SMS scenarios to obtain a semantic similarity matrix; Based on the key score of the keyword group and the semantic similarity matrix, the comprehensive similarity of the target SMS content in each SMS scenario is calculated.
2. The method for reviewing SMS content as described in claim 1, characterized in that, The step of calculating the semantic similarity between each keyword and a preset SMS scenario to obtain a semantic similarity matrix includes: Obtain preset SMS scenarios and the corresponding scenario phrases for each SMS scenario; Based on each keyword group and each scenario phrase in the SMS context, a preset CNKI algorithm is used to calculate the semantic similarity between each keyword and each SMS context, resulting in a semantic similarity matrix.
3. The method for reviewing SMS content as described in claim 1, characterized in that, The step of calculating the comprehensive similarity of the target SMS content in each SMS scenario based on the key score of the keyword group and the semantic similarity matrix includes: Generate a key score vector based on the key scores of all the aforementioned keyword groups; The product of the key score vector and the semantic similarity matrix is calculated to obtain the comprehensive similarity vector; wherein, the elements of the comprehensive similarity vector are the comprehensive similarity of the target SMS content in each SMS scenario.
4. The method for reviewing SMS content as described in claim 1, characterized in that, The calculation of the critical score for each phrase includes: The TextRank score for each phrase is calculated using a pre-defined TextRank algorithm and used as a criticality score.
5. The method for reviewing SMS content as described in claim 4, characterized in that, The process of calculating the TextRank score for each phrase using a preset TextRank algorithm as a key score includes: Calculate the frequency characteristics of each of the aforementioned word groups; Calculate the semantic features of each of the aforementioned phrases; Using each of the aforementioned word groups as vertices, and calculating the weights of the edges between vertices based on the frequency features and the semantic features, a graph model is constructed. Based on the graph model, the TextRank score of each word group is calculated iteratively until the preset score convergence condition is met, thus obtaining the criticality score of each word group.
6. The method for reviewing SMS content as described in claim 5, characterized in that, The calculation of the frequency features of each of the aforementioned word groups includes: Count the frequency of occurrence of each of the aforementioned phrases in the target SMS content; The frequency probability of each phrase is calculated based on the frequency of occurrence of each phrase and the total number of phrases, and is used as the frequency feature.
7. The method for reviewing SMS content as described in claim 5, characterized in that, The calculated semantic features of each of the aforementioned phrases include: The Word2Vec word skipping model is used to calculate the normalized probability vector of each word group; wherein the normalized probability vector is composed of the frequency probabilities of the context words when the word group is the center word; The difference between the highest frequency probability and the second highest frequency probability in the normalized probability vector is calculated and used as the semantic feature of the phrase.
8. The method for reviewing SMS content as described in claim 1, characterized in that, The text segmentation of the target SMS content yields several phrases, including: Obtain the content of the target SMS message; The target SMS content is segmented into several original word groups. Stop words are removed from the original word groups to obtain several processed word groups.
9. A device for reviewing SMS content, characterized in that, include: The SMS content segmentation module is used to segment the target SMS content into several word groups; A key scoring module is used to calculate the key score for each of the aforementioned word groups; A keyword group determination module is used to determine at least one keyword group based on the key score; The comprehensive similarity calculation module is used to calculate the comprehensive similarity of the target SMS content in each of the SMS scenarios based on the keyword group, the key score, and several preset SMS scenarios. The SMS content review module is used to review the target SMS content based on the keyword groups and the overall similarity of the target SMS content; The comprehensive similarity calculation module includes: The semantic similarity calculation unit is used to calculate the semantic similarity between each keyword group and several preset SMS scenarios to obtain a semantic similarity matrix. The comprehensive similarity calculation unit is used to calculate the comprehensive similarity of the target SMS content in each SMS scenario based on the key score of the keyword group and the semantic similarity matrix.
10. A device for reviewing SMS content, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the method for reviewing SMS content as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the SMS content review method as described in any one of claims 1 to 8.
12. A computer program product, characterized in that, The computer program product includes a computer program or computer instructions, which, when executed by a processor, implement the SMS content review method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Information filtering policy generation method and apparatus
CN106649338A
Text recognition method, computer readable storage medium and computer equipment
CN110765757A