Method, system and equipment for identifying fraud-related short messages based on pruning large model and medium

Through the method based on the pruning model, through data downgrade and vector SMS retrieval, the problem that traditional recognition methods are difficult to quickly identify fraudulent SMS is solved, and efficient and accurate recognition effect is achieved, improving the security of the telecommunications network.

CN119416778AActive Publication Date: 2025-02-11北京九栖科技有限责任公司
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411436701.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-02-11
Estimated Expiration
2044-10-15

AI Technical Summary

Technical Problem

Traditional fraudulent SMS recognition methods cannot quickly and effectively identify fraudulent SMS in massive SMS messages, making it difficult to isolate telecommunications and network fraud.

Method used

The fraud-related SMS recognition method based on the pruning model is adopted, and through data degradation, vector SMS retrieval and pruning model input, the fraud-related SMS recognition is achieved quickly and accurately.

Benefits of technology

It improves the recall and accuracy rate of fraud-related text messages, realizes the rapid and accurate identification of fraud-related text messages, and enhances the security of the telecommunications network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119416778A_ABST
    Figure CN119416778A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a system and equipment for identifying fraud-related short messages based on a pruning large model, and a medium. The method comprises the following steps: carrying out data degradation on short message data; vector short messages similar to the degraded short messages are retrieved from a fraud short message vector knowledge base; vector short messages with the similarity meeting the requirement are selected from the similar vector short messages; and inputting the degraded short messages and the vector short messages with the similarity meeting the requirement as a pruning large model to obtain a final recognition result. According to the method, large model reasoning data pressure is reduced through a degradation algorithm, the model identification capability is improved through a mode of retrieving similar short messages, a pruning technology is utilized, model parameters are compressed, and a post-training mode is adopted to reduce the influence brought by model compression, so that fraud-related short messages are rapidly and accurately identified, and the recall rate and the accuracy rate of the fraud-related short messages are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication data processing technology, and more specifically to a method, device and medium for identifying fraudulent text messages based on a pruned large model. Background Art

[0002] Fraudulent text messages are one of the most common means of telecommunications network fraud. They often evade the supervision of telecommunications networks through synonyms, similar characters, homophones, etc., use characters, numbers, Chinese characters and other variations to generate URLs to break through the restrictions of network blacklists, and use massive number pools to break the SMS traffic barrier. As a result, traditional fraudulent text message identification methods have great limitations and are unable to quickly and effectively identify fraudulent text messages.

[0003] Therefore, it is urgent to accurately and quickly identify fraudulent text messages from massive text messages and isolate telecommunications network fraud from the telecommunications network. Summary of the invention

[0004] In view of this, the present invention provides a method, system, device and medium for identifying fraudulent text messages based on a pruned large model, so as to achieve rapid and accurate identification of fraudulent text messages and improve the recall rate and accuracy rate of fraudulent text messages.

[0005] In order to achieve the above object, the present invention adopts the following technical solution:

[0006] A method for identifying fraudulent text messages based on a pruning large model, comprising:

[0007] Data downgrade of SMS data;

[0008] Retrieve vector SMS messages similar to the downgraded SMS messages from a fraud SMS vector knowledge base;

[0009] Selecting a vector text message whose similarity meets the requirement from similar vector text messages;

[0010] The downgraded SMS and the vector SMS with the required similarity are used as inputs to the pruned large model to obtain the final recognition result.

[0011] Preferably, the SMS data is downgraded, specifically including:

[0012] The TextRank algorithm is used to extract k candidate keywords from each text message, and the candidate keywords are sorted by importance to form keyword groups. The text messages with the same keyword groups are clustered, and one text message is selected from each cluster as the downgraded text message.

[0013] Preferably, the TopN candidate keywords are extracted from each SMS by using the TextRank algorithm, the candidate keywords are sorted by importance to form keyword groups, SMS with the same keyword group are clustered, and one SMS is selected from each cluster as the downgraded SMS, specifically including:

