Public opinion monitoring method and device, computer equipment and storage medium

By using dialogue flow data and public opinion large language model to generate target instruction response and task flow, the problems of low efficiency and insufficient flexibility of public opinion monitoring in the existing technology are solved, and more efficient and flexible public opinion monitoring is achieved.

CN119862253APending Publication Date: 2025-04-22BEIJING ZHIHUI XINGGUANG INFORMATION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411778238.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

The existing technology relies on secondary development and manual processing in public opinion monitoring, resulting in low overall efficiency and low flexibility in scenarios where business needs change rapidly.

Method used

By obtaining the user's dialogue flow data, using the trained public opinion large language model to generate target instruction responses, and based on this, the target task flow is generated, and the task flow is performed for public opinion monitoring.

Benefits of technology

It quickly adapts to changes in user business needs, improves processing efficiency and flexibility, and allows the public opinion large language model to be independently iteratively learned during the dialogue, improving the intelligence of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862253A_ABST
    Figure CN119862253A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of public opinion analysis, and discloses a public opinion monitoring method and device, computer equipment and a storage medium, dialogue flow data of a user is obtained through a dialogue flow mode, the user experience is better, the data is analyzed through a trained public opinion big language model, the business requirements of the user are analyzed, and the user experience is improved. The user instruction and the target task corresponding to the user instruction are obtained, for example, public opinion data collection, public opinion data processing, model fine tuning, public opinion report generation and the like, so that the change of user business requirements is quickly adapted, and the flexibility is higher. Finally, the target task is executed through a task flow process mechanism, response and data feedback are conducted on dialogue flow data of the user, the processing efficiency is improved, the public opinion big language model can be made to conduct autonomous iterative learning in the dialogue process, and the intelligent degree of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of public opinion analysis, and in particular to a public opinion monitoring method, device, computer equipment and storage medium. Background Art

[0002] In the current public opinion reporting business practice, a comprehensive business application system has been built that covers report collection, creation, management, storage and historical review functions. The system gathers and integrates various public and private data to build an initial repository for public opinion data. Subsequently, advanced statistical and analytical algorithms are used to deeply process the report data and automatically generate reports. These reports are ultimately stored on the server for subsequent review, downloading, printing and other diversified business needs.

[0003] However, the first generation of public opinion reporting applications lacked real-time data collection and updating, lacked uniformity in data integration standards, and relied heavily on manual operations and customized data processing processes, significantly reducing the timeliness of reports. To address the above issues, the second generation of public opinion reporting applications introduced technical innovations such as automated data collection, metadata standardization management, and visual report template design, effectively solving the problems of data timeliness, standard consistency, and high degree of customization in the first generation of applications. However, the level of intelligence is low, there is a lack of process-based implementation mechanisms, and it lacks the ability to iterate and learn autonomously. Therefore, it is often difficult to respond quickly to rapid changes in business needs, and a large amount of work still needs to rely on secondary development and manual processing, which affects the overall efficiency and flexibility of public opinion monitoring. Summary of the invention

[0004] In view of this, the present invention provides a public opinion monitoring method, apparatus, computer equipment and storage medium to solve the problem that the prior art still relies on secondary development and manual processing, and the overall efficiency of public opinion monitoring is low and the flexibility is not strong in scenarios where business needs change rapidly.

[0005] In a first aspect, the present invention provides a method for monitoring public opinion, the method comprising:

[0006] Get the user's conversation flow data;

[0007] Generate a target instruction response pair based on the dialogue flow data and the trained public opinion language model; wherein the target instruction response pair includes a user instruction and a target task corresponding to the user instruction, and the target task includes at least one of a public opinion data collection task, a public opinion data processing task, a model fine-tuning task, and a public opinion report generation task;

[0008] A target task flow is generated based on the target instruction response pair, and the target task flow is executed to perform public opinion monitoring.

[0009] Beneficial effects: The present invention obtains the user's dialogue flow data through the dialogue flow, giving the user a better experience, and uses the trained public opinion language model to parse it, so as to analyze the user's business needs, obtain user instructions and target tasks corresponding to user instructions, such as public opinion data collection, public opinion data processing, model fine-tuning, and public opinion report generation, etc., so as to quickly adapt to changes in user business needs and be more flexible. Finally, the target task is executed by the process mechanism of the task flow, responding to the user's dialogue flow data and providing data feedback, improving processing efficiency, and enabling the public opinion language model to perform autonomous iterative learning during the dialogue process, thereby improving the intelligence of the model.

[0010] In some optional implementations, the training process of the public opinion language model includes:

[0011] Generate data samples based on the collected context data and the preset data structure, construct an original corpus, and construct an instruction library; wherein the context data includes at least one of encyclopedia entry data, news corpus data, encyclopedia question and answer data, community question and answer data, translation corpus data, and public opinion knowledge data;

[0012] The preset large language model is trained according to the original corpus and the instruction library to obtain a pre-trained instruction synthesizer; wherein the instruction synthesizer is used to generate an instruction response pair corresponding to each instruction command in the instruction library;

[0013] According to the instruction library and the instruction response pair corresponding to each instruction command, an enhanced instruction library is obtained;

[0014] The pre-trained instruction synthesizer is fine-tuned using the enhanced instruction library and the original corpus to obtain a trained public opinion language model.

[0015] Beneficial effect: The present invention uses the constructed instruction library and the original corpus to train the preset large language model to obtain a pre-trained instruction synthesizer, thereby fully deriving and reasoning the instruction commands in the instruction library to obtain instruction response pairs generated based on the instruction commands. Then, an enhanced instruction library is obtained based on the instruction response pairs and the instruction library, and the pre-trained instruction synthesizer is fine-tuned based on the enhanced instruction library and the original corpus to improve the model reasoning ability until the model can meet the business needs of the public opinion large language model.

[0016] In some optional implementations, generating data samples according to the collected context data and a preset data structure to construct an original corpus includes:

[0017] Generate a data sample according to the entry data structure and the encyclopedia entry data; wherein the entry data structure includes at least some of the following items: an entry identifier, an entry address, an entry title, and an entry text;

[0018] and / or, generating data samples according to the news data structure and the news corpus data; wherein the news corpus data structure includes at least some of the following items: news identification, news title, news text, news source, news release time, news keywords and news description;

[0019] and / or, generating a data sample according to the encyclopedia question and answer data structure and the encyclopedia question and answer data; wherein the question and answer corpus data structure includes at least some of the following items: an encyclopedia question and answer identifier, an encyclopedia question type, an encyclopedia question title, an encyclopedia question description, and an encyclopedia answer content;

[0020] and / or, generating a data sample based on a community question and answer data structure and community question and answer data; wherein the community question and answer data structure includes at least some of the following items: a community question and answer identifier, a community question title, a community question description, a topic to which the question belongs, a reply identifier, a reply label, a number of reply likes, and a reply content;

[0021] and / or, generating a data sample according to a translation data structure and translation corpus data; wherein the translation data structure includes original text content and translation content;

[0022] And / or, generating data samples based on the public opinion data structure and the public opinion knowledge data; wherein the public opinion data structure includes at least some of the following items: public opinion knowledge identification, knowledge questions and knowledge answers.

[0023] Beneficial effects: The present invention obtains various types of data such as encyclopedia entries, news corpus, encyclopedia Q&A, community Q&A, translation corpus, and public opinion knowledge data, and generates data samples according to corresponding data structures to construct a data-rich original corpus, so as to improve the scenario generalization ability of the large language model when training the large language model.

[0024] In some optional implementations, constructing an instruction library includes:

[0025] Obtaining instruction commands and attribute information of the instruction commands; wherein the attribute information includes at least some of the following items: instruction storage time, instruction category, instruction application scenario, and instruction usage frequency;

[0026] Sort the command commands according to their attribute information, build a command directory, and establish an association relationship between the command directory and the command commands;

[0027] According to the instruction commands, the instruction directory and the association relationship between the instruction directory and the instruction commands, an instruction library is obtained.

[0028] Beneficial effects: The present invention constructs an instruction command library based on the instruction storage time, instruction category, instruction application scenario, instruction usage frequency and other attribute information of the instruction command, so that when training a large language model, the large language model can identify user instructions corresponding to user business needs. In addition, by constructing an instruction directory and the association between the instruction directory and the instruction command, it is convenient to quickly retrieve relevant instructions and improve processing efficiency.

