Textile quality risk identification and evaluation method based on natural language evaluation
By establishing a knowledge base in the field of textile quality risk identification and a large language model for feature extraction and sentiment analysis, the problems of low efficiency and poor interpretability of textile quality risk assessment in existing technologies are solved, and rapid and low-cost risk identification and assessment are achieved.
Patent Information
- Application Number
- CN202511180776.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-08-22
AI Technical Summary
Existing textile quality risk assessment methods rely on manual experience, are inefficient and difficult to process unstructured text data, and are unable to deeply associate natural language descriptions with industry technical indicators, resulting in poor interpretability of risk assessment results.
By establishing a knowledge base in the field of textile quality risk identification, using a large language model for feature extraction and sentiment analysis, calculating the quality risk coefficient, and generating a multidimensional risk assessment report.
It achieves rapid and low-cost identification and assessment of textile quality risks, provides detection and analysis of potential risks, and supports supervision and random inspections by regulatory authorities.
Smart Images

Figure CN120672223A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of textile quality risk analysis, and in particular relates to a textile quality risk identification and assessment method based on natural language evaluation. Background Art
[0002] Textile products are an essential part of daily life, and their quality impacts consumers' experience and health and safety. Traditional quality testing methods, relying primarily on laboratory testing and expert evaluation, provide objective quality data but struggle to accurately reflect actual consumer experience and any issues they encounter.
[0003] With the development of the Internet and Internet of Things technologies, online text data has become an important basis for evaluating product quality. However, current textile quality risk assessment mainly relies on traditional quality inspection methods, which have obvious limitations:
[0004] First, it relies on manual experience. Quality inspectors conduct risk assessments through sampling and subjective judgment, which is not only inefficient but also susceptible to differences in individual experience.
[0005] Second, structured data analysis is limited. Existing quality management systems are mostly based on numerical testing indicators, such as color fastness and breaking strength, and are unable to effectively process unstructured text data such as consumer reviews and social media.
[0006] Third, the semantic correlation in the field of textile quality risks is weak, and existing technologies fail to deeply associate natural language descriptions with industry technical indicators, resulting in poor interpretability of risk assessment results.
[0007] To solve the above problems, the patent with authorization announcement number CN115187065B discloses a clothing product quality analysis system based on an e-commerce platform. The system extracts the corresponding size, material and color of clothing from the corresponding review information and after-sales information of the target clothing sales merchant within a preset period, processes and analyzes it, and then analyzes and judges the quality of clothing sold by the target clothing sales merchant within the preset period. However, the system only considers size, material and color when evaluating product quality through reviews, and cannot detect other quality problems of clothing products. Secondly, in terms of quality assessment, the system only uses the number of quality keywords appearing in the reviews as the basis for assessment, and does not conduct emotional assessment of the reviews. The risk assessment results it obtains are less accurate.
[0008] Therefore, it is of great significance to study a textile quality risk identification and assessment method based on natural language evaluation to solve the above problems. Summary of the Invention
[0009] This invention aims to address the challenges of existing technologies by providing a method for identifying and assessing textile quality risks based on natural language evaluation. By collecting multi-source text data and using a semantic analysis model to perform feature extraction and sentiment polarity analysis, this method establishes a textile quality knowledge graph, calculates quality risk coefficients, and ultimately generates a multidimensional risk assessment report. This method can identify and assess textile quality risks and provide testing advice to regulatory authorities.
[0010] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0011] A textile quality risk identification and assessment method based on natural language evaluation first establishes a knowledge base in the field of textile quality risk identification. Then, a large language model is combined with the knowledge base to extract features from the textile quality risk assessment text data to obtain characteristic indicators, including quality risk characteristics, sentiment words, and degree adverbs. Finally, the weights of the textile quality risk indicators are determined (i.e., the textile quality risk indicators are weighted). Based on the extracted characteristic indicators, the textile quality risk score is calculated, and the risk level is divided according to the risk score, and the risk assessment result is output.
[0012] The knowledge base in the field of textile quality risk identification includes a textile quality risk characteristic dictionary with a mapping relationship between textile quality risk indicators and textile quality risk characteristic words, as well as a sentiment word dictionary and a degree adverb dictionary. The sentiment word dictionary includes sentiment words and their sentiment word polarity, and the degree adverb dictionary includes degree adverbs and their degree adverb scores.
[0013] The calculation formula for textile quality risk score is as follows:
[0014] P = S × O × E;
[0015] Among them, S represents the risk degree score of the textile quality risk indicator to be calculated, S=10×s, s is the weight value of the textile quality risk indicator; O represents the occurrence frequency of the textile quality risk indicator, O=10×(ia / in), ia is the number of negative text data containing textile quality risk indicators, in is the number of text data of total quality risk texts; E value is the sentiment quantification value of the negative text containing textile quality risk indicators, E=-5×Ea×Eb, Ea is the sentiment score, Ea=-1 (that is, Ea=the sum of the sentiment quantification values of the negative text containing textile quality risk indicators / the total number of negative texts), Eb is the degree adverb score, Eb=the sum of the degree adverb scores in the negative text containing textile quality risk indicators / the total number of negative texts.
[0016] As the preferred technical solution:
[0017] As described above, in a textile quality risk identification and assessment method based on natural language evaluation, textile quality risk indicators refer to the test indicators for textiles in the textile testing standards GB 18401-2010, GB 31701-2015, GB 21500-2008, GB18383-2007, GB 20400-2006, GB 30585-2014, GB 25038-2010 and GB 18587-2001, including color fastness, formaldehyde content, odor, breaking strength, etc.
[0018] As described above, a textile quality risk identification and assessment method based on natural language evaluation, the process of extracting textile quality risk feature words is as follows: first, textile quality risk assessment text data is collected (i.e., user review text data is collected from e-commerce platforms, social media, and after-sales systems through the Python Scrapy framework and API interface), then the SimHash algorithm is used to remove duplicate text, the regular expression of the re module in Python is used to filter special symbols, and short texts with a string length of less than 5 are deleted, and then a large language model is used to assist in identifying invalid comments (including advertisements), and only sentences containing textile quality descriptions are retained to form a corpus; then the text data in the corpus is input into the large language model, candidate feature words are generated through instructions, and the mask prediction function of BERT is used to find potential feature words (specifically: the BERT model directly called from the HuggingFace Transformers library, its working mechanism is to first mask the candidate feature words in the text and replace them with special [MASK] Mark, then input the masked text into the BERT model, and finally predict the masked words based on the unmasked context), and use the found potential feature words as candidate features, combined with the Word2Vec embedding vector, calculate the relevance of all words in the corpus with the candidate feature words; finally, select the n candidate feature words with the highest relevance as extended feature words, remove duplicate words, and then combine with the professional terminology in the textile testing standard to manually filter the screened extended feature words, remove unreasonable extended words, and obtain textile quality risk feature words.
[0019] As described above, a textile quality risk identification and assessment method based on natural language evaluation is combined with Word2Vec embedding vectors to calculate the relevance of all words in the corpus with candidate feature words. The specific process is: first, the corpus and the gensim library in Python are used to train the Word2Vec model. Secondly, the trained Word2Vec model is used to obtain the vector representation of the candidate feature words. Finally, all the words in the corpus are traversed, the cosine similarity with the candidate feature words is calculated, and the words are sorted from high to low according to the relevance.
[0020] As described above, a textile quality risk identification and assessment method based on natural language evaluation, a textile quality risk characteristic dictionary having a mapping relationship between textile quality risk indicators and textile quality risk characteristic words, is established by matching textile quality risk characteristic words and textile quality risk indicators through manual screening, and obtaining a characteristic word list having affiliation between textile quality risk characteristic words and textile quality risk indicators.
[0021] The above-mentioned textile quality risk identification and assessment method based on natural language evaluation uses a large language model combined with a knowledge base in the field of textile quality risk identification to extract features from textile quality risk assessment text data. The specific process is as follows:
[0022] (1) Use Langchain to read the text in the knowledge base of textile quality risk identification and divide the text into chunks. The significance of chunks is that they can split long texts into small segments to improve the accuracy of search recall.
[0023] (2) Use the text2vec-large-chinese Chinese embedding model to perform embedding vectorization processing on the text after being divided into chunks to obtain vector data; then use the FAISS vector database tool to store the vector data in the vector database;
[0024] (3) A large language model is selected, injected into the knowledge base of the textile quality risk identification field, and instruction fine-tuning technology is used to construct a multi-task prompt template that includes textile quality feature word extraction, sentiment analysis and degree discrimination. The template content includes extracting textile quality risk feature words, textile quality risk indicators, sentiment polarity (i.e. sentiment score, divided into positive and negative, with scores assigned to 1 and -1 respectively) and degree adverbs and degree adverb scores from textile quality risk assessment text data, and requires the large language model to read and match text data from the vector database for task processing; among them, degree adverb extraction extracts degree adverbs based on the degree adverb vocabulary and outputs the degree score of the degree adverb;
[0025] (4) The multi-task prompt template constructed in step (3) including textile quality feature word extraction, sentiment analysis and degree discrimination is used to extract features from the textile quality risk assessment text data.
[0026] As described above, a textile quality risk identification and assessment method based on natural language evaluation divides risk levels according to risk scores, specifically: P≥x2 belongs to high risk, x1≤P<x2 belongs to relatively high risk, P<x1 belongs to general risk, where x2>x1. When the risk score P of the quality risk indicator is within the risk level range, it is considered that the quality risk indicator has a corresponding risk.
[0027] In the above-described method for identifying and assessing textile quality risks based on natural language evaluation, x1 = 64, x2 = 180. Each indicator is graded into three levels based on the user's risk acceptance. In the present invention, the risk level scores of quality risk indicators are divided into: 1-3 for general risk, 4-5 for higher risk, and 6-10 for high risk. The frequency of occurrence of quality risk indicators is divided into: 1-3 for general risk, 4-6 for higher risk, and 7-10 for high risk. The text sentiment quantization value of the quality risk indicator is divided into: 1-3 for general risk, 4-6 for higher risk, and 7-10 for high risk. Here, the boundary values of the higher risk interval are taken as the values of x1 and x2, x1 = 4×4×4 = 64, x2 = 5×6×6 = 180.
[0028] Beneficial effects:
[0029] (1) The present invention uses text data and text processing technology to perform sentiment analysis and extract degree adverbs, and extract characteristic indicators of textile quality risks, which are used to identify the quality risks of textiles and further realize the assessment of the quality risks of textiles. The textile quality risk identification and assessment method based on natural language evaluation has the advantages of low cost, fast detection speed and the discovery of potential risks.
[0030] (2) The present invention establishes a knowledge base in the field of textile quality risk identification, uses a large language model to extract features from text data, calculates the textile quality risk score, and realizes the assessment of textile quality risk level. By processing and analyzing online textile-related text data, the product quality risk of online textiles is analyzed and judged, providing a key inspection direction for the existing supervision and inspection methods of current regulatory authorities, and realizing the analysis of textile quality risks from the natural language field. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 This is a flow chart of a method for identifying and assessing textile quality risks based on natural language evaluation according to the present invention;
[0032] Figure 2 Schematic diagram of the large language model prompt template of the present invention. DETAILED DESCRIPTION
[0033] Below in conjunction with specific embodiment, further set forth the present invention.Should be understood that these embodiments are only used to illustrate the present invention and are not used in limiting the scope of the present invention.In addition, should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall equally within the scope limited by the appended claims of the application.
[0034] A textile quality risk identification and assessment method based on natural language evaluation, such as Figure 1 As shown, the steps are as follows:
[0035] (1) Establish a knowledge base in the field of textile quality risk identification;
[0036] The knowledge base in the field of textile quality risk identification includes a textile quality risk characteristic dictionary with a mapping relationship between textile quality risk indicators and textile quality risk characteristic words, as well as a sentiment word dictionary and a degree adverb dictionary; among which:
[0037] Textile quality risk indicators refer to the testing indicators for textiles in the textile testing standards GB 18401-2010, GB 31701-2015, GB21500-2008, GB 18383-2007, GB 20400-2006, GB 30585-2014, GB 25038-2010 and GB18587-2001;
[0038] The sentiment word dictionary is based on the Dalian University of Technology Chinese sentiment word ontology. Some words in the sentiment word ontology are selected and new sentiment words are added. Each sentiment word is reclassified according to its sentiment polarity to obtain the sentiment word dictionary. Among them, positive polarity sentiment words are assigned a value of 1, and negative polarity sentiment words are assigned a value of -1.
[0039] The degree adverb dictionary is built based on the Hownet degree adverb dictionary. The degree adverbs are manually extracted from the review data and normalized according to the Hownet degree adverb scoring method. The value space is (0,2], and all degree adverbs are divided into six categories: very weak (0.5), relatively weak (0.8), relatively strong (1.3), very strong (1.6), extremely strong (1.8), and strongest (2).
[0040] The extraction process of textile quality risk feature words is as follows:
[0041] (a) Textile quality risk assessment text data was collected (i.e., user review text data was collected from e-commerce platforms, social media, and after-sales systems using the Python Scrapy framework and API interface). Duplicate text was then removed using the SimHash algorithm. Regular expressions using the Python re module were used to filter special symbols and delete short text with a string length of less than 5. A large language model was then used to assist in identifying invalid reviews. Generative classification was then used to determine whether the content was the default template. Only sentences containing textile quality descriptions were retained to form a corpus. Finally, the LTP word segmentation tool was used to segment the text and perform part-of-speech tagging.
[0042] (b) Directly call the BERT model from the Hugging Face Transformers library, then use the BERT model's tokenizer to process complex expressions such as the compound words in "severe shrinkage after washing". Then input the tokenized text data into the large language model, generate candidate feature words through instructions, and then call the BERT model again. Use the BERT model's mask prediction function to mask the candidate feature words in the text and replace them with special [MASK] tags. Then input the masked text into the BERT model, and finally predict the masked words (i.e., potential feature words) based on the unmasked context, and use the found potential feature words as candidate features.
[0043] (c) Use the corpus and the gensim library in Python to train a Word2Vec model. Then use the trained Word2Vec model to obtain vector representations of candidate feature words. Finally, traverse all the words in the corpus, calculate the cosine similarity with the candidate feature words, and sort them from high to low in terms of relevance.
[0044] (d) Select the n candidate feature words with the highest relevance as extended feature words, remove duplicate words, and then manually filter the screened extended feature words based on the professional terms in the textile testing standards to remove unreasonable extended words to obtain textile quality risk feature words;
[0045] Finally, the above-mentioned textile quality risk characteristic words and textile quality risk indicators are matched by manual screening to establish a characteristic word table with the affiliation relationship between textile quality risk characteristic words and textile quality risk indicators, that is, a textile quality risk characteristic dictionary with a mapping relationship between textile quality risk indicators and textile quality risk characteristic words. The quality risk indicators and quality risk characteristic words of the first five items of the textile quality risk characteristic dictionary are as follows: ;
[0046] (2) Using a large language model combined with a knowledge base in the field of textile quality risk identification, we extract features from the textile quality risk assessment text data and obtain feature indicators, including quality risk features, sentiment words, and degree adverbs. The specific process is as follows:
[0047] (I) Use Langchain to read the text in the knowledge base of textile quality risk identification and divide the text into chunks (text chunking);
[0048] (II) Use the text2vec-large-chinese Chinese embedding model to perform embedding vectorization on the text after being segmented into chunks to obtain vector data. Then use the FAISS vector database tool to store the vector data in the vector database.
[0049] (III) Select the large language model GPT architecture, use the RAG enhanced retrieval generation method to inject the textile quality risk identification domain knowledge base, and use the instruction fine-tuning technology to build Figure 2 The multi-task prompt template shown includes textile quality feature word extraction, sentiment analysis, and degree discrimination. The template content includes extracting textile quality risk feature words, textile quality risk indicators, sentiment polarity (i.e., sentiment scores, divided into positive and negative, with scores assigned to 1 and -1 respectively), degree adverbs, and degree adverb scores from textile quality risk assessment text data. It also requires a large language model to read and match text data from a vector database for task processing. Among them:
[0050] Quality attribute feature word identification uses feature extraction to extract a set of candidate feature words from the natural language text evaluation data of the textiles to be analyzed. Semantic filtering is performed based on the textile quality risk domain knowledge to extract textile quality risk feature words and output textile quality risk indicators. For example, for a comment such as "This T-shirt is [very] prone to <pilling> (poor quality)", the extracted textile quality risk feature word is "pilling", and the corresponding textile quality risk indicator output is "pilling performance" based on the textile quality risk feature dictionary.
[0051] Sentiment polarity analysis uses a binary classification method based on the sentiment vocabulary to classify the sentiment of each text data. The output is 1 for positive sentiment polarity or -1 for negative sentiment polarity. For example, in the comment "This T-shirt is [very] prone to <pilling> (poor quality)", the sentiment word extracted is "poor quality", and the sentiment polarity is determined to be negative based on the sentiment vocabulary, and the output value is "-1";
[0052] Degree adverb extraction: Extract degree adverbs based on the degree adverb vocabulary and output the degree score of the degree adverb. For example, in the comment "This T-shirt is [very] prone to <pilling>, (poor quality)", the extracted degree adverb is "very", and based on the degree adverb dictionary, the output degree score of the degree adverb is "2";
[0053] (IV) extracting features from the textile quality risk assessment text data using the multi-task prompt template constructed in step (III) that includes textile quality feature word extraction, sentiment analysis, and degree discrimination;
[0054] (3) Output risk assessment results;
[0055] (3.1) The judgment matrix M is constructed using the AHP analytic hierarchy process. The expert scoring method is used. The weight vector is calculated using the eigenvalue method and a consistency test is performed. After passing the consistency test, the textile quality risk indicators are weighted; where:
[0056] The calculation of indicator weights is based on the judgment matrix M. Its maximum eigenvalue λ_max and its corresponding eigenvector A are calculated. The eigenvalues and eigenvectors of the judgment matrix M are solved in the same way as the matrix eigenvalues in linear algebra. The eigenvector corresponding to its largest eigenvalue is the eigenvector A. The solution equation is: M=λ_max A. The eigenvector A is the value of the importance of each evaluation indicator. Then, the weight value of each indicator can be obtained through normalization calculation.
[0057] The formula used for consistency test is as follows:
[0058] CR=CI / RI;
[0059] CI = (λ_max-n)\ / (n-1);
[0060] Where n is the dimension of the judgment matrix, CR is the random consistency ratio, CI is the consistency value, and RI is the average random consistency index value. When CR is less than 0.1, it means that the consistency of the judgment matrix is within the reasonable range of the internal structure logic of the judgment matrix.
[0061] The above method can be used to conduct quality risk assessments on different textiles and obtain indicator weights that are appropriate for the product category. For example, a risk assessment was conducted on product reviews of the "714street" brand woven shorts on the Tmall platform. After the above steps, the textile quality risk indicators obtained were "fiber content," "color fastness," "odor," and "bursting strength." A judgment matrix was constructed based on the indicators. Textile practitioners and industry experts provided relative importance ratios for each indicator, with the specific ratios ranging from 1 to 9. The judgment matrix is shown in the following table:
[0062] Calculate the indicator weights and perform consistency tests. The judgment matrix is shown in the following table: ;
[0063] According to the above judgment matrix M and the solution formula, the weight value of the fiber content of the shorts is 0.11, the weight value of the color fastness of the shorts is 0.255, the weight value of the odor of the shorts is 0.569, and the weight value of the bursting strength of the shorts is 0.066.
[0064] At the same time, in order to test the rationality of the internal logic of the judgment matrix during construction, the consistency test formula is used for calculation. It can be seen that the judgment matrix M is a 4-order matrix, the RI value is 0.90, the CI of the judgment matrix is 0.0195, CR=CI / RI=0.0217<0.1, that is, the weight value of the fiber content of the shorts is 0.11, the weight value of color fastness is 0.255, the weight value of odor is 0.569, and the weight value of bursting strength is 0.066.
[0065] (3.2) Calculate the textile quality risk score P based on the extracted characteristic indicators. The calculation formula for the textile quality risk score is as follows:
[0066] P = S × O × E;
[0067] Among them, S represents the risk degree score of the textile quality risk indicator to be calculated, S=10×s, s is the weight value of the textile quality risk indicator; O represents the frequency of occurrence of the textile quality risk indicator, O=10×(ia / in), ia is the number of text data containing textile quality risk indicators, in is the number of text data of total quality risk texts; E value is the sentiment quantification value of the text containing textile quality risk indicators, E = -5×Ea×Eb, Ea is the sentiment score, Ea=-1, Eb is the degree adverb score, Eb=the sum of the degree adverb scores in the negative text containing textile quality risk indicators / the total number of negative texts;
[0068] Using the above-mentioned formula for calculating textile quality risk scores, the quality risk assessment of the shorts garment in step (3.1) was conducted. The total amount of negative quality text data was 511, of which 39 were negative text data for fiber content, 384 for color fastness, 76 for odor, and 12 for bursting strength. The results are as follows:
[0069] The degree adverb score Eb of fiber content was 1.1, and the risk score P was 4.62;
[0070] The degree adverb score Eb of color fastness is 1.411, and the risk score P is 135.19;
[0071] The degree adverb score Eb of odor is 0.875, and the risk score P is 37.02;
[0072] The score of the degree adverb of breaking strength is Eb 1.77, and the risk score is P 1.37;
[0073] (3.3) Classify the risk level based on the risk score and output the risk assessment results; the risk level classification is specifically as follows: P ≥ 180 is high risk, 64 ≤ P < 180 is relatively high risk, and P < 64 is average risk;
[0074] Based on the above risk classification, the risk classification of the woven shorts in step (3.2) shows that the color fastness of the shorts is high risk, while the fiber content, odor, and bursting strength are medium risk. Therefore, the regulatory authorities need to pay special attention to the "color fastness" test of this textile;
[0075] According to the report on product quality supervision and random inspections in 2024 released by the Zhejiang Provincial Market Supervision Administration in 2025, the test results of 714street shorts clothing in the e-commerce platform sampling were found to be unqualified in water resistance and color fastness. By comparing the above measured results with the sampling test results, it can be seen that the design of this method is meaningful and effective for the identification and assessment of textile quality risks.
Claims
1. A textile quality risk identification and assessment method based on natural language evaluation, characterized by: First, a knowledge base in the field of textile quality risk identification is established. Then, a large language model is combined with the knowledge base to extract features from the textile quality risk assessment text data to obtain characteristic indicators, including quality risk characteristics, sentiment words, and degree adverbs. Finally, the weights of the textile quality risk indicators are determined, and the textile quality risk scores are calculated based on the extracted characteristic indicators. The risk levels are divided according to the risk scores, and the risk assessment results are output. The knowledge base in the field of textile quality risk identification includes a textile quality risk characteristic dictionary with mapping relationships between textile quality risk indicators and textile quality risk characteristic words, as well as a sentiment word dictionary and a degree adverb dictionary; The calculation formula for textile quality risk score is as follows: P = S × O × E; Among them, S represents the risk degree score of the textile quality risk indicator, S=10×s, s is the weight value of the textile quality risk indicator; O represents the occurrence frequency of the textile quality risk indicator, O=10×(ia / in), ia is the number of negative text data containing textile quality risk indicators, in is the number of text data of the total quality risk text; E value is the sentiment quantification value of the negative text containing textile quality risk indicators, E=-5×Ea×Eb, Ea is the sentiment score, Ea=-1, Eb is the degree adverb score, Eb=the sum of the degree adverb scores in the negative text containing textile quality risk indicators / the total number of negative texts.
2. The method for identifying and assessing textile quality risks based on natural language evaluation according to claim 1, characterized in that: Textile quality risk indicators refer to the testing indicators for textiles in the textile testing standards GB 18401-2010, GB 31701-2015, GB 21500-2008, GB 18383-2007, GB 20400-2006, GB 30585-2014, GB 25038-2010 and GB18587-2001.
3. The method for identifying and assessing textile quality risks based on natural language evaluation according to claim 2, characterized in that: The extraction process of textile quality risk feature words is as follows: first, the textile quality risk assessment text data is collected, and then the SimHash algorithm is used to remove duplicate texts. The regular expression of the re module in Python is used to filter special symbols, and short texts with a string length of less than 5 are deleted. Then, a large language model is used to assist in identifying invalid comments, and only sentences containing textile quality descriptions are retained to form a corpus; then the text data in the corpus is input into the large language model, and candidate feature words are generated through instructions. The mask prediction function of BERT is used to find potential feature words, and combined with the Word2Vec embedding vector, the relevance of all words in the corpus to the candidate feature words is calculated; finally, the n candidate feature words with the highest relevance are selected as extended feature words, and duplicate words are removed. Then, the screened extended feature words are manually filtered to remove unreasonable extended words to obtain textile quality risk feature words.
4. The method for identifying and assessing textile quality risks based on natural language evaluation according to claim 3, characterized in that: Combined with Word2Vec embedding vectors, the relevance between all words in the corpus and the candidate feature words is calculated. The specific process is: first, use the corpus and the gensim library in Python to train the Word2Vec model, then use the trained Word2Vec model to obtain the vector representation of the candidate feature words, and finally traverse all the words in the corpus, calculate the cosine similarity with the candidate feature words, and sort them from high to low according to the relevance.
5. The method for identifying and assessing textile quality risks based on natural language evaluation according to claim 4, characterized in that: The textile quality risk characteristic dictionary with the mapping relationship between textile quality risk indicators and textile quality risk characteristic words is The textile quality risk characteristic words and textile quality risk indicators are matched by manual screening, and a characteristic word table with the affiliation relationship between the textile quality risk characteristic words and textile quality risk indicators is established.
6. The method for identifying and assessing textile quality risks based on natural language evaluation according to claim 5, characterized in that: The large language model is combined with the knowledge base in the field of textile quality risk identification to extract features from the textile quality risk assessment text data. The specific process is as follows: (1) Use Langchain to read the text in the knowledge base of textile quality risk identification and divide the text into chunks; (2) Use the text2vec-large-chinese Chinese embedding model to perform embedding vectorization processing on the text after being divided into chunks to obtain vector data; then use the FAISS vector database tool to store the vector data in the vector database; (3) A large language model is selected, injected into the knowledge base of textile quality risk identification, and instruction fine-tuning technology is used to construct a multi-task prompt template that includes textile quality feature word extraction, sentiment analysis and degree discrimination. The template content includes extracting textile quality risk feature words, textile quality risk indicators, sentiment polarity, degree adverbs and degree adverb scores from textile quality risk assessment text data, and requires the large language model to read and match text data from the vector database for task processing; (4) The multi-task prompt template constructed in step (3) including textile quality feature word extraction, sentiment analysis and degree discrimination is used to extract features from the textile quality risk assessment text data.
7. The method for identifying and assessing textile quality risks based on natural language evaluation according to claim 1, characterized in that: The risk level is divided according to the risk score, specifically: P≥x2 is high risk, x1≤P<x2 is relatively high risk, P<x1 is general risk, and x2>x1.
8. The method for identifying and assessing textile quality risks based on natural language evaluation according to claim 7, characterized in that: x1=64,x2=180.
Citation Information
Patent Citations
Commercial quality emotional dictionary construction system based on big data text mining
CN105760502A
Risk assessing method for e-commerce product quality
CN107977798A
Product quality evaluation method and system based on user comments
CN110717654A
E-commerce comment sentiment analysis model based on part-of-speech features and viewpoint features in combination with convolutional neural network
CN111694960A
Fresh food cold chain supervision method and system based on sentiment analysis
CN113609294A