[0014] S11, segment the short message into complete sentences, and obtain a sentence set T = [S 1 ,S 2 ,...,S m ], where m is the number of sentences contained in the text message;

[0015] S12. Perform word segmentation and part-of-speech tagging on each sentence, remove stop words, and obtain the result after removal S a =[t a,1 ,t a,2 ,...,t a,q ], t a,q is a candidate keyword, q is a sentence S a The number of participles;

[0016] S13, converting the candidate keywords into a keyword graph Graph = (V, E), where V represents each candidate keyword node, when there is a co-occurrence relationship between two nodes, that is, when the distance between the candidate keywords corresponding to the two nodes in the text message does not exceed l, there is an edge between the two nodes, and E represents the set of all edges;

[0017] S14. Calculate the weights between nodes according to the following formula:

[0018]

[0019] In the formula, the keyword graph is used to represent the relationship between each candidate keyword, v i 、v j is the node corresponding to the candidate keyword i, j, S(v i )、S(v j ) represents the weights of candidate keyword i and candidate keyword j, d is the damping coefficient, ε represents the set of all candidate keyword edges that appear before candidate keyword i, (j,i) represents one of the ε sets, i.e., the edge where candidate keyword j appears before candidate keyword i, v k Indicates the node corresponding to the keyword that appears after candidate keyword j, out(v j ) represents the set of nodes corresponding to other candidate keywords that appear after candidate keyword j, w ji represents the weight of the edge composed of each point j in front of the candidate keyword i, w jk Represents the weight of point j to other candidate keywords;

[0020] S15, sort all nodes according to weight and take the first s nodes;

[0021] S16, find candidate keywords corresponding to s nodes and mark them in the original text. If there are adjacent candidate keywords, merge them into one candidate keyword;

[0022] S17, the candidate keywords are concatenated in order of weight to form a keyword group, and the short messages with the same keyword group are taken as a set K l =[k l ,c l1 ,c l2 ,...,c ln ], where K l represents the lth group of SMS, k l Indicates the lth keyword group, c ln The content of the nth SMS in the lth SMS group;

[0023] S18, extract the first message content from each group of message collections, and obtain the downgraded message C = [c 11 ,c 21 ,...,c l1 ].

[0024] Preferably, it also includes training a large pruning model, and the specific process includes:

[0025] Take [normal SMS, fraud SMS] in the original SMS as negative samples, [normal SMS, normal SMS] and [fraud SMS, fraud SMS] as positive samples, and construct a training data set;

[0026] The SMS vectorization model is trained through the training data set, the dual-tower model is used to build the SMS vectorization model, and the Bert model is selected as the basic model of the dual-tower model;

[0027] The refined sorting model is trained through the training data set, and the single-tower architecture is used to build the refined sorting model. The Bert model is selected as the basic model of the single-tower architecture.

[0028] A pruned large model is constructed based on the trained SMS vectorization model and refined sorting model, and the pruned large model is pruned. The pruning process includes: determining the coupling structure group of the model, evaluating the importance of the coupling structure group, and identifying the coupling structure group that needs to be pruned based on the importance and performing coupling structure pruning;

[0029] The pruned large model is post-trained using a sample set of fraudulent SMS messages. LoRA is selected as the post-training method, and the update value ΔW of W in the model is decomposed into a low-rank matrix for forward calculation:

[0030] f(x)=(W+ΔW)X+b=(WX+b)+(PQ)X

[0031] Among them, P, Q are low-rank matrices decomposed by ΔW, W is the parameter matrix of the model, ΔW is the update value of W, X is the model input, and b is the bias matrix.

[0032] Preferably, the coupling structure group of the model is determined, specifically:

[0033] The coupling structure refers to the structural set of all neurons that have a dependent relationship starting from the triggering neuron in the model structure. When a neuron is pruned, the corresponding dependent neurons also need to be pruned;

[0034] The dependency relationship between neurons is defined as:

[0035] If N j ∈Out(N i )∧Deg - (N j )=1, then N j Depends on N i , if N i ∈In(N j )∧Deg + (N i )=1, then N i Depends on N j ;

[0036] Among them, N i 、N j Indicates two different neurons in the model, In(N i ) and Out(N i ) indicates all points to N i The neurons and i The neuron that points to Deg + (N i ) represents neuron N i The in-degree, Deg - (N j ) represents neuron N j The out-degree of .

[0037] Preferably, the importance of the coupling structure is evaluated in the following manner:

[0038]

[0039] Among them, I G represents the importance of a set of coupled structures, M is the number of coupled structures, and W i is the weight of the i-th coupling structure, is the loss change of the corresponding coupling structure, W i kis the weight of the kth parameter of the ith coupling structure, W i k The corresponding coupling structure loss changes.

[0040] Preferably, training the SMS vectorization model through a training data set specifically includes:

[0041] The two columns of SMS in the positive and negative samples are used as the input of the dual-tower model to generate SMS vector representation;

[0042] Calculate the similarity. Use cosine similarity to calculate the similarity between two SMS vectors. If the input data is a negative sample, the similarity is 0. If the input data is a positive sample, the similarity is 1.

[0043] The binary cross entropy loss function is used to measure the difference between the model prediction and the true sample label;

[0044] Train the dual-tower model and continuously adjust the model parameters to minimize the loss function.

[0045] A fraudulent SMS identification system based on a pruning large model, comprising:

[0046] Data downgrade unit: used to downgrade the data of SMS;

[0047] Similar SMS retrieval unit: used to retrieve vector SMS similar to the downgraded SMS from the fraud SMS vector knowledge base;

[0048] Similar SMS sorting unit: used to select vector SMS with similarity meeting the requirements from similar vector SMS;

[0049] Large model detection unit: used to input the downgraded SMS and the vector SMS with similarity meeting the requirements as the pruned large model to obtain the final recognition result.

[0050] A computer device comprises: a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of a method for identifying fraudulent text messages based on a pruned large model are implemented.

[0051] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for identifying fraudulent text messages based on a pruned large model.

[0052] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a method, system, device and medium for identifying fraudulent text messages based on a pruned large model. The present invention reduces the pressure of large model inference data through a downgrading algorithm, improves the model recognition capability by retrieving similar text messages, compresses model parameters using pruning technology, and adopts post-training to reduce the impact of model compression, thereby achieving fast and accurate identification of fraudulent text messages and improving the recall rate and precision of fraudulent text messages. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present invention 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 embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0054] Figure 1 A flow chart of a method for identifying fraudulent text messages based on a pruned large model provided by the present invention.

[0055] Figure 2 A structural block diagram of a fraudulent SMS identification system based on a pruned large model provided by the present invention. DETAILED DESCRIPTION

[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] The embodiment of the present invention discloses a method for identifying fraudulent text messages based on a pruning large model, such as Figure 1 As shown, including:

[0058] Data downgrade for SMS;

[0059] Retrieve vector SMS messages similar to the downgraded SMS messages from a fraud SMS vector knowledge base;

[0060] Selecting a vector text message whose similarity meets the requirement from similar vector text messages;

[0061] The downgraded text messages and the vector text messages that meet the similarity requirements are input into the pruned large model to obtain the recognition results. The keyword group is extracted from the obtained recognition results. The data that is the same as the keyword group in the original data is all the fraud-related text messages that are finally identified.

[0062] In this embodiment, data downgrading of the text message specifically includes:

[0063] The TextRank algorithm is used to extract the TopN candidate keywords from each text message, and the candidate keywords are sorted by importance to form keyword groups. The text messages with the same keyword groups are clustered, and one text message is selected from each cluster as the downgraded text message.

[0064] More specifically, they include:

[0065] S11, segment the short message into complete sentences, and obtain a sentence set T = [S 1 ,S 2 ,...,S m ], where m is the number of sentences contained in the text message;