[0029] In some optional implementations, when the target task flow includes a model fine-tuning task, executing the target task flow includes:

[0030] Deploy the trained public opinion language model locally;

[0031] The trained public opinion large language model is fine-tuned according to the preset dialogue flow data format, calling data format and configuration data format to obtain the fine-tuned public opinion large language model; wherein, the dialogue flow data format includes role type and role dialogue content, the calling data format includes at least some of the following items: role type, role dialogue content and calling tool, and the configuration data format includes configuration interface name and configuration parameters.

[0032] Beneficial effects: The embodiment of the present invention deploys the trained public opinion language model locally and uses the local network to realize the dialogue interaction between the user and the model, thereby ensuring the data security when the model is used. The model data is fine-tuned through a preset fine-tuning data format, thereby realizing rapid adjustment and adaptation of the model without significantly increasing resource costs.

[0033] In some optional implementations, when the target task flow also includes a public opinion data collection task, executing the target task flow also includes:

[0034] Crawling network data from various data platforms and collecting user internal data; wherein the data platform includes at least one of social media, news media, forum blogs, and file management platforms, and the user internal data includes at least one of buried point data, interface transmission data, and system synchronization data;

[0035] Public opinion data is obtained based on network data and user internal data from various data platforms.

[0036] Beneficial effects: The present invention collects network data from various data platforms and obtains user internal data through various methods, fully collecting the latest data, which is beneficial to improving the real-time and accuracy of public opinion data.

[0037] In some optional implementations, when the target task flow further includes a public opinion data processing task and a public opinion report generation task in response to a user instruction, executing the target task flow further includes:

[0038] Clean, classify and label the public opinion data to obtain public opinion processing data;

[0039] According to a preset metadata storage structure, the public opinion processing data is stored in the industry knowledge base that the public opinion large language model relies on; wherein the metadata storage structure includes at least some of the following items: event identification, event title, event type, occurrence time, occurrence location, persons involved, event description, media coverage, social media reaction, emotional tendency, keywords, risk level, response measures, processing results, source reliability, and update time of the public opinion event;

[0040] Search the industry knowledge base to determine the target public opinion data corresponding to the user's instructions;

[0041] Analyze and extract key public opinion information from the target public opinion data, and generate a public opinion report based on the preset report format and key public opinion information;

[0042] The public opinion report is stored and updated in response to the user's report editing instruction.

[0043] Beneficial effects: The present invention realizes comprehensive and efficient management and analysis of public opinion data by rationally designing the fields of the metadata storage structure in the industry database. Moreover, by searching the industry database, the public opinion report is automatically generated according to the corresponding format and process, with high intelligence and processing efficiency. In addition, users can edit the public opinion report, which is conducive to improving the user experience.

[0044] In a second aspect, the present invention provides a public opinion monitoring device, the device comprising:

[0045] An acquisition module is used to obtain the user's conversation flow data;

[0046] The first processing module is used to generate a target instruction response pair based on the dialogue flow data and the trained public opinion large language model; wherein the target instruction response pair includes a user instruction and a target task corresponding to the user instruction, and the target task includes at least one of a public opinion data collection task, a public opinion data processing task, a model fine-tuning task, and a public opinion report generation task;

[0047] The second processing module is used to generate a target task flow based on the target instruction response pair and execute the target task flow.

[0048] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the public opinion monitoring method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0049] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the public opinion monitoring method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 is a flow chart of a method for monitoring public opinion according to an embodiment of the present invention;

[0052] Figure 2 is a flow chart of another method for monitoring public opinion according to an embodiment of the present invention;

[0053] Figure 3 is a schematic diagram of an instruction library according to an embodiment of the present invention;

[0054] Figure 4 is a schematic diagram of a process of instruction fine-tuning according to an embodiment of the present invention;

[0055] Figure 5 is a flow chart of another method for monitoring public opinion according to an embodiment of the present invention;

[0056] Figure 6 is a schematic diagram of an industry knowledge base according to an embodiment of the present invention;

[0057] Figure 7 is a schematic diagram of a process for generating a public opinion report according to an embodiment of the present invention;

[0058] Figure 8 is a schematic diagram of a public opinion report management interface according to an embodiment of the present invention;

[0059] Fig. 9 is a schematic diagram of a public opinion report according to an embodiment of the present invention;

[0060] Fig.10 is a system schematic diagram of a public opinion large language model according to an embodiment of the present invention;

[0061] Fig.11 is a structural block diagram of a public opinion monitoring device according to an embodiment of the present invention;

[0062] Fig.12It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0064] In the current public opinion reporting business practice, a comprehensive business application system covering report collection, creation, management, storage and historical review functions has been built. The system mainly collects and integrates various public and private data through network crawling, internal system import and other means to build an initial repository of public opinion data. Subsequently, the report data is deeply processed using advanced statistical and analytical algorithms. In the report generation stage, the system combines office software such as Word and Excel, uses POI technology, and is supplemented by customized report templates to achieve automatic report generation. These reports are finally stored on file servers and NSA (Network Security Architecture) servers to meet subsequent diversified business needs such as review, download and printing. However, the first generation of public opinion reporting applications exposed some key problems in actual operation, including insufficient real-time data collection and update, lack of uniformity in data integration standards, and heavy reliance on manual operations and customized data processing processes, which significantly reduced the timeliness of the report. In addition, the long upgrade cycle of the technical architecture further restricted the improvement of the overall performance of the system.

[0065] To address the above problems, the second-generation public opinion reporting application introduced technical innovations such as automated data collection, metadata standardization management, and visual report template design, which effectively solved the problems of data timeliness, standard consistency, and high degree of customization in the first-generation application. Although the second-generation public opinion reporting application has made significant progress in technology, there are still obvious technical defects. The second-generation public opinion reporting application has not yet fully integrated artificial intelligence technology, which directly limits its ability to expand data collection sources, process new data source content, and identify invalid or false data. In addition, the solution lacks a process-based implementation mechanism and fails to have the ability to iterate and learn independently. Therefore, it is often difficult to respond quickly to rapid changes in business needs. A lot of work still needs to rely on secondary development and manual processing, which affects overall efficiency and flexibility.

[0066] Therefore, the embodiment of the present invention provides a method for monitoring public opinion, which obtains the user's dialogue flow data through the dialogue flow, and parses it using the trained public opinion language model, so as to analyze the user's business needs, obtain the user's instructions and the target tasks that respond to the user's instructions, such as public opinion data collection, public opinion data processing, model fine-tuning, and public opinion report generation, etc., which can quickly adapt to changes in user business needs and have greater flexibility. And the target tasks are executed by the process mechanism of the task flow, and the user's dialogue flow data is responded to, which is more efficient, and the public opinion language model can also be autonomously iterated and autonomously learned during the dialogue process.

[0067] According to an embodiment of the present invention, an embodiment of a public opinion monitoring method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0068] In this embodiment, a method for monitoring public opinion is provided, which can be used for a computer device for monitoring public opinion, such as a computer, a tablet computer, etc. Figure 1 is a flow chart of a method for monitoring public opinion according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0069] Step S101, obtaining the user's conversation flow data.

[0070] Specifically, dialogue flow refers to an interactive method that uses prompt words to communicate with the big model step by step, allowing the big model to think gradually, interacting with users in the form of dialogue flow to obtain users' dialogue flow data.

[0071] Step S102, generating a target command-response pair based on the dialogue flow data and the trained public opinion language model; wherein the target command-response pair includes a user command and a target task corresponding to the user command, and the target task includes at least one of a public opinion data collection task, a public opinion data processing task, a model fine-tuning task, and a public opinion report generation task.

[0072] Specifically, functions such as public opinion data collection, public opinion data processing, training and fine-tuning of the public opinion big language model, and public opinion report generation all require user instructions to interact with the public opinion big language model, so that the public opinion big language model can understand, parse, transform and use the user's dialogue flow data, thereby feeding back various data results and text results required by the user. The public opinion big language model can parse the user's dialogue flow data to obtain the user's intention, and perform common reasoning, sentiment analysis, etc. based on the user's intention, generate user instructions, ensure that the user's instructions can meet the user's business needs, and determine the target task corresponding to the user's instruction, obtain the instruction response pair, and improve the scenario coverage capability of the target task. The present invention can quickly adapt to changes in user business needs and improve the comprehensiveness of the data results fed back to the user.

