A keyword generation and optimization method based on edge computing
By using an improved Linformer network in an edge computing environment, combining local and global attention channels for keyword generation and optimization, the problems of semantic association and personalized modeling in existing technologies are solved, and efficient and accurate keyword generation and real-time optimization are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING SENBO MINGDE MARKETING TECH CO LTD
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-05
Smart Images

Figure CN122154701A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of edge computing and natural language processing, and in particular to a keyword generation and optimization method based on edge computing. Background Technology
[0002] With the rapid expansion of smart terminal application scenarios and the continuous enhancement of edge computing capabilities, keyword extraction and optimization technologies based on local semantic understanding have received widespread attention in text retrieval, semantic indexing, intelligent question answering, and search recommendation. Most existing keyword generation methods rely on traditional TF-IDF calculation, word frequency statistics rules, or semantic coding models based on Transformer structures to extract candidate keywords. However, in practical industrial applications deployed on edge nodes, the following problems are commonly encountered:
[0003] Keyword modeling struggles to simultaneously address both local contextual semantic focus and global textual semantic relationships, easily leading to high-frequency word interference, semantic redundancy, and keyword distortion. This is particularly problematic in scenarios with complex text structures or highly industry-specific corpora, where keyword accuracy and coverage significantly decline. Existing models largely employ unified attention mechanisms and fixed low-rank projection strategies, lacking structural adaptability to keyword sparsity and semantic saliency, hindering efficient operation and personalized modeling in resource-constrained edge nodes. Dynamic adjustments based on keyword usage feedback rely on cloud-based training and update mechanisms, resulting in long update cycles and high response latency, making it difficult to quickly adapt to changes in user interests or semantic drift, thus limiting the real-time performance and intelligence of keyword generation systems. These issues severely impact the accuracy, efficiency, and deployability of keyword modeling in edge-side text intelligent understanding scenarios.
[0004] Therefore, how to provide a keyword generation and optimization method based on edge computing is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] One objective of this invention is to propose a keyword generation and optimization method based on edge computing. This invention is based on an improved Linformer network and uses local keyword attention channels and global semantic attention channels to perform keyword-guided low-rank projection, multi-scale attention, and position-guided low-rank projection. It describes in detail how to achieve keyword local attention modeling, global semantic understanding, candidate keyword generation, and user feedback optimization in edge nodes. It has the advantages of high computational efficiency, strong semantic accuracy, and good deployment flexibility.
[0006] A keyword generation and optimization method based on edge computing according to an embodiment of the present invention includes the following steps:
[0007] Step 1: Collect the text data to be processed in the edge computing node;
[0008] Step 2: Preprocess the text data to be processed to generate a target text embedding vector sequence;
[0009] Step 3: Input the target text embedding vector sequence into an improved Linformer network deployed on edge computing nodes to perform keyword local attention modeling and semantic global understanding modeling to obtain a keyword semantic feature vector sequence; the improved Linformer network includes a local keyword attention channel, a global semantic attention channel, and a feature fusion module;
[0010] Step 4: Based on the keyword semantic feature vector sequence, generate a candidate keyword set through keyword semantic clustering, threshold screening, and consistency analysis;
[0011] Step 5: Perform keyword scoring and ranking on the candidate keyword set, and output the optimized keyword set;
[0012] Step Six: Collect user behavior feedback data and update the improved Linformer network based on the user behavior feedback data;
[0013] Step 7: Redeploy the updated and improved Linformer network to the edge computing nodes.
[0014] Optionally, the text data to be processed includes user input text, search query text, and content description text.
[0015] Optionally, step two specifically includes:
[0016] The preprocessing includes word segmentation, noise removal, word form restoration, stop word filtering, and embedding encoding;
[0017] The word segmentation process specifically involves: dividing the text data to be processed into several text units based on language grammar rules, obtaining a text unit sequence, and recording the index information of each text unit;
[0018] The noise cleaning process specifically involves identifying and removing text words containing non-semantic characters, redundant punctuation marks, and invalid spaces as noise words to obtain a valid text word sequence.
[0019] The word form restoration specifically involves mapping effective text lexical units with different tenses, voices, or plural forms to corresponding standard root lexical units to obtain a standard text lexical unit sequence.
[0020] Based on the established stop word dictionary, the standard text word sequence is filtered for stop words to obtain the target text word sequence;
[0021] An embedding encoding space is defined, and each target text word is mapped to the embedding encoding space through a pre-trained Word2Vec model to obtain the target text embedding vector. The target text embedding vectors are then used to form a target text embedding vector sequence according to the index information.
[0022] Optionally, step three specifically includes:
[0023] The local keyword attention channel includes a keyword-guided low-rank projection module, a multi-scale low-rank attention module, and a compressed sensing adjustment module, which generates a keyword semantic compressed feature matrix.
[0024] The global semantic attention channel includes a position-guided low-rank projection module, a low-rank attention module, and a residual correction module, which generate a global text semantic feature matrix.
[0025] In the feature fusion module, the keyword semantic compressed feature matrix is weighted and fused with the global text semantic feature matrix to generate the keyword semantic feature matrix, and the keyword semantic feature matrix is reshaped into a sequence of keyword semantic feature vectors according to the index information.
[0026] Optionally, generating the keyword semantic compression feature matrix specifically includes:
[0027] In the keyword-guided low-rank projection module, the L2 norm of each target text embedding vector is calculated to obtain a semantic saliency score;
[0028] Set the number of keywords m, and select m target text embedding vectors according to the semantic saliency score. Calculate the mean sequence of the m target text embedding vectors to obtain the keyword guidance center vector.
[0029] The keyword guidance center vector is linearly transformed through two sets of linear mapping matrices, nonlinearly constrained through the tanh function, and multiplied by two sets of trainable keyword guidance basis matrices to generate the keyword guidance key projection matrix and the keyword guidance value projection matrix.
[0030] The target text embedding vector sequence is used to generate the target text key matrix and the target text value matrix through trainable key embedding mapping matrix and value embedding mapping matrix, respectively;
[0031] Based on the keyword-guided key projection matrix, a low-rank projection operation is performed on the target text key matrix to obtain the keyword low-rank text key matrix.
[0032] Based on the keyword-guided value projection matrix, a low-rank projection operation is performed on the target text value matrix to obtain the keyword low-rank text value matrix.
[0033] In the multi-scale low-rank attention module, the target text embedding vector sequence is used to generate a phrase-level query matrix, a syntactic structure query matrix, and a context query matrix through three sets of trainable query embedding mapping matrices.
[0034] The phrase-level query matrix, syntactic structure query matrix, and context query matrix are respectively scaled dot product attention operations are performed with the keyword low-rank text key matrix and the keyword low-rank text value matrix to obtain the phrase-level attention feature matrix, syntactic structure attention feature matrix, and context attention feature matrix.
[0035] The phrase-level attention feature matrix, the syntactic structure attention feature matrix, and the context attention feature matrix are concatenated to obtain the keyword attention feature matrix.
[0036] The compressed sensing adjustment module constructs a compression adjustment factor vector and multiplies each row of the keyword attention feature matrix element by element to obtain the keyword semantic compressed feature matrix.
[0037] Optionally, generating the global text semantic feature matrix specifically includes:
[0038] In the position-guided low-rank projection module, the index information of each target text embedding vector is obtained, and the index information is mapped into a position encoding vector through a trainable position embedding matrix;
[0039] Each position encoding vector is linearly transformed to obtain the projection control vector, and the projection control vector sequence is constructed according to the index information.
[0040] The projection control vector sequence is used to generate a position guide key projection matrix and a position guide value projection matrix through two sets of trainable position guide basis matrices.
[0041] Based on the position-guided key projection matrix, a low-rank projection operation is performed on the target text key matrix to obtain the position-low-rank text key matrix.
[0042] Based on the keyword-guided value projection matrix, a low-rank projection operation is performed on the target text value matrix to obtain the positional low-rank text value matrix;
[0043] In the low-rank attention module, the target text embedding vector sequence is mapped to a text query matrix through a trainable query embedding mapping matrix;
[0044] Based on the text query matrix, the low-rank text key matrix, and the low-rank text value matrix, a scaling dot product attention operation is performed to generate a global attention feature matrix.
[0045] In the residual correction module, the target text embedding vector sequence is globally averaged and pooled to obtain the global semantic center vector; the global semantic center vector is then used to generate a center compensation matrix by vector copying.
[0046] Set residual correction coefficients, multiply the residual correction coefficients element-wise with the center compensation matrix, and add them element-wise with the global attention feature matrix to obtain the global text semantic feature matrix.
[0047] Optionally, the construction process of the compression adjustment factor vector specifically includes:
[0048] Set the context window width, and based on the current target text embedding vector, calculate the average cosine similarity between the current target text embedding vector and each target text embedding vector within the context window width to obtain the redundancy score of the current target text embedding vector, and construct the redundancy score vector according to the index information.
[0049] The redundant score vector is standardized using Z-score and then nonlinearly mapped using the Sigmoid function to obtain the standard redundant score vector. The vector difference between the unit vector and the redundant score vector is calculated to obtain the compression adjustment factor vector.
[0050] Optionally, step four specifically includes:
[0051] Set the number of keyword semantic clusters C, cluster similarity threshold, semantic weight threshold, and consistency determination threshold;
[0052] Calculate the cosine similarity between the current keyword semantic feature vector and any keyword semantic feature vector to obtain a semantic similarity score;
[0053] K-Means clustering was used to divide the sequence of keyword semantic feature vectors into C keyword semantic clusters;
[0054] Within each keyword semantic cluster, calculate the cluster average similarity of each keyword semantic feature vector and obtain the keyword attention weight;
[0055] Within each keyword semantic cluster, calculate the average of all semantic similarity scores of the current keyword semantic feature vector to obtain the cluster average similarity of the current keyword semantic feature vector, and obtain the keyword attention weight of the current keyword semantic feature vector.
[0056] The keyword attention weights are generated through the scaled dot product attention operation of the local keyword attention channel;
[0057] Keyword semantic feature vectors with average cluster similarity greater than or equal to the cluster similarity threshold and semantic weight greater than or equal to the semantic weight threshold are used as the initial keyword feature vectors.
[0058] Set the context window width, and calculate the average cosine similarity between the feature vector of the initial keyword and the semantic feature vector of each keyword within the context window width to obtain the average context similarity.
[0059] If the average similarity of the context is greater than or equal to the consistency judgment threshold, the initial keyword feature vector is judged as the candidate keyword feature vector, and the index information of the candidate keyword feature vector is added to the candidate keyword index set.
[0060] Based on the candidate keyword index set, the corresponding target text words are extracted from the target text word sequence to obtain the candidate keyword set.
[0061] Optionally, step five specifically includes:
[0062] Based on each candidate keyword, the cosine similarity between the feature vector of the current candidate keyword and the global semantic center vector is calculated to obtain the semantic relevance.
[0063] Set the context window width, and calculate the average cosine similarity between the current candidate keyword feature vector and the semantic feature vector of each keyword within the context window width to obtain the semantic overlap.
[0064] Calculate the maximum cosine similarity between the current candidate keyword and each candidate keyword, and calculate the difference between 1 and the maximum cosine similarity to obtain the semantic discriminant.
[0065] A domain keyword dictionary is defined, which includes several domain keywords, and each domain keyword corresponds to a domain feature vector;
[0066] Calculate the maximum cosine similarity between the current candidate keyword feature vector and the feature vector of each domain to obtain industry matching;
[0067] The semantic relevance, semantic overlap, semantic distinctiveness, and industry matching of each candidate keyword are weighted and integrated to obtain a comprehensive keyword score;
[0068] The top N candidate keywords based on their overall keyword scores are combined to form an optimized keyword set.
[0069] Optionally, step six specifically includes:
[0070] The user behavior feedback data includes the number of user clicks for each optimized keyword, the user search conversion rate triggered by the optimized keyword, the bounce rate, and the frequency of keyword usage.
[0071] Calculate the ratio of user clicks for each optimized keyword to the total user clicks for all optimized keywords to obtain the click percentage;
[0072] The click share, user search conversion rate, bounce rate and keyword usage frequency of each optimized keyword are weighted and integrated to obtain the keyword feedback weight, and the keyword feedback weight vector is constructed according to the index order.
[0073] The feedback perturbation vector is obtained by linear mapping the keyword guidance center vector, and the feedback perturbation vector is multiplied by the keyword guidance center vector to obtain the feedback perturbation matrix.
[0074] The updated keyword guiding basis matrix is obtained by adding the keyword guiding basis matrix in the local keyword attention channel to the feedback perturbation matrix element by element.
[0075] The updated keyword-guided matrix was re-added to the improved Linformer network.
[0076] The beneficial effects of this invention are:
[0077] This invention introduces local and global semantic attention channels in the keyword semantic modeling stage, using keyword-guided low-rank projection and multi-scale low-rank attention to semantically focus on keywords and fuse contextual information. In the candidate keyword generation stage, semantic clustering, attention weight filtering, and contextual consistency analysis are jointly used to construct a high-quality candidate set. In the keyword scoring stage, a keyword scoring system is constructed by comprehensively considering semantic relevance, semantic discriminancy, context coverage, and domain matching, and keywords are sorted and filtered according to the comprehensive keyword score. In the feedback optimization stage, a keyword feedback perturbation mechanism is constructed based on user behavior feedback indicators such as click-through rate, conversion rate, and bounce rate, dynamically adjusting the guiding basis matrix parameters to improve the adaptability of the improved Linformer network to interest drift and semantic changes. The above technical solutions effectively improve the accuracy, deployment flexibility, and real-time response of keyword generation. Attached Figure Description
[0078] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0079] Figure 1 This is a schematic diagram of a keyword generation and optimization method based on edge computing proposed in this invention;
[0080] Figure 2 This is a flowchart of the improved Linformer network structure in a keyword generation and optimization method based on edge computing proposed in this invention.
[0081] Figure 3 This is a flowchart of the process for generating an optimized keyword set in a keyword generation and optimization method based on edge computing proposed in this invention. Detailed Implementation
[0082] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0083] refer to Figures 1-3 A keyword generation and optimization method based on edge computing includes the following steps:
[0084] Step 1: Collect the text data to be processed in the edge computing node;
[0085] Step 2: Preprocess the text data to be processed to generate a target text embedding vector sequence;
[0086] Step 3: Input the target text embedding vector sequence into the improved Linformer network deployed on edge computing nodes to perform keyword local attention modeling and semantic global understanding modeling to obtain the keyword semantic feature vector sequence; wherein, the improved Linformer network includes a local keyword attention channel, a global semantic attention channel and a feature fusion module;
[0087] Step 4: Based on the keyword semantic feature vector sequence, generate a candidate keyword set through keyword semantic clustering, threshold screening, and consistency analysis;
[0088] Step 5: Perform keyword scoring and ranking on the candidate keyword set, and output the optimized keyword set;
[0089] Step Six: Collect user behavior feedback data and update the improved Linformer network based on the user behavior feedback data;
[0090] Step 7: Redeploy the updated and improved Linformer network to the edge computing nodes.
[0091] In this embodiment, the text data to be processed includes user input text, search query text, and content description text.
[0092] In this embodiment, step two specifically includes:
[0093] Preprocessing includes word segmentation, noise removal, lemmatization, stop word filtering, and embedding encoding;
[0094] The word segmentation process specifically involves dividing the text data to be processed into several text units based on language grammar rules, obtaining a text unit sequence, and recording the index information of each text unit.
[0095] Noise cleaning specifically involves identifying and removing text words containing non-semantic characters, redundant punctuation marks, and invalid spaces as noise words to obtain a sequence of valid text words.
[0096] Lexical reconstruction specifically involves mapping valid text lexical units with different tenses, voices, or plural forms to their corresponding standard root lexical units, thereby obtaining a standard text lexical unit sequence.
[0097] Based on the established stop word dictionary, the standard text word sequence is filtered for stop words to obtain the target text word sequence;
[0098] An embedding encoding space is defined, and each target text word is mapped to the embedding encoding space through a pre-trained Word2Vec model to obtain the target text embedding vector. The target text embedding vectors are then used to form a target text embedding vector sequence according to the index information.
[0099] For example, for the text data to be processed, "Artificial intelligence is rapidly changing the world!", word segmentation is performed based on language grammar rules to divide the text into word units "artificial intelligence", "technology", "is", "rapidly", "change", "world", and "!", and the index information of each word unit in the text data to be processed is recorded; "!" is removed by noise cleaning; variants of "is" and "change" are uniformly mapped to the standard root word "change"; based on the set stop word dictionary, "is" is defined as a common stop word and filtered, and finally the word units "artificial intelligence", "technology", "rapidly", "change", and "world" are retained; finally, each target word unit is input into the pre-trained Word2Vec model, which is mapped to the corresponding embedding vector in the embedding encoding space, and combined into a target text embedding vector sequence according to the index information.
[0100] In this embodiment, step three specifically includes:
[0101] The local keyword attention channel includes a keyword-guided low-rank projection module, a multi-scale low-rank attention module, and a compressed perception modulation module, which generate a keyword semantic compressed feature matrix.
[0102] The global semantic attention channel includes a position-guided low-rank projection module, a low-rank attention module, and a residual correction module, which generate a global text semantic feature matrix;
[0103] In the feature fusion module, the keyword semantic compressed feature matrix is weighted and fused with the global text semantic feature matrix to generate the keyword semantic feature matrix, and the keyword semantic feature matrix is reshaped into a sequence of keyword semantic feature vectors according to the index information.
[0104] In this embodiment, generating a keyword semantic compression feature matrix specifically includes:
[0105] In the keyword-guided low-rank projection module, the L2 norm of each target text embedding vector is calculated to obtain a semantic saliency score;
[0106] Set the number of keywords m, and select m target text embedding vectors according to the semantic saliency score. Calculate the mean sequence of the m target text embedding vectors to obtain the keyword guidance center vector.
[0107] The keyword guidance center vector is linearly transformed through two sets of linear mapping matrices, nonlinearly constrained through the tanh function, and multiplied by two sets of trainable keyword guidance basis matrices to generate the keyword guidance key projection matrix and the keyword guidance value projection matrix.
[0108] The target text embedding vector sequence is used to generate the target text key matrix and the target text value matrix through trainable key embedding mapping matrix and value embedding mapping matrix, respectively;
[0109] Based on the keyword-guided key projection matrix, a low-rank projection operation is performed on the target text key matrix to obtain the keyword low-rank text key matrix.
[0110] Based on the keyword-guided value projection matrix, a low-rank projection operation is performed on the target text value matrix to obtain the keyword low-rank text value matrix.
[0111] In this context, the column dimension of the keyword guiding basis matrix is smaller than the column dimension of the embedding mapping matrix. If the column dimension of the keyword guiding basis matrix is k and the column dimension of the embedding mapping matrix is d, then d and k are the compression ratio. In order to meet the low-rank compression requirements, the compression ratio is generally above 4.
[0112] In the multi-scale low-rank attention module, the target text embedding vector sequence is used to generate a phrase-level query matrix, a syntactic structure query matrix, and a context query matrix through three sets of trainable query embedding mapping matrices.
[0113] The phrase-level query matrix, syntactic structure query matrix, and context query matrix are each multiplied by the keyword low-rank text key matrix and the keyword low-rank text value matrix, respectively, to obtain the phrase-level attention feature matrix, syntactic structure attention feature matrix, and context attention feature matrix. Specifically, the scaling dot product attention operation involves multiplying the phrase-level query matrix, syntactic structure query matrix, and context query matrix by the transpose of the keyword low-rank text key matrix, dividing by the square root of the column dimension of the keyword low-rank text key matrix, and then performing Softmax normalization to obtain the phrase-level attention weight matrix, syntactic structure attention weight matrix, and context attention weight matrix. Finally, the phrase-level attention weight matrix, syntactic structure attention weight matrix, and context attention weight matrix are multiplied by the keyword low-rank text value matrix to obtain the phrase-level attention feature matrix, syntactic structure attention feature matrix, and context attention feature matrix.
[0114] In this invention, three sets of trainable query embedding mapping matrices are used to model attention requirements at different semantic scales, with different structural parameters and training objectives. The first set of query embedding mapping matrices focuses on capturing lexical-level local contextual dependencies, highlighting the combination characteristics of phrases and word groups, and generating a phrase-level query matrix. The second set of query embedding mapping matrices introduces stronger syntactic dependency structure constraints, focusing on modeling grammatical relationships such as subject-verb-object and attributive-adverbial-complement within sentences, and generating a syntactic structure query matrix. The third set of query embedding mapping matrices learns semantic co-occurrence and paragraph-level consistency, constructing query features with a global contextual perspective, and generating a contextual query matrix. By performing scaled dot product attention operations with the keyword low-rank text key matrix and the keyword low-rank text value matrix using these three sets of query embedding mapping matrices with different modeling perspectives, multi-scale and multi-level keyword dependencies can be effectively extracted, improving the breadth of attention features and the semantic adaptability of keyword extraction.
[0115] The phrase-level attention feature matrix, the syntactic structure attention feature matrix, and the context attention feature matrix are concatenated to obtain the keyword attention feature matrix.
[0116] The compressed sensing adjustment module constructs a compression adjustment factor vector and multiplies each row vector of the keyword attention feature matrix element by element to obtain the keyword semantic compressed feature matrix.
[0117] In this embodiment, generating a global text semantic feature matrix specifically includes:
[0118] In the position-guided low-rank projection module, the index information of each target text embedding vector is obtained, and the index information is mapped into a position encoding vector through a trainable position embedding matrix;
[0119] Each position encoding vector is linearly transformed to obtain the projection control vector, and the projection control vector sequence is constructed according to the index information.
[0120] The projection control vector sequence is used to generate a position guide key projection matrix and a position guide value projection matrix through two sets of trainable position guide basis matrices.
[0121] Based on the position-guided key projection matrix, a low-rank projection operation is performed on the target text key matrix to obtain the position-low-rank text key matrix.
[0122] Based on the keyword-guided value projection matrix, a low-rank projection operation is performed on the target text value matrix to obtain the positional low-rank text value matrix;
[0123] In the low-rank attention module, the target text embedding vector sequence is mapped to a text query matrix through a trainable query embedding mapping matrix;
[0124] Based on the text query matrix, the low-rank text key matrix, and the low-rank text value matrix, a scaling dot product attention operation is performed to generate a global attention feature matrix.
[0125] In the residual correction module, the target text embedding vector sequence is globally averaged and pooled to obtain the global semantic center vector; the global semantic center vector is then used to generate a center compensation matrix by vector copying.
[0126] Set residual correction coefficients, multiply the residual correction coefficients element-wise with the center compensation matrix, and add them element-wise with the global attention feature matrix to obtain the global text semantic feature matrix.
[0127] In this invention, the residual correction coefficient is a scalar parameter used to adjust the injection intensity of the center compensation matrix, and its value range is limited to the interval [0,1]. When the residual correction coefficient is 0, it means that no center compensation matrix is introduced, and only the global attention feature matrix is retained; when the residual correction coefficient is 1, it means that the center compensation matrix is fully superimposed, and the global attention feature matrix is subjected to the maximum residual compensation. In order to achieve a balance between maintaining global semantic consistency and avoiding excessive smoothing, the residual correction coefficient is set to 0.3, which can effectively correct the global attention feature matrix without weakening the contextual discriminativeness.
[0128] In this embodiment, the construction process of the compression adjustment factor vector specifically includes:
[0129] Set the context window width, and based on the current target text embedding vector, calculate the average cosine similarity between the current target text embedding vector and each target text embedding vector within the context window width to obtain the redundancy score of the current target text embedding vector, and construct the redundancy score vector according to the index information.
[0130] For example, suppose the length of the target text embedding vector sequence is 5, x1=[1,0,0], x2=[0.9,0.1,0], x3=[0,1,0], x4=[0,0.9,0.1], x5=[0,0,1]; suppose the context window width is 1, then for x3, its context is x2 and x4. Calculate the cosine similarity: cos(x3, x2)≈0.110, cos(x3, x4)≈0.995. Add the two and take the average, the redundancy score of x3 is approximately (0.110+0.995) / 2=0.5525.
[0131] In this invention, the improved Linformer network inherits the basic structure and core computational paradigm of the original Linformer network. The original Linformer network first maps the target text embedding vector sequence into a query matrix, a key matrix, and a value matrix, respectively. Then, it uses a trainable low-rank projection matrix to compress the dimensions of the key matrix and the value matrix. Finally, it completes contextual semantic modeling through scaled dot product attention.
[0132] In this invention, the improved Linformer network introduces a dual-channel structure and a multi-level guidance mechanism based on the original Linformer network. Specifically, the improved Linformer network is divided into a local keyword attention channel and a global semantic attention channel in its overall architecture. These two channels perform keyword saliency modeling and full-text semantic consistency modeling, respectively. In the local keyword attention channel, a keyword-guided low-rank projection module is introduced, using the keyword guidance center vector obtained from semantic saliency scoring as a prior to guide the low-rank projection direction of the key matrix and value matrix. Simultaneously, a multi-scale low-rank attention module is used in the attention calculation stage to perform parallel modeling of phrase-level, syntactic structure-level, and context-level semantics, and a compressed sensing adjustment module dynamically suppresses semantic redundancy. In the global semantic attention channel, a position-guided low-rank projection module is introduced, constructing a projection control vector through position encoding to enable the low-rank projection process to have sequence awareness. In the output stage, a residual correction module compensates for the global semantic center, structurally enhancing the overall semantic stability.
[0133] Through the aforementioned structural improvements, the improved Linformer network maintains the efficiency of the original low-rank attention while significantly enhancing the targeting and semantic accuracy of keyword modeling. Keyword-guided low-rank projection focuses attention resources more on semantically salient words, reducing interference from high-frequency non-keywords on the attention distribution; the multi-scale attention structure enhances the coverage of keywords at different semantic granularities; the compressed sensing adjustment module effectively reduces semantic redundancy and increases the information density of the keyword set; and position guidance and residual correction ensure the stability and consistency of global semantic modeling. In summary, the improved Linformer network achieves higher keyword accuracy, lower semantic redundancy, and better edge-side computational efficiency in keyword generation tasks, making it more suitable for keyword generation and dynamic optimization in edge computing scenarios compared to the original Linformer network.
[0134] The redundant score vector is standardized using Z-score and then nonlinearly mapped using the Sigmoid function to obtain the standard redundant score vector. The vector difference between the unit vector and the redundant score vector is calculated to obtain the compression adjustment factor vector.
[0135] In this invention, a compression adjustment factor vector is constructed by the vector difference between the unit vector and the standard redundancy scoring vector, enabling reverse adjustment and control of semantic redundancy. The larger the value of each element in the standard redundancy scoring vector, the more redundant the embedding vector at the current position is in the context, and the lower its retention value. By subtracting the redundancy score value from 1 using the unit vector as a benchmark, the information density weight at that position can be mapped inversely. This allows embedding vectors with strong semantic differences and no contextual redundancy to obtain higher retention factors, while highly redundant embedding vectors are compressed, thereby achieving effective focusing of semantic information and suppression of interference.
[0136] In this embodiment, step four specifically includes:
[0137] Set the number of keyword semantic clusters C, cluster similarity threshold, semantic weight threshold, and consistency determination threshold;
[0138] Calculate the cosine similarity between the current keyword semantic feature vector and any keyword semantic feature vector to obtain a semantic similarity score;
[0139] K-Means clustering was used to divide the sequence of keyword semantic feature vectors into C keyword semantic clusters;
[0140] Within each keyword semantic cluster, calculate the cluster average similarity of each keyword semantic feature vector and obtain the keyword attention weight;
[0141] Within each keyword semantic cluster, calculate the average of all semantic similarity scores of the current keyword semantic feature vector to obtain the cluster average similarity of the current keyword semantic feature vector, and obtain the keyword attention weight of the current keyword semantic feature vector.
[0142] Keyword attention weights are generated through scaling dot product attention operations on local keyword attention channels. Specifically, based on the phrase-level attention weight matrix, syntactic structure attention weight matrix, and context attention weight matrix, the phrase-level attention weight, syntactic structure attention weight, and context attention weight of the current keyword semantic feature vector are weighted and fused to obtain the keyword attention weights.
[0143] Keyword semantic feature vectors with average cluster similarity greater than or equal to the cluster similarity threshold and semantic weight greater than or equal to the semantic weight threshold are used as the initial keyword feature vectors.
[0144] Set the context window width, and calculate the average cosine similarity between the feature vector of the initial keyword and the semantic feature vector of each keyword within the context window width to obtain the average context similarity.
[0145] If the average similarity of the context is greater than or equal to the consistency judgment threshold, the initial keyword feature vector is judged as the candidate keyword feature vector, and the index information of the candidate keyword feature vector is added to the candidate keyword index set.
[0146] Based on the candidate keyword index set, the corresponding target text words are extracted from the target text word sequence to obtain the candidate keyword set.
[0147] In this embodiment, step five specifically includes:
[0148] Based on each candidate keyword, the cosine similarity between the feature vector of the current candidate keyword and the global semantic center vector is calculated to obtain the semantic relevance.
[0149] Set the context window width, and calculate the average cosine similarity between the current candidate keyword feature vector and the semantic feature vector of each keyword within the context window width to obtain the semantic overlap.
[0150] Calculate the maximum cosine similarity between the current candidate keyword and each candidate keyword, and calculate the difference between 1 and the maximum cosine similarity to obtain the semantic discriminant.
[0151] A domain keyword dictionary is defined, which includes several domain keywords, and each domain keyword corresponds to a domain feature vector;
[0152] Calculate the maximum cosine similarity between the current candidate keyword feature vector and the feature vector of each domain to obtain industry matching;
[0153] The semantic relevance, semantic overlap, semantic distinctiveness, and industry matching of each candidate keyword are weighted and integrated to obtain a comprehensive keyword score;
[0154] The top N candidate keywords based on their overall keyword scores are combined to form an optimized keyword set.
[0155] In this embodiment, step six specifically includes:
[0156] User behavior feedback data includes the number of user clicks for each optimized keyword, user search conversion rate triggered by optimized keywords, bounce rate, and keyword usage frequency;
[0157] Calculate the ratio of user clicks for each optimized keyword to the total user clicks for all optimized keywords to obtain the click percentage;
[0158] The click share, user search conversion rate, bounce rate and keyword usage frequency of each optimized keyword are weighted and integrated to obtain the keyword feedback weight, and the keyword feedback weight vector is constructed according to the index order.
[0159] The keyword guidance center vector is linearly mapped to obtain the feedback perturbation vector, and the feedback perturbation vector is outer productd with the keyword guidance center vector to obtain the feedback perturbation matrix; wherein, the embedding dimension of the feedback perturbation vector is consistent with the row dimension of the keyword guidance basis matrix; through the outer product operation, the dimension of the feedback perturbation matrix is consistent with that of the keyword guidance basis matrix.
[0160] The keyword guiding basis matrix is obtained by adding the feedback perturbation matrix element by element.
[0161] The updated keyword-guided matrix was re-added to the improved Linformer network.
[0162] Example 1: To verify the feasibility of this invention in practice, the method of this invention was applied to the intelligent search and recommendation system of a municipal e-commerce platform. This e-commerce platform deployed multiple edge computing nodes to process and push user behavior logs and low-latency content. Traditional rule-based TF-IDF algorithms and static dictionary methods generate keywords that deviate significantly from user search intent, cold-start products lack effective tags, and edge node processing latency is high, making it difficult to meet the real-time and personalized semantic matching requirements of product recommendations.
[0163] During implementation, user browsing history, search input, review summaries, and product descriptions are acquired through edge computing nodes. Target text embedding vector sequences are generated through word segmentation, noise removal, lemmatization, stop word filtering, and embedding encoding. These target text embedding vector sequences are then deployed on an improved Linformer network at the edge nodes to generate keyword semantic feature vector sequences. Furthermore, K-Means clustering, threshold filtering, and consistency analysis are used to generate a candidate keyword set, and an optimized keyword set is generated based on a comprehensive keyword score. In actual operation, user click-through rate, search conversion rate, and keyword usage frequency are collected in real time, and the keyword guiding basis matrix is periodically fine-tuned.
[0164] To compare and verify the performance advantages of the method of the present invention, a comparative experiment was conducted with the method of the present invention and three existing keyword extraction methods deployed on the platform, namely: the traditional TF-IDF method: calculating the importance of keywords based on the statistical values of term frequency (TF) and inverse document frequency (IDF); the TextRank graph ranking method: constructing a co-occurrence relationship graph between words and extracting keywords with higher weights through an iterative ranking algorithm of graph structure; and the BERT extraction method: using the pre-trained language model BERT to perform contextual encoding on the text and extracting semantic keywords through an attention mechanism.
[0165] The experiment selected 5,000 product description samples covering electronic products, clothing, beauty and home furnishings on e-commerce platforms, and evaluated the keyword extraction quality, system response performance and user behavior indicators. The comparison results are shown in Table 1.
[0166] Table 1. Performance comparison of the method of this invention with other keyword extraction methods.
[0167] Comparison indicators Traditional TF-IDF method TextRank method BERT extraction method Method of the present invention Average keyword matching accuracy (%) 74.2 78.9 84.7 92.3 Increase in user search conversion rate (%) 5.6 8.1 11.3 18.7 Cold start product label coverage (%) 61.4 67.9 74.1 89.5 Keyword response latency (ms) 124 188 460 96 Average CPU utilization (%) of edge nodes 72.5 81.3 88.9 67.4 User click-through rate increase (%) 6.3 8.8 12.5 20.1 Keyword semantic redundancy score 0.63 0.47 0.41 0.27
[0168] As shown in Table 1, the method of this invention significantly outperforms existing keyword extraction methods across multiple comparative metrics. Regarding keyword matching accuracy, the method achieves 92.3%, an improvement of 18.1 percentage points compared to the traditional TF-IDF method, enhancing the semantic fit between keywords and users' actual search intent. The user search conversion rate of this invention is improved by 18.7%, far exceeding the 11.3% improvement of the BERT extraction method, demonstrating that optimized keywords can more effectively promote user behavior conversion. In terms of cold-start product tag coverage, the method achieves 89.5%, solving the problem of new products lacking tags and being difficult to retrieve, which is crucial in scenarios involving rapid product launches.
[0169] Furthermore, in terms of system performance, the keyword response latency of the method of this invention is only 96ms, significantly lower than the 460ms of the BERT extraction method, indicating that the method of this invention has good real-time response capabilities in edge nodes. Meanwhile, the average CPU utilization rate of edge nodes is 67.4%, saving 13.9 percentage points compared to the TextRank method, indicating that the method of this invention has higher operating efficiency and deployment adaptability. The user click-through rate of the method of this invention increases by 20.1%, nearly three times that of the traditional TF-IDF method, proving that the keywords generated by the method of this invention are more attractive and have greater click potential. The keyword semantic redundancy score of the method of this invention is only 0.27, indicating that the method of this invention can effectively compress semantic redundancy in the keyword selection stage, avoiding the repeated selection of high-frequency invalid words, thereby improving the expressive power and information density of the final keyword set.
[0170] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. An edge computing-based keyword generation and optimization method, characterized in that, Includes the following steps: Step 1: Collect the text data to be processed in the edge computing node; Step 2: Preprocess the text data to be processed to generate a target text embedding vector sequence; Step 3: Input the target text embedding vector sequence into an improved Linformer network deployed on edge computing nodes to perform keyword local attention modeling and semantic global understanding modeling to obtain a keyword semantic feature vector sequence; the improved Linformer network includes a local keyword attention channel, a global semantic attention channel, and a feature fusion module; Step 4: Based on the keyword semantic feature vector sequence, generate a candidate keyword set through keyword semantic clustering, threshold screening, and consistency analysis; Step 5: Perform keyword scoring and ranking on the candidate keyword set, and output the optimized keyword set; Step Six: Collect user behavior feedback data and update the improved Linformer network based on the user behavior feedback data; Step 7: Redeploy the updated and improved Linformer network to the edge computing nodes. 2.The keyword generation and optimization method based on edge computing according to claim 1, characterized in that, The text data to be processed includes user-input text, search query text, and content description text.
3. The keyword generation and optimization method based on edge computing according to claim 1, characterized in that, Step two specifically includes: The preprocessing includes word segmentation, noise removal, word form restoration, stop word filtering, and embedding encoding; The word segmentation process specifically involves: dividing the text data to be processed into several text units based on language grammar rules, obtaining a text unit sequence, and recording the index information of each text unit; The noise cleaning process specifically involves identifying and removing text words containing non-semantic characters, redundant punctuation marks, and invalid spaces as noise words to obtain a valid text word sequence. The word form restoration specifically involves mapping effective text lexical units with different tenses, voices, or plural forms to corresponding standard root lexical units to obtain a standard text lexical unit sequence. Based on the established stop word dictionary, the standard text word sequence is filtered for stop words to obtain the target text word sequence; An embedding encoding space is defined, and each target text word is mapped to the embedding encoding space through a pre-trained Word2Vec model to obtain the target text embedding vector. The target text embedding vectors are then used to form a target text embedding vector sequence according to the index information.
4. The keyword generation and optimization method based on edge computing according to claim 1, characterized in that, Step three specifically includes: The local keyword attention channel includes a keyword-guided low-rank projection module, a multi-scale low-rank attention module, and a compressed sensing adjustment module, which generates a keyword semantic compressed feature matrix. The global semantic attention channel includes a position-guided low-rank projection module, a low-rank attention module, and a residual correction module, which generate a global text semantic feature matrix. In the feature fusion module, the keyword semantic compressed feature matrix is weighted and fused with the global text semantic feature matrix to generate the keyword semantic feature matrix, and the keyword semantic feature matrix is reshaped into a sequence of keyword semantic feature vectors according to the index information.
5. The keyword generation and optimization method based on edge computing according to claim 4, characterized in that, The generation of the keyword semantic compression feature matrix specifically includes: In the keyword-guided low-rank projection module, the L2 norm of each target text embedding vector is calculated to obtain a semantic saliency score; Set the number of keywords m, and select m target text embedding vectors according to the semantic saliency score. Calculate the mean sequence of the m target text embedding vectors to obtain the keyword guidance center vector. The keyword guidance center vector is linearly transformed through two sets of linear mapping matrices, nonlinearly constrained through the tanh function, and multiplied by two sets of trainable keyword guidance basis matrices to generate the keyword guidance key projection matrix and the keyword guidance value projection matrix. The target text embedding vector sequence is used to generate the target text key matrix and the target text value matrix through trainable key embedding mapping matrix and value embedding mapping matrix, respectively; Based on the keyword-guided key projection matrix, a low-rank projection operation is performed on the target text key matrix to obtain the keyword low-rank text key matrix. Based on the keyword-guided value projection matrix, a low-rank projection operation is performed on the target text value matrix to obtain the keyword low-rank text value matrix. In the multi-scale low-rank attention module, the target text embedding vector sequence is used to generate a phrase-level query matrix, a syntactic structure query matrix, and a context query matrix through three sets of trainable query embedding mapping matrices. The phrase-level query matrix, syntactic structure query matrix, and context query matrix are respectively scaled dot product attention operations are performed with the keyword low-rank text key matrix and the keyword low-rank text value matrix to obtain the phrase-level attention feature matrix, syntactic structure attention feature matrix, and context attention feature matrix. The phrase-level attention feature matrix, the syntactic structure attention feature matrix, and the context attention feature matrix are concatenated to obtain the keyword attention feature matrix. The compressed sensing adjustment module constructs a compression adjustment factor vector and multiplies each row of the keyword attention feature matrix element by element to obtain the keyword semantic compressed feature matrix.
6. The keyword generation and optimization method based on edge computing according to claim 4, characterized in that, The generation of the global text semantic feature matrix specifically includes: In the position-guided low-rank projection module, the index information of each target text embedding vector is obtained, and the index information is mapped into a position encoding vector through a trainable position embedding matrix; Each position encoding vector is linearly transformed to obtain the projection control vector, and the projection control vector sequence is constructed according to the index information. The projection control vector sequence is used to generate a position guide key projection matrix and a position guide value projection matrix through two sets of trainable position guide basis matrices. Based on the position-guided key projection matrix, a low-rank projection operation is performed on the target text key matrix to obtain the position-low-rank text key matrix. Based on the keyword-guided value projection matrix, a low-rank projection operation is performed on the target text value matrix to obtain the positional low-rank text value matrix; In the low-rank attention module, the target text embedding vector sequence is mapped to a text query matrix through a trainable query embedding mapping matrix; Based on the text query matrix, the low-rank text key matrix, and the low-rank text value matrix, a scaling dot product attention operation is performed to generate a global attention feature matrix. In the residual correction module, the target text embedding vector sequence is globally averaged and pooled to obtain the global semantic center vector; the global semantic center vector is then used to generate a center compensation matrix by vector copying. Set residual correction coefficients, multiply the residual correction coefficients element-wise with the center compensation matrix, and add them element-wise with the global attention feature matrix to obtain the global text semantic feature matrix.
7. The keyword generation and optimization method based on edge computing according to claim 5, characterized in that, The construction process of the compression adjustment factor vector specifically includes: Set the context window width, and based on the current target text embedding vector, calculate the average cosine similarity between the current target text embedding vector and each target text embedding vector within the context window width to obtain the redundancy score of the current target text embedding vector, and construct the redundancy score vector according to the index information. The redundant score vector is standardized using Z-score and then nonlinearly mapped using the Sigmoid function to obtain the standard redundant score vector. The vector difference between the unit vector and the redundant score vector is calculated to obtain the compression adjustment factor vector.
8. The keyword generation and optimization method based on edge computing according to claim 1, characterized in that, Step four specifically includes: Set the number of keyword semantic clusters C, cluster similarity threshold, semantic weight threshold, and consistency determination threshold; Calculate the cosine similarity between the current keyword semantic feature vector and any keyword semantic feature vector to obtain a semantic similarity score; K-Means clustering was used to divide the sequence of keyword semantic feature vectors into C keyword semantic clusters; Within each keyword semantic cluster, calculate the cluster average similarity of each keyword semantic feature vector and obtain the keyword attention weight; Within each keyword semantic cluster, calculate the average of all semantic similarity scores of the current keyword semantic feature vector to obtain the cluster average similarity of the current keyword semantic feature vector, and obtain the keyword attention weight of the current keyword semantic feature vector. The keyword attention weights are generated through the scaled dot product attention operation of the local keyword attention channel; Keyword semantic feature vectors with average cluster similarity greater than or equal to the cluster similarity threshold and semantic weight greater than or equal to the semantic weight threshold are used as the initial keyword feature vectors. Set the context window width, and calculate the average cosine similarity between the feature vector of the initial keyword and the semantic feature vector of each keyword within the context window width to obtain the average context similarity. If the average similarity of the context is greater than or equal to the consistency judgment threshold, the initial keyword feature vector is judged as the candidate keyword feature vector, and the index information of the candidate keyword feature vector is added to the candidate keyword index set. Based on the candidate keyword index set, the corresponding target text words are extracted from the target text word sequence to obtain the candidate keyword set.
9. The keyword generation and optimization method based on edge computing according to claim 1, characterized in that, Step five specifically includes: Based on each candidate keyword, the cosine similarity between the feature vector of the current candidate keyword and the global semantic center vector is calculated to obtain the semantic relevance. Set the context window width, and calculate the average cosine similarity between the current candidate keyword feature vector and the semantic feature vector of each keyword within the context window width to obtain the semantic overlap. Calculate the maximum cosine similarity between the current candidate keyword and each candidate keyword, and calculate the difference between 1 and the maximum cosine similarity to obtain the semantic discriminant. A domain keyword dictionary is defined, which includes several domain keywords, and each domain keyword corresponds to a domain feature vector; Calculate the maximum cosine similarity between the current candidate keyword feature vector and the feature vector of each domain to obtain industry matching; The semantic relevance, semantic overlap, semantic distinctiveness, and industry matching of each candidate keyword are weighted and integrated to obtain a comprehensive keyword score; The top N candidate keywords based on their overall keyword scores are combined to form an optimized keyword set.
10. The keyword generation and optimization method based on edge computing according to claim 1, characterized in that, Step six specifically includes: The user behavior feedback data includes the number of user clicks for each optimized keyword, the user search conversion rate triggered by the optimized keyword, the bounce rate, and the frequency of keyword usage. Calculate the ratio of user clicks for each optimized keyword to the total user clicks for all optimized keywords to obtain the click percentage; The click share, user search conversion rate, bounce rate and keyword usage frequency of each optimized keyword are weighted and integrated to obtain the keyword feedback weight, and the keyword feedback weight vector is constructed according to the index order. The feedback perturbation vector is obtained by linear mapping the keyword guidance center vector, and the feedback perturbation vector is multiplied by the keyword guidance center vector to obtain the feedback perturbation matrix. The updated keyword guiding basis matrix is obtained by adding the keyword guiding basis matrix in the local keyword attention channel to the feedback perturbation matrix element by element. The updated keyword-guided matrix was re-added to the improved Linformer network.