A method for automatic demand splitting and conversion based on semantic understanding and industry learning
Through methods based on semantic understanding and industry learning, multi-source industry text data is used for demand topic extraction and sentiment analysis, which solves the problems of single data source and low accuracy in traditional methods, and achieves in-depth understanding of industry needs and market insights. Help companies maintain a competitive advantage.
Patent Information
- Application Number
- CN202411076678.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-07
AI Technical Summary
Traditional industry demand splitting and conversion methods rely on structured data and fail to effectively utilize unstructured data, resulting in a single data source with low accuracy and depth. It is difficult to capture market dynamics and emotional factors, affecting the market competitiveness and customer needs of enterprises. Satisfaction.
Using methods based on semantic understanding and industry learning, by collecting multi-source industry text data, we perform demand topic extraction, sentiment analysis and topic modeling, combined with multi-scale embedding representation, HDBSCAN clustering, c-TF-IDF formula and multi-layer Transformer Model to realize automatic splitting and conversion of industry requirements.
Through in-depth understanding of multi-source text data, key industry topics and emotional tendencies are extracted, emotional scores are quantified, and more in-depth market insights and dynamic analysis are provided to help enterprises identify market changes in a timely manner, maintain competitive advantages, and satisfy customer needs.
Smart Images

Figure CN118586402B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of natural language technology, and specifically relates to a method for automatically splitting and converting requirements based on semantic understanding and industry learning. Background Art
[0002] Industry demand segmentation refers to segmenting the demand of an industry or market into different parts or fields in order to better understand and meet the needs of each segment. This method can help companies more accurately locate the target market, develop targeted products or services, and provide more effective solutions. By segmenting industry demand, companies can better understand the characteristics of demand in different fields, thereby better meeting customer needs and improving market competitiveness.
[0003] Industry demand transformation refers to the fact that as the market and industry develop and change, the original demand may change or evolve. This transformation may be caused by new technologies, new trends, new demands or other factors. Enterprises need to identify and understand this demand transformation in a timely manner so as to adjust their products, services or strategies to adapt to new market demands and trends, maintain competitiveness and achieve sustained growth. By analyzing and responding to the transformation of industry demand, enterprises can better adapt to market changes, meet customer needs and maintain competitive advantages.
[0004] Traditional industry demand splitting and conversion usually involves market research and data analysis. However, with the rise of social media and online platforms, large amounts of unstructured data (such as social media comments, user feedback, etc.) are difficult to collect, process, and analyze effectively, limiting in-depth understanding of industry needs. In addition, when processing large amounts of data, the requirements for technology and resources are high, requiring strong data analysis and processing capabilities, which may be beyond the capabilities of some companies.
[0005] At the same time, market and industry demands change rapidly, and existing technologies and tools may not be able to capture and analyze market dynamics in real time, making it difficult for companies to respond quickly and adjust strategies. The impact of external factors such as changes in policies and regulations and economic fluctuations on industry demand is difficult to predict and quantify, increasing the complexity and uncertainty of industry demand segmentation.
[0006] Therefore, traditional industry demand analysis may rely mainly on structured data sources, such as market reports, sales data, and consumer surveys. This approach may overlook the potential of unstructured data, such as social media comments, online forum discussions, and customer feedback, which contain rich consumer sentiment and real feedback, and can reveal deeper insights hidden behind the data. And existing industry demand analysis may not fully utilize this technology to deeply understand consumers' emotional reactions to products or services. Through sentiment analysis, companies can more accurately capture consumers' preferences, dissatisfaction, and expectations, thereby guiding product improvements and market strategy adjustments.
[0007] In summary, the present invention proposes a method combining text classification, sentiment analysis and topic modeling to split and transform industry needs and provide enterprises with deeper market insights and positioning strategies. Summary of the invention
[0008] The present invention provides a method for automatic demand splitting and conversion based on semantic understanding and industry learning, which solves the problems of traditional methods such as single data source, failure to capture emotional factors, and low accuracy and depth in industry demand splitting and conversion.
[0009] In order to solve the above technical problems, the technical solution of the present invention is: a method for automatically splitting and converting requirements based on semantic understanding and industry learning, comprising the following steps:
[0010] S1. Collect multiple industry texts and perform data preprocessing to obtain industry text data;
[0011] S2. Extract demand topics based on industry text data to obtain demand topics and demand keywords corresponding to each demand topic and demand topic text;
[0012] S3, perform sentiment analysis on the demand topic text to obtain the demand sentiment score;
[0013] S4. Conduct industry dynamics analysis through demand themes, demand keywords and demand sentiment scores to achieve automatic splitting and conversion of industry demands.
[0014] The beneficial effects of the present invention are as follows: the present invention automatically extracts demand themes through multi-source industry text data, can understand the key topics and focus in the industry, and perform sentiment analysis on demand theme texts, understand the emotional tendencies and attitudes behind industry demands, calculate demand sentiment scores, quantify the positive or negative emotions of different demands, and provide enterprises with deeper insights and evaluation basis. At the same time, combining demand themes, keywords and sentiment scores can achieve in-depth analysis and prediction of industry dynamics, and can timely identify and respond to market changes, thereby maintaining competitive advantages and meeting customer needs.
[0015] Furthermore, the industry texts in S1 include industry-related news articles, academic papers, market reports, and social media content.
[0016] Furthermore, the specific steps of S2 are:
[0017] S21. Extracting multi-scale embedding representations of industry text data through semantic understanding models ;
[0018] S22. Multi-scale embedding representation Perform dimensionality reduction to obtain a dimensionality reduction embedding representation ;
[0019] S23. Representation of reduced dimension embedding through HDBSCAN clustering Perform clustering to obtain multiple demand topics and industry text data corresponding to each demand topic;
[0020] S24, the industry text data corresponding to each demand topic is combined into a demand topic text, and the weight of each word in each topic text is calculated according to the c-TF-IDF formula;
[0021] S25. Sort the words in the demand topic from large to small according to the weights, and select the top M words as the demand keywords for each demand topic.
[0022] The beneficial effects of the above further scheme are: capturing the semantic information of words, phrases and texts through multi-scale embedding representation, reducing the dimensionality of the multi-scale embedding representation can reduce the complexity and dimension of the data, and retaining its key semantic information. At the same time, using HDBSCAN clustering can effectively identify the implicit structure in the text data, thereby automatically dividing the industry text data into multiple demand topics. This clustering method can handle clusters of different sizes and densities, and obtain demand topics with different scales. The c-TF-IDF formula is used to effectively identify and filter out the keywords most relevant to the topic, and further understand and describe the content characteristics of each demand topic.
[0023] Furthermore, the specific steps of S21 are:
[0024] S211. Map industry text data into word embedding vectors , and positionally encode the word embedding vector through sine and cosine functions to embed the word embedding vector Combined with the corresponding position code to obtain the input representation of industry text data ;
[0025] S212, input representation The semantic and contextual information of industry text data is extracted through a multi-layer Transformer encoder to obtain the hidden state representation of each layer;
[0026] S213, concatenate the hidden state representations at different levels, and adjust the weights of the hidden state representations at different levels through the attention mechanism to obtain the multi-scale embedding representation of the industry text data .
[0027] The beneficial effects of the above further scheme are: converting each word in the industry text data into a word embedding vector and encoding its position through sine and cosine functions can effectively capture the relative position information of the word in the sentence or document. After merging the word embedding vector and position encoding, the obtained input representation can more comprehensively express the semantic and structural information of the text data, which helps subsequent models to understand and process the text content more accurately. By extracting the semantic and contextual information of industry text data through a multi-layer Transformer model, long-distance dependencies and complex semantic structures in the text can be effectively captured.
[0028] Furthermore, the input representation in S211 The calculation formula is:
[0029]
[0030]
[0031]
[0032] in, represents the embedding matrix, represents the input sequence, Indicates that the input is and The position code, Indicates the selection parameters of the sine and cosine functions, Indicates the position of a word in a sequence. represents the dimension index of the position encoding, represents the dimension of word embedding, express A collection of;
[0033] The calculation formula for the hidden state representation in S212 is:
[0034]
[0035]
[0036]
[0037] in, Indicates The output matrix of layer self-attention, represents the normalized exponential function, , and Respectively represent The query matrix, key matrix and value matrix of the layer, express The transpose of Indicates The hidden state of the layer is represented by , and Both indicate The weight parameters of the layer, Indicates The hidden state of the layer is represented by represents the ReLU activation function, and Both indicate The weights of the feedforward neural network of the layer, and Both indicate The bias of the feedforward neural network of the layer, represents a hyperparameter;
[0038] The multi-scale embedding representation in S213 The calculation formula is:
[0039]
[0040]
[0041]
[0042] in, represents the concatenated feature representation, Represents a splicing operation, Indicates The hidden state of the layer is represented by represents the self-attention matrix of the concatenated feature representation, and Both represent weight parameters, express The transpose of .
[0043] Furthermore, the specific steps of S22 are:
[0044] S221. Compute multi-scale embedding representations The direction of maximum variance , and based on the direction of maximum variance Multi-scale embedding representation Perform a dimensionality reduction to obtain an embedding representation ;
[0045] S222, using the UMAP algorithm to represent an embedding Perform nonlinear dimensionality reduction to obtain a reduced dimensionality embedding representation .
[0046] Furthermore, the specific steps of S221 are:
[0047] A1. Compute multi-scale embedding representations The mean of each scale in the multi-scale embedding representation is obtained by subtracting the mean of the corresponding scale from each feature in each scale to obtain the centralized feature matrix ;
[0048] A2. Calculate the centralized feature matrix The covariance matrix of ;
[0049] A3. Perform eigenvalue decomposition on the covariance matrix and find the eigenvector corresponding to the maximum eigenvalue as the maximum variance direction of the multi-scale embedding representation ;
[0050] A4. Perform a dimensionality reduction on the multi-scale embedding representation based on the maximum variance direction to obtain an embedding representation ;
[0051] The covariance matrix The calculation formula is:
[0052]
[0053] in, represents the dimension of each scale in the multi-scale embedding representation, Represents the centralized feature matrix The transpose of
[0054] The one-time embedding representation The calculation formula is:
[0055] .
[0056] The beneficial effect of the above further scheme is: first embedding the multi-scale representation Reduce to a lower dimension, retain the most important variance information in the multi-scale embedding representation, reduce the redundant information and noise of the multi-scale embedding representation, and then perform nonlinear dimensionality reduction through UMAP to effectively retain the local and global structure of the multi-scale embedding representation. Through two dimensionality reductions, the computational complexity of UMAP dimensionality reduction can be reduced and the efficiency can be improved, and the distribution and characteristics of the multi-scale embedding representation can be more intuitively understood.
[0057] Furthermore, the formula for calculating the weight of each word appearing in each topic text in S24 is:
[0058]
[0059] in, Expressive words On Demand Topics Corresponding to the weight in the topic text, Expressive words On Demand Topics The frequency of words in the corresponding topic text, represents the norm, Indicates the average number of words contained in each demand topic, Expressive words Frequency among all demand topics.
[0060] Furthermore, the specific steps of S3 are:
[0061] S31. Use the semantic understanding model to extract the deep semantic information of the demand subject text and obtain the context semantic vector;
[0062] S32, learning the demand topic text through the SSWE model to obtain the sentiment vector;
[0063] S33, concatenating the sentiment vector and the context semantic vector to obtain the word vector of the demand topic text;
[0064] S34, input the word vector into the bidirectional long short-term memory network to process the text sequence, and weight the processed word vector through the self-attention mechanism to obtain the weighted word vector ;
[0065] S35. Weighted word vector Input into the recursive neural network for feature conversion to obtain the emotional feature vector ;
[0066] S36, sentiment feature vector Input into the classifier to calculate the demand sentiment score of the demand topic text .
[0067] The beneficial effects of the above further scheme are: learning the sentiment vector through the SSWE model, capturing the emotional color and emotional tendency in the demand topic text, concatenating the sentiment vector and the context semantic vector to obtain the word vector of the demand topic text. This comprehensive representation can more comprehensively express the semantic and emotional information of the text. The self-attention mechanism is used to weight the processed word vector, which helps to capture important semantic and emotional information in the text and improve the global understanding of the text. The recursive neural network converts complex word-level representations into higher-level semantic features, thereby better reflecting the emotional tendency and emotional intensity of the text. Finally, the emotional polarity and intensity in the demand topic text are evaluated through the demand emotional score, providing quantitative results for sentiment analysis.
[0068] Furthermore, the weighted word vector in S34 The calculation formula is:
[0069]
[0070]
[0071]
[0072] in, Indicates The word and The attention score of each word, Indicates The hidden state of a word, Indicates The hidden state of a word, represents the attention function, represents the attention weight, represents the sequence length, Indicates The word and The attention score of each word;
[0073] The sentiment feature vector The calculation formula is:
[0074]
[0075]
[0076] in, express The corresponding hidden state is express The emotional weight of represents the activation function, express The corresponding hidden state is and Both represent recursive parameters. represents the recursive bias term;
[0077] The requirement sentiment score The calculation formula is:
[0078]
[0079] in, Represents a classifier. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 This is a flow chart of the method for automatic splitting and conversion based on semantic understanding and industry learning requirements of the present invention.
[0081] Figure 2 This is a schematic diagram of sentiment analysis performed in the present invention. DETAILED DESCRIPTION
[0082] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
[0083] Example 1
[0084] like Figure 1 As shown, the present invention provides a method for automatically splitting and converting requirements based on semantic understanding and industry learning, comprising the following steps:
[0085] S1. Collect multiple industry texts and perform data preprocessing to obtain industry text data;
[0086] S2. Extract demand topics based on industry text data to obtain demand topics and demand keywords corresponding to each demand topic and demand topic text;
[0087] S3, perform sentiment analysis on the demand topic text to obtain the demand sentiment score;
[0088] S4. Conduct industry dynamics analysis through demand themes, demand keywords and demand sentiment scores to achieve automatic splitting and conversion of industry demands.
[0089] In this embodiment 1, data preprocessing includes operations such as data cleaning, word segmentation, and stop word removal.
[0090] The industry texts in S1 include industry-related news articles, academic papers, market reports, and social media content.
[0091] In this embodiment 1, the industry text includes multi-source data, among which news articles cover real-time industry dynamics and events, and can reflect current hot spots and trends; academic papers usually explore in depth the research results and technological progress in specific fields, and provide in-depth and professional industry knowledge; market reports provide detailed data and analysis on market size, trends, competition analysis, etc., which are helpful for understanding the market structure and business opportunities; and social media content reflects the real-time feedback and emotional attitudes of consumers and users, and can capture changes in public opinion and user needs.
[0092] Therefore, news and social media content can quickly reflect the market and public concerns and public opinion trends, and help capture emerging trends and emergencies in the industry in a timely manner. Although academic papers and market reports are not as timely as news and social media, they provide more in-depth and long-term analysis, which helps to understand the long-term development trends and structural changes of the industry.
[0093] Combining the advantages of news articles, academic papers, market reports and social media content as industry text data can provide multi-dimensional and multi-angle information perspectives, which helps to deeply understand and analyze the current status of the industry and its development trends.
[0094] The specific steps of S2 are:
[0095] S21. Extracting multi-scale embedding representations of industry text data through semantic understanding models ;
[0096] S22. Multi-scale embedding representation Perform dimensionality reduction to obtain a dimensionality reduction embedding representation ;
[0097] S23. Representation of reduced dimension embedding through HDBSCAN clustering Perform clustering to obtain multiple demand topics and industry text data corresponding to each demand topic;
[0098] S24, the industry text data corresponding to each demand topic is combined into a demand topic text, and the weight of each word in each topic text is calculated according to the c-TF-IDF formula;
[0099] S25. Sort the words in the demand topic from large to small according to the weights, and select the top M words as the demand keywords for each demand topic.
[0100] In this embodiment 1, demand topics and demand keywords are extracted through S2, which does not require a large number of preprocessing steps like the LDA model. At the same time, when it is necessary to process complex, long texts and multilingual data, it can provide more comprehensive and accurate analysis results.
[0101] The specific steps of S21 are:
[0102] S211. Map industry text data into word embedding vectors , and positionally encode the word embedding vector through sine and cosine functions to embed the word embedding vector Combined with the corresponding position code to obtain the input representation of industry text data ;
[0103] S212, input representation The semantic and contextual information of industry text data is extracted through a multi-layer Transformer encoder to obtain the hidden state representation of each layer;
[0104] S213, concatenate the hidden state representations at different levels, and adjust the weights of the hidden state representations at different levels through the attention mechanism to obtain the multi-scale embedding representation of the industry text data .
[0105] In this embodiment 1, a multi-scale embedding representation is extracted through an improved ALBERT model. The original ALBERT model outputs an embedding representation of fixed dimensions. Regardless of the length of the text sequence, the embedding representation of each word or token output is a vector of the same dimension. Therefore, features are selectively fused or combined from the outputs of Transformer encoders at different levels to obtain semantic information at different levels. Improve the model's ability to adapt to text complexity and diversity, and obtain richer and more diverse semantic expression capabilities.
[0106] The input in S211 indicates The calculation formula is:
[0107]
[0108]
[0109]
[0110] in, represents the embedding matrix, represents the input sequence, Indicates that the input is and The position code, Indicates the selection parameters of the sine and cosine functions, Indicates the position of a word in a sequence. represents the dimension index of the position encoding, represents the dimension of word embedding, express A collection of;
[0111] The calculation formula for the hidden state representation in S212 is:
[0112]
[0113]
[0114]
[0115] in, Indicates The output matrix of layer self-attention, represents the normalized exponential function, , and Respectively represent The query matrix, key matrix and value matrix of the layer, express The transpose of Indicates The hidden state of the layer is represented by , and Both indicate The weight parameters of the layer, Indicates The hidden state of the layer is represented by represents the ReLU activation function, and Both indicate The weights of the feedforward neural network of the layer, and Both indicate The bias of the feedforward neural network of the layer, represents a hyperparameter;
[0116] In this embodiment 1, the hyperparameter The dimensions of the query matrix and the key matrix.
[0117] The multi-scale embedding representation in S213 The calculation formula is:
[0118]
[0119]
[0120]
[0121] in, represents the concatenated feature representation, Represents a splicing operation, Indicates The hidden state of the layer is represented by represents the self-attention matrix of the concatenated feature representation, and Both represent weight parameters, express The transpose of .
[0122] The specific steps of S22 are:
[0123] S221. Compute multi-scale embedding representations The direction of maximum variance , and based on the direction of maximum variance Multi-scale embedding representation Perform a dimensionality reduction to obtain an embedding representation ;
[0124] S222, using the UMAP algorithm to represent an embedding Perform nonlinear dimensionality reduction to obtain a reduced dimensionality embedding representation .
[0125] The specific steps of S221 are:
[0126] A1. Compute multi-scale embedding representations The mean of each scale in the multi-scale embedding representation is obtained by subtracting the mean of the corresponding scale from each feature in each scale to obtain the centralized feature matrix ;
[0127] A2. Calculate the centralized feature matrix The covariance matrix of ;
[0128] A3. Perform eigenvalue decomposition on the covariance matrix and find the eigenvector corresponding to the maximum eigenvalue as the maximum variance direction of the multi-scale embedding representation ;
[0129] A4. Perform a dimensionality reduction on the multi-scale embedding representation based on the maximum variance direction to obtain an embedding representation ;
[0130] The covariance matrix The calculation formula is:
[0131]
[0132] in, represents the dimension of each scale in the multi-scale embedding representation, Represents the centralized feature matrix The transpose of
[0133] The one-time embedding representation The calculation formula is:
[0134] .
[0135] The formula for calculating the weight of each word appearing in each topic text in S24 is:
[0136]
[0137] in, Expressive words On Demand Topics Corresponding to the weight in the topic text, Expressive words On Demand Topics The frequency of words in the corresponding topic text, represents the norm, Indicates the average number of words contained in each demand topic, Expressive words Frequency among all demand topics.
[0138] In this embodiment 1, through a single dimensionality reduction, the main variance in the data is captured, and the important features and semantic information in the data are retained, thereby reducing the redundant information and noise of the data while maintaining the overall structure of the data.
[0139] The UMAP secondary dimensionality reduction can preserve more local structures and nonlinear relationships, and the primary dimensionality reduction can significantly reduce the computational complexity of the UMAP algorithm.
[0140] For multi-scale embedding vectors, through primary and secondary dimensionality reduction, we can more comprehensively understand and analyze the data characteristics at different scales, effectively maintain the data structure and information at different scales and complexities, making it easier to handle the complexity and diversity of multi-scale embedding representations in practical applications.
[0141] like Figure 2 As shown, the specific steps of S3 are:
[0142] S31. Use the semantic understanding model to extract the deep semantic information of the demand subject text and obtain the context semantic vector;
[0143] S32, learning the demand topic text through the SSWE model to obtain the sentiment vector;
[0144] S33, concatenating the sentiment vector and the context semantic vector to obtain the word vector of the demand topic text;
[0145] S34, input the word vector into the bidirectional long short-term memory network to process the text sequence, and weight the processed word vector through the self-attention mechanism to obtain the weighted word vector ;
[0146] S35. Weighted word vector Input into the recursive neural network for feature conversion to obtain the sentiment feature vector ;
[0147] S36, sentiment feature vector Input into the classifier to calculate the demand sentiment score of the demand topic text .
[0148] In this embodiment 1, the sentiment vector is obtained through the SSWE model. The SSWE model not only considers the semantic relationship of the context words, but also integrates the grammatical and syntactic information through structured embedding, so as to generate a more comprehensive word vector. At the same time, it can effectively capture the ambiguity of words, so that the generated word vector can better adapt to different contexts and language processing tasks.
[0149] In this embodiment 1, a bidirectional long short-term memory network is used to process the text sequence. Assume that a text sequence ,in, Represents the word vector representation words, , after being processed by a bidirectional long short-term memory network, the hidden state sequence is obtained ,in, Indicates The hidden state of a word.
[0150] The bidirectional long short-term memory network calculates the forward hidden state and the reverse hidden state respectively, and the calculation formula is:
[0151]
[0152]
[0153] in, Indicates The forward hidden state of a word, Represents the calculation of the forward LSTM, Indicates The forward hidden state of a word, Indicates The reverse hidden state of each word, represents the calculation of reverse LSTM, Indicates The reverse hidden state of each word.
[0154] By formula , get the Hidden state of words .
[0155] The weighted word vector in S34 The calculation formula is:
[0156]
[0157]
[0158]
[0159] in, Indicates The word and The attention score of each word, Indicates The hidden state of a word, Indicates The hidden state of a word, represents the attention function, represents the attention weight, represents the sequence length, Indicates The word and The attention score of each word;
[0160] The sentiment feature vector The calculation formula is:
[0161]
[0162]
[0163] in, express The corresponding hidden state is express The emotional weight of represents the activation function, express The corresponding hidden state is and Both represent recursive parameters. represents the recursive bias term;
[0164] The requirement sentiment score The calculation formula is:
[0165]
[0166] in, Represents a classifier.
[0167] In this embodiment 1, by collecting multiple industry texts, in-depth analysis of the industry texts is performed, and demand themes are extracted. The demand themes reflect the market's concerns and consumer demand directions, and the industry's demand hotspots are split. At the same time, demand keywords are extracted. The demand keywords reflect the specific issues or characteristics that consumers are concerned about in the discussion. Finally, sentiment analysis is performed to help companies understand consumers' emotional attitudes towards products or brands, etc., which helps companies judge the market response of the industry, optimize product marketing strategies or improve product design, etc. Therefore, by extracting demand keywords and performing sentiment analysis on massive industry texts, the industry's needs are converted, and industry dynamic analysis is achieved, so that companies can better meet industry market needs.
[0168] Example 2
[0169] In this embodiment 2, taking the automobile industry as an example, the automobile industry text is collected, and the partial content of the automobile industry text is shown in Table 1, which is an example table of the partial automobile industry text.
[0170] Table 1
[0171]
[0172] First, data processing is performed on the automotive industry text, including data cleaning, word segmentation, and stop word removal operations to obtain automotive industry text data.
[0173] Demand themes are extracted from the automotive industry text data to obtain demand themes and demand keywords corresponding to each demand theme and demand theme text. This embodiment 2 selects the top 4 demand keywords, as shown in Table 2, which is a partial example table of demand themes, demand keywords and demand theme text.
[0174] Table 2
[0175]
[0176] This embodiment 2 can also cluster the demand topics according to the needs of the enterprise to obtain a large category of demand topics, or perform secondary demand topic extraction on the demand topic text under the demand topic to obtain smaller and more precise secondary demand topics.
[0177] After the demand is split, sentiment analysis is performed on the text under each demand topic to calculate the demand sentiment score, and positive sentiment, negative sentiment, and neutral sentiment are obtained through the demand sentiment score.
[0178] Therefore, the industry demand can be automatically split and converted through demand themes, demand keywords and demand sentiment scores, which can help enterprises gain a deeper understanding of customer needs, competitive situations and industry trends, thereby formulating more accurate market strategies. This invention solves the problems of traditional methods, such as single data source, failure to capture sentiment factors, and low precision and depth in the splitting and conversion of industry demand.
Claims
1. A method for automatic demand splitting and conversion based on semantic understanding and industry learning, characterized in that: The following steps are involved: S1. Collect multiple industry texts and perform data preprocessing to obtain industry text data; S2. Extract demand topics based on industry text data to obtain demand topics and demand keywords corresponding to each demand topic and demand topic text; S3, perform sentiment analysis on the demand topic text to obtain the demand sentiment score; S4. Conduct industry dynamic analysis through demand themes, demand keywords and demand sentiment scores to achieve automatic splitting and conversion of industry demands; The specific steps of S2 are: S21, extracting multi-scale embedding representation F of industry text data through semantic understanding model; S22. Reduce the dimension of the multi-scale embedding representation F to obtain the reduced-dimensional embedding representation F D ; S23. Clustering of reduced dimension embedding representation F by HDBSCAN D Perform clustering to obtain multiple demand topics and industry text data corresponding to each demand topic; S24, the industry text data corresponding to each demand topic is combined into a demand topic text, and the weight of each word in each topic text is calculated according to the c-TF-IDF formula; S25, sorting the words in the demand topic from large to small according to the weight, and selecting the top M words as the demand keywords of each demand topic; The specific steps of S21 are: S211. Map industry text data into word embedding vector X e , and positionally encode the word embedding vector through sine and cosine functions to embed the word vector X e Combined with the corresponding position code, the input representation X of the industry text data is obtained f ; S212, input representation X f The semantic and contextual information of industry text data is extracted through a multi-layer Transformer encoder to obtain the hidden state representation of each layer; S213, concatenating hidden state representations at different levels, and adjusting the weights of hidden state representations at different levels through an attention mechanism to obtain a multi-scale embedding representation F of the industry text data; The specific steps of S3 are: S31. Use the semantic understanding model to extract the deep semantic information of the demand subject text and obtain the context semantic vector; S32, learning the demand topic text through the SSWE model to obtain the sentiment vector; S33, concatenating the sentiment vector and the context semantic vector to obtain the word vector of the demand topic text; S34, input the word vector into the bidirectional long short-term memory network to process the text sequence, and weight the processed word vector through the self-attention mechanism to obtain the weighted word vector S35. Weighted word vector Input into the recursive neural network for feature conversion to obtain the sentiment feature vector F S ; S36, the emotional feature vector F S Input into the classifier and calculate the demand sentiment score S of the demand topic text.
2. The method for automatic demand splitting and conversion based on semantic understanding and industry learning according to claim 1 is characterized in that: The industry texts in S1 include industry-related news articles, academic papers, market reports, and social media content.
3. The method for automatic demand splitting and conversion based on semantic understanding and industry learning according to claim 1 is characterized in that: The input in S211 indicates X f The calculation formula is: X f =X e +P X e =E·X o Where E represents the embedding matrix, X o represents the input sequence, P(p,I) represents the position encoding of the input p and I, I represents the sine and cosine function selection parameters, p represents the position of the word in the sequence, i represents the dimension index of the position encoding, d represents the dimension of the word embedding, and P represents the set of P(p,I); The calculation formula for the hidden state representation in S212 is: <h2 style=";text-align:left;direction:ltr">H<h2 style=";text-align:left;direction:ltr"> l <h2 style=";text-align:left;direction:ltr"> =ReLU(A<h2 style=";text-align:left;direction:ltr"> l <h2 style=";text-align:left;direction:ltr"> W1<h2 style=";text-align:left;direction:ltr"> l <h2 style=";text-align:left;direction:ltr"> +b1<h2 style=";text-align:left;direction:ltr"> l <h2 style=";text-align:left;direction:ltr"> W2)<h2 style=";text-align:left;direction:ltr"> l <h2 style=";text-align:left;direction:ltr"> +b2<h2 style=";text-align:left;direction:ltr"> l Among them, A l represents the output matrix of the l-th layer of self-attention, Softmax(·) represents the normalized exponential function, Q l , K l and V l Represent the query matrix, key matrix and value matrix of the lth layer respectively, (K l ) T K l The transpose of H l-1 represents the hidden state representation of the l-1th layer, and Both represent the weight parameters of the lth layer, H l represents the hidden state representation of the lth layer, ReLU(·) represents the ReLU activation function, W1 l and W2 l Both represent the weights of the feedforward neural network at layer l, b1 l and b2 l Both represent the bias of the feedforward neural network at layer l, d k represents a hyperparameter; The calculation formula of the multi-scale embedding representation F in S213 is: F=A H ·H H=concat(H l-2 ,H l-1 ,H l ) A H =Softmax(W H2 ·tanh(W H1 ·H T )) Among them, H represents the concatenated feature representation, concat(·) represents the concatenation operation, and H l-2 represents the hidden state representation of the l-2th layer, A H represents the self-attention matrix of the concatenated feature representation, W H1 and W H2 Both represent weight parameters, H T represents the transpose of H.
4. The method for automatic demand splitting and conversion based on semantic understanding and industry learning according to claim 1 is characterized in that: The specific steps of S22 are: S221, calculate the maximum variance direction W of the multi-scale embedding representation F, and perform a dimensionality reduction on the multi-scale embedding representation F based on the maximum variance direction W to obtain an embedding representation F m ; S222, use the UMAP algorithm to embed F m Perform nonlinear dimensionality reduction to obtain the reduced dimensionality embedding representation F D .
5. The method for automatic demand splitting and conversion based on semantic understanding and industry learning according to claim 4 is characterized in that: The specific steps of S221 are: A1. Calculate the mean of each scale in the multi-scale embedding representation F, and subtract the mean of the corresponding scale from each feature in each scale in the multi-scale embedding representation to obtain the centralized feature matrix F C ; A2. Calculate the centralized feature matrix F C The covariance matrix F * ; A3. Perform eigenvalue decomposition on the covariance matrix and find the eigenvector corresponding to the maximum eigenvalue as the maximum variance direction W of the multi-scale embedding representation; A4. Perform a dimensionality reduction on the multi-scale embedding representation based on the maximum variance direction to obtain an embedding representation F m ; The covariance matrix F * The calculation formula is: Where N represents the dimension of each scale in the multi-scale embedding representation, and F C T Represents the centralized feature matrix F C The transpose of The first embedding representation F m The calculation formula is: F m =F·W。 6. The method for automatic demand splitting and conversion based on semantic understanding and industry learning according to claim 1 is characterized in that: The formula for calculating the weight of each word appearing in each topic text in S24 is: Among them, W t,a represents the weight of word t in the topic text corresponding to the demand topic a, tf t,a represents the frequency of word t in the topic text corresponding to demand topic a, ||·|| represents the norm, A represents the average number of words contained in each demand topic, and f t Represents the frequency of word t in all demand topics.
7. The method for automatic demand splitting and conversion based on semantic understanding and industry learning according to claim 1 is characterized in that: The weighted word vector in S34 The calculation formula is: e ij =Attention(h i ,h j ) Among them, e ij represents the attention score of the i-th word and the j-th word, h i represents the hidden state of the i-th word, h j represents the hidden state of the jth word, Attention(·) represents the attention function, α ij represents the attention weight, n represents the sequence length, e ik Represents the attention scores of the i-th word and the k-th word; The emotional feature vector F S The calculation formula is: Among them, H i express The corresponding hidden state, s i Indicates H i The sentiment weight, σ(·) represents the activation function, H i-1 express The corresponding hidden state, W h and W H All represent recursive parameters, and b represents the recursive bias term; The calculation formula of the demand emotion score S is: S=f(F S ) Here, f(·) represents the classifier.
Citation Information
Patent Citations
Image paragraph meaning releasing method based on topic clustering and transfer prediction
CN116737976A
Non-perpetual propagation group sentiment analysis method based on deep learning and analysis system thereof
CN117540740A