[0073] It should be noted that the "instruction" in the name of the instruction-response pair mainly refers to the dialogue flow data input by the user, and the "response" refers to the user instruction derived based on the reasoning of the dialogue flow data. The target instruction response pair of the present invention also includes target tasks corresponding to the user instructions. The major categories of target tasks mainly include public opinion data collection, public opinion data processing, model fine-tuning and public opinion report generation.

[0074] Step S103, generating a target task flow based on the target instruction response pair, and executing the target task flow to perform public opinion monitoring.

[0075] Specifically, the target instruction corresponding pair can include multiple target tasks. For example, when a user uses the dialogue flow window to obtain the latest public opinion information of relevant data, in order to feedback the latest public opinion situation to the user, it is necessary to collect the latest public opinion data and display it to the user. Then the target task flow can be public opinion data collection -> public opinion data processing -> public opinion report generation, and the target task flow is executed by the process mechanism of the task flow to form an intelligent entity, thereby improving the intelligence level and processing efficiency of the model.

[0076] It should be noted that the intelligent agent is a business application model plug-in built with the task flow as the skeleton, combined and connected with the industry knowledge base, business data set, corpus, instruction library, etc. that the model relies on. For details about the industry knowledge base, corpus, and instruction library that the model relies on, please see the description below.

[0077] The public opinion monitoring method provided in this embodiment obtains the user's dialogue flow data through the dialogue flow to provide a better user experience, and uses the trained public opinion large language model to parse it, so as to analyze the user's business needs, obtain user instructions and target tasks corresponding to user instructions, such as public opinion data collection, public opinion data processing, model fine-tuning, and public opinion report generation, so as to quickly adapt to changes in user business needs and be more flexible. Finally, the target task is executed by the process mechanism of the task flow, and the user's dialogue flow data is responded to and data feedback is provided to improve the processing efficiency. In addition, the public opinion large language model can also perform autonomous iterative learning during the dialogue process to improve the intelligence of the model.

[0078] In this embodiment, a method for monitoring public opinion is provided, which can be used for a computer device for monitoring public opinion, such as a computer, a tablet computer, etc. Figure 2 is a flow chart of a method for monitoring public opinion according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0079] Step S201, generating data samples according to the collected context data and the preset data structure, constructing the original corpus, and constructing the instruction library; wherein the context data includes at least one of encyclopedia entry data, news corpus data, encyclopedia question and answer data, community question and answer data, translation corpus data, and public opinion knowledge data.

[0080] In some optional implementations, a data sample is generated based on an entry data structure and encyclopedia entry data; wherein the entry data structure includes at least some of the following items: an entry identifier, an entry address, an entry title, and an entry text.

[0081] For example, encyclopedia entry data can be obtained from millions of encyclopedia entries on Wikipedia, and the entry data structure is {"id": <id> ,"url": <url>,"title": <title> ,"text":< / title> <text>}, where id is the identifier, url is the entry address, title is the entry title, text is the entry body, and the entry body is wrapped with "\n\n". For example, a certain entry data sample constructed based on the entry data structure and encyclopedia entry data can be {"id":"53","url":"https: / / zh.wikipedia.org / wiki?curid=53","title":"Economics","text":"Economics\n\nEconomics is a discipline that studies the production, distribution, and consumption of products and services..."}.

[0082] In some optional implementations, data samples are generated based on a news data structure and news corpus data; wherein the news corpus data structure includes at least some of the following items: news identification, news title, news text, news source, news release time, news keywords and news description.

[0083] For example, news corpus data can be obtained based on millions of news corpus in a certain period of time, and news data samples can be constructed in combination with the news data structure. The news data structure can be {'news_id':<news_id> ,'title': <title> ,'content':< / title> <content>,'source': <source> ,'time': <time>,'keywords': <keywords>,'desc': <desc>}, where news_id is the news identifier, title is the news title, content is the news text, source is the news source, time is the news release time, keywords are news keywords, and desc is the news description. For example, a news data sample can be: {"news_id":"610130831","keywords":"tour guide, ticket","title":"Off-season ticket of the Forbidden City is 40 yuan, "black tour guide" sells it to out-of-town tourists for 140 yuan","desc":"Recently, some netizens broke the news that...","source":"Xinhuanet","time":"03-2212:00","content":"Recently, some netizens broke the news that..."}.

[0084] In some optional implementations, a data sample is generated based on an encyclopedia question and answer data structure and encyclopedia question and answer data; wherein the question and answer corpus data structure includes at least some of the following items: an encyclopedia question and answer identifier, an encyclopedia question type, an encyclopedia question title, an encyclopedia question description, and an encyclopedia answer content.

[0085] For example, encyclopedia question and answer data can be obtained based on millions of encyclopedia question and answer corpora, and combined with the encyclopedia question and answer data structure to construct an encyclopedia question and answer data sample. The encyclopedia question and answer data structure can be {"qid": <qid>,"category": <category>,"title": <title> ,"desc":< / title> <desc>,"answer": <answer>}, qid is the encyclopedia question and answer identifier, category is the encyclopedia question type, title is the encyclopedia question title, desc is the encyclopedia question description (can be empty or consistent with the title content), and answer is the encyclopedia answer content. For example, a sample of encyclopedia question and answer data can be {"qid":"qid_2540946131115409959","category":"Life knowledge","title":"Is it better to take tonic in winter or in summer?","desc":"","answer":"Hello!\r\rOf course it is better to take tonic in winter..."}.

[0086] In some optional implementations, a data sample is generated based on a community question and answer data structure and community question and answer data; wherein the community question and answer data structure includes at least some of the following items: a community question and answer identifier, a community question title, a community question description, the topic to which the question belongs, a reply identifier, a reply label, the number of reply likes, and the reply content.

[0087] For example, millions of community questions and answers can be obtained to obtain community question and answer data, and combined with the community question and answer data structure, a community question and answer data sample is constructed. In this embodiment, the community question and answer data structure can be {"qid": <qid>,"title": <title> ,"desc":< / title> <desc>,"topic": <topic>,"star": <star>,"content": <content>,"answer_id":<answer_id> ,"answerer_tags":<answerer_tags>}, where qid is the community question and answer identifier, title is the community question title, desc is the community question description (can be empty), topic is the topic to which the question belongs, star is the number of likes on the reply, content is the reply content, answer_id is the reply identifier, and answerer_tags is the reply tag carried by the respondent. For example, the community question and answer data sample generated based on the community question and answer data structure and community question and answer data can be {"qid":65618973,"title":"Can AlphaGo only play Go? Can AlphaGo write novels?","desc":"So will there be intelligent robots that can engage in literary creation now? If so, what level of work can be written? ","topic":"Robot","star":3,"content":"AlphaGo can only play Go, its design...","answer_id":545576062,"answerer_tags":"Artificial Intelligence @ Gaming Industry"}.

[0088] In some optional implementations, a data sample is generated based on a translation data structure and translation corpus data; wherein the translation data structure includes original content and translated content.

[0089] For example, millions of translation corpora can be obtained to obtain translation corpus data, and combined with the translation data structure to generate translation data samples. Taking the original text in English and the translation in Chinese as an example, the translation data structure can be {"english": <english>,"chinese": <chinese>}, where english is the English content and chinese is the Chinese content, and there is a one-to-one correspondence between Chinese and English. For example, the translation data sample generated based on the Chinese-English translation corpus can be {"english":"Have an ice day","chinese":"Wish you a happy day"}.

[0090] In some optional implementations, data samples are generated based on the public opinion data structure and the public opinion knowledge data; wherein the public opinion data structure includes at least some of the following items: public opinion knowledge identification, knowledge questions, and knowledge answers.

[0091] For example, tens of thousands of pieces of public opinion knowledge information are obtained to obtain public opinion knowledge data, and a public opinion knowledge data sample is constructed by combining the public opinion data structure. The public opinion data structure can be {"pid": <pid>,"problem": <problem>,"answer": <answer>}, where pid is the public opinion knowledge identifier, problem is the knowledge problem, and answer is the knowledge answer. For example, the constructed partial public opinion knowledge data sample can be: {"pid":1,"problem":"negative public opinion","answer":"refers to information or speech circulating on the Internet that has an adverse impact on a specific individual, organization, brand or event..."}.

