Fraud-related short message identification method, system and device based on pruned large model and medium
By employing a pruning-based large model identification method, combined with data degradation and similar SMS retrieval, and utilizing the TextRank algorithm and training model, the pruning technique identifies fraudulent SMS messages, solving the problem of insufficient identification capability in traditional methods and achieving fast and accurate identification of fraudulent SMS messages.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2026-03-20
AI Technical Summary
Existing technologies are insufficient for quickly and effectively identifying fraudulent text messages. Traditional methods have limited identification capabilities when faced with massive amounts of text messages, and cannot accurately isolate telecommunications network fraud.
A large-scale model-based identification method is adopted, which uses data degradation, similar SMS retrieval and pruning techniques, combined with the TextRank algorithm to extract keywords, train dual-tower and single-tower models, prune the large-scale model and perform post-training, and use a fraud SMS vector knowledge base for identification.
It enables rapid and accurate identification of fraudulent text messages, improves recall and precision, reduces the data pressure on model inference, compresses model parameters, and mitigates the impact of model compression.
Smart Images

Figure CN119416778B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication data processing, and more particularly to a fraud-related short message identification method based on a pruned large model, a device and a medium. BACKGROUND
[0002] Fraudulent short messages are one of the most common means of telecommunications network fraud, often evading telecommunications network supervision through synonyms, similar characters, homophonic characters, etc., generating URLs using character, number, and Chinese character variations to break through network blacklist restrictions, and using a large number of number pools to break through the short message flow barrier, resulting in limitations of traditional fraud short message identification methods, which cannot quickly and effectively identify fraudulent short messages.
[0003] Therefore, it is urgent to accurately and quickly identify fraudulent short messages from a large number of short messages and isolate telecommunications network fraud from the telecommunications network. SUMMARY
[0004] Therefore, the present application provides a fraud-related short message identification method, system, device and medium based on a pruned large model, which realizes fast and accurate identification of fraud-related short messages and improves the recall rate and accuracy of fraud-related short messages.
[0005] To achieve the above purpose, the present application adopts the following technical solutions:
[0006] A fraud-related short message identification method based on a pruned large model, comprising:
[0007] Downgrading short message data;
[0008] Retrieving similar vector short messages from the fraud short message vector knowledge base to the downgraded short messages;
[0009] Selecting vector short messages with a similarity that meets the requirements from the similar vector short messages;
[0010] Taking the downgraded short messages and the vector short messages with the similarity that meets the requirements as inputs of the pruned large model to obtain the final identification result.
[0011] Preferably, the short message data is downgraded, specifically including:
[0012] Extracting k candidate keywords from each short message by the TextRank algorithm, sorting the candidate keywords by importance to form a keyword group, clustering short messages with the same keyword group, and selecting one short message from each cluster as a downgraded short message.
[0013] Preferably, TopN candidate keywords are extracted from each short message by the TextRank algorithm, the candidate keywords are sorted according to the importance of the candidate keywords to form a keyword group, short messages with the same keyword group are clustered, and one short message is selected from each cluster as a downgraded short message, which specifically includes:
[0014] S11, the short message is segmented according to complete sentences to obtain a sentence set T = [S1, S2,..., S m ], wherein m is the number of sentences contained in the short message;
[0015] S12, each sentence is segmented and tagged with a part of speech, and stop words are removed to obtain a result S a = [t a,1 ,t a,2 ,...,t a,q ] after removal, t a,q is a candidate keyword, and q is the number of segmented sentences of S a ;
[0016] S13, the candidate keywords are converted into a keyword graph Graph = (V, E), wherein V represents each candidate keyword node, when there is a co-occurrence relationship between two nodes, that is, the distance between the candidate keywords corresponding to the two nodes in the short message does not exceed l, there is an edge between the two nodes, and E represents a set of all edges;
[0017] S14, the weight between nodes is calculated according to the following formula:
[0018]
[0019] In the formula, the relationship between each candidate keyword is represented by a keyword graph, v i and v j are nodes corresponding to candidate keywords i and j, S(v i ) and S(v j ) represent the weights of candidate keywords i and j, d is a damping coefficient, ε represents a set of edges in which candidate keywords appear before candidate keyword i, (j, i) represents one in the ε set, that is, candidate keyword j appears before candidate keyword i, v k represents a node corresponding to a keyword appearing after candidate keyword j, out(v j ) represents a set of nodes corresponding to other candidate keywords appearing after candidate keyword j, w ji represents the weight of the edge formed by each point j in front of candidate keyword i, and w jk represents the weight of point j to other candidate keywords;
[0020] S15, all nodes are sorted according to the weight, and the first s nodes are taken.
[0021] S16, find the candidate keywords corresponding to the s nodes and mark them in the original text, and if there are adjacent candidate keywords, merge them into one candidate keyword;
[0022] S17, splice the obtained candidate keywords into keyword groups in order of weight size, and short messages with consistent keyword groups are taken as a set K l l l1 l2 ln , where K l represents the lth set of short message sets, k l represents the lth keyword group, and c ln is the n th short message content in the lth set of short message sets.
[0023] S18, extract the first short message content from each set of short messages to obtain the degraded short message C = [c 11 21 l1 .
[0024] Preferably, it also includes training a pruning large model, and the specific process includes:
[0025] The original short message [normal short message, fraudulent short message] is taken as a negative sample, and [normal short message, normal short message] and [fraudulent short message, fraudulent short message] are taken as positive samples to construct a training data set.
[0026] Train the short message vectorization model through the training data set, use a double-tower model to build the short message vectorization model, and select a Bert model as the base model of the double-tower model.
[0027] Train the fine arrangement model through the training data set, use a single-tower architecture to build the fine arrangement model, and select a Bert model as the base model of the single-tower architecture.
[0028] Based on the trained short message vectorization model and the fine arrangement model, a pruning large model is constructed, and the pruning large model is pruned, and the pruning process includes: determining a coupling structure group of the model, evaluating the importance of the coupling structure group, based on the importance, determining the coupling structure group that needs to be pruned and performing coupling structure pruning.
[0029] The pruning large model is post-trained through the fraud-related short message sample set, 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] Where P and Q are the low-rank matrices of the ΔW decomposition, W is the parameter matrix of the model, ΔW is the updated 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 as follows:
[0033] A coupled structure refers to a set of all neurons in a model structure that have dependencies on each other, starting from the triggering neuron. When a neuron is pruned, the corresponding dependent neurons also need to be pruned.
[0034] The dependency relationship between neurons is defined as follows:
[0035] If N j ∈Out(N i )∧Deg - (N j If ) = 1, then N j Depends on N i If N i ∈In(N j )∧Deg + (N i If ) = 1, then N i Depends on N j ;
[0036] Where, N i N j In represents two distinct neurons in the model, In(N) i ) and Out(N i ) represents all pointers to N i Neurons and N i The neuron being pointed to, Deg + (N i ) represents neuron N i in-degree, Deg - (N j ) represents neuron N j The degree of departure.
[0037] Preferably, the importance of the coupling structure is assessed, and the assessment method is as follows:
[0038]
[0039] Among them, I G M represents the importance of a set of coupled structures, and W represents the number of coupled structures. i Let be the weight of the i-th coupling structure. To correspond to the loss variation of the coupled structure, W i k The weight of the k-th parameter in the i-th coupling structure. For Wi k Corresponding coupling structure loss variation.
[0040] Preferably, the short message vectorization model is trained by a training data set, specifically comprising:
[0041] Two columns of short messages in the positive and negative samples are respectively taken as the input of the double tower model to generate short message vectorization representation;
[0042] The similarity is calculated, and the cosine similarity is used to calculate the similarity between two short message 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 real sample label;
[0044] The double tower model is trained, and the model parameters are continuously adjusted to minimize the loss function.
[0045] A fraud-related short message recognition system based on a pruned large model, comprising:
[0046] Data degradation unit: for degrading short messages;
[0047] Similar short message retrieval unit: for retrieving similar vector short messages from the fraud short message vector knowledge base to the degraded short messages;
[0048] Similar short message sorting unit: for selecting vector short messages with similar degrees meeting the requirements from similar vector short messages;
[0049] Large model detection unit: for taking the degraded short messages and the vector short messages with similar degrees meeting the requirements as inputs of the pruned large model to obtain the final recognition result.
[0050] A computer device, comprising a memory and a processor, the memory stores a computer program executable on the processor, and the processor implements the steps of a fraud-related short message recognition method based on a pruned large model when executing the computer program.
[0051] A computer readable storage medium, the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of a fraud-related short message recognition method based on a pruned large model.
[0052] As can be seen from the above technical solutions, 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 data pressure of large model inference by using a degradation algorithm, improves the model recognition ability by searching for similar text messages, compresses model parameters by using pruning technology, and mitigates the impact of model compression by using post-training, thereby achieving fast and accurate identification of fraudulent text messages and improving the recall and accuracy of fraudulent text messages. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0054] Figure 1 The flowchart of a method for identifying fraudulent text messages based on a pruned large model provided by the present invention is shown.
[0055] Figure 2 This invention provides a structural block diagram of a fraudulent SMS identification system based on a pruned large model. Detailed Implementation
[0056] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0057] This invention discloses a method for identifying fraudulent text messages based on a pruned large model, such as... Figure 1 As shown, it includes:
[0058] Downgrade SMS data;
[0059] Retrieve vector text messages similar to the downgraded text messages from the fraudulent text message vector knowledge base;
[0060] Select vector text messages that meet the similarity requirements from similar vector text messages;
[0061] The downgraded SMS messages and the vector SMS messages that meet the similarity requirements are used as input to the pruning large model to obtain the recognition results. Keyword groups are extracted from the recognition results, and the data in the original data that are the same as the keyword groups are all the fraudulent SMS messages finally identified.
[0062] In the embodiment, data degradation is performed on the short messages, specifically including:
[0063] TopN candidate keywords are extracted from each short message by the TextRank algorithm, and the candidate keywords are sorted according to the importance of the candidate keywords to form a keyword group. The short messages with the same keyword group are clustered, and one short message is selected from each cluster as the degraded short message.
[0064] More specifically, including:
[0065] S11, the short message is segmented according to the complete sentence to obtain a sentence set T = [S1, S2,..., S m ], wherein m is the number of sentences contained in the short message;
[0066] S12, each sentence is segmented and tagged with a part of speech, and stop words are removed to obtain a result S a = [t a,1 ,t a,2 ,...,t a,q ] after removal, t a,q is a candidate keyword, and q is the number of segmented sentences of S a ;
[0067] S13, the candidate keywords are converted into a keyword graph Graph = (V, E), wherein V represents each candidate keyword node, when there is a co-occurrence relationship between two nodes, that is, the distance between the candidate keywords corresponding to the two nodes in the short message does not exceed l, there is an edge between the two nodes, and E represents a set of all edges;
[0068] S14, the weight between the nodes is calculated according to the following formula:
[0069]
[0070] In the formula, the relationship between each candidate keyword is represented by the keyword graph, v i , v j is the node corresponding to the candidate keywords i and j, S(v i ), S(v j ) represents the weight of the candidate keyword i and the candidate keyword j, d is a damping coefficient, ε represents a set of edges in which the candidate keyword i appears in front of the candidate keyword j, (j, i) represents one in the ε set, that is, the edge in which the candidate keyword j appears in front of the candidate keyword i, v k represents the node corresponding to the keyword appearing after the candidate keyword j, out(v j ) represents a set of nodes corresponding to other candidate keywords appearing after the candidate keyword j, w ji represents the weight of the edge composed of each point j in front of the candidate keyword i, and w jkThis represents the weight of point j to other candidate keywords;
[0071] S15. Sort all nodes according to their weights and take the first s nodes;
[0072] S16. Find the 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. Concatenate the obtained candidate keywords in order of weight to form keyword groups. Text messages with the same keyword group are grouped into a set K. l =[k l ,c l1 ,c l2 ,...,c ln ], where K l Let k represent the set of the l-th group of text messages. l c represents the l-th keyword phrase. ln For the content of the nth SMS message in the lth SMS set, in one embodiment, the keyword phrase is represented as a string formed by concatenating each keyword with &.
[0074] S18. Extract the content of the first text message from each set of text messages to obtain the downgraded text message C = [c 11 ,c 21 ,...,c l1 ].
[0075] In this embodiment, before formal prediction, a large-scale pruned model is trained, and the specific process includes:
[0076] Step 1: Construct a training dataset by using [normal SMS, scam SMS] as negative samples and [normal SMS, normal SMS] and [scam SMS, scam SMS] as positive samples in the original SMS. The training dataset is generated by random sampling, and the ratio of positive to negative samples is close to 1:2 or 1:3.
[0077] Step 2: Train the SMS vectorization model using the training dataset. A dual-tower model is used to build the SMS vectorization model, with the BERT model selected as the base model. The specific process is as follows:
[0078] The two columns of SMS messages from the positive and negative samples are used as inputs to the two models respectively to generate a vectorized representation of the SMS messages;
[0079] The similarity is calculated using cosine 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] The dual tower model is trained, and the model parameters are constantly adjusted to minimize the loss function.
[0082] The dual tower model trained in this embodiment is used as a short message vectorization model to vectorize all short messages in the original data set and the test short messages to be identified.
[0083] Step 3: Train the fine arrangement model through the training data set, use a single tower architecture to build the fine arrangement model, and select the Bert model as the base model of the single tower architecture; generate a token as the model input. This training method can obtain more accurate classification results than the dual tower architecture, so the model is used to sort the similarity of the short messages retrieved from the vector knowledge base and find more similar short messages.
[0084] Step 4: Based on the trained short message vectorization model and the fine arrangement model, construct a pruning large model, prune the pruning large model, and the pruning process includes: determining the coupling structure of the model, evaluating the importance of the coupling structure, and based on the importance, determining the coupling structure group that needs to be pruned and performing coupling structure pruning.
[0085] The pruning process can meet the following conditions: due to the dependence of the large model on the original corpus, the pruning process needs to reduce the demand for the original corpus, and a small amount of public data set can be used to complete the compression of the large model; the model can still maintain the ability to solve multiple tasks after pruning, and the pruning process is task-independent compression; the pruning process is automatically completed through the defined dependency relationship and the corresponding weight calculation; the pruning process can be completed without consuming too much time.
[0086] Specifically, it includes:
[0087] The dependency relationship in the large model is determined, and the dependency structure group in the large model is identified. The dependency relationship in the model can be defined as:
[0088]
[0089] According to the dependency relationship in the formula, if a neuron needs to be pruned, the neurons that have a dependency relationship with it also need to be pruned.
[0090] After that, a neuron is randomly initialized as a trigger neuron, and other neurons having a dependency relationship with the trigger neuron are found according to the dependency relationship between neurons. These neurons can also be used as trigger neurons to find neurons having a dependency relationship with them. Such iteration is performed until no other neuron having a dependency relationship can be found. The set of these neurons is a set of dependency structure groups. All neurons are traversed to find all coupling structure groups having a dependency relationship. 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 obtained coupling structure groups are evaluated for importance. Due to the limited training set of the large model, data are selected from a public data set for importance evaluation. The data set is where N is the number of samples, x i and y i represent the input and output of the model respectively, and the coupling structure group is defined as where M represents the number of coupling structures in the corresponding coupling structure group, and W i is the weight corresponding to the coupling structure.
[0092] The coupling structure group that is pruned has the least impact on the model, and the weight of the coupling structure needs to be evaluated. The evaluation method is as follows:
[0093]
[0094] where H is the Hessian matrix, and L represents the predicted loss function of the next token. When the original training set of the large model is used for training, the model has already converged, and thus, However, the data set used in the embodiment is a public data set, and thus,
[0095] According to the above importance evaluation method of the coupling structure, the importance evaluation formula of W i in a more fine-grained manner can be obtained:
[0096]
[0097] In the formula, k represents the kth parameter of W i , and H kk can be approximately represented by a Fisher information matrix. Therefore, the above formula can be defined as:
[0098]
[0099] After determining the evaluation method of the coupling structure, the importance of each coupling structure group needs to be calculated to select the coupling structure group that needs to be pruned, i.e., the importance evaluation of G =. The evaluation method is as follows:
[0100]
[0101] The importance of all coupling structure groups is calculated according to formula (7), and the large model is pruned in proportion.
[0102] The pruning large model minimizes the influence on the model performance and minimizes the range of dependence on the original training set, speeds up the model inference by pruning the structure of the model, and the structure pruning method of the large model does not destroy the various functions that can be achieved by the original large model.
[0103] Step 5: The pruned large model is post-trained by the fraud message sample set, LoRA is selected as the post-training method, and the update value AW of W in the model is decomposed into a low-rank matrix for forward calculation:
[0104] f(x)=(W+ΔW)X+b=(WX+b)+(PQ)X (8)
[0105] Wherein, P, Q are low-rank matrices decomposed from AW, W is a parameter matrix of the model, AW is an update value of W, X is a model input, and b is a bias matrix.
[0106] In this embodiment, the fraud message vector knowledge base is used to store real fraud message vector data and representative normal message vector data of various types, and the fraud message vector knowledge base is used as a prompt word for subsequent large model fraud message identification.
[0107] The fraud message vector knowledge base is built by using a double-tower model to train a message vectorization model, and existing message data is used as model input to build the fraud message vector knowledge base.
[0108] The embodiment discloses a fraud message identification system based on a pruned large model, as shown in Figure 2 , comprising:
[0109] The data degradation unit is configured to degrade the short message data;
[0110] The similar short message retrieval unit is configured to retrieve similar vector short messages from the fraud message vector knowledge base;
[0111] The similar short message sorting unit is configured to select vector short messages with a similarity meeting a requirement from the similar vector short messages;
[0112] The large model detection unit is configured to input the degraded short message and the vector short message with the similarity meeting the requirement into the pruned large model to obtain a final identification result.
[0113] The specific implementation process and method of each unit in the system are the same, and will not be repeated here.
[0114] The embodiment provides a computer device, including a memory and a processor, the memory stores a computer program capable of running on the processor, and when the processor executes the computer program, steps of a fraud-related short message identification method based on a pruned large model are implemented.
[0115] The embodiment provides a computer readable storage medium, and the storage medium stores a computer program. When the computer program is executed by a processor, steps of a fraud-related short message identification method based on a pruned large model are implemented.
[0116] Those skilled in the art can understand that all or part of the steps of the above method embodiments can be completed by program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium, and the program is executed to perform the steps of the above method embodiments; and the foregoing storage medium includes a mobile storage device, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk and various media capable of storing program codes.
[0117] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part.
[0118] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform 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 pruned large model, characterized in that, include: Degrade SMS data; Retrieve vector text messages similar to the downgraded text messages from the fraudulent text message vector knowledge base; Select vector text messages that meet the similarity requirements from similar vector text messages; The downgraded SMS messages and the vector SMS messages that meet the similarity requirements are used as input to the pruned large model to obtain the final recognition result; This also includes training a large, pruned model, the specific process of which includes: The training dataset is constructed by using [normal SMS, fraudulent SMS] as negative samples and [normal SMS, normal SMS] and [fraudulent SMS, fraudulent SMS] as positive samples in the original SMS messages. The SMS vectorization model was trained using a training dataset. The SMS vectorization model was built using a dual-tower model, with the Bert model selected as the base model for the dual-tower model. The fine-ranking model was trained using a training dataset, and a single-tower architecture was used to build the fine-ranking model. The BERT model was selected as the base model for the single-tower architecture. A large-scale pruning model is constructed based on the trained SMS vectorization model and the fine-ranking model. The pruning process includes: determining the coupling structure groups of the model, evaluating the importance of the coupling structure groups, identifying the coupling structure groups that need to be pruned based on their importance, and pruning the coupling structures. The pruned large model was post-trained using a sample set of fraudulent text messages. LoRA was chosen as the post-training method, and the update value ΔW of W in the model was decomposed into a low-rank matrix for forward computation. f(x)=(W+ΔW)X+b=(WX+b)+(PQ)X Where P and Q are the low-rank matrices of the ΔW decomposition, W is the parameter matrix of the model, ΔW is the updated value of W, X is the model input, and b is the bias matrix.
2. The method for identifying fraudulent text messages based on a pruned large model according to claim 1, characterized in that, Downgrade SMS data, specifically including: The TextRank algorithm is used to extract k candidate keywords from each SMS message. These keywords are then sorted by importance to form keyword groups. SMS messages with the same keyword group are clustered together, and one SMS message from each cluster is selected as the downgraded SMS message.
3. The method for identifying fraudulent text messages based on a pruned large model according to claim 2, characterized in that, The TextRank algorithm is used to extract the Top N candidate keywords from each SMS message. These keywords are then ranked by importance and grouped into keyword groups. SMS messages with the same keyword group are clustered, and one message from each cluster is selected as the downgraded SMS message. Specifically, this includes: S11. Segment the text message into complete sentences to obtain a 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 S after removal. a =[t a,1 ,t a,2 ,...,t a,q ], t a,q Let q be the candidate keyword and S be the sentence. a The number of word segments; S13. Convert 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 SMS does not exceed l, there is an edge between the two nodes. E represents the set of all edges. S14. Calculate the weights between nodes according to the following formula: In the formula, a keyword graph is used to represent the relationship between each candidate keyword, v i v j For the nodes corresponding to candidate keywords i and 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, and (j,i) represents one of the elements in the set ε, i.e., the edge where candidate keyword j appears before candidate keyword i. k This represents 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 w represents the weight of the edge formed by the points j preceding candidate keyword i. jk This represents the weight of point j to other candidate keywords; S15. Sort all nodes according to their weights and take the first s nodes; S16. Find the 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. Concatenate the obtained candidate keywords in order of weight to form keyword groups. Text messages with the same keyword group are grouped into a set K. l =[k l ,c l1 ,c l2 ,...,c ln ], where K l Let k represent the set of the l-th group of text messages. l c represents the l-th keyword phrase. ln The content of the nth text message in the l-th text message set; S18. Extract the content of the first text message from each set of text messages to obtain the downgraded text message C = [c 11 ,c 21 ,...,c l1 ].
4. The method for identifying fraudulent text messages based on a pruned large model according to claim 1, characterized in that, The coupling structure group of the model is determined as follows: A coupled structure refers to a set of all neurons in a model structure that have dependencies on each other, starting from the triggering neuron. When a neuron is pruned, the corresponding dependent neurons also need to be pruned. The dependency relationship between neurons is defined as follows: If N j ∈Out(N i )∧Deg - (N j If ) = 1, then N j Depends on N i If N i ∈In(N j )∧Deg + (N i If ) = 1, then N i Depends on N j ; Where, N i N j In represents two distinct neurons in the model, In(N) i ) and Out(N i ) represents all pointers to N i Neurons and N i The neuron being pointed to, Deg + (N i ) represents neuron N i in-degree, Deg - (N j ) represents neuron N j The degree of departure.
5. The method for identifying fraudulent text messages based on a pruned large model according to claim 1, characterized in that, The importance of the coupled structure group is assessed using the following method: Among them, I G M represents the importance of a set of coupled structures, and W represents the number of coupled structures. i Let I be the weight of the i-th coupling structure. Wi To correspond to the loss variation of the coupled structure, W i k The weight of the k-th parameter in the i-th coupling structure. For W i k The corresponding changes in the coupling structure loss.
6. The method for identifying fraudulent text messages based on a pruned large model according to claim 1, characterized in that, Training a vectorized SMS model using a training dataset specifically includes: The two columns of SMS messages from the positive and negative samples are used as inputs to the dual-tower model to generate a vectorized representation of the SMS messages. The similarity is calculated using cosine 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, continuously adjust the model parameters, and minimize the loss function.
7. A fraudulent SMS identification system based on a pruned large model, used to implement the method described in any one of claims 1-6, characterized in that, include: Data Degradation Unit: Used to downgrade SMS data; Similar SMS retrieval unit: used to retrieve vector SMS messages that are similar to the downgraded SMS messages from the fraudulent SMS vector knowledge base; Similar SMS ranking unit: used to select vector SMS messages that meet the similarity requirements from similar vector SMS messages; Large model detection unit: Used to input the downgraded SMS and the vector SMS that meet the similarity requirements as the input of the pruned large model to obtain the final recognition result.
8. A computer device, characterized in that, include: A memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor, when executing the computer program, implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
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