[0066] S12. Perform word segmentation and part-of-speech tagging on each sentence, remove stop words, and obtain the result after removal S a =[t a,1 ,t a,2 ,...,t a,q ], t a,q is a candidate keyword, q is a sentence S a The number of participles;

[0067] S13, converting the candidate keywords into a keyword graph Graph = (V, E), where V represents each candidate keyword node, when there is a co-occurrence relationship between two nodes, that is, when the distance between the candidate keywords corresponding to the two nodes in the text message does not exceed l, there is an edge between the two nodes, and E represents the set of all edges;

[0068] S14. Calculate the weights between nodes according to the following formula:

[0069]

[0070] In the formula, the keyword graph is used to represent the relationship between each candidate keyword, v i 、v j is the node corresponding to the candidate keyword i, j, S(v i )、S(v j ) represents the weights of candidate keyword i and candidate keyword j, d is the damping coefficient, ε represents the set of all candidate keyword edges that appear before candidate keyword i, (j,i) represents one of the ε sets, i.e., the edge where candidate keyword j appears before candidate keyword i, v k Indicates the node corresponding to the keyword that appears after candidate keyword j, out(v j ) represents the set of nodes corresponding to other candidate keywords that appear after candidate keyword j, w jirepresents the weight of the edge composed of each point j in front of the candidate keyword i, w jk Represents the weight of point j to other candidate keywords;

[0071] S15, sort all nodes according to weight and take the first s nodes;

[0072] S16, find candidate keywords corresponding to s nodes and mark them in the original text. If there are adjacent candidate keywords, merge them into one candidate keyword;

[0073] S17, the candidate keywords are concatenated in order of weight to form a keyword group, and the short messages with the same keyword group are taken as a set K l =[k l ,c l1 ,c l2 ,...,c ln ], where K l represents the lth group of SMS, k l Indicates the lth keyword group, c ln The content of the nth SMS in the lth SMS group. In one embodiment, the keyword phrase is represented by a string of keywords concatenated by &;

[0074] S18, extract the first message content from each group of message collections, and obtain the downgraded message C = [c 11 ,c 21 ,...,c l1 ].

[0075] In this embodiment, before the formal prediction, a large model is trained and pruned. The specific process includes:

[0076] Step 1: Take [normal SMS, fraud SMS] in the original SMS as negative samples, [normal SMS, normal SMS] and [fraud SMS, fraud SMS] as positive samples, and construct a training data set. The training data set adopts random sampling, and the ratio of positive and negative samples generated is close to 1:2 or 1:3;

[0077] Step 2: Train the SMS vectorization model using the training data set, use the dual-tower model to build the SMS vectorization model, and select the Bert model as the basic model of the dual-tower model; the specific process is:

[0078] The two columns of SMS in the positive and negative samples are used as inputs of the two models respectively to generate SMS vector representations;

[0079] Calculate the similarity. Use cosine similarity to calculate the similarity between two SMS vectors. If the input data is a negative sample, the similarity is 0. If the input data is a positive sample, the similarity is 1.

[0080] The binary cross entropy loss function is used to measure the difference between the model prediction and the true sample label;

[0081] Train the dual-tower model and continuously adjust the model parameters to minimize the loss function.

[0082] The dual-tower model trained in this embodiment is used as a text message vectorization model to vectorize all text messages in the original data set and the text messages to be tested that need to be identified.

[0083] Step 3: Train the refined ranking model through the training data set, use the single-tower architecture to build the refined ranking model, and select the Bert model as the basic model of the single-tower architecture; generate a token from the positive and negative samples as the model input. This training method can obtain more accurate classification results compared to the dual-tower architecture. Therefore, the model is used to sort the text messages retrieved from the vector knowledge base by similarity to find more similar text messages.

[0084] Step 4: construct a pruned large model based on the trained SMS vectorization model and refined sorting model, and prune the pruned large model. The pruning process includes: determining the coupling structure of the model, evaluating the importance of the coupling structure, and clarifying the coupling structure group that needs to be pruned based on the importance and pruning the coupling structure;