[0092] The present invention acquires various types of data such as encyclopedia entries, news corpora, encyclopedia questions and answers, community questions and answers, translation corpora, and public opinion knowledge data, and generates data samples according to corresponding data structures to construct a data-rich original corpus, so as to improve the scenario generalization ability of the large language model when training the large language model.

[0093] In some optional implementations, when constructing an instruction library, first obtain instruction commands and attribute information of the instruction commands, wherein the attribute information includes at least some of the following items: instruction storage time, instruction category, instruction application scenario, and instruction usage frequency. Then, sort the instruction commands according to the attribute information of the instruction commands, construct an instruction directory, and establish an association relationship between the instruction directory and the instruction commands. Finally, obtain the instruction library according to the instruction commands, the instruction directory, and the association relationship between the instruction directory and the instruction commands.

[0094] Specifically, with public opinion-related businesses as the core, an instruction library is built to manage instructions, and associations are configured according to specific application scenarios to facilitate automatic use of automated tasks. Instruction commands can be obtained by extracting data from specific fields in data samples (such as questions, answers, and other field data), collecting instructions and task data corresponding to the user's dialogue flow data, etc. The instruction library is mainly used to train large language models. The instruction library consists of two parts, one is the instruction directory library and the instruction directory relationship library, and the other is the instruction command library. The instruction directory library forms an instruction directory according to the entry time of the instruction command, instruction category, instruction application scenario, and instruction usage frequency, and raises or lowers the ranking of the instruction command in the instruction directory according to the instruction entry time and instruction usage frequency.

[0095] For example, Figure 3 As shown, the instruction catalog relationship library stores the association relationship between the instruction catalog data in the instruction catalog library and the instruction command library, and the association relationship mainly includes 1:1, 1:N, N:N, and N:1 relationship modes. Among them, the instruction command includes the instruction command identifier pid, the instruction description problem, the instruction answer answer, the frequency mark percent and other field information, the instruction catalog includes the catalog identifier catalogueid, the catalog name dname, the catalog description classification, the frequency mark percent and other information, and the instruction catalog relationship, that is, the association relationship between the instruction catalog and the instruction command, includes the relationship identifier relationid, the instruction command identifier pid with the association relationship and the catalog identifier catalogueid.

[0096] It should be noted that the frequency mark percent is used to characterize the frequency of instruction use. The frequency mark percent can be a percentage or a digital mark representing different frequency levels. Exemplarily, the instruction use frequency can be represented by different digital marks, for example, different digital marks are used to represent the instruction commands whose usage times in the past three days exceed 100% of the usage times in the previous day and the daily usage times are >100 times, the instruction commands whose usage times in the past seven days exceed 100% of the usage times in the previous day and the daily usage times are >100 times, and the instruction commands whose usage times in the past two weeks exceed 100% of the usage times in the previous day and the daily usage times are >100 times. The instruction usage frequency is calculated according to the number of times the instruction command is used in a preset time period, and the digital mark corresponding to the instruction usage frequency is determined, and the digital mark is added to the instruction directory and the field information of the instruction command for subsequent data retrieval. In this way, the instruction command can be quickly retrieved according to the usage frequency when the instruction is retrieved.

[0097] The present invention constructs an instruction command library based on the instruction storage time, instruction category, instruction application scenario, instruction usage frequency and other attribute information of the instruction command, so that when training a large language model, the large language model can identify user instructions corresponding to user business needs. In addition, by constructing an instruction directory and the association between the instruction directory and the instruction command, it is convenient to quickly retrieve relevant instructions and improve processing efficiency.

[0098] Step S202, training a preset large language model according to the original corpus and the instruction library to obtain a pre-trained instruction synthesizer; wherein the instruction synthesizer is used to generate an instruction-response pair corresponding to each instruction command in the instruction library.

[0099] Specifically, the training process of the preset large language model is command pre-training, and command pre-training requires the use of a command synthesizer to generate a set of command-response pairs for each collected original text. For example, the original text of the command can be obtained by extracting the news title, news text, news source, news release time and other information based on the news corpus data sample. The command synthesizer determines the business requirement of generating a news public opinion report based on the original text of the command, and then generates a derived text content that derives and summarizes the original text of the command by performing various subtasks such as derivation, commonality reasoning, sentiment analysis, and summary analysis on the original text of the command. The original text of the command is the "command", and the derived text content is the "response" corresponding to the command.

[0100] In some optional implementations, information can be extracted from the data in the original corpus according to the metadata storage structure, the extracted information can be saved in the industry knowledge base that the public opinion big language model relies on, and the extracted information can be associated with the corresponding instructions in the instruction library for subsequent continuous training and improvement of the public opinion big language model and continuous improvement of the relevant information in the industry knowledge base.

[0101] Step S203: obtaining an enhanced instruction library according to the instruction library and the instruction response pair corresponding to each instruction command.

[0102] Specifically, each instruction command in the instruction library and its corresponding instruction-response pair are combined to obtain an enhanced instruction command. An enhanced instruction command contains an original text of an instruction command and its corresponding instruction-response pair (the association between the original text and the derived text content) to obtain an enhanced corpus.

[0103] Step S204, using the enhanced instruction library and the original corpus to fine-tune the model of the pre-trained instruction synthesizer to obtain a trained public opinion language model.

[0104] Specifically, the instruction synthesizer can be fine-tuned using a few-shot approach, such as Figure 4 As shown in the figure, a sample sequence contains a piece of original text T and its instruction-response pair I⊕R, where the same sample sequence is sampled from the same data set to ensure the consistency of the patterns in different instruction-response pairs. Multiple sample sequences are connected to each other, and the pre-trained instruction synthesizer is fine-tuned for multiple rounds to obtain a trained public opinion language model. Model fine-tuning refers to further training and adjusting parameters of the model using task-specific data after the pre-training stage to achieve better performance on the target task.

[0105] Furthermore, the model is verified to determine whether it can obtain accurate and up-to-date public opinion information, and whether the trained public opinion large language model can meet the real-time and accuracy requirements.

[0106] The present invention uses the constructed instruction library and the original corpus to train the preset large language model to obtain a pre-trained instruction synthesizer, thereby fully deriving and reasoning the instruction commands in the instruction library to obtain instruction response pairs generated based on the instruction commands. Then, an enhanced instruction library is obtained based on the instruction response pairs and the instruction library, and the pre-trained instruction synthesizer is fine-tuned based on the enhanced instruction library and the original corpus to improve the model reasoning ability until the model can meet business needs and obtain a trained public opinion large language model.

[0107] Step S205: Obtain the user's conversation flow data. Figure 1 The description of step S101 of the illustrated embodiment will not be repeated here.

[0108] Step S206: Generate a target command response pair based on the dialogue flow data and the trained public opinion language model; wherein the target command response pair includes a user command and a target task in response to the user command, and the target task includes at least one of a public opinion data collection task, a public opinion data processing task, a model fine-tuning task, and a public opinion report generation task. For details, please refer to Figure 1 The description of step S102 of the illustrated embodiment will not be repeated here.

[0109] Step S207: Generate a target task flow based on the target instruction response pair, and execute the target task flow to monitor public opinion. Figure 1 The description of step S103 of the illustrated embodiment will not be repeated here.

[0110] The public opinion monitoring method provided in this embodiment constructs an instruction library and an original corpus, and trains a preset large language model to obtain a pre-trained instruction synthesizer, thereby fully deriving and reasoning the instruction commands in the instruction library to obtain instruction response pairs generated based on the instruction commands. An enhanced instruction library is obtained based on the instruction response pairs and the instruction library, and the pre-trained instruction synthesizer is fine-tuned based on the enhanced instruction library and the original corpus to improve the model reasoning ability until the model can meet the business needs of the public opinion large language model. In the actual application process of the public opinion large language model, the user's dialogue flow data is obtained to provide a better user experience, and the public opinion large language model is used to parse it, analyze the user's business needs, obtain user instructions and target tasks corresponding to the user instructions, and quickly adapt to changes in user business needs with greater flexibility. Finally, the target task is executed with a process mechanism of task flow to improve processing efficiency, and the public opinion large language model can also be made to perform autonomous iterative learning during the dialogue process to improve the intelligence of the model.

[0111] In this embodiment, a method for monitoring public opinion is provided, which can be used for a computer device for monitoring public opinion, such as a computer, a tablet computer, etc. Figure 5 is a flow chart of a method for monitoring public opinion according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:

[0112] Step S501, obtain the user's conversation flow data. For details, see Figure 2 The description of step S205 of the illustrated embodiment will not be repeated here.

[0113] Step S502: Generate a target command response pair based on the dialogue flow data and the trained public opinion language model; wherein the target command response pair includes a user command and a target task in response to the user command, and the target task includes at least one of a public opinion data collection task, a public opinion data processing task, a model fine-tuning task, and a public opinion report generation task. For details, please refer to Figure 2 The description of step S206 of the illustrated embodiment will not be repeated here.

[0114] Step S503, generating a target task flow based on the target instruction response pair, and executing the target task flow to perform public opinion monitoring.

[0115] Specifically, the above step S503 includes:

[0116] Step S5031, deploy the trained public opinion large language model locally, and fine-tune the trained public opinion large language model according to the preset dialogue flow data format, call data format and configuration data format to obtain the fine-tuned public opinion large language model.

[0117] Specifically, localization refers to the deployment and use of large models in a private local area network outside the independent Internet, and the application system interacts with the large model in this private network, which is conducive to ensuring data security.

[0118] In some optional implementations, the loRA method and the preset dialog flow data format, call data format and configuration data format may be used to fine-tune data using multiple graphics cards. Exemplarily, the fine-tuning instructions may be as follows:

[0119] OMP_NUM_THREADS=1torchrun--standalone--nnodes=1--nproc_per_node=8finetune.py data / AdvertiseGen / THUDM / glm-4-9b-chat configs / lora.yaml;

[0120] OMP_NUM_THREADS=1torchrun--standalone--nnodes=1--nproc_per_node=8finetune_vision.py data / CogVLM-311K / THUDM / glm-4v-9b configs / lora.yaml.

[0121] It should be noted that loRA (PEFT) is used for data fine-tuning. The fine-tuning adds dependent packages such as jieba, datasets, peft, deepspeed, and nltk. LoRA is a technology used to optimize deep learning models, especially when dealing with large-scale pre-trained models. The core idea of ​​LoRA is to approximate the weight update of the model by adding a low-rank matrix instead of directly updating the original high-dimensional weight matrix. This can achieve rapid adjustment and adaptation of the model without significantly increasing the computing and storage costs.

[0122] In some optional implementations, the dialog flow data format includes the role type and the role dialogue content, and the dialog flow data format may be as follows:

[0123]

[0124] In some optional implementations, the call data format includes at least some of the following items: role type, role dialogue content, and call tool. For example, a fine-tuning data sample for calling external knowledge base data may be as follows:

[0125]

[0126] In some optional implementations, the configuration data format includes a configuration interface name and configuration parameters, and the configuration data format may be as follows:

[0127]

[0128] The embodiment of the present invention deploys the trained public opinion language model locally and uses the local network to realize the dialogue interaction between the user and the model, thereby ensuring the data security when the model is used. The model data is fine-tuned through a preset fine-tuning data format, thereby realizing rapid adjustment and adaptation of the model without significantly increasing resource costs.

[0129] Step S5032, crawling network data from various data platforms and collecting user internal data, and obtaining public opinion data based on the network data from various data platforms and user internal data.

[0130] Specifically, the data platform includes at least one of social media, news media, forum blogs, and file management platforms, and the user internal data includes at least one of buried data, interface transmission data, and system synchronization data. For example, social media can be a user-generated content (UGC) platform, etc. The UGC content on these platforms expresses the public's views and attitudes on a certain event; news media include news websites and online media, which usually report various events and are important channels for obtaining public opinion information, such as industry news, social hot spots, emergencies, specific personnel information, etc.; for forums and blogs, posts and comments posted by users on these platforms are also important sources of public opinion information; file management platforms can include government announcements, professional reports, industry internal sedimentation data, etc. These files usually contain authoritative information data and various historical data, tables, reports, etc. that are internally deposited by customers.

[0131] In some optional implementations, the automated collection process of network data includes: drawing the collection process, editing each node in the collection process, customizing the collection tasks, and generating a python data collection script for collection through a large language model based on the metadata storage structure fields published in the knowledge base. The process of acquiring user internal data includes: acquiring data using embedded javascript, or acquiring data using interface docking between systems or ETL (Extract-Transform-Load) data real-time synchronization. After determining the collection process of network data and user internal data, the storage target source for storing the collected data is specified according to the workflow-based public opinion data collection tasks, and the data is stored in the data storage cluster to be processed.

[0132] The present invention collects network data from various data platforms and obtains user internal data through various methods, fully collecting the latest data, which is conducive to improving the real-time and accuracy of public opinion data.

[0133] Step S5033, cleans, classifies and annotates the public opinion data to obtain public opinion processing data, and stores the public opinion processing data in the industry knowledge base that the public opinion large language model relies on according to a preset metadata storage structure.

[0134] Specifically, the data cleaning process includes: calculating the content similarity for each piece of stored public opinion data to obtain the simhash value, and removing duplicate public opinion data information through simhash value comparison to ensure the uniqueness of the data. Figure 6 The relevant keywords of the industry knowledge base shown in the figure filter out information that is not related to public opinion monitoring. In addition, the large language model is used to screen the data for errors one by one, select unreasonable data, and put it into the questionable data set for manual correction.

[0135] Specifically, the process of data classification and data labeling includes: classifying the cleaned data according to the source of information release, and using a large language model combined with an industry knowledge base to label individual data items in terms of event type, time, location, tendency, information semantics, etc., to form a public opinion monitoring database, a public opinion early warning database, a public opinion topic database, and an event case database to conduct targeted public opinion monitoring.

[0136] Specifically, see Figure 6 , the metadata storage structure of the industry knowledge base includes at least some of the following items: event identification, event title, event type, occurrence time, occurrence location, involved persons, event description, media coverage, social media reaction, emotional tendency, keywords, risk level, response measures, processing results, source reliability and update time of public opinion events. It should be noted that the knowledge base is a structured, easy-to-operate, easy-to-use, and comprehensive organized knowledge cluster in knowledge engineering. It is a collection of interconnected knowledge pieces that are stored, organized, managed and used in computer memory using a certain (or several) knowledge representation method to solve problems in a certain (or certain) field. These knowledge pieces include theoretical knowledge related to the field, factual data, heuristic knowledge obtained from expert experience, such as definitions, theorems and operation rules related to a certain field, and common sense knowledge.

[0137] Exemplarily, the industry knowledge base of the present invention is used for public opinion monitoring, event analysis, and risk warning. The public opinion event ID is a unique identifier for each public opinion event, which is used to distinguish different public opinion events; the event title is a brief description or title of the public opinion event, which can summarize the main content of the event; the event type is classified according to the nature of the event, such as traffic accidents, public security cases, criminal cases, public safety incidents, etc.; the time of occurrence is the time when the public opinion event occurred, which can be a specific date and time, or a time period; the place of occurrence is the geographical location where the public opinion event occurred, which can be a specific address, city or area; the people involved include personnel information related to the public opinion event, such as the persons involved, victims, witnesses, etc.; the event description is a detailed description of the public opinion event, including the cause, process, and result of the event; the media reports include a list of media reports on the public opinion event, including the name, link, and release time of the reported media. etc.; social media reactions refer to discussions, comments, and reposts about the public opinion event on social media, which may include data from platforms such as Weibo, WeChat, and forums; sentiment tendency refers to sentiment analysis of the public opinion event, such as positive, negative, neutral, etc., which helps to understand the public's views on the event; keywords include keywords or tags related to the public opinion event, which facilitate search and classification; risk level is to assess the risk level of the public opinion event based on factors such as the nature and scope of influence; response measures refer to response measures or suggestions proposed for the public opinion event, which may be specific action plans or strategies; processing results include the processing results or subsequent developments of the public opinion event, such as case detection, accountability, public feedback, etc.; source reliability is used to evaluate the reliability of the source of public opinion information, which helps to judge the authenticity and credibility of the information; update time refers to the last update time of the public opinion event information in the knowledge base, to ensure the timeliness and accuracy of the information.

[0138] It should be noted that the knowledge base metadata storage structure is determined by the user through actual business, including field type, field name, field length, and field content. These fields constitute the basic framework of the public opinion knowledge base. Users can add or reduce fields according to actual needs, and achieve comprehensive and efficient management and analysis of public opinion information by reasonably designing fields and metadata storage structure.

