Short message identification method and device, terminal and computer readable storage medium
By obtaining and processing specific information in the SMS and sending it to the server for matching, the problem of reading user SMS content due to identifying spam is identified, and efficient and accurate SMS recognition and protecting user privacy have been protected.
Patent Information
- Application Number
- CN202310935308.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-27
- Publication Date
- 2025-01-28
AI Technical Summary
In order to identify spam messages, it is usually necessary to read the user's SMS content, making it difficult to ensure the privacy of the user.
At least one in the reserved drainage information, SMS fingerprint information, and text message feature vectors in the SMS, and send it to the server for matching. Accuracy.
Effectively protect the privacy of users, improve the efficiency and accuracy of SMS recognition, and solve the privacy problem caused by reading SMS content.
Smart Images

Figure CN119383616A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a text message identification method, device, terminal and computer-readable storage medium. Background Art
[0002] With the rapid development of information technology, communication networks have been widely popularized. At present, using text messages to communicate has become a more formal way of communication in daily life. In order to identify spam text messages, it is usually necessary to read the content of user text messages, making it difficult to ensure the privacy of users. Summary of the invention
[0003] The embodiments of the present application provide a text message identification method, device, terminal and computer-readable storage medium, which can solve the technical problem that in order to identify spam text messages, it is usually necessary to read the content of user text messages, making it difficult to ensure the privacy of users.
[0004] In a first aspect, an embodiment of the present application provides a method for identifying a text message, the method comprising:
[0005] Get the SMS received by the terminal;
[0006] Obtain at least one of reserved traffic diversion information, SMS fingerprint information, and SMS feature vector of the SMS;
[0007] Sending at least one of the reserved traffic diversion information, the SMS fingerprint information and the SMS feature vector of the SMS to the server;
[0008] Receive the matching result for the reserved diversion information or the SMS fingerprint information sent by the server and determine the first SMS recognition result of the SMS based on the matching result, and / or receive the approximate SMS sample information corresponding to the SMS feature vector sent by the server and compare the SMS with the approximate SMS sample information to determine the second SMS recognition result of the SMS.
[0009] Optionally, the acquiring at least one of the reserved traffic diversion information, the SMS fingerprint information, and the SMS feature vector of the SMS includes:
[0010] Extract the reserved traffic diversion information in the text message; or extract the text message fingerprint information in the text message.
[0011] Optionally, extracting the reserved traffic diversion information in the text message includes:
[0012] The variant character text in the text message is restored to normal text, and the reserved drainage information is extracted from the normal text; or, the reserved drainage information in the text message is extracted by a preset extraction model.
[0013] Optionally, extracting the reserved traffic diversion information in the text message by using a preset extraction model includes:
[0014] Inputting the short message into a preset extraction model;
[0015] Controlling the preset extraction model to extract a first target character feature of a text message character in the text message, determining at least one drainage category index value for the text message character based on the first target character feature, determining the drainage category of the text message character based on the drainage category index value, and determining reserved drainage information from the text message based on the drainage category of the text message character;
[0016] Control the preset extraction model to output reserved drainage information.
[0017] Optionally, the determining at least one traffic diversion category index value for the SMS character based on the first target character feature includes:
[0018] Determine a character sequence corresponding to the short message, and extract a first character context feature of the first target character feature based on the character sequence;
[0019] The first character context feature is processed to obtain at least one traffic diversion category index value corresponding to the SMS character.
[0020] Optionally, extracting SMS fingerprint information from the SMS includes:
[0021] identifying text variables in the text message;
[0022] The text variable is replaced according to a preset strategy to obtain a reference SMS;
[0023] Determine the SMS fingerprint information of the SMS according to the reference SMS.
[0024] Optionally, the replacing the text variable according to a preset strategy to obtain a reference SMS message includes:
[0025] Input the short message into the desensitized information fingerprint extraction model, and output the text variables in the short message;
[0026] The text variables in the SMS are replaced based on the desensitized variables to obtain a reference SMS.
[0027] Optionally, inputting the text message into a desensitized information fingerprint extraction model and outputting text variables in the text message includes:
[0028] Input the short message into a desensitized information fingerprint extraction model;
[0029] Controlling the desensitized information fingerprint extraction model to extract a second target character feature of a text message character in the text message, determining at least one text variable category index value for the text message character based on the second target character feature, determining a text variable category of the text message character based on the text variable category index value, and determining a text variable from the text message based on the text variable category of the text message character;
[0030] Control the desensitized information fingerprint extraction model to output text variables.
[0031] Optionally, determining at least one text variable category index value for the text message character based on the second target character feature includes:
[0032] Determine a character sequence corresponding to the short message, and extract a second character context feature of the second target character feature based on the character sequence;
[0033] The second character context feature is processed to obtain at least one text variable category index value corresponding to the SMS character.
[0034] Optionally, determining the SMS fingerprint information of the SMS according to the reference SMS includes:
[0035] Calculate the hash value of the reference SMS and use the hash value as SMS fingerprint information.
[0036] Optionally, sending at least one of the reserved traffic diversion information, the SMS fingerprint information, and the SMS feature vector of the SMS to the server includes:
[0037] The reserved diversion information or the SMS fingerprint information is sent to a server, so that the server determines a matching result for the reserved diversion information or the SMS fingerprint information based on the reserved diversion information or the SMS fingerprint information.
[0038] Optionally, sending the reserved traffic diversion information or the SMS fingerprint information to a server so that the server determines a matching result for the reserved traffic diversion information or the SMS fingerprint information based on the reserved traffic diversion information or the SMS fingerprint information, includes:
[0039] The reserved diversion information and the SMS fingerprint information are sent to the server, so that the server matches the reserved diversion information with malicious SMS based on the reserved diversion information library to determine a first matching result of the SMS, and so that the server matches the SMS fingerprint information with malicious SMS based on the SMS fingerprint information library to determine a second matching result of the SMS.
[0040] Optionally, determining the SMS recognition result based on the matching result includes:
[0041] Determine whether the first matching result and the second matching result are both matching failures. If the first matching result and the second matching result are both matching failures, determine that the SMS category of the SMS is a malicious category; otherwise, the SMS category of the SMS is a common category.
[0042] Optionally, sending at least one of the reserved traffic diversion information, the SMS fingerprint information, and the SMS feature vector of the SMS to the server includes:
[0043] Sending the reserved traffic diversion information, SMS fingerprint information and SMS feature vector of the SMS to the server;
[0044] The receiving a matching result for the reserved traffic diversion information or the SMS fingerprint information sent by the server and determining a first SMS recognition result of the SMS based on the matching result, and / or receiving approximate SMS sample information corresponding to the SMS feature vector sent by the server and comparing the SMS with the approximate SMS sample information to determine a second SMS recognition result of the SMS, including:
[0045] Receiving a matching result for the reserved traffic diversion information or the SMS fingerprint information sent by the server, and if the matching result is a matching failure, receiving approximate SMS sample information corresponding to the SMS feature vector sent by the server;
[0046] The text message is compared with the similar text message sample information to determine a second text message recognition result, and the second text message recognition result is used as a target text message recognition result of the text message.
[0047] Optionally, comparing the text message with the similar text message sample information to determine the second text message recognition result includes:
[0048] Calculating a similarity result between the approximate SMS sample information and the SMS, and determining a target sample SMS from the approximate SMS sample information based on the similarity result;
[0049] A target SMS category corresponding to the target sample SMS is determined, and the target SMS category is used as a second SMS recognition result of the SMS.
[0050] In a second aspect, an embodiment of the present application further provides a method for identifying a text message, the method comprising:
[0051] At least one of reserved traffic diversion information, SMS fingerprint information, and SMS feature vector of the SMS sent by the receiving terminal;
[0052] Determine a matching result for the reserved diversion information or the SMS fingerprint information and send the matching result to the terminal, so that the terminal determines a first SMS recognition result based on the matching result; and / or determine approximate SMS sample information corresponding to the SMS feature vector and send the approximate SMS sample information to the terminal, so that the terminal compares the SMS with the approximate SMS sample information to determine a second SMS recognition result.
[0053] Optionally, the determining a matching result for the reserved traffic diversion information or the SMS fingerprint information includes:
[0054] Based on the reserved diversion information library, the reserved diversion information is matched with malicious SMS to determine a first matching result of the SMS;
[0055] The SMS fingerprint information is matched with malicious SMS based on the SMS fingerprint information library to determine a second matching result of the SMS.
[0056] Optionally, sending the matching result to the terminal so that the terminal determines the first SMS recognition result based on the matching result includes:
[0057] The first matching result and the second matching result are sent to the terminal, so that the terminal determines that the first SMS identification result is a malicious category when the first matching result or the second matching result is a matching failure, and so that the terminal determines that the first SMS identification result is a common category when the first matching result and the second matching result are both matching successes.
[0058] Optionally, at least one of reserved traffic diversion information, SMS fingerprint information, and SMS feature vector of the SMS sent by the receiving terminal includes:
[0059] Receiving reserved traffic diversion information, SMS fingerprint information and SMS feature vector of SMS sent by the terminal;
[0060] The determining of a matching result for the reserved traffic diversion information or the SMS fingerprint information and sending the matching result to the terminal, so that the terminal determines a first SMS recognition result based on the matching result; and / or determining approximate SMS sample information corresponding to the SMS feature vector and sending the approximate SMS sample information to the terminal, so that the terminal compares the SMS with the approximate SMS sample information to determine a second SMS recognition result, including:
[0061] Determine a matching result for the reserved traffic diversion information or the SMS fingerprint information, and if the matching result is a matching failure, determine approximate SMS sample information corresponding to the SMS feature vector;
[0062] The approximate SMS sample information is sent to the terminal, so that the terminal compares the SMS with the approximate SMS sample information, determines a second SMS recognition result, and uses the second SMS recognition result as a target SMS recognition result of the SMS.
[0063] Optionally, the determining the approximate SMS sample information corresponding to the SMS feature vector includes:
[0064] Obtaining an associated database of sample SMS vectors and SMS indexes, determining a target sample SMS vector that matches the SMS feature vector from the sample SMS vectors, and obtaining a target SMS index corresponding to the target sample SMS vector based on the associated database;
[0065] Determine approximate SMS sample information for the SMS based on the target SMS index.
[0066] In a third aspect, an embodiment of the present application further provides a text message identification device, the device comprising:
[0067] A first acquisition module, adapted to acquire short messages received by a terminal;
[0068] A second acquisition module, adapted to acquire at least one of the reserved traffic diversion information, the SMS fingerprint information and the SMS feature vector of the SMS;
[0069] A sending module, adapted to send at least one of the reserved traffic diversion information, the SMS fingerprint information and the SMS feature vector of the SMS to a server;
[0070] A receiving module is suitable for receiving the matching result for the reserved diversion information or the SMS fingerprint information sent by the server and determining the first SMS recognition result of the SMS based on the matching result, and / or receiving the approximate SMS sample information corresponding to the SMS feature vector sent by the server and comparing the SMS with the approximate SMS sample information to determine the second SMS recognition result of the SMS.
[0071] In a fourth aspect, an embodiment of the present application further provides a server, the server comprising:
[0072] A server receiving module, adapted to receive at least one of reserved traffic diversion information, SMS fingerprint information and SMS feature vector of SMS sent by a terminal;
[0073] The SMS determination module is suitable for determining the matching result for the reserved diversion information or the SMS fingerprint information and sending the matching result to the terminal, so that the terminal determines the first SMS recognition result based on the matching result; and / or, determining the approximate SMS sample information corresponding to the SMS feature vector and sending the approximate SMS sample information to the terminal, so that the terminal compares the SMS with the approximate SMS sample information to determine the second SMS recognition result.
[0074] In a fifth aspect, an embodiment of the present application further provides a terminal, the terminal comprising:
[0075] Processor; and
[0076] A memory arranged to store computer executable instructions which, when executed, cause the processor to perform a method according to any one of the above.
[0077] In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores one or more programs, and when the one or more programs are executed by a processor, implement any of the methods described above.
[0078] The embodiment of the present application provides a method for identifying short messages, firstly obtaining the short message received by the terminal, then obtaining at least one of the reserved drainage information, short message fingerprint information and short message feature vector in the short message, after obtaining at least one of the reserved drainage information, short message fingerprint information and short message feature vector, the terminal sends at least one of the reserved drainage information, short message fingerprint information and short message feature vector corresponding to the short message to the server, because the reserved drainage information, short message fingerprint information and short message feature vector are extracted from the short message, which is different from the original text of the short message, thus effectively protecting the privacy of the user. After receiving the matching result of the reserved drainage information or the short message fingerprint information, the server can determine the matching result corresponding to the short message, so that the terminal and the server are combined to construct a short message identification system, thereby improving the recognition efficiency and recognition accuracy of the short message, and finally the server sends the matching result to the terminal, and the terminal determines the short message identification result based on the matching result.
[0079] After receiving the SMS feature vector, the server can determine the approximate SMS sample information corresponding to the SMS feature vector, thereby realizing preliminary screening of the approximate SMS sample information based on the SMS feature vector. Afterwards, the approximate SMS sample information is sent to the terminal, and the SMS is compared with the approximate SMS sample information, thereby realizing accurate screening of the approximate SMS sample information based on the SMS content. In addition, since the comparison is performed on the terminal side, the user's privacy is guaranteed. Finally, the SMS recognition result is determined based on the comparison result.
[0080] The embodiment of the present application provides a text message identification method, which effectively solves the technical problem that in order to identify junk text messages, it is usually necessary to read the content of the user's text messages, making it difficult to ensure the privacy of the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0082] Figure 1 An exemplary system architecture diagram of a method for identifying short messages provided in an embodiment of the present application;
[0083] Figure 2 A flowchart of a method for identifying short messages applied to a terminal provided in an embodiment of the present application;
[0084] Figure 3 A schematic diagram of a process for determining reserved diversion information provided in an embodiment of the present application;
[0085] Figure 4 A schematic diagram of the structure of a BiLSTM-CRF network model provided in an embodiment of the present application;
[0086] Figure 5 A schematic diagram of a flow chart for determining a drainage category index value provided in an embodiment of the present application;
[0087] Figure 6 A schematic diagram of a process for determining SMS fingerprint information of a SMS based on a reference SMS provided in an embodiment of the present application; Figure 7 A schematic diagram of a process for obtaining a reference SMS provided in an embodiment of the present application;
[0088] Figure 8 A schematic diagram of a process for determining text variables in a text message provided in an embodiment of the present application;
[0089] Fig. 9 A schematic diagram of a process for determining a text variable category index value provided in an embodiment of the present application;
[0090] Fig.10 A flowchart of another method for identifying short messages provided in an embodiment of the present application;
[0091] Fig.11 A schematic diagram of a process for determining a target SMS recognition result provided in an embodiment of the present application;
[0092] Fig.12 A flowchart of a method for identifying short messages applied to a server provided in an embodiment of the present application;
[0093] Fig.13 A schematic diagram of a process for determining a target SMS recognition result provided in an embodiment of the present application;
[0094] Fig.14 A schematic diagram of a process for determining approximate SMS sample information for SMS provided in an embodiment of the present application;
[0095] Fig.15 A schematic diagram of a process flow of similarity comparison of short messages provided in an embodiment of the present application;
[0096] Fig.16 A schematic diagram of the structure of a text message recognition device provided in an embodiment of the present application;
[0097] Fig.17 A schematic diagram of the structure of a server provided in an embodiment of the present application;
[0098] Fig.18 A schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0099] Fig.19 A schematic diagram of the internal structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0100] In order to make the features and advantages of the embodiments of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the embodiments of the present application.
[0101] In recent years, with the rapid development of information technology, communication networks have been widely popularized. Communicating via text messages has become a more formal way of communication in daily life. However, in order to attract traffic, some black and gray industries will send a large number of spam text messages to users' terminals to achieve the purpose of attracting traffic and propaganda.
[0102] At present, there are two methods for intercepting spam text messages. The first method is to deploy it directly in the operator's text message sending network, and use the sending number and text message content to build an identification system. This method is difficult to deploy on the user terminal because the identification system occupies a large space and requires a large amount of computing power.
[0103] The second method builds an identification system by utilizing the collaborative processing of user terminals and cloud servers. Due to the constraints of user terminals on storage, memory, and computing fields, it is difficult to deploy larger deep learning models. Directly uploading the original text messages received by users to the cloud server for detection will undermine the protection of user privacy and may cause user privacy leakage.
[0104] In order to solve the above technical problems, the embodiment of the present application provides a method for identifying short messages, firstly obtaining the short message received by the terminal, and then obtaining at least one of the reserved drainage information, short message fingerprint information and short message feature vector in the short message. After obtaining at least one of the reserved drainage information, short message fingerprint information and short message feature vector, the terminal sends at least one of the reserved drainage information, short message fingerprint information and short message feature vector corresponding to the short message to the server. Since the reserved drainage information, short message fingerprint information and short message feature vector are extracted from the short message and are different from the original text of the short message, the user's privacy can be effectively protected. After receiving the matching result of the reserved drainage information or the short message fingerprint information, the server can determine the matching result corresponding to the short message, so that the terminal and the server are combined to construct a short message identification system, thereby improving the recognition efficiency and recognition accuracy of the short message. Finally, the server sends the matching result to the terminal, and the terminal determines the short message identification result based on the matching result.
[0105] After receiving the SMS feature vector, the server can determine the approximate SMS sample information corresponding to the SMS feature vector, thereby realizing preliminary screening of the approximate SMS sample information based on the SMS feature vector. Afterwards, the approximate SMS sample information is sent to the terminal, and the SMS is compared with the approximate SMS sample information, thereby realizing accurate screening of the approximate SMS sample information based on the SMS content. In addition, since the comparison is performed on the terminal side, the user's privacy is guaranteed. Finally, the SMS recognition result is determined based on the comparison result.
[0106] The embodiment of the present application provides a text message identification method, which effectively solves the technical problem that in order to identify junk text messages, it is usually necessary to read the content of the user's text messages, making it difficult to ensure the privacy of the user.
[0107] See also Figure 1 , Figure 1 An exemplary system architecture diagram of a text message identification method provided in an embodiment of the present application.
[0108] like Figure 1As shown, the system architecture may include a terminal 101, a network 102, and a server 103. The network 102 is used to provide a medium for a communication link between the terminal 101 and the server 103. The network 102 may include various types of wired communication links or wireless communication links, for example, the wired communication link includes an optical fiber, a twisted pair, or a coaxial cable, and the wireless communication link includes a Bluetooth communication link, a Wireless-Fidelity (Wi-Fi) communication link, or a microwave communication link.
[0109] The terminal 101 can interact with the server 103 through the network 102 to receive messages from the server 103 or send messages to the server 103, or the terminal 101 can interact with the server 103 through the network 102 to receive messages or data sent by other users to the server 103. The terminal 101 can be hardware or software. When the terminal 101 is hardware, it can be various terminals, including but not limited to smart watches, smart phones, tablet computers, laptop portable computers and desktop computers. When the terminal 101 is software, it can be installed in the terminals listed above, which can be implemented as multiple software or software modules (for example: used to provide distributed services), or it can be implemented as a single software or software module, which is not specifically limited here.
[0110] In an embodiment of the present application, terminal 101 can obtain a text message received by the terminal; obtain at least one of the reserved diversion information, text message fingerprint information and text message feature vector of the text message; send at least one of the reserved diversion information, text message fingerprint information and text message feature vector of the text message to a server; receive the matching result for the reserved diversion information or the text message fingerprint information sent by the server and determine the first text message recognition result of the text message based on the matching result, and / or receive the approximate text message sample information corresponding to the text message feature vector sent by the server and compare the text message with the approximate text message sample information to determine the second text message recognition result of the text message.
[0111] The server 103 may be a business server that provides various services. It should be noted that the server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster consisting of multiple servers, or it may be implemented as a single server. When the server 103 is software, it may be implemented as multiple software or software modules (for example, for providing distributed services), or it may be implemented as a single software or software module, which is not specifically limited here.
[0112] In the embodiment of the present application, the server 103 may receive at least one of the reserved traffic diversion information, the SMS fingerprint information, and the SMS feature vector of the SMS sent by the terminal;
[0113] Determine the matching result for the reserved drainage information or SMS fingerprint information and send the matching result to the terminal, so that the terminal determines the first SMS recognition result based on the matching result; and / or determine the approximate SMS sample information corresponding to the SMS feature vector and send the approximate SMS sample information to the terminal, so that the terminal compares the SMS with the approximate SMS sample information to determine the second SMS recognition result.
[0114] Alternatively, the system architecture may not include the server 103. In other words, the server 103 may be an optional device in the embodiments of this specification. That is, the method provided in the embodiments of this specification may be applied to a system structure that only includes the terminal 101, and the embodiments of this application do not limit this.
[0115] It should be understood that Figure 1 The number of terminals, networks and servers in the figure is only for illustration and any number of terminals, networks and servers may be used according to implementation requirements.
[0116] See also Figure 2 , Figure 2 A flowchart of a method for identifying short messages applied to a terminal provided in an embodiment of the present application. The execution subject of the embodiment of the present application can be a terminal that executes the method for identifying short messages, or a processor in the terminal that executes the method for identifying short messages, or a short message identification service in the terminal that executes the method for identifying short messages. For the convenience of description, the specific execution process of the method for identifying short messages is introduced below by taking the execution subject being a processor in a terminal as an example.
[0117] S202: Obtain the short message received by the terminal.
[0118] After the terminal receives the text message, the processor obtains the text message received by the terminal. Here, the source of the text message includes but is not limited to communication devices and web pages. For example, the communication device can send text messages based on a physical SIM (Subscriber Identity Module) card or a virtual SIM card. The SIM card is a module on the mobile phone used to store user identity information. The SIM card plays an identity authentication role on the mobile phone, ensuring that the mobile phone can only communicate with a legitimate SIM card. A virtual SIM card, also known as a "software SIM", is a mobile communication service implemented at the software level, rather than a physical SIM card. A virtual SIM card is a technology that integrates SIM card functions into mobile devices, allowing users to use mobile communication services without inserting a physical SIM card. For example, when sending text messages based on a web page, text messages can be sent based on a text message platform in cooperation with an operator.
[0119] In a feasible implementation, when the terminal receives a text message, the text message identification result corresponding to the text message is not determined. Therefore, the terminal side may not display the text message until the text message identification result corresponding to the text message is determined to be a common category, otherwise it is intercepted.
[0120] S204: Obtain at least one of reserved traffic diversion information, SMS fingerprint information, and SMS feature vector of the SMS.
[0121] In S204, any one of the reserved diversion information, SMS fingerprint information and SMS feature vector of the SMS can be obtained; of course, any two of the reserved diversion information, SMS fingerprint information and SMS feature vector of the SMS can also be obtained; the reserved diversion information, SMS fingerprint information and SMS feature vector of the SMS can also be obtained.
[0122] Among them, the reserved drainage information is used to provide a drainage channel. For example, the reserved drainage information may include but is not limited to contact information and URL (Uniform Resource Locator) reserved in text messages, etc. The contact information may include mobile phone numbers, landline numbers, and social accounts, etc. The URL is the address of a standard resource on the Internet.
[0123] Optionally, the reserved traffic diversion information in the SMS can be extracted based on a trained preset extraction model. The received SMS is input into the preset extraction model, and the reserved traffic diversion information is identified and extracted based on the preset extraction model.
[0124] Optionally, the variant word text in the SMS can be restored to normal text, and the reserved drainage information can be extracted from the normal text.
[0125] Optionally, the reserved traffic diversion information can be identified from the text of the SMS based on a pre-set identifier. The pre-set identifier may include "telephone number", "contact information" and various social account names, etc. When the pre-set identifier is identified in the SMS, the reserved traffic diversion information corresponding to the identifier can be extracted from the SMS.
[0126] In S204, the SMS fingerprint information can be obtained by desensitizing the SMS. Desensitization refers to hiding sensitive information to protect the security of the information. For example, when processing SMS, in order to protect the privacy of the user, the sensitive information can be desensitized. There are many methods of desensitization, including but not limited to randomization, encryption, replacement, etc., all of which are aimed at protecting the security of sensitive information.
[0127] Optionally, a desensitized information fingerprint extraction model can be used to identify sensitive information in the SMS and replace it to achieve the purpose of desensitization, and then the hash value of the desensitized SMS is calculated to obtain the SMS fingerprint information. Among them, sensitive information may include names of people, business names, place names, product names, various letters and numeric variables, etc.
[0128] Optionally, sensitive information in the text message can be identified based on a sensitive information database, the identified sensitive information can be replaced, and then the hash value of the desensitized text message can be calculated to obtain the text message fingerprint information.
[0129] In S204, the SMS feature vector is obtained by vectorizing the SMS. For example, the SMS can be input into a deep learning model to obtain a vectorized representation of the SMS, i.e., the SMS feature vector. Of course, before the SMS is vectorized, the SMS can be desensitized to further protect the user's privacy.
[0130] S206: Send at least one of the reserved traffic diversion information, the SMS fingerprint information, and the SMS feature vector to the server.
[0131] After the terminal obtains the reserved diversion information, SMS fingerprint information and SMS feature vector of the SMS, it can send any one of the reserved diversion information, SMS fingerprint information and SMS feature vector to the server, or send any two of the reserved diversion information, SMS fingerprint information and SMS feature vector to the server, or send the reserved diversion information, SMS fingerprint information and SMS feature vector of the SMS to the server.
[0132] When the terminal obtains any two of the reserved drainage information, SMS fingerprint information and SMS feature vector of the SMS, the two features obtained by the terminal can be sent to the server, or any one of the two features obtained by the terminal can be sent to the server.
[0133] When the terminal obtains any one of the reserved drainage information, the SMS fingerprint information and the SMS feature vector of the SMS, the feature obtained by the terminal can be sent to the server.
[0134] Since the reserved drainage information and SMS fingerprint information are significantly different from the original text of the SMS, and the SMS fingerprint information is a desensitized SMS. Therefore, sending the reserved drainage information or SMS fingerprint information to the server can effectively protect the user's privacy. In addition, the SMS feature vector is also significantly different from the original text of the SMS. Therefore, sending the SMS feature vector to the server can also effectively protect the user's privacy.
[0135] After receiving the reserved drainage information or SMS fingerprint information, the server can determine the matching result for the reserved drainage information or SMS fingerprint information. Since the calculation is performed on the server side, the computing pressure of the terminal is reduced. In addition, since a large database and a large machine learning model can be deployed on the server side, the server can accurately and quickly determine the matching result for the SMS based on the reserved drainage information or SMS fingerprint information.
[0136] In addition, after receiving the SMS feature vector, the server can determine the approximate SMS sample information corresponding to the SMS feature vector. Specifically, the SMS feature vector and the vectorized representation corresponding to the sample SMS can be compared, and the approximate SMS sample information corresponding to the SMS feature vector can be determined based on the similarity of the comparison. It is easy to understand that the higher the similarity between the SMS and the sample SMS, the closer the SMS recognition result of the sample SMS is to the SMS recognition result of the SMS. The SMS recognition result of the sample SMS can be manually annotated in advance.
[0137] S208: Receive the matching result for the reserved diversion information or the SMS fingerprint information sent by the server and determine the first SMS recognition result of the SMS based on the matching result, and / or, receive the approximate SMS sample information corresponding to the SMS feature vector sent by the server and compare the SMS with the approximate SMS sample information to determine the second SMS recognition result of the SMS.
[0138] When the terminal obtains reserved diversion information or SMS fingerprint information, the terminal can send the reserved diversion information or SMS fingerprint information to the server, and correspondingly, can receive the matching result for the reserved diversion information or SMS fingerprint information sent by the server.
[0139] When the terminal obtains a text message feature vector, the terminal may send the text message feature vector to the server, and correspondingly, receive approximate text message sample information corresponding to the text message feature vector sent by the server.
[0140] When the terminal obtains at least one of the reserved diversion information and the SMS fingerprint information, as well as the SMS feature vector, it can be determined based on the matching result for the reserved diversion information or the SMS fingerprint information whether to receive the approximate SMS sample information corresponding to the SMS feature vector sent by the server. Similarly, it can be determined based on the matching result for the reserved diversion information or the SMS fingerprint information whether the server sends the approximate SMS sample information corresponding to the SMS feature vector to the terminal.
[0141] When the matching result for the reserved diversion information or SMS fingerprint information is a match failure, it indicates that the database established based on the malicious SMS cannot match the reserved diversion information or SMS fingerprint information. At this time, in order to more accurately determine the SMS recognition result of the SMS, the approximate SMS sample information corresponding to the SMS feature vector sent by the server can be received, and the SMS and the approximate SMS sample information can be compared to more accurately determine the SMS recognition result of the SMS.
[0142] When the terminal obtains the reserved drainage information or SMS fingerprint information, at this time, the first SMS identification result can be determined based on the matching result. When the matching result for the reserved drainage information or SMS fingerprint information is a match failure, it indicates that the database established based on the malicious SMS cannot match the reserved drainage information or SMS fingerprint information. At this time, the first SMS identification result corresponding to the SMS is a common category, and it is not necessary to intercept and display the SMS normally. When the matching result for the reserved drainage information or SMS fingerprint information is a match success, it indicates that the database established based on the malicious SMS can match the reserved drainage information or SMS fingerprint information. At this time, the first SMS identification result corresponding to the SMS is a malicious category, and the SMS can be intercepted and the SMS is not displayed.
[0143] When the terminal obtains a text message feature vector, the similarity between the text message and the approximate text message sample information can be compared, and the text message corresponding to the approximate text message sample information that meets the similarity requirement can be determined based on the compared similarity. It is easy to understand that the higher the similarity between the text message and the approximate text message sample information, the closer the text message recognition result of the approximate text message sample information is to the second text message recognition result of the text message. The approximate text message sample information comes from the sample text message, and the text message recognition result of the sample text message can be manually annotated in advance.
[0144] When the terminal obtains at least one of the reserved diversion information and SMS fingerprint information, and the SMS feature vector, when the matching result for the reserved diversion information or the SMS fingerprint information is a matching failure, the SMS can be compared with the approximate SMS sample information to determine the second SMS recognition result.
[0145] The embodiment of the present application provides a text message identification method, first obtaining the text message received by the terminal, and then obtaining at least one of the reserved drainage information, text message fingerprint information and text message feature vector in the text message. After obtaining at least one of the reserved drainage information, text message fingerprint information and text message feature vector, the terminal sends at least one of the reserved drainage information, text message fingerprint information and text message feature vector corresponding to the text message to the server. Since the reserved drainage information, text message fingerprint information and text message feature vector are extracted from the text message and are different from the original text of the text message, the user's privacy can be effectively protected. After receiving the matching result of the reserved drainage information or the text message fingerprint information, the server can determine the matching result corresponding to the text message, so that the terminal and the server are combined to construct a text message identification system, thereby improving the recognition efficiency and recognition accuracy of the text message. Finally, the server sends the matching result to the terminal, and the terminal determines the text message recognition result based on the matching result.
[0146] When the matching result determined by the server is a match failure, the server can determine the approximate SMS sample information corresponding to the SMS feature vector after receiving the SMS feature vector, thereby realizing preliminary screening of the approximate SMS sample information based on the SMS feature vector, and then sending the approximate SMS sample information to the terminal, comparing the SMS with the approximate SMS sample information, thereby realizing accurate screening of the approximate SMS sample information based on the SMS content, and because the comparison is performed on the terminal side, the user's privacy is guaranteed, and finally the SMS recognition result is determined based on the comparison result. The embodiment of the present application effectively solves the technical problem that in order to realize the identification of spam SMS, it is usually necessary to read the user's SMS content, making it difficult to guarantee the user's privacy.
[0147] In an embodiment provided in the present application, obtaining at least one of reserved traffic diversion information, SMS fingerprint information, and SMS feature vector of a SMS includes:
[0148] Extract the reserved drainage information in the SMS; or extract the SMS fingerprint information in the SMS.
[0149] Optionally, extract the reserved traffic diversion information in the SMS, including:
[0150] The variant word text in the SMS is restored to normal text, and the reserved drainage information is extracted from the normal text; or, the reserved drainage information in the SMS is extracted through a preset extraction model.
[0151] The variant word text in the text message is identified, and the variant word text in the text message is restored to normal text in combination with the context semantics. Thereafter, the reserved drainage information is extracted from the text message restored to normal text; alternatively, the text message is input into a preset extraction model, and the reserved drainage information in the text message is extracted based on the preset extraction model.
[0152] In some feasible embodiments, the reserved drainage information can be extracted from the normal text by restoring the variant text in the short message to the normal text. In some feasible embodiments, the reserved drainage information in the short message can be extracted by a preset extraction model.
[0153] In still other feasible embodiments, a part of the content in the short message can have the variant text restored to the normal text, and the reserved drainage information can be extracted from the normal text, while the remaining part can have the reserved drainage information in the short message extracted by a preset extraction model.
[0154] Here, the preset extraction model is obtained through big data training and can be a deep learning network model. Specifically, the preset extraction model can be a BiLSTM-CRF network model. The BiLSTM-CRF network model is a sequence-to-sequence model, including a bidirectional long short-term memory network (BiLSTM) and a conditional random field (CRF).
[0155] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of a process for determining reserved drainage information provided by an embodiment of this application. Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of a BiLSTM-CRF network model provided by an embodiment of this application.
[0156] As Figure 3 shown, in an embodiment provided by this application, extracting the reserved drainage information in the short message by a preset extraction model may include:
[0157] S302: Input the short message into the preset extraction model.
[0158] After obtaining the short message, input the short message text into the preset extraction model. When the preset extraction model is a BiLSTM-CRF network model, its structure can be referred to Figure 4 . For example, "Jiaweixin... 8" can be input into the preset extraction model.
[0159] S304: Control the preset extraction model to extract the first target character features of the short message characters, determine at least one drainage category index value for the short message characters based on the first target character features, determine the drainage category of the short message characters based on the drainage category index value, and determine the reserved drainage information from the short message based on the drainage category of the short message characters.
[0160] Among them, the first target character feature of the short message character can be spliced based on at least one of the single-character feature, the pinyin feature, and the glyph feature. The single-character feature can be determined based on Figure 4 the Char embedding in Figure 4 the Pinyin embedding in Figure 4 the Font embedding in
[0161] Char embedding is a representation method used to map a character into a vector space. Each vector in this vector space represents the feature of a character and can be used to represent and analyze characters. Char embedding can be applied to the field of natural language processing, such as tasks like machine translation, text classification, and sentiment analysis. In the field of natural language processing, Char embedding can map the characters in the text into a high-dimensional vector space, enabling the distance between different characters to be represented by vectors. This method can convert the characters in the text into digital form. Here, Char embedding can be used for the recognition of similar-shaped characters, such as homographic characters, homographic symbols, as well as traditional and simplified Chinese characters, like "微" and "徽", "②" and "2", and "专业" and "專業". The glyph feature can be represented using the four-corner code, which is a more refined coding method than the radical coding feature. For the samples of variant short messages, sentence-level sample enhancement can be adopted to generate more samples by changing the order of the sentences before and after, without destroying the distribution characteristics of the variant Chinese characters.
[0162] Pinyin embedding is a technology that converts pinyin into Chinese characters. Its main function is to convert pinyin into Chinese characters, facilitating computer processing and human understanding. The pinyin embedding algorithm usually maps the pinyin sequence into a vector of a fixed length, and this vector can represent the semantic information of the pinyin. In this way, the conversion between pinyin and Chinese characters can be achieved through the similarity between vectors. Here, Pinyin embedding can be used for the recognition of homophonous characters, pinyin, pinyin abbreviations, as well as English letters and homophonous symbols. For example, "微" and "威", "微" and "wei", "微" and "V", and "加我" and "+我", etc.
[0163] Font embedding is a technique that converts fonts into vector representations. It can map each letter, number, and symbol into a vector space of a fixed length. In this way, we can convert text into a digital representation, which can then be input into various machine learning algorithms and models to perform various tasks such as text classification and machine translation. Here, Font embedding can be used for the recognition of split characters. For example, "a certain letter" and "a certain person's speech". In addition, Figure 4 The Embedding Layer is a concept in deep learning. It is a method of mapping high-dimensional sparse vectors to low-dimensional dense vectors, that is, by converting high-dimensional feature vectors into low-dimensional feature vectors.
[0164] In this embodiment, one or more drainage category metric values (corresponding to the Emission Score in Figure 4 ) for the short message characters can be determined based on the first target character feature. Different drainage category metric values can represent the confidence degree of the drainage category of the short message character. In other words, when a short message character corresponds to multiple drainage category metric values, the drainage category corresponding to the maximum value among the multiple drainage category metric values can be taken as the drainage category of the short message character. For example, when the drainage category metric values 2.09, 0.26, and 1.32 correspond to the first drainage category, the second drainage category, and the third drainage category respectively, the first drainage category corresponding to 2.09 can be used as the drainage category of "good".
[0165] Such as Figure 4 shown, the drainage category can include the first drainage category, the second drainage category, and the third drainage category. The first drainage category, the second drainage category, and the third drainage category can correspond to different social software methods. Of course, the first drainage category, the second drainage category, and the third drainage category can also include non-drainage categories. Figure 4 The DecodingProcessor is an encoder-decoder that is used to process and transform data. It can be used to convert binary data into text data or convert text data back into binary data.
[0166] After determining the drainage category of each short message character in the short message, the reserved drainage information can be determined from the short message based on the drainage category of each short message character. For example, when the received short message is "I can help you make a profit plus a certain x: 198561596", the determined reserved drainage information can be "a certain letter: 198561596"
[0167] S306: Control the preset extraction model to output the reserved drainage information.
[0168] After determining the reserved diversion information in the SMS based on the preset extraction model, the determined reserved diversion information is extracted from the SMS and output.
[0169] In this embodiment, by inputting the SMS into the preset extraction model, the preset extraction model extracts the first target character feature of the SMS character in the SMS, and the first target character feature is used to determine at least one drainage category index value for the SMS character, and finally the drainage category of each SMS character is screened out according to the size of each drainage category index value. Since the drainage category of each SMS character in the SMS is determined, the reserved drainage information in the SMS can be obtained.
[0170] See also Figure 5 , Figure 5 A schematic diagram of a flow chart for determining a drainage category indicator value provided in an embodiment of the present application.
[0171] In an embodiment provided in the present application, determining at least one traffic diversion category index value for the text message character based on the first target character feature in S304 includes:
[0172] S502: Determine a character sequence corresponding to the short message, and extract a first character context feature of a first target character feature based on the character sequence.
[0173] The character sequence corresponding to the SMS is determined based on the reading sequence of the SMS, and the first character context feature of the SMS character is extracted based on the character sequence. The first character context feature integrates the context semantic feature and the semantic feature of the character.
[0174] In a possible implementation, Figure 4 As shown, the first character context features of SMS characters can be extracted based on BiLSTM using character sequence. BiLSTM is a recurrent neural network variant that can capture long-term dependencies in sequences. BiLSTM consists of two directional LSTM (Long Short-Term Memory) layers, which are used to transfer information in the forward and reverse directions respectively. In this way, BiLSTM can capture long-term dependencies in sequences. Among them, LSTM is a special recurrent neural network that can solve the gradient vanishing and gradient exploding problems in the long sequence training process. It introduces a gating mechanism to maintain long-term dependencies, so that it can better process sequence data.
[0175] S504: Process the first character context feature to obtain at least one traffic diversion category index value corresponding to the SMS character.
[0176] This can be done through a linear layer (such as Figure 4The linear layer in the first character context feature is processed to obtain at least one traffic category indicator value corresponding to the SMS character. The linear layer can take the output of the previous layer as input and map it to the next layer. The output of the linear layer is the weighted sum of the input and the weight, and is adjusted by a bias term. Among them, the weight and bias term can be determined by the training of the preset extraction model in the early stage.
[0177] In this embodiment, by determining the first character context feature of each SMS character, the first character context feature is integrated with the context semantic feature and the semantic feature of the character, so that one or more drainage category indicator values corresponding to the SMS character are determined more accurately.
[0178] See also Figure 6 , Figure 6 A schematic diagram of a process for determining SMS fingerprint information of a SMS based on a reference SMS is provided in an embodiment of the present application.
[0179] like Figure 6 As shown, in one embodiment provided in the present application, extracting SMS fingerprint information from a SMS message includes:
[0180] S602: Identify text variables in the text message.
[0181] Generally, after the text variables in the SMS are replaced or processed, they do not affect the meaning of the SMS and the SMS recognition results. However, since the text variables in the SMS often involve the user's personal meaning, the text variables in the SMS are first identified to prepare for further processing.
[0182] Among them, text variables may include sensitive information variables, and sensitive information variables may include names of people, business names, place names, product names, letters, and numbers, etc.
[0183] S604: Replace the text variable according to a preset strategy to obtain a reference SMS.
[0184] The text variables are replaced by a preset strategy, thereby desensitizing the SMS to avoid leakage of user privacy. The text variables in the SMS are replaced to obtain a reference SMS. The text variables in the SMS are determined, and the text variables in the SMS are replaced with non-sensitive information to obtain a reference SMS. For example, replacing the text variables in the SMS with non-sensitive information can be replacing "Zhang San" with "XX".
[0185] S606: Determine the SMS fingerprint information of the SMS according to the reference SMS.
[0186] After obtaining the reference SMS, the reference SMS can be encrypted to obtain encrypted SMS fingerprint information, thereby avoiding leakage of user privacy. In a feasible implementation, a hash value of the reference SMS can be calculated. Since the hash value is irreversible, the hash value is used as SMS fingerprint information to avoid leakage of user privacy. Here, the hash value of the reference SMS can be determined based on a hash algorithm.
[0187] In this embodiment, the text variables are replaced according to a preset strategy to obtain a reference SMS, thereby achieving desensitization of the SMS to protect the user's personal privacy. Afterwards, the SMS fingerprint information of the SMS is determined based on the reference SMS, and the reference SMS is encrypted, such as calculating the hash value of the reference SMS, to further ensure the user's personal privacy.
[0188] See also Figure 7 , Figure 7 A schematic diagram of a process for obtaining a reference SMS provided in an embodiment of the present application.
[0189] In an embodiment provided in the present application, in S604, the text variable is replaced according to a preset strategy to obtain a reference SMS, including:
[0190] S702: Input the SMS into the desensitized information fingerprint extraction model, and output the text variables in the SMS.
[0191] The desensitized information fingerprint extraction model can be a BiLSTM-CRF network model, and its structure can refer to Figure 4 . The desensitized information fingerprint extraction model is used to extract text variables in text messages. The difference between the desensitized information fingerprint extraction model and the preset extraction model is that the Decoding Processor of the desensitized information fingerprint extraction model is used to output text variable categories, such as: a first text variable category, a second text variable category, and a third text variable category. The first text variable category or the second text variable category or the third text variable category can be a person's name, a business name, a place name, a product name, a letter, a number, and a non-text variable, etc. Here, the first text variable category, the second text variable category, and the third text variable category are different.
[0192] S704: Replace the text variable in the SMS based on the desensitized variable to obtain a reference SMS.
[0193] Desensitized variables can be pre-set and can be specific characters, such as "X", "Y" and "~". Replacing the text variable in the SMS with the desensitized variable can effectively erase the user's personal privacy. After the text variable in the SMS is replaced with the desensitized variable, a reference SMS is obtained. In addition, letters and numbers in the text variable can be replaced using regular expressions.
[0194] For example, when the text message is "[Medical Insurance] Notify again: Dear Zhang San, your 3334 account critical illness insurance has been received! If not verified, it will be automatically invalidated. Click tp.62mpbbzz.cn to confirm!", after replacement, you can get the reference text message, that is, "[Medical Insurance] Notify again: Dear XXX, your XXX account critical illness insurance has been received! If not verified, it will be automatically invalidated. Click XXX to confirm!", and further get the corresponding hash value "881f297928d8ebb503b9c2c6ebeb2cf6".
[0195] In other embodiments, only non-numeric and alphabetic text variables in the text message can be replaced based on the desensitized information fingerprint extraction model. For example, when the text message is "[Medical Insurance] Notify again: Dear Zhang San, your 3334 account critical illness insurance has arrived! If not verified, it will be automatically invalidated. Click tp.62mpbbzz.cn to confirm!", after replacement, a reference text message can be obtained, that is, "[Medical Insurance] Notify again: Dear XXX, your 3334 account critical illness insurance has arrived! If not verified, it will be automatically invalidated. Click tp.62mpbbzz.cn to confirm!", and then the letters and numbers in the text message are also replaced by regular expressions to obtain a reference text message, that is, "[Medical Insurance] Notify again: Dear XXX, your XXX account critical illness insurance has arrived! If not verified, it will be automatically invalidated. Click XXX to confirm!", and further obtain the corresponding hash value "881f297928d8ebb503b9c2c6ebeb2cf6".
[0196] In this embodiment, the text variables in the text message are determined by the desensitized information fingerprint extraction model, and then the desensitized variables are used to replace the text variables in the text message to obtain a reference text message, so that the sensitive information in the text message is erased, thereby protecting the user's personal privacy.
[0197] See also Figure 8 , Figure 8 A schematic diagram of a flow chart for determining text variables in a text message provided in an embodiment of the present application.
[0198] In an embodiment provided in the present application, in S702, the text message is input into the desensitized information fingerprint extraction model, and the text variables in the text message are output, including:
[0199] S802: Input the short message into the desensitized information fingerprint extraction model.
[0200] After obtaining the SMS, the SMS text is input into the desensitized information fingerprint extraction model, and the preset extraction model can be a BiLSTM-CRF network model.
[0201] S804: Control the desensitized information fingerprint extraction model to extract a second target character feature of SMS characters in the SMS, determine at least one text variable category indicator value for the SMS characters based on the second target character feature, determine the text variable category of the SMS characters based on the text variable category indicator value, and determine a text variable from the SMS based on the text variable category of the SMS characters.
[0202] The second target character feature of the SMS character can be formed by combining at least one of a single character feature, a pinyin feature, and a glyph feature. Figure 4 The Char embedding in the pinyin feature can be determined based on Figure 4 The Pinyin embedding in the glyph feature can be determined based on Figure 4 The font embedding in is determined.
[0203] In this embodiment, one or more text variable category index values for the SMS character can be determined based on the second target character feature, and different text variable category index values can represent the text variable category confidence level of the SMS character. In other words, when a SMS character corresponds to multiple text variable category index values, the text variable category corresponding to the maximum value of the multiple text variable category index values can be taken as the text variable category of the SMS character. After determining the text variable category of each SMS character in the SMS, the text variable can be determined from the SMS based on the text variable category of each SMS character in the SMS.
[0204] S806: Control the desensitized information fingerprint extraction model to output text variables.
[0205] After determining the text variables in the SMS based on the desensitized information fingerprint extraction model, the determined text variables are extracted from the SMS and output.
[0206] In this embodiment, by inputting the SMS into the desensitized information fingerprint extraction model, the desensitized information fingerprint extraction model extracts the second target character feature of the SMS character in the SMS, and the second target character feature is used to determine at least one text variable category index value for the SMS character, and finally the text variable category of each SMS character is screened out according to the size of each text variable category index value, because the text variable category of each SMS character in the SMS is determined. Therefore, the text variable in the SMS can be obtained.
[0207] See also Figure 8 , Figure 8 A schematic diagram of a process for determining a text variable category index value provided in an embodiment of the present application.
[0208] In an embodiment provided by the present application, determining at least one text variable category index value for the text message character based on the second target character feature in S804 includes:
[0209] S902: Determine a character sequence corresponding to the short message, and extract a second character context feature of a second target character feature based on the character sequence.
[0210] The character sequence corresponding to the SMS is determined based on the reading sequence of the SMS, and the second character context features of the SMS characters are extracted based on the character sequence. The second character context features are integrated with the context semantic features and the semantic features of the characters.
[0211] S904: Process the second character context feature to obtain at least one text variable category index value corresponding to the SMS character.
[0212] The second character context feature can be processed by a linear layer to obtain at least one text variable category indicator value corresponding to the SMS character. The linear layer can take the output of the previous layer as input and map it to the next layer. The output of the linear layer is the weighted sum of the input and the weight, and is adjusted by a bias term. Among them, the weight and bias term can be determined by the SMS training that has been manually annotated in the early stage of the desensitized information fingerprint extraction model.
[0213] In this embodiment, by determining the first character context feature of each SMS character, the first character context feature is integrated with the context semantic feature and the semantic feature of the character, so that one or more text variable category indicator values corresponding to the SMS character are determined more accurately.
[0214] In an embodiment provided in the present application, at least one of the reserved traffic diversion information, the SMS fingerprint information, and the SMS feature vector of the SMS is sent to the server in S206, including:
[0215] The reserved diversion information or the SMS fingerprint information is sent to the server, so that the server determines a matching result for the reserved diversion information or the SMS fingerprint information based on the reserved diversion information or the SMS fingerprint information.
[0216] Any features in the reserved diversion information and SMS fingerprint information can be sent to the server; the reserved diversion information and SMS fingerprint information can also be sent to the server, so that the server can match the reserved diversion information with malicious SMS based on the reserved diversion information library to determine the first matching result of the SMS, and so that the server can match the SMS fingerprint information with malicious SMS based on the SMS fingerprint information library to determine the second matching result of the SMS.
[0217] After the terminal extracts the reserved diversion information and the SMS fingerprint information, the reserved diversion information and the SMS fingerprint information are sent to the server. After receiving the reserved diversion information and the SMS fingerprint information sent by the terminal, the server uses the reserved diversion information library to match the reserved diversion information with malicious SMS, and obtains a first matching result corresponding to the SMS. Here, the reserved diversion information library includes a large amount of malicious reserved diversion information. In addition, the server can also use the SMS fingerprint information library to match the SMS fingerprint information with malicious SMS, and obtain a second matching result corresponding to the SMS. Here, the SMS fingerprint information library includes a large amount of malicious SMS fingerprint information. It should be noted that the reserved diversion information library and the SMS fingerprint information library have been desensitized.
[0218] In this embodiment, by sending the reserved diversion information and SMS fingerprint information to the server, a large database can be stored with the help of the server, so that when matching using the reserved diversion information database and the SMS fingerprint information database, the accuracy is higher and the processing pressure of the terminal is reduced.
[0219] In an embodiment provided in the present application, determining the SMS recognition result based on the matching result in S210 includes:
[0220] Determine whether the first matching result and the second matching result are both matching failures. If both the first matching result and the second matching result are matching failures, determine that the SMS recognition result of the SMS is a malicious category; otherwise, the SMS recognition result of the SMS is a common category.
[0221] The terminal obtains the first matching result and the second matching result from the server. When at least one of the first matching result and the second matching result is a successful match, the SMS identification result of the SMS is determined to be a malicious category. At this time, the SMS can be intercepted to avoid harassment to the user.
[0222] The terminal obtains the first matching result and the second matching result from the server. When both the first matching result and the second matching result fail to match, the text message recognition result of the text message is determined to be a common category. At this time, the text message is not intercepted and can be displayed normally.
[0223] See also Fig.10 , Fig.10 A flowchart of another SMS identification method provided in an embodiment of the present application.
[0224] In an embodiment provided in the present application, the text message identification method further includes:
[0225] S1002: If the matching result is a match failure, vectorization is performed on the SMS to obtain a feature vector of the SMS.
[0226] When the first SMS category and the second SMS category are both common categories, a vectorized representation of the SMS is generated based on the deep learning model to obtain a feature vector of the SMS.
[0227] S1004: Send the SMS feature vector to the server, so that the server determines approximate SMS sample information corresponding to the SMS based on the SMS feature vector.
[0228] After obtaining the SMS feature vector, the terminal sends the SMS feature vector to the server, and the server searches for similar SMS based on the SMS feature vector, thereby determining the approximate SMS sample information corresponding to the SMS. Here, the number of the approximate SMS sample information can be multiple.
[0229] In a feasible implementation, the approximate SMS sample information corresponding to the SMS can be determined based on the SMS feature vector based on the ANN (Artificial Neural Networks) algorithm on the server side. The ANN algorithm simulates the structure and function of the human neural network to achieve efficient processing and analysis of data. The ANN algorithm has a strong nonlinear fitting ability and can learn and extract useful information in a complex data environment. The ANN algorithm can be used to search for vectors similar to the SMS feature vector, and then determine the approximate SMS sample information corresponding to the searched vector.
[0230] S1006: Obtain similar SMS sample information from the server, compare the SMS with the similar SMS sample information, and determine the SMS recognition result.
[0231] After the server determines the approximate SMS sample information, the terminal obtains the approximate SMS sample information from the server, calculates the similarity between each piece of approximate SMS sample information and the corresponding SMS of the terminal, and determines the approximate SMS sample information that meets the similarity requirements, thereby determining the target SMS category based on the approximate SMS sample information that meets the similarity requirements, and determining the target SMS recognition result based on the target SMS category.
[0232] In this embodiment, when both the first matching result and the second matching result fail to match, that is, the previous means cannot hit the text message, the approximate text message sample information is determined through the text message feature vector, and the text message is compared with the approximate text message sample information to determine the text message recognition result, thereby further improving the accuracy of the text message recognition result.
[0233] In an embodiment provided in the present application, at least one of the reserved traffic diversion information, the SMS fingerprint information, and the SMS feature vector of the SMS is sent to the server in S206, including:
[0234] Send the reserved traffic diversion information, SMS fingerprint information and SMS feature vector of the SMS to the server;
[0235] In S208, receiving the matching result for the reserved traffic diversion information or the SMS fingerprint information sent by the server and determining the first SMS recognition result of the SMS based on the matching result, and / or receiving the approximate SMS sample information corresponding to the SMS feature vector sent by the server and comparing the SMS with the approximate SMS sample information to determine the second SMS recognition result of the SMS, including:
[0236] Receive the matching result of the reserved traffic diversion information or the SMS fingerprint information sent by the server. If the matching result is a match failure, receive the approximate SMS sample information corresponding to the SMS feature vector sent by the server;
[0237] The SMS is compared with similar SMS sample information to determine a second SMS recognition result, and the second SMS recognition result is used as the target SMS recognition result of the SMS.
[0238] In this embodiment, the SMS is first preliminarily judged based on the reserved drainage information and SMS fingerprint information of the SMS. When the matching result for the reserved drainage information or the SMS fingerprint information is a match failure, it indicates that the current matching means have not hit the SMS at this time, and the SMS may be a malicious SMS. Therefore, in order to improve the accuracy of the SMS recognition result, the approximate SMS sample information corresponding to the SMS feature vector sent by the server can be received, and then the SMS is compared with the approximate SMS sample information to determine the SMS recognition result.
[0239] See also Fig.11 , Fig.11 A schematic diagram of a process for determining a target SMS recognition result provided in an embodiment of the present application.
[0240] In the embodiment provided in the present application, comparing the short message with the similar short message sample information to determine the second short message recognition result includes:
[0241] S1102: Calculate the similarity result between the approximate SMS sample information and the SMS, and determine the target sample SMS from the approximate SMS sample information based on the similarity result.
[0242] After the terminal obtains the approximate SMS sample information, the similarity results of each approximate SMS sample information and the SMS are calculated respectively, and the results are sorted, and the approximate SMS sample information with the highest similarity result is selected as the target sample SMS. Specifically, the similarity results of the approximate SMS sample information and the SMS can be calculated based on Jaccard similarity. Jaccard similarity is the absolute value of the ratio of the number of elements in the intersection of two sets to the number of elements in the union. If the two sets are completely equal, the Jaccard coefficient is 1. If the two sets are completely unequal, the Jaccard coefficient is 0. If the two sets contain the same elements but in different quantities, the Jaccard coefficient can be between 0 and 1. As the similarity increases, the Jaccard coefficient also gradually increases.
[0243] S1104: Determine a target SMS category corresponding to the target sample SMS, and use the target SMS category as a second SMS recognition result.
[0244] The target sample SMS is pre-labeled with the corresponding target SMS category. After determining the target sample SMS, the corresponding target SMS category can be obtained. After that, the target SMS category is used as the second SMS recognition result of the SMS. For example, when the target SMS category is a common category, the second SMS recognition result of the SMS is also a common category. When the target SMS category is a malicious category, the second SMS recognition result of the SMS is also a malicious category.
[0245] This embodiment further improves the SMS recognition result by calculating the similarity result between the approximate SMS sample information and the SMS, based on screening the approximate SMS sample information based on the SMS feature vector.
[0246] See also Fig.12 , Fig.12 A flowchart of a method for identifying short messages applied to a server is provided in an embodiment of the present application. The execution subject of the embodiment of the present application can be a server that executes the method for identifying short messages, or a processor in the server that executes the method for identifying short messages, or a short message identification service in the server that executes the method for identifying short messages. For the convenience of description, the specific execution process of the method for identifying short messages is introduced below by taking the execution subject being a processor in a server as an example.
[0247] like Fig.12 As shown, the SMS identification method includes:
[0248] S1202: Receive at least one of reserved traffic diversion information, SMS fingerprint information, and SMS feature vector of a SMS sent by a terminal.
[0249] The specific content of step S1202 can refer to step S202 and step S204, which will not be described in detail here.
[0250] S1204: Determine a matching result for the reserved diversion information or the SMS fingerprint information and send the matching result to the terminal, so that the terminal determines a first SMS recognition result based on the matching result; and / or, determine approximate SMS sample information corresponding to the SMS feature vector and send the approximate SMS sample information to the terminal, so that the terminal compares the SMS with the approximate SMS sample information to determine a second SMS recognition result.
[0251] Among them, the specific content in step S1204 can refer to step S206, step S208 and step S210, which will not be repeated here.
[0252] The embodiment of the present application provides a method for identifying short messages, firstly obtaining the short message received by the terminal, then obtaining at least one of the reserved drainage information, short message fingerprint information and short message feature vector in the short message, after obtaining at least one of the reserved drainage information, short message fingerprint information and short message feature vector, the terminal sends at least one of the reserved drainage information, short message fingerprint information and short message feature vector corresponding to the short message to the server, because the reserved drainage information, short message fingerprint information and short message feature vector are extracted from the short message, which is different from the original text of the short message, thus effectively protecting the privacy of the user. After receiving the matching result of the reserved drainage information or the short message fingerprint information, the server can determine the matching result corresponding to the short message, so that the terminal and the server are combined to construct a short message identification system, thereby improving the recognition efficiency and recognition accuracy of the short message, and finally the server sends the matching result to the terminal, and the terminal determines the short message identification result based on the matching result.
[0253] After receiving the SMS feature vector, the server can determine the approximate SMS sample information corresponding to the SMS feature vector, thereby realizing preliminary screening of the approximate SMS sample information based on the SMS feature vector. Afterwards, the approximate SMS sample information is sent to the terminal, and the SMS is compared with the approximate SMS sample information, thereby realizing accurate screening of the approximate SMS sample information based on the SMS content. In addition, since the comparison is performed on the terminal side, the user's privacy is guaranteed. Finally, the SMS recognition result is determined based on the comparison result, which effectively solves the technical problem that in order to realize the identification of spam SMS, it is usually necessary to read the user's SMS content, making it difficult to guarantee the user's privacy.
[0254] In the embodiment provided in the present application, determining the matching result for the reserved traffic diversion information or the SMS fingerprint information in S1204 includes:
[0255] Based on the reserved diversion information library, malicious SMS matching is performed on the reserved diversion information to determine a first matching result of the SMS; based on the SMS fingerprint information library, malicious SMS matching is performed on the SMS fingerprint information to determine a second matching result of the SMS.
[0256] After the terminal extracts the reserved diversion information and the SMS fingerprint information, it sends the reserved diversion information and the SMS fingerprint information to the server. After receiving the reserved diversion information and the SMS fingerprint information sent by the terminal, the server uses the reserved diversion information library to match the reserved diversion information with malicious SMS and obtains the first matching result of the SMS. Here, the reserved diversion information library includes a large amount of malicious reserved diversion information. In addition, the server can also use the SMS fingerprint information library to match the SMS fingerprint information with malicious SMS and obtain the second matching result of the SMS. Here, the SMS fingerprint information library includes a large amount of malicious SMS fingerprint information. It should be noted that the reserved diversion information library and the SMS fingerprint information library have been desensitized.
[0257] In this embodiment, by sending the reserved drainage information and SMS fingerprint information to the server, the server can store a large database, so that when matching using the reserved drainage information database and the SMS fingerprint information database, the accuracy is higher and the processing pressure of the terminal is reduced.
[0258] In the embodiment provided in the present application, in S1206, the matching result is sent to the terminal so that the terminal determines the first SMS recognition result based on the matching result, including:
[0259] The first matching result and the second matching result are sent to the terminal, so that the terminal determines that the first SMS identification result is a malicious category when the first matching result or the second matching result is a matching failure, and determines that the first SMS identification result is a common category when the first matching result and the second matching result are both matching successes.
[0260] When at least one of the first matching result and the second matching result is a successful match, the first SMS identification result is determined to be a malicious category, and the SMS can be intercepted to avoid harassing the user. When both the first matching result and the second matching result fail to match, the first SMS identification result is determined to be a common category, and the SMS is not intercepted.
[0261] See also Fig.13 , Fig.13 A schematic diagram of a process for determining a target SMS recognition result provided in an embodiment of the present application.
[0262] like Fig.13 As shown, in the embodiment provided in the present application, the text message identification method further includes:
[0263] S1302: receiving a feature vector of a short message sent by a terminal, where the feature vector of the short message is a feature vector of the short message obtained after the terminal performs vectorization processing on the short message when the short message category is a common category.
[0264] The specific content of step S1302 may refer to step S1002 and will not be repeated here.
[0265] S1304: Determine approximate SMS sample information corresponding to the SMS based on the SMS feature vector, and send the approximate SMS sample information to the terminal, so that the terminal determines the target SMS category based on the approximate SMS sample information and determines the target SMS recognition result based on the target SMS category.
[0266] The specific content of step S1304 may refer to step S1004 and will not be repeated here.
[0267] In an embodiment provided in the present application, at least one of the reserved traffic diversion information, the SMS fingerprint information, and the SMS feature vector of the SMS sent by the terminal is received in S1202, including:
[0268] Receiving reserved traffic diversion information, SMS fingerprint information and SMS feature vector of SMS sent by the terminal;
[0269] Determining the matching result for the reserved traffic diversion information or the SMS fingerprint information and sending the matching result to the terminal in S1204, so that the terminal determines the first SMS recognition result based on the matching result; and / or determining the approximate SMS sample information corresponding to the SMS feature vector and sending the approximate SMS sample information to the terminal, so that the terminal compares the SMS with the approximate SMS sample information to determine the second SMS recognition result, including:
[0270] Determine a matching result for the reserved drainage information or the SMS fingerprint information, and if the matching result is a match failure, determine approximate SMS sample information corresponding to the SMS feature vector;
[0271] The similar SMS sample information is sent to the terminal, so that the terminal compares the SMS with the similar SMS sample information, determines the second SMS recognition result, and uses the second SMS recognition result as the target SMS recognition result of the SMS.
[0272] In this embodiment, the SMS is first preliminarily judged based on the reserved drainage information and SMS fingerprint information of the SMS. When the matching result for the reserved drainage information or the SMS fingerprint information is a match failure, it indicates that the current matching means have not hit the SMS at this time, and the SMS may be a malicious SMS. Therefore, in order to improve the accuracy of the SMS recognition result, the approximate SMS sample information corresponding to the SMS feature vector sent by the server can be received, and then the SMS is compared with the approximate SMS sample information to determine the target SMS recognition result.
[0273] See also Fig.14 , Fig.14 A schematic diagram of a process for determining approximate SMS sample information for a SMS provided in an embodiment of the present application.
[0274] In an embodiment provided in the present application, determining the approximate SMS sample information corresponding to the SMS feature vector in S1204 includes:
[0275] S1402: Obtain an associated database of sample SMS vectors and SMS indexes, determine a target sample SMS vector that matches the SMS feature vector from the sample SMS vectors, and obtain a target SMS index corresponding to the target sample SMS vector based on the associated database.
[0276] See also Fig.15 , Fig.15 A flowchart of a similarity comparison of short messages provided in an embodiment of the present application. Fig.15 The vectorization-index ID (identity document) corresponding to the associated database) includes paired sample SMS vectors and SMS indexes. The sample SMS vector is determined based on the sample SMS. The target sample SMS vector that matches the SMS feature vector can be determined from the sample SMS vector based on the ANN search, so as to obtain the target SMS index corresponding to the target sample SMS vector based on the associated database. The target SMS index is used to determine the corresponding approximate SMS sample information.
[0277] S1404: Determine approximate SMS sample information for the SMS based on the target SMS index.
[0278] Based on the target SMS index, approximate SMS sample information for the SMS is obtained from the index ID-SMS text-category database, and then similarity calculation is performed to obtain the target sample SMS, determine the target SMS category corresponding to the target sample SMS, and use the target SMS category as the target SMS recognition result, that is, the classification result.
[0279] An embodiment of the present application further provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded by a processor and executing the steps of any method in the above embodiments.
[0280] See also Fig.16 , Fig.16 A schematic diagram of the structure of a text message recognition device provided in an embodiment of the present application.
[0281] The short message identification device 1600 includes:
[0282] A first acquisition module 1610, adapted to acquire a short message received by a terminal;
[0283] The second acquisition module 1620 is adapted to acquire at least one of the reserved traffic diversion information, the SMS fingerprint information and the SMS feature vector of the SMS;
[0284] The sending module 1630 is adapted to send at least one of the reserved traffic diversion information, the SMS fingerprint information and the SMS feature vector of the SMS to the server;
[0285] The receiving module 1640 is suitable for receiving the matching results for the reserved diversion information or the SMS fingerprint information sent by the server and determining the first SMS recognition result of the SMS based on the matching results, and / or receiving the approximate SMS sample information corresponding to the SMS feature vector sent by the server and comparing the SMS with the approximate SMS sample information to determine the second SMS recognition result of the SMS.
[0286] Optionally, the second acquisition module 1620 is adapted to extract reserved traffic diversion information from a text message; or extract text message fingerprint information from a text message.
[0287] Optionally, the second acquisition module 1620 is suitable for restoring the variant character text in the text message to normal text, and extracting the reserved drainage information from the normal text; or, extracting the reserved drainage information in the text message through a preset extraction model.
[0288] Optionally, the second acquisition module 1620 includes:
[0289] A short message input module, adapted to input short messages into a preset extraction model;
[0290] A control preset extraction model module is adapted to control the preset extraction model to extract a first target character feature of a text message character in the text message, determine at least one drainage category index value for the text message character based on the first target character feature, determine the drainage category of the text message character based on the drainage category index value, and determine reserved drainage information from the text message based on the drainage category of the text message character;
[0291] The module for outputting reserved drainage information is suitable for controlling the preset extraction model to output reserved drainage information.
[0292] Optionally, the control preset extraction model module includes:
[0293] A first character context feature determination module, adapted to determine a character sequence corresponding to the short message, and extract a first character context feature of a first target character feature based on the character sequence;
[0294] The traffic diversion category index value determination module is adapted to process the first character context feature to obtain at least one traffic diversion category index value corresponding to the SMS character.
[0295] Optionally, the second acquisition module 1620 includes:
[0296] A text variable recognition module, suitable for recognizing text variables in SMS;
[0297] A reference SMS determination module is adapted to perform replacement processing on text variables according to a preset strategy to obtain a reference SMS;
[0298] The SMS fingerprint information determination module is adapted to determine the SMS fingerprint information of the SMS based on the reference SMS.
[0299] Optionally, the reference SMS determination module includes:
[0300] The desensitized information fingerprint extraction model input module is suitable for inputting short messages into the desensitized information fingerprint extraction model and outputting text variables in the short messages;
[0301] The reference SMS determination submodule is suitable for replacing text variables in SMS based on desensitized variables to obtain a reference SMS.
[0302] Optionally, the desensitized information fingerprint extraction model input module includes:
[0303] An input module, suitable for inputting short messages into a desensitized information fingerprint extraction model;
[0304] a desensitized information fingerprint extraction model control module, adapted to control the desensitized information fingerprint extraction model to extract a second target character feature of a text message character in the text message, determine at least one text variable category index value for the text message character based on the second target character feature, determine a text variable category of the text message character based on the text variable category index value, and determine a text variable from the text message based on the text variable category of the text message character;
[0305] The text variable control output module is suitable for controlling the output text variables of the desensitized information fingerprint extraction model.
[0306] Optionally, the desensitized information fingerprint extraction model control module includes:
[0307] A character sequence determination module, adapted to determine a character sequence corresponding to the short message, and extract a second character context feature of a second target character feature based on the character sequence;
[0308] The second character context feature processing module is adapted to process the second character context feature to obtain at least one text variable category index value corresponding to the SMS character.
[0309] Optionally, the SMS fingerprint information determination module is adapted to calculate a hash value of a reference SMS, and use the hash value as SMS text SMS fingerprint information.
[0310] Optionally, the sending module 1630 is adapted to send the reserved diversion information or the SMS fingerprint information to the server, so that the server determines a matching result for the reserved diversion information or the SMS fingerprint information based on the reserved diversion information or the SMS fingerprint information.
[0311] Optionally, the sending module 1630 is suitable for sending the reserved diversion information and the SMS fingerprint information to the server, so that the server matches the reserved diversion information with malicious SMS based on the reserved diversion information library to determine a first matching result of the SMS, and so that the server matches the SMS fingerprint information with malicious SMS based on the SMS fingerprint information library to determine a second matching result of the SMS.
[0312] Optionally, the sending module 1630 is suitable for determining whether both the first matching result and the second matching result are matching failures. If both the first matching result and the second matching result are matching failures, the SMS category of the SMS is determined to be a malicious category; otherwise, the SMS category of the SMS is a normal category.
[0313] Optionally, the sending module 1630 is adapted to send the reserved traffic diversion information, the SMS fingerprint information and the SMS feature vector of the SMS to the server;
[0314] The receiving module 1640 is suitable for receiving the matching result sent by the server for the reserved drainage information or the SMS fingerprint information. If the matching result is a matching failure, the approximate SMS sample information corresponding to the SMS feature vector sent by the server is received; the SMS is compared with the approximate SMS sample information to determine the second SMS recognition result, and the second SMS recognition result is used as the target SMS recognition result of the SMS.
[0315] Optionally, the receiving module 1640 includes:
[0316] A calculation module, adapted to calculate a similarity result between the approximate SMS sample information and the SMS, and determine a target sample SMS from the approximate SMS sample information based on the similarity result;
[0317] The target SMS category determination module is adapted to determine the target SMS category corresponding to the target sample SMS, and use the target SMS category as the second SMS recognition result of the SMS.
[0318] See also Fig.17 , Fig.17 A schematic diagram of the structure of a server provided in an embodiment of the present application.
[0319] The server 1700 includes:
[0320] The server receiving module 1710 is adapted to receive at least one of the reserved traffic diversion information, the SMS fingerprint information and the SMS feature vector of the SMS sent by the terminal;
[0321] The SMS determination module 1720 is suitable for determining the matching results for the reserved drainage information or the SMS fingerprint information and sending the matching results to the terminal, so that the terminal determines the first SMS recognition result based on the matching results; and / or, determining the approximate SMS sample information corresponding to the SMS feature vector and sending the approximate SMS sample information to the terminal, so that the terminal compares the SMS with the approximate SMS sample information to determine the second SMS recognition result.
[0322] Optionally, the short message determination module 1720 includes:
[0323] A first matching result information determination module, adapted to match the reserved diversion information with malicious SMS based on the reserved diversion information library to determine a first matching result of the SMS;
[0324] The second matching result information determination module is adapted to perform malicious SMS matching on SMS fingerprint information based on the SMS fingerprint information library to determine a second matching result of the SMS.
[0325] Optionally, the SMS identification result determination module 1730 is suitable for sending the first matching result and the second matching result to the terminal, so that the terminal determines that the first SMS identification result is a malicious category when the first matching result or the second matching result is a matching failure, and determines that the first SMS identification result is a normal category when the first matching result and the second matching result are both matching successes.
[0326] Optionally, the server receiving module 1710 is adapted to receive reserved diversion information, SMS fingerprint information and SMS feature vector of a SMS sent by a terminal;
[0327] The SMS determination module 1720 is adapted to determine a matching result for the reserved drainage information or the SMS fingerprint information, and if the matching result is a match failure, determine approximate SMS sample information corresponding to the SMS feature vector;
[0328] The approximate SMS sample information is sent to the terminal, so that the terminal compares the SMS with the approximate SMS sample information, determines a second SMS recognition result, and uses the second SMS recognition result as a target SMS recognition result of the SMS.
[0329] Optionally, the short message determination module 1720 includes:
[0330] A target SMS index determination module is adapted to obtain a database of sample SMS vectors and SMS indexes, determine a target sample SMS vector that matches the SMS feature vector from the sample SMS vector, and obtain a target SMS index corresponding to the target sample SMS vector based on the database;
[0331] The approximate SMS sample information determination module is adapted to determine the approximate SMS sample information for the SMS based on the target SMS index.
[0332] See also Fig.18 , Fig.18 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. Fig.18 As shown, the terminal 1800 may include: at least one processor 1801 , at least one network interface 1804 , a user interface 1803 , a memory 1805 , and at least one communication bus 1802 .
[0333] The communication bus 1802 is used to realize the connection and communication between these components.
[0334] The user interface 1803 may include a display screen (Display) and a camera (Camera), and the optional user interface 1803 may also include a standard wired interface and a wireless interface.
[0335] The network interface 1804 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0336] Among them, the processor 1801 may include one or more processing cores. The processor 1801 uses various interfaces and lines to connect the various parts of the entire experimental operation terminal 1800, and executes various functions and processes data of the terminal 1800 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1805, and calling data stored in the memory 1805. Optionally, the processor 1801 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1801 can integrate one or more combinations of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 1801, and it can be implemented by a single chip.
[0337] Among them, the memory 1805 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory, ROM). Optionally, the memory 1805 includes a non-transitory computer-readable storage medium. The memory 1805 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1805 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1805 may also be optionally at least one storage device located away from the aforementioned processor 1801. As Fig.18 As shown, the memory 1805 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a text message recognition program.
[0338] exist Fig.18 In the terminal 1800 shown, the user interface 1803 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 1801 can be used to call the short message recognition program stored in the memory 1805 and specifically perform the following operations:
[0339] Get the SMS received by the terminal;
[0340] Obtain at least one of reserved traffic diversion information, SMS fingerprint information, and SMS feature vector of the SMS;
[0341] Sending at least one of the reserved traffic diversion information, the SMS fingerprint information, and the SMS feature vector of the SMS to the server;
[0342] Receive the matching result for the reserved diversion information or SMS fingerprint information sent by the server and determine the first SMS recognition result of the SMS based on the matching result, and / or, receive the approximate SMS sample information corresponding to the SMS feature vector sent by the server and compare the SMS with the approximate SMS sample information to determine the second SMS recognition result of the SMS.
[0343] Optionally, when the processor 1801 executes obtaining at least one of the reserved traffic diversion information, the SMS fingerprint information, and the SMS feature vector of the SMS, specifically executes:
[0344] Extract the reserved drainage information in the SMS; or extract the SMS fingerprint information in the SMS.
[0345] Optionally, when the processor 1801 extracts the reserved traffic diversion information in the text message, it specifically performs:
[0346] The variant word text in the SMS is restored to normal text, and the reserved drainage information is extracted from the normal text; or, the reserved drainage information in the SMS is extracted through a preset extraction model.
[0347] Optionally, when the processor 1801 extracts the reserved traffic diversion information in the text message by using a preset extraction model, the processor 1801 specifically performs:
[0348] Input the SMS into the preset extraction model;
[0349] Controlling a preset extraction model to extract a first target character feature of a text message character in the text message, determining at least one drainage category index value for the text message character based on the first target character feature, determining a drainage category of the text message character based on the drainage category index value, and determining reserved drainage information from the text message based on the drainage category of the text message character;
[0350] Control the preset extraction model to output reserved drainage information.
[0351] Optionally, when the processor 1801 determines at least one traffic diversion category index value for a text message character based on the first target character feature, the processor 1801 specifically performs:
[0352] Determine a character sequence corresponding to the short message, and extract a first character context feature of a first target character feature based on the character sequence;
[0353] The first character context feature is processed to obtain at least one traffic diversion category indicator value corresponding to the SMS character.
[0354] Optionally, when the processor 1801 extracts the SMS fingerprint information from the SMS, it specifically performs:
[0355] Identify text variables in SMS messages;
[0356] Replace the text variables according to the preset strategy to obtain a reference SMS;
[0357] Determine the SMS fingerprint information of the SMS based on the reference SMS.
[0358] Optionally, the processor 1801 performs replacement processing on the text variable according to a preset strategy, and when a reference SMS is obtained, specifically performs:
[0359] Input the SMS into the desensitized information fingerprint extraction model and output the text variables in the SMS;
[0360] The text variables in the SMS are replaced based on the anonymized variables to obtain a reference SMS.
[0361] Optionally, when the processor 1801 inputs the short message into the desensitized information fingerprint extraction model and outputs the text variable in the short message, specifically:
[0362] Input the SMS into the desensitized information fingerprint extraction model;
[0363] Controlling the desensitized information fingerprint extraction model to extract a second target character feature of a text message character in the text message, determining at least one text variable category index value for the text message character based on the second target character feature, determining a text variable category of the text message character based on the text variable category index value, and determining a text variable from the text message based on the text variable category of the text message character;
[0364] Controls the output text variable of the desensitized information fingerprint extraction model.
[0365] Optionally, when the processor 1801 determines at least one text variable category index value for the text message character based on the second target character feature, it specifically performs:
[0366] Determine a character sequence corresponding to the short message, and extract a second character context feature of a second target character feature based on the character sequence;
[0367] The second character context feature is processed to obtain at least one text variable category index value corresponding to the text message character.
[0368] Optionally, when the processor 1801 determines the SMS fingerprint information of the SMS according to the reference SMS, it specifically executes:
[0369] Calculate the hash value of the reference SMS and use the hash value as the SMS fingerprint information.
[0370] Optionally, when the processor 1801 executes sending at least one of the reserved traffic diversion information, the SMS fingerprint information, and the SMS feature vector of the SMS to the server, the processor 1801 specifically executes:
[0371] The reserved diversion information or the SMS fingerprint information is sent to the server, so that the server determines a matching result for the reserved diversion information or the SMS fingerprint information based on the reserved diversion information or the SMS fingerprint information.
[0372] Optionally, when the processor 1801 sends the reserved diversion information or the SMS fingerprint information to the server, so that the server determines a matching result for the reserved diversion information or the SMS fingerprint information based on the reserved diversion information or the SMS fingerprint information, specifically:
[0373] The reserved diversion information and SMS fingerprint information are sent to the server, so that the server matches the reserved diversion information with malicious SMS based on the reserved diversion information library to determine the first matching result of the SMS, and so that the server matches the SMS fingerprint information with malicious SMS based on the SMS fingerprint information library to determine the second matching result of the SMS.
[0374] Optionally, when the processor 1801 determines the SMS recognition result based on the matching result, it specifically performs:
[0375] Determine whether both the first matching result and the second matching result are matching failures. If both the first matching result and the second matching result are matching failures, determine that the text message category of the text message is a malicious category; otherwise, the text message category of the text message is a common category.
[0376] Optionally, when the processor 1801 executes sending at least one of the reserved traffic diversion information, the SMS fingerprint information, and the SMS feature vector of the SMS to the server, the processor 1801 specifically executes:
[0377] Send the reserved traffic diversion information, SMS fingerprint information and SMS feature vector of the SMS to the server;
[0378] Processor 1801 receives a matching result for reserved traffic diversion information or SMS fingerprint information sent by a server and determines a first SMS recognition result of the SMS based on the matching result, and / or receives approximate SMS sample information corresponding to a SMS feature vector sent by a server and compares the SMS with the approximate SMS sample information to determine a second SMS recognition result of the SMS, specifically performing:
[0379] Receive the matching result of the reserved traffic diversion information or the SMS fingerprint information sent by the server. If the matching result is a match failure, receive the approximate SMS sample information corresponding to the SMS feature vector sent by the server;
[0380] The SMS is compared with similar SMS sample information to determine a second SMS recognition result, and the second SMS recognition result is used as the target SMS recognition result of the SMS.
[0381] Optionally, when the processor 1801 compares the short message with the similar short message sample information and determines the second short message recognition result, specifically executes:
[0382] Calculate the similarity results of the approximate SMS sample information and the SMS, and determine the target sample SMS from the approximate SMS sample information based on the similarity results;
[0383] Determine the target SMS category corresponding to the target sample SMS, and use the target SMS category as the second SMS recognition result of the SMS.
[0384] See also Fig.19 , Fig.19The internal structure diagram of a server provided in an embodiment of the present application is shown in FIG. Fig.19 As shown, the terminal 1900 may include: at least one processor 1901 , at least one network interface 1904 , a user interface 1903 , a memory 1905 , and at least one communication bus 1902 .
[0385] The communication bus 1902 is used to realize the connection and communication between these components.
[0386] The user interface 1903 may include a display screen (Display) and a camera (Camera), and the optional user interface 1903 may also include a standard wired interface and a wireless interface.
[0387] The network interface 1904 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0388] Among them, the processor 1901 may include one or more processing cores. The processor 1901 uses various interfaces and lines to connect the various parts of the entire experimental operation terminal 1900, and executes various functions and processes data of the terminal 1900 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1905, and calling data stored in the memory 1905. Optionally, the processor 1901 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1901 can integrate one or more combinations of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1901, and it can be implemented by a single chip.
[0389] Among them, the memory 1905 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory, ROM). Optionally, the memory 1905 includes a non-transitory computer-readable storage medium. The memory 1905 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1905 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1905 may also be optionally at least one storage device located away from the aforementioned processor 1901. As Fig.19 As shown, the memory 1905 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a text message recognition program.
[0390] exist Fig.19 In the terminal 1900 shown, the user interface 1903 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 1901 can be used to call the short message recognition program stored in the memory 1905, and specifically perform the following operations:
[0391] At least one of reserved traffic diversion information, SMS fingerprint information, and SMS feature vector of the SMS sent by the receiving terminal;
[0392] Determine the matching result for the reserved drainage information or SMS fingerprint information and send the matching result to the terminal, so that the terminal determines the first SMS recognition result based on the matching result; and / or determine the approximate SMS sample information corresponding to the SMS feature vector and send the approximate SMS sample information to the terminal, so that the terminal compares the SMS with the approximate SMS sample information to determine the second SMS recognition result.
[0393] Optionally, when the processor 1901 determines the matching result for the reserved traffic diversion information or the SMS fingerprint information, it specifically executes:
[0394] Based on the reserved diversion information database, malicious SMS matching is performed on the reserved diversion information to determine a first matching result of the SMS;
[0395] The SMS fingerprint information is matched with malicious SMS based on the SMS fingerprint information library to determine a second matching result of the SMS.
[0396] Optionally, when the processor 1901 sends the matching result to the terminal so that the terminal determines the first SMS recognition result based on the matching result, the processor 1901 specifically executes:
[0397] The first matching result and the second matching result are sent to the terminal, so that the terminal determines that the SMS identification result is a malicious category when the first matching result or the second matching result is a matching failure, and determines that the first SMS identification result is a common category when the first matching result and the second matching result are both matching successes.
[0398] Optionally, when the processor 1901 executes at least one of the reserved traffic diversion information, the SMS fingerprint information, and the SMS feature vector of the SMS sent by the receiving terminal, specifically executes:
[0399] Receive the reserved traffic information, SMS fingerprint information and SMS feature vector of the SMS sent by the terminal
[0400] Processor 1901 determines a matching result for reserved traffic diversion information or SMS fingerprint information and sends the matching result to the terminal, so that the terminal determines a first SMS recognition result based on the matching result; and / or determines approximate SMS sample information corresponding to the SMS feature vector and sends the approximate SMS sample information to the terminal, so that the terminal compares the SMS with the approximate SMS sample information, and determines a second SMS recognition result, specifically executing:
[0401] Determine a matching result for the reserved drainage information or the SMS fingerprint information, and if the matching result is a match failure, determine approximate SMS sample information corresponding to the SMS feature vector;
[0402] The approximate SMS sample information is sent to the terminal, so that the terminal compares the SMS with the approximate SMS sample information, determines a second SMS recognition result, and uses the second SMS recognition result as a target SMS recognition result of the SMS.
[0403] Optionally, when the processor 1901 determines the approximate SMS sample information corresponding to the SMS feature vector, the processor 1901 specifically performs:
[0404] Obtaining a database of sample SMS vectors and SMS indexes, determining a target sample SMS vector that matches the SMS feature vector from the sample SMS vectors, and obtaining a target SMS index corresponding to the target sample SMS vector based on the database;
[0405] Determine approximate SMS sample information for the SMS based on the target SMS index.
[0406] In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0407] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, and may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0408] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
[0409] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable 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 embodiment of the present application. 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 and other media that can store program code.
[0410] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of the present application.
[0411] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0412] The above is a description of a text message identification method, device, terminal and computer-readable storage medium provided in an embodiment of the present application. For technicians in this field, according to the ideas of the embodiments of the present application, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the embodiments of the present application.
Claims
1. A method for identifying short messages, wherein: The method comprises: Get the SMS received by the terminal; Obtain at least one of reserved traffic diversion information, SMS fingerprint information, and SMS feature vector of the SMS; Sending at least one of the reserved traffic diversion information, the SMS fingerprint information and the SMS feature vector of the SMS to the server; Receive the matching result for the reserved diversion information or the SMS fingerprint information sent by the server and determine the first SMS recognition result of the SMS based on the matching result, and / or receive the approximate SMS sample information corresponding to the SMS feature vector sent by the server and compare the SMS with the approximate SMS sample information to determine the second SMS recognition result of the SMS.
2. The method according to claim 1, wherein: The obtaining of at least one of the reserved traffic diversion information, the SMS fingerprint information, and the SMS feature vector of the SMS includes: Extract the reserved traffic diversion information in the text message; or extract the text message fingerprint information in the text message.
3. The method according to claim 2, wherein: The extracting the reserved traffic diversion information in the short message includes: The variant character text in the text message is restored to normal text, and the reserved drainage information is extracted from the normal text; or, the reserved drainage information in the text message is extracted by a preset extraction model.
4. The method according to claim 2, wherein: The extracting the SMS fingerprint information from the SMS includes: identifying text variables in the text message; The text variable is replaced according to a preset strategy to obtain a reference SMS; Determine the SMS fingerprint information of the SMS according to the reference SMS.
5. The method according to claim 1, wherein: The sending at least one of the reserved traffic diversion information, the SMS fingerprint information and the SMS feature vector of the SMS to the server includes: Sending the reserved traffic diversion information, SMS fingerprint information and SMS feature vector of the SMS to the server; The receiving a matching result for the reserved traffic diversion information or the SMS fingerprint information sent by the server and determining a first SMS recognition result of the SMS based on the matching result, and / or receiving approximate SMS sample information corresponding to the SMS feature vector sent by the server and comparing the SMS with the approximate SMS sample information to determine a second SMS recognition result of the SMS, including: Receiving a matching result for the reserved traffic diversion information or the SMS fingerprint information sent by the server, and if the matching result is a matching failure, receiving approximate SMS sample information corresponding to the SMS feature vector sent by the server; The text message is compared with the similar text message sample information to determine a second text message recognition result, and the second text message recognition result is used as a target text message recognition result of the text message.
6. A method for identifying short messages, wherein: The method comprises: At least one of reserved traffic diversion information, SMS fingerprint information, and SMS feature vector of the SMS sent by the receiving terminal; Determine a matching result for the reserved diversion information or the SMS fingerprint information and send the matching result to the terminal, so that the terminal determines a first SMS recognition result based on the matching result; and / or determine approximate SMS sample information corresponding to the SMS feature vector and send the approximate SMS sample information to the terminal, so that the terminal compares the SMS with the approximate SMS sample information to determine a second SMS recognition result.
7. A text message recognition device, wherein: The device comprises: A first acquisition module, adapted to acquire short messages received by a terminal; A second acquisition module, adapted to acquire at least one of the reserved traffic diversion information, the SMS fingerprint information and the SMS feature vector of the SMS; A sending module, adapted to send at least one of the reserved traffic diversion information, the SMS fingerprint information and the SMS feature vector of the SMS to a server; A receiving module is suitable for receiving the matching result for the reserved diversion information or the SMS fingerprint information sent by the server and determining the first SMS recognition result of the SMS based on the matching result, and / or receiving the approximate SMS sample information corresponding to the SMS feature vector sent by the server and comparing the SMS with the approximate SMS sample information to determine the second SMS recognition result of the SMS.
8. A server, wherein: The server comprises: A server receiving module, adapted to receive at least one of reserved traffic diversion information, SMS fingerprint information and SMS feature vector of SMS sent by a terminal; The SMS determination module is suitable for determining the matching result for the reserved diversion information or the SMS fingerprint information and sending the matching result to the terminal, so that the terminal determines the first SMS recognition result based on the matching result; and / or, determining the approximate SMS sample information corresponding to the SMS feature vector and sending the approximate SMS sample information to the terminal, so that the terminal compares the SMS with the approximate SMS sample information to determine the second SMS recognition result.
9. A terminal, wherein: The terminal includes: Processor; and A memory arranged to store computer executable instructions which, when executed, cause the processor to perform a method according to any one of claims 1 to 5 or 6.
10. A computer-readable storage medium, wherein: The computer-readable storage medium stores one or more programs, which, when executed by a processor, implement the method of any one of claims 1 to 5 or 6.