[0085] The pruning process can meet the following conditions: Due to the dependence of large models on the original corpus, it is necessary to reduce the demand for the original corpus in the pruning process, and a small amount of public data sets can be used to compress the large model; the model can still maintain multi-task solving capabilities after pruning, and the pruning process is task-independent compression; the pruning process is automatically completed through the defined dependencies and corresponding weight calculations; the pruning process can be completed without taking too much time.

[0086] Specifically include:

[0087] Determine the dependencies in the large model and identify the dependency structure groups in the large model. The dependencies in the model can be defined as:

[0088]

[0089] According to the dependency relationship in the formula, if a neuron needs to be pruned, then the neurons that have dependencies on it must also be pruned.

[0090] After that, a neuron is randomly initialized as a trigger neuron. Based on the dependency between neurons, other neurons with dependencies on the triggering neuron are found. These neurons can be used as triggering neurons to find neurons with dependencies on them. This iteration is repeated until no other neurons with dependencies can be found. The collection of these neurons is a set of dependency structure groups. Traverse all neurons to find all coupling structures with dependencies. For all coupling structure groups, all neurons in the same group should be pruned at the same time to avoid parameter imbalance caused by partial pruning.

[0091] The importance of the obtained coupling structure group is evaluated. Due to the limited sample size of the large model training set, data are selected from the public data set for importance evaluation. The data set is Where N is the number of samples, x i ,y i Represent the input and output of the model respectively, and the coupled structure group is defined as Where M represents the number of coupling structures in the corresponding coupling structure group, W i is the weight corresponding to the coupling structure.

[0092] In order to prune the coupled structure group with the least impact on the model, the weights of the coupled structures need to be evaluated as follows:

[0093]

[0094] Among them, H is the Hessian matrix, L represents the prediction loss function of the next token. When the original training set of the large model is used for training, since the model has converged, However, the data set used in the embodiment is a public data set, so

[0095] According to the above evaluation method of the importance of coupling structure, W can be obtained i The importance evaluation formula at a finer granularity is:

[0096]

[0097] Where k represents W i The kth parameter, H kk It can be approximated by the Fisher information matrix, so the above formula can be defined as:

[0098]

[0099] After determining the evaluation method of the coupling structure, it is necessary to select the coupling structure group that needs to be pruned by calculating the importance of each coupling structure group, that is, G = importance evaluation. The evaluation method is as follows:

[0100]

[0101] The importance of all coupled structure groups is calculated according to formula (7), and the large model is pruned according to a certain ratio.

[0102] The present invention pruned the large model on the basis of minimizing the impact on model performance and minimizing the dependence on the original training set, and accelerated the model reasoning by pruning the structure of the model. The structural pruning method of the large model will not destroy the various functions that the original large model can achieve.

[0103] Step 5: Post-train the pruned large model using the fraudulent SMS sample set, select LoRA as the post-training method, and decompose the update value ΔW of W in the model into a low-rank matrix for forward calculation:

[0104] f(x)=(W+ΔW)X+b=(WX+b)+(PQ)X (8)

[0105] Among them, P, Q are low-rank matrices decomposed by ΔW, W is the parameter matrix of the model, ΔW is the update value of W, X is the model input, and b is the bias matrix.

[0106] In this embodiment, the fraudulent SMS vector knowledge base is used to store real fraudulent SMS vector data and representative normal SMS vector data of various types. The fraudulent SMS vector knowledge base is used as a prompt word for subsequent large model identification of fraudulent SMS.

[0107] The construction of the fraudulent SMS vector knowledge base uses the dual-tower model to train the SMS vectorization model, and uses the existing SMS data as the model input to build the fraudulent SMS vector knowledge base.

[0108] This embodiment discloses a fraudulent SMS identification system based on a pruned large model. Figure 2 As shown, including:

[0109] Data downgrade unit: used to downgrade the data of SMS;

[0110] Similar SMS retrieval unit: used to retrieve vector SMS similar to the downgraded SMS from the fraud SMS vector knowledge base;