[0139] Step S5034, search the industry knowledge base to determine the target public opinion data corresponding to the user instruction, analyze and extract the key public opinion information in the target public opinion data, and generate a public opinion report according to the preset report format and the key public opinion information.

[0140] Exemplarily, the preset report format may include title (bold, size 2 font, centered), overview (bold, size 4 font, main text), basic course of events (bold, size 4 font, main text), first-level classified chapters (bold, size 4 font, title numbers are one, two, three...), second-level classified chapters (bold, size 4 font, title numbers are (one), (two), (three)...), analysis and countermeasures and suggestions title (bold, size 4 font), analysis and countermeasures and suggestions main text (bold, size 4 font), etc.

[0141] In some optional implementations, the system can automatically recommend corresponding data collection and processing solutions based on the report type and template selected by the user. It can also provide a visualization interface and a report display interface, and by designing a more intuitive and easy-to-use visualization interface, it is convenient for users to view and manage various types of data and reports in the system. At the same time, the report display method is optimized, and multiple formats of report output (such as PDF, HTML, etc.) are provided to meet the needs of different users.

[0142] Step S5035, storing the public opinion report, and updating the public opinion report in response to the user's report editing instruction.

[0143] Specifically, in response to the user's report editing instruction, such as Figure 7 As shown, you can set the summary parameters, event tone analysis parameters, main viewpoint parameters, risk summary parameters, response method assessment parameters, etc. of the public opinion report, and finally splice them to generate a public opinion report.

[0144] Exemplarily, when setting summary parameters, the report editing instructions can be determined according to the description input by the user. For example, if the user input description is "output an event summary that conforms to the format of a public opinion analysis report. The content in the summary should reflect the description of the time, cause, location, key content, key figures, and event context of the event as much as possible. The word count should be between 200-400 words. Do not directly use the six keywords of time, cause, location, key content, key figures, event context, and summary in the output content." Then the report editing instructions are "Please output the summary in a professional report summary format based on the content title of the same event discussion provided. The word count should be between 200-400 words. The summary needs to be output in a format that conforms to the article summary. The content in the summary needs to reflect the description of the time, cause, location, key content, key figures, and event context of the event, except when the input data is not involved." In addition, you can also add summary output restrictions, such as "while reflecting the six elements of the summary content, make the output content conform to the format of the report summary; please strictly output according to the input content, do not fabricate; please answer in simplified Chinese, do not use English or other non-Chinese languages; reply after deep thinking."

[0145] Furthermore, the workflow of the corresponding summary parameter settings includes event positioning, context combing and summary output. Event positioning confirms the event subject based on the incoming data, with "anchoring the data pointed to by most content" and "recent occurrence" and "important event" as the premise; context combing confirms the time development context based on time and determines the boundary of the event, that is, which data describes the content related to the event; summary output selects data for summary extraction and outputs the event summary based on the event boundary.

[0146] Exemplarily, when setting the event tone analysis parameters, the report editing instructions are "Compare the data morphology relationship between the event post volume and the negativity during the event propagation process, and based on the morphology comparison, find the correlation between the negativity and the event heat. Analyze the data morphology and trend correlation results between the event post volume and the negativity to find the public opinion characteristics of the event."

[0147] Furthermore, the corresponding workflow includes negative trend comparison (this part of the content will not be output and displayed to users, please use percentage to display the negativity), analysis of the correlation between event propagation heat and negativity (the output is limited to the analysis and output from the perspective and format of the public opinion analysis report; respond after deep thinking), trend analysis (the output is limited to if the results of the previous stage are not enough to draw a conclusion, this section will not be output; the analysis and output is from the perspective and format of the public opinion analysis report; respond after deep thinking) and other phased sub-tasks. Among them, the negative trend comparison is based on the input event propagation heat data and event propagation trend data, from the perspectives of peak value, morphological similarity, hysteresis, propagation nodes and inflection points and other professional methods to determine 3-5 valuable angles; the event propagation heat analyzes the valuable angles of the previous stage, and outputs an analysis description of the correlation between event propagation heat and negativity; the trend analysis selects 1-2 analysis contents from the perspectives of sentiment fluctuation analysis, key node identification, long-term impact assessment, and subsequent propagation assessment for analysis of the analysis and output content of the previous stage.

[0148] Exemplarily, when setting the main viewpoint parameters, the report editing instruction is "respectively extract the official and netizens' views on the event based on the incoming content, and compare the differences in the views and opinions of both parties on the event". The corresponding workflow may include viewpoint extraction, public opinion analysis and disagreement analysis. The viewpoint extraction is based on the official discussion content title and the netizens' discussion content and title of the media platform, and outputs "3" negative views respectively, with formats such as "official viewpoint + official article title + author name" and "civilian viewpoint + netizen comment content + platform name"; public opinion analysis explains from the perspective of public opinion analysis what kind of official public opinion orientation the viewpoint reflects, what kind of demands the folk public opinion sentiment carries, etc., and one or more can be selected from the aspects of public opinion development, folk sentiment, etc. for explanation; disagreement analysis is based on the views output by official views and folk views, compares the main divergence directions, outputs the main divergence between the two types of views (explained by whether there is a public opinion analysis scenario that is mainly dealt with in public opinion handling), the possible adverse effects of the divergence between the two types of views, and whether it is necessary to strengthen the guiding role of the media.

[0149] For example, when setting the overseas control point situation parameters, the report editing instruction is "respectively extract the views of domestic and overseas netizens on the incident based on the input content, compare the differences in the views of both sides on the incident, and analyze the sensitivity", and the input content includes the content and titles of articles from official and overseas media. The corresponding task workflow mainly includes viewpoint extraction and viewpoint comparison, among which, viewpoint extraction extracts viewpoints based on the input official content and outputs no more than three viewpoints, and extracts viewpoints based on overseas media content and outputs no more than three viewpoints; viewpoint comparison outputs whether there are obvious differences in domestic and overseas views and what the differences are from the perspective of "public opinion management department" to "respond to sudden public opinion" (use [] to mark the viewpoints, and attach the source of the extracted content after the viewpoints), and introduces whether the overseas views are sensitive.

[0150] Exemplarily, when setting the risk summary parameters, the report editing instruction is "output an event handling risk summary from the perspective of the public opinion management department's response to sudden public opinion", and the input content is "the titles, publication dates, author names, and source names of 10 articles published on the first and last days of the event development cycle, social media platforms, and all key media; event overview-event introduction; event overview-communication overview". The corresponding task workflow includes confirming the type of public opinion event and event classification (such as sudden public opinion, conference and policy public opinion, topic public opinion, and publicity effect evaluation public opinion), conducting risk analysis based on the type of public opinion (risk types can refer to the risk of public opinion content, external environment analysis, related unit analysis, event character risk analysis, overseas risk analysis, etc.), combining event type and risk extraction to formulate event handling suggestions, and outputting them with reference to subsequent suggestions from the perspective of auxiliary information (reference perspectives: handling of negative public opinion, handling of negative voice, reference to guidance methods, response strategies, etc.).

[0151] Exemplarily, when setting the response evaluation content of a public opinion report, the corresponding workflow may include extracting relevant information of relevant units (describing the publication of relevant parties and media documents respectively), identifying the handling and guiding actions of relevant units, scoring the handling methods based on the available information (scoring dimensions refer to response speed, response method, handling method, information transparency, public opinion calming effect and handling effect, etc.), and attaching the relevant units and guiding actions to the given scores.

[0152] In some optional embodiments, such as Figure 8 As shown, a report management system can also be built to manage the generated public opinion reports. The corresponding operation process can be as follows:

[0153] 1) Click Report Service-Consulting Report Generation, and land on the Generate Report Management page. 2) At the top of the interface, you can search and query based on the event generation time and report name. 3) The report module displays the report title (the report title when it is saved for the first time, and it will not be modified when it is saved again) and the report generation time (and the time when the report is saved for the first time). The report generation time is accurate to the minute, and the reports are arranged in reverse order according to the generation time. 4) The overall style of the page can refer to the secretary report page. 5) When the mouse hovers over the report, the report frame is grayed out, and the download and delete buttons are displayed. 6) Click the Download button to display the download pop-up window. Click the download format to start the download. Click the Download button again or anywhere other than the stand-alone download format to fold the Download button. It supports the download of three formats: doc, html, and pdf. 7) Click the Delete button, and a pop-up window prompt for deleting the report will pop up. The format and prompt content are aligned with the Report Management Module. 8) Click the Edit button to enter the generated report for online editing. 9) Click the Report Management Module to enter the report generation process.

