Text abstract generation method and system for cigarette retail marketing public opinion monitoring
Through the optimization of large language models and low-order adaptation methods, the professionalism, diversity and noise problems of tobacco industry public opinion text summary extraction are solved, and high-quality and efficient text summary generation is achieved, which is suitable for the text characteristics and diversification of the tobacco industry. data.
Patent Information
- Application Number
- CN202410811695.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-20
AI Technical Summary
Extraction of public opinion text summaries in the tobacco industry has problems such as domain expertise, text feature diversity, and noise information overload, making it difficult to generate accurate and efficient text summaries.
Using a large language model, by constructing a tobacco public opinion text summary data set and optimizing the low-order adaptation method, combined with word vector matrix training and a multi-layer Transformer structure, the tobacco industry-specific text data is processed, key information is extracted and text summaries are generated.
It improves the quality and efficiency of text summarization, can optimize large language models on civilian equipment, reduce information overload, adapt to the professional terminology and diversified texts of the tobacco industry, and enhances the recognition accuracy of real information.
Smart Images

Figure CN118673134A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology in the tobacco field, and in particular to a text summary generation method and system for monitoring public opinion in cigarette retail marketing. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Public opinion is the abbreviation of "public opinion situation". It is the sum of the attitudes, opinions and emotions expressed by the masses on various phenomena and problems in society. From the perspective of traditional sociological theory, public opinion is a reflection of the collective public opinion. In short, public opinion is the social attitude held by the public during the occurrence, development and change of public opinion-related events.
[0004] Text summarization technology refers to summarizing the content of the original document, while retaining the important content of the original document, and making the summary as concise as possible. The length of the text summary is often shorter than the source text. By reading the text summary, readers can understand the general meaning of the text in a shorter time. If text summaries can be extracted from massive public opinion texts and real-time human-computer dialogue texts on online social media in real time, relevant personnel in public opinion monitoring can quickly grasp the content of public opinion, thereby improving the efficiency of public opinion monitoring.
[0005] Due to the professionalism of the tobacco industry, the particularity and diversity of industry texts, it is difficult to extract the summary of public opinion texts in the tobacco industry. The specific analysis is as follows:
[0006] (1) Domain expertise: The tobacco industry has specific terminology, standards, and industry knowledge. In order to generate accurate summaries, summarization technology needs to have a certain understanding and background of relevant knowledge of the tobacco industry. This involves understanding the tobacco industry’s professional terminology, product classification, manufacturing process, market dynamics, and other aspects.
[0007] (2) Text characteristics: Tobacco industry texts have specific structures and formats, such as technical reports, market analysis, scientific research, etc. These texts contain a large amount of data, charts, experimental results and other information. Summarization technology needs to be able to process and accurately extract this key information.
[0008] (3) Diversity: The tobacco industry covers a variety of different types of texts, including scientific papers, market reports, news articles, etc. Each type of text has its own specific requirements and goals. Summarization technology needs to have the ability to understand and adapt to different types of texts in order to generate summaries that meet the requirements.
[0009] (4) Noise and information overload: Due to the size and complexity of the tobacco industry, public opinion texts may contain some noise information (such as advertisements, irrelevant words, emoticons, web links, repeated content, etc.), making it more difficult to extract key information. Summary of the invention
[0010] In order to solve the above problems, the present invention proposes a text summary generation method and system for cigarette retail marketing public opinion monitoring, which gives full play to the language comprehension ability of a large language model and effectively generates summaries for tobacco public opinion texts.
[0011] In order to achieve the above object, the present invention adopts the following technical solution:
[0012] In a first aspect, the present invention provides a text summary generation method for cigarette retail marketing public opinion monitoring, comprising:
[0013] Obtain historical tobacco public opinion texts and corresponding summary texts to construct a public opinion text summary dataset;
[0014] Use the public opinion text summary dataset to train the large language model, and use the low-order adaptation method to optimize the large language model;
[0015] The process of training a large language model includes: training the model by constructing a word vector matrix in the introduced word vector layer; specifically, mapping the words in the public opinion text summary dataset to a unique index, and counting the frequency of each word to construct a vocabulary containing domain professional terms, traversing each word in the vocabulary, and copying the corresponding pre-trained word vector generated to the custom word vector matrix;
[0016] For the tobacco public opinion text to be processed, the optimized large language model is used to obtain the text summary result.
[0017] As an optional implementation method, the process of constructing a public opinion text summary dataset includes:
[0018] Obtain texts related to cigarette retail marketing public opinion to build a corpus;
[0019] Provide initial text prompts or questions to guide the large language model to generate domain-related terms;
[0020] A diverse corpus is generated by using different text prompts or questions and producing corresponding different results.
[0021] As an optional implementation method, the tobacco public opinion text to be processed is segmented, and the keywords, adjectives modifying the keywords and the word frequency are counted according to the segmentation results;
[0022] After word segmentation, the frequency of nouns is first counted, and the nouns are sorted from high to low according to their frequency, and the first k nouns are used as keywords; then the sentences containing each keyword are determined, and the adjectives contained in the sentences of each keyword are counted in the sentences to obtain the frequency of each adjective;
[0023] The sentiment polarity of the adjectives modifying the keywords is judged to obtain the sentiment polarity of each keyword.
[0024] According to the keywords and their sentiment polarity, the sentences that meet the requirements in the tobacco public opinion text to be processed are extracted as text summaries.
[0025] As an optional implementation, the large language model links multiple layers of transformer-based neural networks, and constructs a word vector layer based on the multiple layers of transformer structure.
[0026] As an optional implementation, the process of optimizing the large language model using a low-order adaptation method includes: freezing the weight parameters of the pre-trained large language model, injecting a trainable word vector layer into each Transformer block, and eliminating the need to recalculate the gradients of the weight parameters of the large language model.
[0027] As an optional implementation, through prompt word engineering, the original text and summary text in the public opinion text summary dataset are converted into key-value pairs for large language model training optimization.
[0028] In a second aspect, the present invention provides a text summary generation system for cigarette retail marketing public opinion monitoring, comprising:
[0029] A data acquisition module is configured to acquire historical tobacco public opinion texts and corresponding summary texts, thereby constructing a public opinion text summary data set;
[0030] A model training module is configured to train a large language model using a public opinion text summary dataset and optimize the large language model using a low-order adaptation method;
[0031] The process of training a large language model includes: training the model by constructing a word vector matrix in the introduced word vector layer; specifically, mapping the words in the public opinion text summary dataset to a unique index, and counting the frequency of each word to construct a vocabulary containing domain professional terms, traversing each word in the vocabulary, and copying the corresponding pre-trained word vector generated to the custom word vector matrix;
[0032] The summary generation module is configured to use the optimized large language model to obtain the text summary result for the tobacco public opinion text to be processed.
[0033] In a third aspect, the present invention provides an electronic device comprising a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in the first aspect is performed.
[0034] In a fourth aspect, the present invention provides a computer-readable storage medium for storing computer instructions, wherein when the computer instructions are executed by a processor, the method described in the first aspect is performed.
[0035] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described in the first aspect.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] The method of the present invention collects historical tobacco public opinion text data, summarizes and annotates the historical tobacco public opinion text, and constructs a public opinion text summary data set; based on the constructed data set, a low-order adaptation method is used to train a large language model to improve the ability of the large language model to perform text summarization, and the large language model is applied to a more subdivided text summary generation field, thereby improving the quality of text summary production. At the same time, the method of the present invention uses a low-order adaptation method so that the large language model can be optimized on civilian training equipment. The present invention uses summary extraction technology to extract key information and core ideas from a large amount of text, helping users quickly obtain the required information and alleviating the problem of information overload.
[0038] In view of the problem of domain expertise, the present invention uses domain knowledge to fine-tune the large language model to better understand the professional terms and context of the tobacco industry and improve the performance of the large language model in this field; in view of the problem of text features, the present invention processes the text data by segmentation, part-of-speech tagging, etc., and extracts text features by word frequency statistics, sentiment analysis, etc., so as to better capture the characteristics and meaning of the text and better provide input for the model, and designs a text feature extraction method suitable for the tobacco industry; in view of the problem of text diversity, the present invention introduces diversified data sets and training samples to ensure that the large language model has good generalization ability when processing texts of different types and sources. At the same time, in order to obtain a more diverse and comprehensive data set, the model generation steps are run multiple times, and different text prompts or questions are used to produce diverse results, which helps to capture professional terms of different aspects and levels and enrich the content of the generated data set; in view of the problem of noise and information overload, the present invention needs to perform data cleaning and preprocessing before preparing the corpus. This includes removing irrelevant text, deleting duplicate content, processing format errors, etc., filtering out noise data, and improving the recognition accuracy of the large language model for real information.
[0039] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0041] Figure 1 A flow chart of a method for generating a text summary for monitoring public opinion in cigarette retail marketing provided in Example 1 of the present invention;
[0042] Figure 2 This is a schematic diagram of a large language model provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0043] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0044] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0045] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "comprise" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0046] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0047] Example 1
[0048] like Figure 1 As shown, this embodiment proposes a text summary generation method for cigarette retail marketing public opinion monitoring, including:
[0049] Obtain historical tobacco public opinion texts and corresponding summary texts to construct a public opinion text summary dataset;
[0050] Use the public opinion text summary dataset to train the large language model, and use the low-order adaptation method to optimize the large language model;
[0051] The process of training a large language model includes: training the model by constructing a word vector matrix in the introduced word vector layer; specifically, mapping the words in the public opinion text summary dataset to a unique index, and counting the frequency of each word to construct a vocabulary containing domain professional terms, traversing each word in the vocabulary, and copying the corresponding pre-trained word vector generated to the custom word vector matrix;
[0052] For the tobacco public opinion text to be processed, the optimized large language model is used to obtain the text summary result.
[0053] Specifically include:
[0054] Step 1: "Public opinion text" includes both user comments on forums and articles and comments published by the media or officially released; crawler technology is used, using Python's scrapy framework to crawl the specified website list regularly to collect historical tobacco public opinion text data on the Internet, such as user comment data on tobacco products.
[0055] Step 2: Use traditional methods to annotate the collected historical tobacco public opinion text data to obtain a set of original text-summary text pairs; after traversing all the collected historical tobacco public opinion text data, complete the construction of the public opinion text summary dataset.
[0056] Step 3: Through the prompt word engineering, the original text and summary text in the public opinion text summary dataset are converted into key-value pairs for large language model training optimization;
[0057] Texts in the tobacco field may have special language styles, domain-specific vocabulary, and contextual relevance. You can consider using domain-specific pre-trained models or performing domain adaptation methods. Specifically, you can collect a corpus in a specific field, generate a word vector database in a specific field, and then use a domain-specific pre-trained model for training to improve the model's performance on texts in the tobacco field.
[0058] In addition, the generated summaries can be further proofread and adjusted in combination with the knowledge of domain experts. Starting from a series of high-quality data sets, this method generates a series of data sets containing professional terms in the field of cigarette retail through a large language model combined with professional domain terminology.
[0059] The specific implementation process includes the following steps.
[0060] (1) Collecting professional terms in the field of cigarette retail: First, it is necessary to collect professional terms in the field of cigarette retail. This can be done by referring to industry-related literature, news articles, forum posts, encyclopedias, industry reports, professional papers and other sources to ensure that the collected terms are relevant to the field of cigarette retail and can cover all aspects of the field, such as supply chain management, sales strategy, market analysis, etc.; by introducing diverse data sets and training samples, ensure that the large language model has good generalization capabilities when processing texts of different types and sources.
[0061] (2) Data cleaning and preprocessing: Before preparing the corpus, data cleaning and preprocessing are required. This includes removing irrelevant text, deleting duplicate content, processing format errors, etc., filtering out noise data, and improving the recognition accuracy of large language models for real information.
[0062] (3) Prepare a corpus: In order to train a large language model, you need to prepare a corpus containing enough text data. This can be articles, blogs, news reports, forum posts, etc. related to cigarette retail collected from the Internet. The larger the corpus, the richer and more diverse the dataset generated by the model will be.
[0063] (4) Generate data using a large language model: After preparing the corpus, use a large language model (such as Qwen) to generate a dataset containing professional terms in the field of cigarette retail. To achieve this, some initial text prompts or questions can be provided to guide the large language model to generate relevant terms. For example, provide a question to the large language model, such as: "In the field of cigarette retail, what are the professional terms related to supply chain management?", and then extract relevant terms from the answers generated by the large language model.
[0064] (5) Generate diverse data: To obtain a more diverse and comprehensive dataset, run the model generation step multiple times and use different text prompts, questions, or settings to produce diverse results, which helps capture different aspects and levels of professional terminology and enrich the content of the generated dataset.
[0065] (6) Dataset evaluation and screening: The generated data set needs to be evaluated and screened to ensure the accuracy and rationality of the professional terms. Domain experts or domain knowledge can be used for evaluation and data that does not meet the requirements can be deleted.
[0066] (7) Dataset organization and export: After completing the evaluation and screening of the data set, the data can be organized and sorted to ensure that the structure and format of the data set are consistent. Finally, the data set is exported to an appropriate format, such as a text file, CSV file, etc., for subsequent use and analysis.
[0067] In this embodiment, the preprocessed text data is processed by word segmentation, part-of-speech tagging, etc., and text feature extraction methods such as word frequency statistics and sentiment analysis are used to better capture the characteristics and meaning of the text and better provide input for the model.
[0068] Specifically include:
[0069] Word segmentation: Based on the establishment of a rich vocabulary dictionary, the text that has completed the preprocessing module is segmented into Chinese words based on the forward maximum matching algorithm; words that are not in the vocabulary dictionary, that is, words that cannot be recognized, are processed as one word, and each word in the word segmentation result is separated by a space;
[0070] Word frequency statistics: Based on the word segmentation results, the number of keywords in the text information is counted based on the created special noun library and adjective library;
[0071] Among them, after the text information is segmented into Chinese words, the frequency of nouns in the text is first counted. After the frequency is counted, the noun words are sorted from high to low according to the frequency. The top-ranked (top k) noun indicator words can be considered as the key words for text analysis. Then, the sentences containing each keyword are summarized, and the adjectives contained in the sentences of each keyword are counted in the sentences, and the frequency of each adjective is listed.
[0072] Polarity judgment: judge the sentiment polarity of the adjectives that modify each keyword in the text;
[0073] Among them, the sentiment polarity of each key indicator word can be obtained by performing weighted sum calculation on the polarity of adjectives in the sentence set to which the keyword in the text information belongs.
[0074] Extract summary: According to the keywords and their sentiment polarity, extract the sentences that meet the requirements in the text information as the summary of the text information;
[0075] For example, according to each keyword and the corresponding sentiment polarity, the sentence containing the keyword and its sentiment word with the highest frequency is extracted as the sentiment evaluation text of the keyword.
[0076] Among them, the word segmentation results include noun information such as irritation, fragrance, aftertaste, smoke, taste, miscellaneous smell, appearance quality, packaging color, cigarette brand, cigarette type, taste, thickness, origin, price, tar content, carbon monoxide content, nicotine content, filter and popping beads, etc. The noun keywords with the highest word frequency are the key indicators for statistical analysis;
[0077] The sentiment word list mainly stores adjectives in text information that can reflect the emotional inclination of the evaluator and their sentiment polarity, such as sufficient, clean, sufficient, soft, light, and a series of words that can reflect the sentiment polarity of keywords;
[0078] Adjectives that modify nouns in text information are marked with their sentiment polarity in sentiment analysis. If the sentiment polarity value is 1, it means the sentiment is positive, and if the sentiment polarity value is -1, it means the sentiment is negative.
[0079] In this embodiment, for a specific text provided by a tobacco company, after steps such as text preprocessing, filtering, Chinese word segmentation, word frequency statistics, and abstract extraction, the trained large prediction model is used to obtain text summary information.
[0080] In this embodiment, the basic principle of the large language model is as follows Figure 2 As shown, by linking multiple layers of transformer-based neural networks, a language model with a large number of parameters is obtained. Based on the traditional multi-layer transformer structure, this embodiment constructs a custom word vector layer, so that the large language model has a stronger ability to process professional terms in the field of cigarette retail.
[0081] The specific processing procedures include:
[0082] (1) Data preprocessing: First, the dataset obtained above needs to be preprocessed, including text cleaning, word segmentation and other operations, to convert the text data into a processable form.
[0083] (2) Build a vocabulary: Map all words in the dataset to a unique index. Specifically, use tool libraries (such as NLTK, spaCy, etc.) to segment words and count the frequency of each word to build a vocabulary containing domain-specific terms.
[0084] (3) Create a word vector matrix: Based on the vocabulary, generate the corresponding pre-trained word vector according to the pre-trained word vector model (such as Word2Vec, GloVe, etc.); then, traverse each word in the vocabulary and copy its corresponding pre-trained word vector into the custom word vector matrix, thereby creating the word vector matrix.
[0085] The above-constructed vocabulary table and word vector matrix are for the establishment of professional terms in the tobacco industry, and are intended to train a large language model, thereby enabling the training of a large language model in the tobacco vertical field based on the underlying data support provided by the word vector database.
[0086] Step 4: Select a pre-trained large language model such as BERT and GPT, and re-pretrain it on the above-mentioned domain-specific corpus to obtain domain-specific model weights; then, fine-tune it on domain-specific tasks (such as text classification and named entity recognition) to further improve the performance of the model; in response to domain expertise issues, this embodiment uses domain knowledge to fine-tune the large language model to better understand the professional terminology and context of the tobacco industry and improve the performance of the large language model in this field.
[0087] Among them, a low-order adaptation method is used to optimize large language models;
[0088] Specifically, the pre-trained model weight parameters are frozen, and then the trainable layers are injected into each Transformer block. Since there is no need to recalculate the gradient of the model weight parameters, the amount of computation required for training is greatly reduced.
[0089] The number of parameters of the pre-trained large language model is very large, and civilian equipment cannot adjust all of its parameters. Therefore, this embodiment uses a low-order adaptation method to optimize the large language model. This method does not need to adjust all the parameter weights of the large language model, but simulates the fine-tuning of the weights of the large language model through multiple low-order matrices. While ensuring the model training effect, this method greatly reduces the number of parameters required to be modified for model fine-tuning, thereby completing the fine-tuning of the model on limited computing resources, so that the large language model has a way to learn professional knowledge in the field of cigarette retail.
[0090] In this embodiment, after training a large language model with the ability to summarize public opinion text, the model can analyze the input public opinion text and convert it into a summary text as a result. By using summary extraction technology, key information and core ideas can be extracted from a large amount of text, helping users quickly obtain the required information and reducing the problem of information overload.
[0091] The summary text here refers to the ability of the large language model to convert a long paragraph of input text into a key content summary. The specific value of the summary is a paragraph of text, which is a summary of the content of the input text. The generation of summaries helps tobacco industry marketers to efficiently extract important information from a large amount of media data, helps them monitor the current market public opinion, and helps guide subsequent production and sales processes.
[0092] Compared with the prior art, the method of this embodiment collects historical tobacco public opinion text data, summarizes and annotates the historical tobacco public opinion text, and constructs a public opinion text summary data set; based on the constructed data set, a low-order adaptation method is used to train the large language model, improve the ability of the large language model to perform text summarization, and apply the large language model to a more subdivided text summary generation field, thereby improving the quality of text summary production. At the same time, the method of this embodiment uses a low-order adaptation method, so that the large language model can be optimized on civilian training equipment.
[0093] It should be noted that all data is obtained in compliance with laws and regulations and user consent, and the data is used legally.
[0094] Example 2
[0095] This embodiment provides a text summary generation system for cigarette retail marketing public opinion monitoring, including:
[0096] A data acquisition module is configured to acquire historical tobacco public opinion texts and corresponding summary texts, thereby constructing a public opinion text summary data set;
[0097] A model training module is configured to train a large language model using a public opinion text summary dataset and optimize the large language model using a low-order adaptation method;
[0098] The process of training a large language model includes: training the model by constructing a word vector matrix in the introduced word vector layer; specifically, mapping the words in the public opinion text summary dataset to a unique index, and counting the frequency of each word to construct a vocabulary containing domain professional terms, traversing each word in the vocabulary, and copying the corresponding pre-trained word vector generated to the custom word vector matrix;
[0099] The summary generation module is configured to use the optimized large language model to obtain the text summary result for the tobacco public opinion text to be processed.
[0100] In this embodiment, a system page is also constructed by using a react framework, which can receive user input and obtain results through a summary generation module.
[0101] It should be noted that the above modules correspond to the steps described in Example 1, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above Example 1. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer executable instructions.
[0102] In further embodiments, there is also provided:
[0103] An electronic device includes a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in Embodiment 1 is performed. For the sake of brevity, it will not be described in detail here.
[0104] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0105] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0106] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the method described in Example 1 is completed.
[0107] The method in Example 1 can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it is not described in detail here.
[0108] A computer program product includes a computer program, and when the computer program is executed by a processor, the method described in embodiment 1 is implemented.
[0109] The present invention also provides at least one computer program product tangibly stored on a non-transitory computer-readable storage medium. The computer program product includes computer executable instructions, such as instructions included in a program module, which are executed in a device on a real or virtual processor of the target to perform the process / method as described above. Typically, program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform specific tasks or implement specific abstract data types. In various embodiments, the functions of program modules can be combined or divided between program modules as needed. Machine executable instructions for program modules can be executed in local or distributed devices. In distributed devices, program modules can be located in local and remote storage media.
[0110] The computer program code for implementing the method of the present invention can be written in one or more programming languages. These computer program codes can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the computer or other programmable data processing device, causes the function / operation specified in the flow chart and / or block diagram to be implemented. The program code can be executed completely on a computer, partially on a computer, as an independent software package, partially on a computer and partially on a remote computer or completely on a remote computer or server.
[0111] In the context of the present invention, computer program codes or related data may be carried by any appropriate carrier to enable a device, apparatus or processor to perform the various processes and operations described above. Examples of carriers include signals, computer readable media, etc. Examples of signals may include electrical, optical, radio, acoustic or other forms of propagation signals, such as carrier waves, infrared signals, etc.
[0112] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with this embodiment can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0113] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A text summary generation method for cigarette retail marketing public opinion monitoring, characterized in that: include: Obtain historical tobacco public opinion texts and corresponding summary texts to construct a public opinion text summary dataset; Use the public opinion text summary dataset to train the large language model, and use the low-order adaptation method to optimize the large language model; The process of training a large language model includes: training the model by constructing a word vector matrix in the introduced word vector layer; specifically, mapping the words in the public opinion text summary dataset to a unique index, and counting the frequency of each word to construct a vocabulary containing domain professional terms, traversing each word in the vocabulary, and copying the corresponding pre-trained word vector generated to the custom word vector matrix; For the tobacco public opinion text to be processed, the optimized large language model is used to obtain the text summary result.
2. The text summary generation method for cigarette retail marketing public opinion monitoring according to claim 1, characterized in that: The process of constructing a public opinion text summary dataset includes: Obtain texts related to cigarette retail marketing public opinion to build a corpus; Provide initial text prompts or questions to guide the large language model to generate domain-related terms; A diverse corpus is generated by using different text prompts or questions and producing corresponding different results.
3. The text summary generation method for cigarette retail marketing public opinion monitoring according to claim 1, characterized in that: Segment the tobacco public opinion text to be processed, and count the keywords, adjectives modifying the keywords, and word frequencies based on the segmentation results; After word segmentation, the frequency of nouns is first counted, and the nouns are sorted from high to low according to their frequency, and the first k nouns are used as keywords; then the sentences containing each keyword are determined, and the adjectives contained in the sentences of each keyword are counted in the sentences to obtain the frequency of each adjective; The sentiment polarity of the adjectives modifying the keywords is judged to obtain the sentiment polarity of each keyword. According to the keywords and their sentiment polarity, the sentences that meet the requirements in the tobacco public opinion text to be processed are extracted as text summaries.
4. The text summary generation method for cigarette retail marketing public opinion monitoring according to claim 1, characterized in that: The large language model links multiple layers of transformer-based neural networks, and constructs a word vector layer based on the multiple layers of transformer structure.
5. The text summary generation method for cigarette retail marketing public opinion monitoring according to claim 4, characterized in that: The process of optimizing a large language model using a low-order adaptation method includes freezing the weight parameters of the pre-trained large language model and injecting a trainable word embedding layer into each Transformer block without recalculating the gradients of the weight parameters of the large language model.
6. The text summary generation method for cigarette retail marketing public opinion monitoring according to claim 1, characterized in that: Through the prompt word engineering, the original text and summary text in the public opinion text summary dataset are converted into key-value pairs for large language model training optimization.
7. A text summary generation system for cigarette retail marketing public opinion monitoring, characterized in that: include: A data acquisition module is configured to acquire historical tobacco public opinion texts and corresponding summary texts, thereby constructing a public opinion text summary data set; A model training module is configured to train a large language model using a public opinion text summary dataset and optimize the large language model using a low-order adaptation method; The process of training a large language model includes: training the model by constructing a word vector matrix in the introduced word vector layer; specifically, mapping the words in the public opinion text summary dataset to a unique index, and counting the frequency of each word to construct a vocabulary containing domain professional terms, traversing each word in the vocabulary, and copying the corresponding pre-trained word vector generated to the custom word vector matrix; The summary generation module is configured to use the optimized large language model to obtain the text summary result for the tobacco public opinion text to be processed.
8. An electronic device, characterized in that: The method comprises a memory and a processor and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method according to any one of claims 1 to 6 is completed.
9. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the method described in any one of claims 1 to 6.
10. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Gibbs restricted text abstract generation method using pre-training model
CN113407711A
Simple aspect-level sentiment classification method for sentiment knowledge enhancement prompt tuning
CN116304063A
Cited By
Tobacco question-answering method and device based on multi-modal large model and medium
CN120086391A