[0111] Similar SMS sorting unit: used to select vector SMS with similarity meeting the requirements from similar vector SMS;

[0112] Large model detection unit: used to input the downgraded SMS and the vector SMS with similarity meeting the requirements as the pruned large model to obtain the final recognition result.

[0113] Among them, the specific implementation process and method of each unit in the system of this embodiment are the same, and will not be repeated here.

[0114] This embodiment provides a computer device, including: a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of a method for identifying fraudulent text messages based on a pruned large model are implemented.

[0115] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a method for identifying fraudulent text messages based on a pruned large model are implemented.

[0116] A person skilled in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc. Various media that can store program codes.

[0117] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0118] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for identifying fraudulent text messages based on a pruning large model, characterized in that: include: Data downgrade of SMS data; Retrieve vector SMS messages similar to the downgraded SMS messages from a fraud SMS vector knowledge base; Selecting a vector text message whose similarity meets the requirement from similar vector text messages; The downgraded SMS and the vector SMS with the required similarity are used as inputs to the pruned large model to obtain the final recognition result.

2. According to claim 1, a method for identifying fraudulent text messages based on a pruning large model is characterized in that: Data downgrade of SMS data, including: The TextRank algorithm is used to extract k candidate keywords from each text message, and the candidate keywords are sorted by importance to form keyword groups. The text messages with the same keyword groups are clustered, and one text message is selected from each cluster as the downgraded text message.

3. According to claim 2, a method for identifying fraudulent text messages based on a pruning large model is characterized in that: The TextRank algorithm is used to extract the top N candidate keywords from each SMS, and the candidate keywords are sorted by importance to form keyword groups. SMS messages with the same keyword group are clustered, and one SMS message is selected from each cluster as the downgraded SMS message, including: S11, segment the text message into complete sentences, and obtain the sentence set T = [S1, S2, ..., S m ], where m is the number of sentences contained in the text message; S12. Perform word segmentation and part-of-speech tagging on each sentence, remove stop words, and obtain the result after removal S a =[t a,1 ,t a,2 ,...,t a,q ], t a,q is a candidate keyword, q is a sentence S a The number of participles; S13, converting the candidate keywords into a keyword graph Graph = (V, E), where V represents each candidate keyword node, when there is a co-occurrence relationship between two nodes, that is, when the distance between the candidate keywords corresponding to the two nodes in the text message does not exceed l, there is an edge between the two nodes, and E represents the set of all edges; S14. Calculate the weights between nodes according to the following formula: In the formula, the keyword graph is used to represent the relationship between each candidate keyword, v i 、v j is the node corresponding to the candidate keyword i, j, S(v i )、S(v j ) represents the weights of candidate keyword i and candidate keyword j, d is the damping coefficient, ε represents the set of all candidate keyword edges that appear before candidate keyword i, (j,i) represents one of the ε sets, i.e., the edge where candidate keyword j appears before candidate keyword i, v k Indicates the node corresponding to the keyword that appears after candidate keyword j, out(v j ) represents the set of nodes corresponding to other candidate keywords that appear after candidate keyword j, w ji represents the weight of the edge composed of each point j in front of the candidate keyword i, w jk Represents the weight of point j to other candidate keywords; S15, sort all nodes according to weight and take the first s nodes; S16, find candidate keywords corresponding to s nodes and mark them in the original text. If there are adjacent candidate keywords, merge them into one candidate keyword; S17, the candidate keywords are concatenated in order of weight to form a keyword group, and the short messages with the same keyword group are taken as a set K l =[k l ,c l1 ,c l2 ,...,c ln ], where K l represents the lth group of SMS, k l Indicates the lth keyword group, c ln The content of the nth SMS in the lth SMS group; S18, extract the first message content from each group of message collections, and obtain the downgraded message C = [c 11 ,c 21 ,...,c l1 ].