[0154] Specifically, the basic information for generating a report includes: when you click the report generation button and enter the basic information page, the page only displays the "Next" button, and does not display the "Update data range" button. The "Update data range" button is displayed when you click the previous step to return from the "Data Overview" page; limit the earliest starting time, and the time span is limited to 60 days. If it is earlier than the earliest time, or the span is too large, it will be grayed out; the search expression is limited to 200 characters and only supports "&""|""()""!"; click the button to enter the expression, click "&、|、!", and the input is "&""|""!" before and after. There is no English character space. In actual use, there is no English character space between "()" and "&" and "|". All content is required. If it is not filled in, click Next and it will display "Please fill in the title", "Please select the time span", and "Please enter keywords". When you click "Next" for the first time, the expression will be verified. If the expression is wrong, it will prompt "Please check the expression". If the expression is correct, search according to the expression. When returning from the data overview page, click Next to return to the data overview page, click "Update data range" to search again, and the data overview and summary generation page content will be lost.

[0155] Furthermore, an event trend chart can be presented at the top of the public opinion report, with a time granularity of days. A softer trend control can be used to draw a trend chart based on the total number of articles published daily, and the date, data volume, trend high point, etc. can be marked. According to the search conditions, multiple media networks can be searched to collect the total number of statistics, the number of articles published by central media, and the number of articles published by provincial media, and displayed as label partitions.

[0156] Furthermore, the data list of the public opinion data report includes the title, publication event, author name, platform name and summary. The title displays 1 line, the summary displays 2 lines, and the data list displays a preset number of data and is arranged in reverse order according to the publication time (without turning pages). Click the switch button to switch between the total data, central media publications, and provincial media publications. The summary content can be modified, and the modified content is included in the event introduction of the report.

[0157] Furthermore, the purpose of generating the public opinion report and the identity of the reporter are edited. The summary content is generated based on the displayed content. When jumping between the three generation stages of basic information, data overview, and summary generation, the changes to the summary generation are saved. If the data range is not updated, it will not trigger regeneration.

[0158] In some optional implementations, when generating a public opinion report, the generation progress of the report is displayed. For example, after clicking Start Generation, you will enter the report editing page, where the title content will be displayed, and the generated summary (i.e., event introduction) will be output line by line and word by word. The current status report content cannot be edited. After the event introduction is output, the output is paused to display the five-part stage generation progress bar, including the general situation of communication, main communicators, event tone analysis, main viewpoints, and overseas viewpoints. The progress bar corresponds to the background generation progress. After the generation is completed, the five-stage progress is output line by line and word by word.

[0159] In some optional implementations, when generating a public opinion report, the report generation content is displayed line by line. For example, the report is displayed line by line at a speed of 3 seconds per line (self-debugging according to the generation speed of the large model). The generation process cannot be interrupted, and the text cannot be edited during the generation process; the generation process exits, and the report generation content is lost; the report cannot be saved before the generation is completed; display generation problems and handling methods; when a certain process fails to generate for the first time, the generation process is automatically re-executed, and executed 3 times. The progress bar does not change during the execution process. If the generation is successful, the report is displayed normally; if the regeneration fails after executing three times, a prompt box "Report generation failed, do you want to keep the current content?" is displayed, and the user can choose to modify the generation conditions, regenerate, and keep the current content. If the user clicks to modify the generation conditions, enter the report generation-basic information page, supplement the information, re-retrieve the data, and generate the public opinion report; click Regenerate to clear the current generation parameters and context, and re-execute the generation process except summary generation on the current page (clear the content screen, and re-execute the generation stage from 1); click Keep Current Content to stay on this page, keep the currently generated content, and no longer generate the report. Please note that when a pop-up window appears, the page content cannot be edited.

[0160] In some optional implementations, the generated public opinion report is as follows: Fig. 9 As shown. After the report is generated, it can be edited. Click the Save button to save it. If the report is saved successfully, a prompt "Report saved successfully" will pop up. The time and title of the first save will be used as the "Report creation time" and "Report title" of the event list. (The update time and current title fields are saved and not displayed in the list.) When re-saving, the report name and event in the report list will not be updated. When the report is open, when the currently opened report is deleted in the generated report list, if you click Save, a new report will be generated with the current article title and save time; if you close the current report, the report will be lost; if you click the Back button, you will return to the report list page without saving the changes.

[0161] The present invention realizes comprehensive and efficient management and analysis of public opinion data by reasonably designing the fields of the metadata storage structure in the industry database. In addition, by searching in the industry database, the public opinion report is automatically generated according to the corresponding format and process, with high intelligence and processing efficiency. In addition, the user can edit the public opinion report, which is conducive to improving the user experience.

[0162] The public opinion monitoring method of the present invention is described in detail below with reference to a specific application example.

[0163] Specifically, the open source version of the latest generation of pre-trained models in the GLM-4 series can be used to build a public opinion language model. The GLM-4 series model has added multi-language support, supporting 26 languages ​​including Japanese, Korean, and German. It is a multimodal language model that supports 1M context length (about 2 million Chinese characters) and has the ability to conduct multi-round conversations in Chinese and English at a high resolution of 1120*1120.

[0164] like Fig.10 As shown (the industry knowledge base can be found in Figure 6 , the instruction library can be found in Figure 3 ), the public opinion large language model has the functions of building an industry knowledge base, data collection and data processing, local deployment and fine-tuning of large language models, building training instructions, and automatic generation of public opinion reports. The public opinion reporting system is deployed in the user's private network environment to ensure data access security and use security. At the same time, it uses domestically produced, self-controlled, and reliable servers, chips, and operating system software. Therefore, the domestic open source GLM large language model is selected for local deployment and use. Among them, the CPU frequency can be 2.6GHz, the number of CPU cores is 96 cores, the video memory can be 24GB, the memory is 64GB, and the hard disk uses a 906GB*3 solid-state drive. During installation, you need to download the GLM-4-9B model and deploy it to the server, configure the operating environment python and related plug-ins and dependency packages, and perform test verification and model fine-tuning.

[0165] Specifically, the system can be divided into multiple independent modules, such as data acquisition module, data processing module, report generation module, etc. Each module communicates with each other through a standardized interface. In this way, when it is necessary to add new functions or adjust existing functions, only the corresponding modules need to be modified or replaced without the need to reconstruct the entire system.

[0166] The present invention is committed to improving the system's ability to widely expand data collection sources and enhancing its efficiency in processing new and complex data sources. At the same time, the system will be given the function of automatically identifying and accurately filtering invalid or false data to ensure the authenticity and accuracy of all data, thereby greatly improving data quality and enhancing the intelligence of data collection and processing.

[0167] The present invention adds localized deployment of a large language model to the system and uses it in combination with the capabilities of the large language model. This will enable the system to have the ability of self-learning and iteration, and can quickly adjust and optimize according to changes in business needs, reducing the need for secondary development.

[0168] In order to further improve the intelligence level of the system, the present invention adds an industry knowledge base, which covers multiple aspects such as data collection and large language model capability training, provides the system with richer background information and professional knowledge, and helps to improve the accuracy of data collection and the application effect of the large language model.

[0169] In order to achieve a more automated and process-oriented application model, the present invention adds a workflow engine, which integrates multiple elements such as data, large language models, industry knowledge, user roles, and public opinion report applications, and realizes the automated connection and efficient collaboration of each link through the workflow, making the overall operation of the system smoother and significantly improving work efficiency. It also reduces the workload of secondary development and manual processing, reduces operation and maintenance costs, enables the system to operate more economically, and improves the economic benefits of the enterprise.

[0170] The present invention constructs a highly process-oriented and automated reporting intelligent entity, combines knowledge base, data collection and processing, and quickly generates accurate and efficient applications of public opinion reports through localized large language models. By introducing technologies such as automated data collection, metadata standardization management, and visual report template design, the automated generation of reports is achieved, reducing manual intervention and customized data processing processes, and improving the timeliness and accuracy of reports.