4. According to claim 1, a method for identifying fraudulent text messages based on a pruning large model is characterized in that: It also includes training and pruning large models. The specific process includes: Take [normal SMS, fraud SMS] in the original SMS as negative samples, [normal SMS, normal SMS] and [fraud SMS, fraud SMS] as positive samples, and construct a training data set; The SMS vectorization model is trained through the training data set, the dual-tower model is used to build the SMS vectorization model, and the Bert model is selected as the basic model of the dual-tower model; The refined sorting model is trained through the training data set, and the single-tower architecture is used to build the refined sorting model. The Bert model is selected as the basic model of the single-tower architecture. A pruned large model is constructed based on the trained SMS vectorization model and refined sorting model, and the pruned large model is pruned. The pruning process includes: determining the coupling structure group of the model, evaluating the importance of the coupling structure group, and identifying the coupling structure group that needs to be pruned based on the importance and performing coupling structure pruning; The pruned large model is post-trained using a sample set of fraudulent SMS messages. LoRA is selected as the post-training method, and the update value ΔW of W in the model is decomposed into a low-rank matrix for forward calculation: f(x)=(W+ΔW)X+b=(WX+b)+(PQ)X Among them, P, Q are low-rank matrices decomposed by ΔW, W is the parameter matrix of the model, ΔW is the update value of W, X is the model input, and b is the bias matrix.

5. According to claim 4, a method for identifying fraudulent text messages based on a pruning large model is characterized in that: Determine the coupled structure group of the model, specifically: The coupling structure refers to the structural set of all neurons that have a dependent relationship starting from the triggering neuron in the model structure. When a neuron is pruned, the corresponding dependent neurons also need to be pruned; The dependency relationship between neurons is defined as: If N j ∈Out(N i )∧Deg - (N j )=1, then N j Depends on N i , if N i ∈In(N j )∧Deg + (N i )=1, then N i Depends on N j ; Among them, N i 、N j Indicates two different neurons in the model, In(N i ) and Out(N i ) indicates all points to N i The neurons and i The neuron that points to Deg + (N i ) represents neuron N i The in-degree, Deg - (N j ) represents neuron N j The out-degree of .

6. According to claim 4, a method for identifying fraudulent text messages based on a pruning large model is characterized in that: The importance of the coupled structure group is evaluated as follows: Among them, I G represents the importance of a set of coupled structures, M is the number of coupled structures, and W i is the weight of the i-th coupling structure, is the loss change corresponding to the coupling structure, W i k is the weight of the kth parameter of the ith coupling structure, W i k The corresponding coupling structure loss changes.

7. According to claim 4, a method for identifying fraudulent text messages based on a pruning large model is characterized in that: The SMS vectorization model is trained using the training data set, including: The two columns of SMS in the positive and negative samples are used as the input of the dual-tower model to generate SMS vector representation; Calculate the similarity. Use cosine similarity to calculate the similarity between two SMS vectors. If the input data is a negative sample, the similarity is 0. If the input data is a positive sample, the similarity is 1. The binary cross entropy loss function is used to measure the difference between the model prediction and the true sample label; Train the dual-tower model and continuously adjust the model parameters to minimize the loss function.

8. A fraudulent SMS identification system based on a pruned large model, characterized in that: include: Data downgrade unit: used to downgrade the data of SMS; Similar SMS retrieval unit: used to retrieve vector SMS similar to the downgraded SMS from the fraud SMS vector knowledge base; Similar SMS sorting unit: used to select vector SMS with similarity meeting the requirements from similar vector SMS; Large model detection unit: used to input the downgraded SMS and the vector SMS with similarity meeting the requirements as the pruned large model to obtain the final recognition result.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the steps of the method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Recall method for intelligently selecting underlying feature supplementation under stratified sampling

    CN115563169A

  • Retrieval enhancement generation method based on vector similarity matching optimization

    CN117573815A

  • Entity search method, and fine tuning method, device and equipment of large language model

    CN118733633A

  • Methods and systems for indicating resource usage parameter for prompting a large language model (LLM)

    US20240311192A1