[0171] The present invention takes the task flow as the framework, combines the industry knowledge base, the business data set and the training instructions, and constructs a business application model plug-in - intelligent body, so that the system can respond to various business needs more flexibly, and improves the scalability and customizability of the system; uses the guidance of prompt words to communicate with the big model step by step, so that the big model can think gradually, which is an interactive mode - dialogue flow, so that users can interact with the system more intuitively, and improve the usability and user experience of the system; realizes the deployment and use of the big model in a private local area network, and the application system interacts with the big model in this network, ensuring the access security and use security of the data, and reducing the dependence on the external network; introduces LoRA technology to optimize the deep learning model, and by adding a low-rank matrix to approximate the weight update of the model, instead of directly updating the original high-dimensional weight matrix, without significantly increasing the calculation and storage costs, the rapid adjustment and adaptation of the model is realized. The present invention shortens the system upgrade cycle and improves the overall performance of the system by optimizing the technical architecture and introducing advanced artificial intelligence technology, so that the system can respond to changes in business needs more quickly, and improves the flexibility and scalability of the system.

[0172] In this embodiment, a public opinion monitoring device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated here. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0173] This embodiment provides a public opinion monitoring device, such as Fig.11 As shown, including:

[0174] An acquisition module 1101 is used to acquire the user's conversation flow data;

[0175] The first processing module 1102 is used to generate a target instruction response pair based on the dialogue flow data and the trained public opinion large language model; wherein the target instruction response pair includes a user instruction and a target task corresponding to the user instruction, and the target task includes at least one of a public opinion data collection task, a public opinion data processing task, a model fine-tuning task, and a public opinion report generation task;

[0176] The second processing module 1103 is used to generate a target task flow based on the target instruction response pair and execute the target task flow.

[0177] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0178] The public opinion monitoring device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0179] The embodiment of the present invention also provides a computer device having the above Fig.11 The public opinion monitoring device shown.

[0180] See also Fig.12 , Fig.12 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.12 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.12 A processor 10 is taken as an example.

[0181] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general array logic or any combination thereof. The memory 20 stores instructions executable by at least one processor 10 so that the at least one processor 10 executes the method shown in the above embodiment. The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory and may also include a non-transient memory. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof. The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0182] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Fig.12 The example of the bus connection is taken. The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a touch pad, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device may be a touch screen.

[0183] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be downloaded through a network and originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a computer, a processor, or programmable or dedicated hardware. Among them, the storage medium can be a flash memory, a hard disk, or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that the processor, microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0184] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.< / answer> < / problem> < / pid> < / chinese> < / english> < / content> < / star> < / topic> < / desc> < / qid> < / answer> < / desc> < / category> < / qid> < / desc> < / keywords> < / time> < / content> < / text> < / url> < / id>

Claims

1. A method for monitoring public opinion, characterized in that: The method comprises: Get the user's conversation flow data; Generate a target instruction response pair based on the dialogue flow data and the trained public opinion language model; wherein the target instruction response pair includes a user instruction and a target task corresponding to the user instruction, and the target task includes at least one of a public opinion data collection task, a public opinion data processing task, a model fine-tuning task, and a public opinion report generation task; A target task flow is generated based on the target instruction response pair, and the target task flow is executed to perform public opinion monitoring.

2. The method according to claim 1, characterized in that The training process of the public opinion language model includes: Generate data samples based on the collected context data and the preset data structure, construct an original corpus, and construct an instruction library; wherein the context data includes at least one of encyclopedia entry data, news corpus data, encyclopedia question and answer data, community question and answer data, translation corpus data, and public opinion knowledge data; The preset large language model is trained according to the original corpus and the instruction library to obtain a pre-trained instruction synthesizer; wherein the instruction synthesizer is used to generate an instruction response pair corresponding to each instruction command in the instruction library; Obtaining an enhanced instruction library according to the instruction library and the instruction response pair corresponding to each instruction command; The enhanced instruction library and the original corpus are used to fine-tune the model of the pre-trained instruction synthesizer to obtain a trained public opinion language model.

3. The method according to claim 2, characterized in that The step of generating data samples according to the collected context data and the preset data structure and constructing the original corpus includes: Generate a data sample according to the entry data structure and the encyclopedia entry data; wherein the entry data structure includes at least some of the following items: an entry identifier, an entry address, an entry title, and an entry text; and / or, generating data samples according to the news data structure and the news corpus data; wherein the news corpus data structure includes at least some of the following items: news identification, news title, news text, news source, news release time, news keywords and news description; and / or, generating a data sample according to the encyclopedia question and answer data structure and the encyclopedia question and answer data; wherein the question and answer corpus data structure includes at least some of the following items: an encyclopedia question and answer identifier, an encyclopedia question type, an encyclopedia question title, an encyclopedia question description, and an encyclopedia answer content; and / or, generating a data sample based on a community question and answer data structure and community question and answer data; wherein the community question and answer data structure includes at least some of the following items: a community question and answer identifier, a community question title, a community question description, a topic to which the question belongs, a reply identifier, a reply label, a number of reply likes, and a reply content; and / or, generating a data sample according to a translation data structure and translation corpus data; wherein the translation data structure includes original text content and translation content; And / or, generating data samples based on the public opinion data structure and the public opinion knowledge data; wherein the public opinion data structure includes at least some of the following items: public opinion knowledge identification, knowledge questions and knowledge answers.

4. The method according to claim 2, characterized in that: The construction instruction library includes: Obtaining instruction commands and attribute information of the instruction commands; wherein the attribute information includes at least some of the following items: instruction storage time, instruction category, instruction application scenario, and instruction usage frequency; Sort the instruction commands according to their attribute information, build an instruction directory, and establish an association relationship between the instruction directory and the instruction commands; According to the instruction commands, the instruction directory and the association relationship between the instruction directory and the instruction commands, an instruction library is obtained.

5. The method according to any one of claims 1 to 4, characterized in that When the target task flow includes a model fine-tuning task, executing the target task flow includes: Deploy the trained public opinion language model locally; The trained public opinion large language model is fine-tuned according to the preset dialogue flow data format, calling data format and configuration data format to obtain the fine-tuned public opinion large language model; wherein, the dialogue flow data format includes role type and role dialogue content, the calling data format includes at least some of the following items: role type, role dialogue content and calling tool, and the configuration data format includes configuration interface name and configuration parameters.

6. The method according to claim 5, characterized in that When the target task flow also includes a public opinion data collection task, the execution of the target task flow also includes: Crawling network data from various data platforms and collecting user internal data; wherein the data platform includes at least one of social media, news media, forum blogs, and file management platforms, and the user internal data includes at least one of buried point data, interface transmission data, and system synchronization data; Public opinion data is obtained based on network data and user internal data from various data platforms.

7. The method according to claim 6, characterized in that When the target task flow further includes a public opinion data processing task and a public opinion report generation task in response to a user instruction, the execution of the target task flow further includes: Clean, classify and label the public opinion data to obtain public opinion processing data; According to a preset metadata storage structure, the public opinion processing data is stored in the industry knowledge base that the public opinion large language model relies on; wherein the metadata storage structure includes at least some of the following items: event identification, event title, event type, occurrence time, occurrence location, persons involved, event description, media coverage, social media reaction, emotional tendency, keywords, risk level, response measures, processing results, source reliability, and update time of the public opinion event; Search the industry knowledge base to determine the target public opinion data corresponding to the user's instructions; Analyze and extract key public opinion information in the target public opinion data, and generate a public opinion report according to a preset report format and the key public opinion information; The public opinion report is stored, and in response to a report editing instruction from a user, the public opinion report is updated.

8. A public opinion monitoring device, characterized in that: The device comprises: An acquisition module is used to obtain the user's conversation flow data; A first processing module is used to generate a target instruction response pair based on the dialogue flow data and the trained public opinion large language model; wherein the target instruction response pair includes a user instruction and a target task corresponding to the user instruction, and the target task includes at least one of a public opinion data collection task, a public opinion data processing task, a model fine-tuning task, and a public opinion report generation task; The second processing module is used to generate a target task flow based on the target instruction response pair and execute the target task flow.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the public opinion monitoring method described in any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the public opinion monitoring method described in any one of claims 1 to 7.

Citation Information

Cited By

  • Intelligent public opinion report generation method and device

    CN120124601A

  • Public opinion situation awareness method and device, electronic equipment and storage medium

    CN121658642A