A method for public opinion propagation modeling simulation and risk warning based on large language model

Through the public opinion communication modeling and simulation method based on the large language model, the problem in the existing technology that the public opinion communication simulation relies on initial parameters and rules is solved, and more realistic and accurate public opinion communication simulation and risk warning are achieved.

CN117575829BActive Publication Date: 2024-09-13ZHEJIANG LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311591174.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-24
Publication Date
2024-09-13
Estimated Expiration
2043-11-24

AI Technical Summary

Technical Problem

Existing public opinion communication simulation methods rely on initial parameter settings and rule formulation, which cannot effectively simulate the diverse behaviors of social media users, and are difficult to capture deep dynamic processes and real user behaviors.

Method used

Adopting a public opinion communication modeling and simulation method based on a large language model, the preset large language model is fine-tuned and trained by obtaining event public opinion information, initializing the topological network and agent characteristics, iteratively updating behavioral information to simulate the public opinion communication process, and conducting risk assessment Early warning.

Benefits of technology

It improves the realism and accuracy of the simulation, can better capture changes in social media user relationships and the impact of public opinion atmosphere, and achieves true restoration and timely analysis of the evolution of public opinion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117575829B
    Figure CN117575829B
Patent Text Reader

Abstract

This specification discloses a method for public opinion propagation modeling simulation and risk warning based on a large language model, which can obtain event public opinion information, and fine-tune the preset large language model according to the event public opinion information, and then initialize the topological network and initialize the intelligent agent's own characteristics. In each round of iteration, the intelligent agent's memory flow information is determined, and the target information is filtered out from the memory flow information, and the updated own characteristics and the target information in the previous round of iteration are input into the large language model to obtain the updated own characteristics in this round of iteration, and the updated own characteristics in this round of iteration are input into the large language model to obtain the predicted behavior information of the intelligent agent for the target event, and update the topological network for the next round of iteration. Finally, risk warnings can be made based on the predicted behavior information of each intelligent agent in each round of iteration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of deep learning, and in particular to a public opinion dissemination modeling simulation and risk warning method based on a large language model. Background Art

[0002] With the continuous development of information technology, a large number of users express their personal opinions on events on online platforms. In practical applications, the propagation process of public opinion about events can be analyzed to provide risk warnings.

[0003] At present, there are two methods for analyzing the process of public opinion dissemination: big data analysis and simulation. Big data analysis uses a huge amount of data and applies machine learning and other technologies to explain the evolution of public opinion, but it mainly focuses on the surface characteristics of the data and is difficult to explore the deep dynamic process. Compared with big data analysis methods, simulation methods are more suitable for studying the emergence mechanism from micro-behavior to macro-phenomenon in public opinion dissemination. Commonly used simulation methods include equation-based simulation methods and agent-based simulation methods. However, existing simulation methods still have certain limitations, that is, the simulation results are too dependent on the initial parameter settings and the formulation of rules, and they cannot simulate the diverse behaviors of users on social media.

[0004] To make up for the shortcomings of previous simulation methods, this paper proposes a public opinion propagation modeling simulation and risk warning method based on a large language model. By applying a large language model to model the intelligent agent and deducing the public opinion propagation process on this basis, it provides a new path for studying public opinion propagation. Summary of the invention

[0005] This specification provides a public opinion dissemination modeling simulation and risk warning method based on a large language model to partially solve the above-mentioned problems existing in the prior art.

[0006] This manual adopts the following technical solutions:

[0007] This manual provides a method for public opinion propagation modeling simulation and risk warning based on a large language model, including:

[0008] Obtaining public opinion information about the event, and fine-tuning and training a preset large language model based on the public opinion information about the event;

[0009] Initializing a topological network and initializing the self-features of the intelligent agents, wherein the topological network is used to represent the social relationship between the intelligent agents, wherein the nodes in the topological network are used to represent the intelligent agents, and one intelligent agent is used to simulate one user, and the self-features include: at least one of a self-confidence score and a self-restraint willingness score;

[0010] In each round of iteration, the memory flow information of the agent is determined, and the target information is filtered out from the memory flow information, and the self-features updated in the previous round of iteration and the target information are input into the large language model to obtain the self-features updated in this round of iteration, wherein the target information includes: memory information associated with the target event and memory information corresponding to neighboring agents that have influence on the agent determined by the topological network;

[0011] Inputting the updated self-features in the current iteration into the large language model to obtain the predicted behavior information of the agent for the target event, and updating the topological network according to the behavior information to perform the next iteration;

[0012] Risk warning is issued based on the behavior information of each intelligent agent predicted in each round of iteration.

[0013] Optionally, obtain public opinion information about the event, including:

[0014] Obtain the user's basic information, the public opinion events in which he / she participated, and the actual comments made on the public opinion events as the event public opinion information;

[0015] Fine-tune the preset large language model according to the public opinion information of the event, specifically including:

[0016] The user's basic information and the public opinion events in which he / she participated are input into a preset large language model, and the large language model is fine-tuned and trained by taking the large language model as the input of the actual comments made by the user on the public opinion events as the optimization target.

[0017] Optionally, initialize the topology network, including:

[0018] Initialize the topological network based on the actual user relationships obtained and the attractiveness score corresponding to each agent.

[0019] Optionally, after initializing the topology network, the method further includes:

[0020] Determine the influence value corresponding to each intelligent agent according to the topological network;

[0021] Determining memory information of neighboring agents that have influence on the agent through the topological network, specifically including:

[0022] According to the influence value corresponding to each intelligent agent determined through the topological network, the memory information corresponding to the neighboring intelligent agents that have influence on the intelligent agent is determined.

[0023] Optionally, determining the influence value corresponding to each agent according to the topological network specifically includes:

[0024] Determining an adjacency matrix of the topological network, and standardizing the adjacency matrix to obtain a standardized adjacency matrix;

[0025] The influence value corresponding to each agent according to the standardized adjacency matrix.

[0026] Optionally, determining the memory flow information of the agent includes:

[0027] Construct set B i , the set B i represents the set of opinions of other agents on the target event perceived by agent i;

[0028] According to the public opinion event set M and set B i , determine the memory flow information of agent i, the public opinion event set M includes time, public opinion event content and behavioral activities taken by each user.

[0029] Optionally, the updated self-features obtained in the previous iteration and the target information are input into the large language model to obtain the updated self-features obtained in the current iteration, specifically including:

[0030] Inputting the self-restraint willingness score updated in the previous iteration and the memory information associated with the target event into the large language model to obtain the self-restraint willingness score updated in the current iteration;

[0031] The confidence score updated in the previous iteration and the memory information corresponding to the neighboring agents that have influence on the agent determined by the topological network are input into the large language model to obtain the confidence score updated in this iteration.

[0032] This specification provides a public opinion propagation modeling simulation and risk warning device based on a large language model, including:

[0033] A fine-tuning module is used to obtain event public opinion information and perform fine-tuning training on a preset large language model based on the event public opinion information;

[0034] An initialization module is used to initialize a topological network and initialize the self-features of the intelligent agent, wherein the topological network is used to represent the social relationship between the intelligent agents, wherein the nodes in the topological network are used to represent the intelligent agents, and one intelligent agent is used to simulate one user, and the self-features include: at least one of a self-confidence score and a self-restraint willingness score;

[0035] A screening module is used to determine the memory flow information of the agent in each round of iteration, and screen the target information from the memory flow information, input the self-features updated in the previous round of iteration and the target information into the large language model, and obtain the self-features updated in this round of iteration, wherein the target information includes: memory information associated with the target event and memory information corresponding to the neighboring agents that have influence on the agent determined by the topological network;

[0036] An updating module, used to input the updated self-features in the current iteration into the large language model, obtain the predicted behavior information of the agent for the target event, and update the topological network according to the behavior information to perform the next iteration;

[0037] The early warning module is used to issue risk warnings based on the behavior information of each intelligent agent predicted in each round of iteration.

[0038] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned public opinion propagation modeling simulation and risk warning method based on a large language model.

[0039] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the above-mentioned public opinion propagation modeling simulation and risk warning method based on a large language model is implemented.

[0040] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0041] It can be seen from the above-mentioned public opinion propagation modeling simulation and risk warning based on the large language model that the public opinion information of the event is obtained, and the preset large language model is fine-tuned and trained according to the public opinion information of the event. Then, the topological network can be initialized, and the self-features of the intelligent agent can be initialized. The topological network is used to represent the social relationship between intelligent agents, wherein the nodes in the topological network are used to represent intelligent agents, and one intelligent agent is used to simulate one user. The self-features include: at least one of the self-confidence score and the self-restraint willingness score. In each round of iteration, the memory flow information of the intelligent agent is determined, and the target information is filtered out from the memory flow information. The self-features updated in the previous round of iteration and the target information are input into the large language model to obtain the self-features updated in this round of iteration, wherein the target information includes: the memory information associated with the target event and the memory information corresponding to the neighboring intelligent agent that has influence on the intelligent agent determined by the topological network. The self-features updated in this round of iteration are input into the large language model to obtain the predicted behavior information of the intelligent agent for the target event, and the topological network is updated according to the behavior information for the next round of iteration. Finally, risk warnings can be issued based on the behavior information of each agent predicted in each round of iteration.

[0042] Compared with the prior art, the advantages and positive effects of the present invention are:

[0043] 1. By constructing a scale-free network, this method can better capture the relationship between social media users, and the broken edge reconnection strategy can reflect the reality of changes in social relationships, which can better study the extent to which the opinions of intelligent agents are influenced by the atmosphere of online public opinion.

[0044] 2. Use a large language model to model the intelligent agent and deduce the user's behavior on social media, such as likes, reposts, comments, etc., to achieve a true restoration of the evolution process of public opinion.

[0045] 3. Fine-tuning the large language model through real data from social media users and public opinion events can generate more reasonable intelligent agent responses and improve the realism of the simulation.

[0046] 4. After each intelligent agent responds, the network structure is updated and iterated to better simulate and analyze the dynamic process of public opinion dissemination and ensure the timeliness, accuracy and authenticity of the research. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0048] Figure 1 A flowchart of the public opinion propagation modeling simulation and risk warning method based on a large language model provided in this manual;

[0049] Figure 2 A schematic diagram of a process for determining an event with the highest correlation with a target event provided in this specification;

[0050] Figure 3 A schematic diagram of a process for determining an influence value provided in this specification;

[0051] Figure 4 A schematic diagram of a public opinion propagation modeling simulation and risk warning device based on a large language model provided in this manual;

[0052] Figure 5 The corresponding Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0054] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0055] Figure 1 This is a flow chart of a method for public opinion propagation modeling simulation and risk warning based on a large language model provided in this specification, which specifically includes the following steps:

[0056] S100: Obtaining event public opinion information, and fine-tuning a preset large language model according to the event public opinion information.

[0057] S102: Initialize a topological network and initialize the self-characteristics of the intelligent agent, wherein the topological network is used to represent the social relationship between the intelligent agents, wherein the nodes in the topological network are used to represent the intelligent agents, and one intelligent agent is used to simulate one user, and the self-characteristics include: at least one of a self-confidence score and a self-restraint willingness score.

[0058] In this specification, the process of propagation of public opinion of an event can be simulated, so that, after a new event occurs, risk warning of the event can be issued by simulating the process of propagation of public opinion of the event.

[0059] First, you can obtain event public opinion information and fine-tune the preset large language model based on the event public opinion information.

[0060] Among them, in the fine-tuning training: the user's basic information, the public opinion events in which he / she participated, and the actual comments made on the public opinion events can be obtained, and the user's basic information and the public opinion events in which he / she participated are input into a preset large language model, and the large language model is input with the actual comments made by the user on the public opinion events as the optimization goal, and the large language model is fine-tuned.

[0061] It should be noted that during fine-tuning, the collected data can be pre-processed, including deduplication, cleaning, word segmentation, etc. After the data is sorted, save it as a .json file for subsequent use.

[0062] Through LoRA method fine-tuning, first freeze the pre-trained model weights, then inject the trainable rank decomposition matrix into each layer of the Transformer architecture, and train it. The LoRA trained model weights are integrated into the original Baichuan-13B model weights to obtain the fine-tuned Baichuan-13B model.

[0063] Then, the server can initialize the topological network and initialize the self-characteristics of the intelligent agent. The topological network is used to represent the social relationship between the intelligent agents, wherein the nodes in the topological network are used to represent the intelligent agents, and one intelligent agent is used to simulate one user. The self-characteristics include: self-confidence score, self-restraint willingness score, etc.

[0064] Among them, when initializing the characteristics of the intelligent agent itself, we can first select 30 public opinion events with more than 10,000 participants from social media, and select 100 users (users correspond to intelligent agents) from the number of participants. These 100 users are required to participate in at least 15 or more of the selected public opinion events, and obtain their basic information (such as account name, filled in age, etc.).

[0065] Initialize the self-confidence score. Self-confidence measures the degree of self-affirmation of the agent in the opinion. The confidence of the agent is affected by the majority of opinions observed by the agent. In the present invention, a value between [0, 1] is randomly generated using Gaussian distribution as the self-confidence score of the agent.

[0066] Initialize the self-restraint willingness score. In the process of public opinion dissemination, self-restraint is defined as concealing the true opinion from the audience who disagrees with one's own opinion. The self-restraint willingness measures the degree of self-restraint. In the present invention, a Gaussian distribution is used to randomly generate a value between [0,1] as the self-restraint willingness of the intelligent agent.

[0067] Initialize activity: Use the agent's participation in public opinion events to calculate the agent's activity. Construct a matrix with rows representing agents and columns representing public opinion events. The values ​​in the matrix represent the agent's participation in the corresponding event (the sum of the number of likes, reposts, and comments). If there is no participation, it is recorded as 0. Add the participation level of each column corresponding to each agent to get a comprehensive score, and then normalize it to get 100 scores between [0,1] as the activity of each agent.

[0068] The initialized self-confidence score, self-restraint willingness score and activity mentioned above can all be used as the initial eigenvalues ​​corresponding to the intelligent agent.

[0069] Determine the set of public opinion events M in which each intelligent agent participates. Each event m in the set of public opinion events M consists of time, content of the public opinion event, and behavioral activities taken by each user (including likes, reposts, comments or silence, etc.).

[0070] The topological network mentioned above can be a scale-free network. When initializing the topological network, the topological network can be initialized according to the actual user relationships obtained (such as users' attention, likes, comments, etc. on other users) and the attractiveness score corresponding to each intelligent agent.

[0071] Here, we define several mathematical symbols: The topological network composed of 100 agents is represented by G. G=(V,E), V={1,2,…100} is the set of all agents, E={{i,j}:i,j∈V} represents the connection between agents, N(θ) represents the set of all critical points of an agent, that is, N(i)={j∈v:(i,j)∈E}, and the assumptions that this topological network needs to meet are as follows:

[0072] (1) The network remains static during the process of agent opinion formation, that is, in each time iteration. Assuming that the speed of opinion formation is faster than the changes in real-world social networks, the network structure will not be updated until a time iteration is completed;

[0073] (2) The network model can study the impact of different network topologies (especially network density and participant location) on public opinion by changing parameters (parameters may include the number of network nodes, network density, etc.).

[0074] The steps to build a topological network structure are as follows:

[0075] S2.1 Connecting nodes: In a scale-free network, connections between nodes are not established randomly, but based on the attraction score between nodes. The attraction score formula of a node is:

[0076] A i =β(γ-2)+qi

[0077] Where β refers to the number of edges connected to each newly added node. Each time a new node joins the network, it will connect to existing nodes with β edges, γ is the power law exponent, and q i is the initial attractiveness score of the agent;

[0078] S2.2: Reconnection of Broken Edges: The structure of a social network should not remain static. Therefore, during the modeling process, the network structure is reconnected with the iteration of events to simulate behaviors such as unfollowing on social media. The basic idea of ​​reconnection of broken edges is to change the connection mode of the network without changing the network nodes. By observing the impact of reconnection of broken edges on information dissemination, scope and path, we can better simulate the spread of public opinion on social media.

[0079] S104: In each round of iteration, the memory flow information of the agent is determined, and the target information is filtered out from the memory flow information, and the self-features updated in the previous round of iteration and the target information are input into the large language model to obtain the self-features updated in this round of iteration, wherein the target information includes: memory information associated with the target event and memory information corresponding to neighboring agents that have influence on the agent as determined by the topological network.

[0080] S106: Input the updated self-features in the current iteration into the large language model to obtain the predicted behavior information of the agent for the target event, and update the topological network according to the behavior information to perform the next iteration.

[0081] In the subsequent process, it is necessary to iteratively simulate the development process of public opinion of the event.

[0082] Specifically, in each round of iteration, the memory flow information of the intelligent agent can be determined, and the target information can be filtered out from the memory flow information, and the self-features updated in the previous round of iteration and the target information can be input into the large language model to obtain the self-features updated in the current round of iteration.

[0083] It should be noted that the above-mentioned memory flow information can represent the memory of the events experienced by the agent before this round of iteration and the opinions related to the events.

[0084] Specifically, we can construct set B i = {b 1 ,b 2 ,…b i-1 ,b i+1 ,…b 100}, set B iIt is used to represent the set of opinions of other agents on the target event H perceived by agent i, where b i Represents the view of agent i on the target event H. Among them, the set Bi needs to be initialized in the first iteration, and each subsequent iteration can be generated by the large language model at the previous moment.

[0085] Then, we can use the public opinion event set M and the set B i , determine the memory flow information of agent i.

[0086] The format of each piece of memory stream information is: intelligent agent, public opinion event content, participation time, and behavioral activities.

[0087] After determining the memory flow information of each intelligent agent, for an intelligent agent, the target information can be filtered out from the memory flow information, and the target information and its own features updated in the previous round of iterations can be input into the large language model to obtain its own features updated in this round of iterations, and then the self-features updated in this round of iterations can be input into the large language model to obtain the predicted behavior information of the intelligent agent for the target event.

[0088] The above-mentioned behavior information may include information on whether the intelligent agent expresses an opinion on the target event, and if the intelligent agent expresses an opinion on the target event, the specific content of the opinion, etc.

[0089] Then, the topology network can be updated according to the above behavior information and enter the next round of iteration.

[0090] It should be noted that the above-mentioned filtered target information may include memory information associated with the target event and memory information corresponding to neighboring agents that have influence on the agent determined through the topological network, etc.

[0091] Among them, you can filter by:

[0092] 1. The information of the event with the highest correlation with the target event can be screened out from the public opinion event set M as the memory information associated with the target event.

[0093] Figure 2 A flowchart for determining an event with the highest correlation with a target event is provided in this specification.

[0094] like Figure 2 As shown, the above large language model can be used to determine the embedding vector of each public opinion event in the public opinion event set M and the embedding vector of the target event, and then determine the similarity of the embedding vectors between the public opinion event and the target event.

[0095] It should be noted that the influence of public opinion events decays over time. Therefore, the temporal impact value of public opinion events can be determined according to the time when each public opinion event occurs.

[0096] The similarity of the embedding vectors between the public opinion event and the target event and the temporal influence value of the public opinion event can be combined to select the top-k public opinion events as the events with the highest correlation with the target event, so that the corresponding memory information can be filtered out from the public opinion event set M.

[0097] exist Figure 2 In the figure, there are 30 public opinion events, and 20 events are selected from the 30 public opinion events for illustration. It can be seen that the similarity between each public opinion event and the target event can be calculated first, and then the temporal impact value of the 30 public opinion events can be calculated (the closer the time, the greater the impact value), which can be determined by an exponential retrieval function (which can be a time decay function), and then the similarity and the temporal impact value of the public opinion event can be weightedly summed (the weight can be set to the same or set according to demand), so as to select the 20 events with the highest correlation through the obtained summation result.

[0098] 2. The influence value corresponding to each intelligent agent can be determined based on the topological network. According to the influence value corresponding to each intelligent agent determined by the topological network, the influence value corresponding to each intelligent agent can be obtained from set B. i The memory information corresponding to the neighboring agents that have influence on the agent is determined.

[0099] When determining the influence value corresponding to each intelligent agent through a topological network, the adjacency matrix of the topological network can be determined, and the adjacency matrix can be standardized to obtain a standardized adjacency matrix, as well as the influence value corresponding to each intelligent agent according to the standardized adjacency matrix.

[0100] Specifically, you can Figure 3 As shown, follow these steps:

[0101] Figure 3 A schematic diagram of a process for determining an influence value provided in this specification.

[0102] S3.1 Determine the adjacency matrix and represent the scale-free network as the adjacency matrix L, where L[i,j] indicates whether there is a connection between nodes i and j. If so, the value is 1, otherwise it is 0.

[0103] S3.2 Standardize the adjacency matrix. First, construct the degree matrix D, where D[i,i] represents the degree of node i (the number of edges connected to it). Then construct the standardized adjacency matrix P, where P[i][j] = L[i][j] / D[i][i].

[0104] S3.3 Initialize the feature vector, initialize a feature vector x, where x[i] represents the initial feature value of node i. The initial feature value may include the above-mentioned activity, self-restraint willingness score and self-confidence score, etc. The initial feature value can be randomly initialized or obtained through the user's real behavior in the social networking site.

[0105] S3.4 repeats the iteration to update the feature vector, and in each iteration, x=P*x.

[0106] S3.5 Obtain results: After each iteration, calculate the change result of the eigenvector x. When the Euclidean distance between two iterations is less than 1e-6, the eigenvector is considered to be the eigenvector centrality of the node, where x[i] represents the influence of agent i in the network and can be used as the influence value of agent i.

[0107] Then, the self-confidence score and self-restraint willingness score in the agent's own characteristics can be updated through the large language model.

[0108] Specifically, the self-restraint willingness score updated in the previous round of iteration and the memory information associated with the target event can be input into the large language model to obtain the self-restraint willingness score updated in this round of iteration, and the self-confidence score updated in the previous round of iteration and the memory information corresponding to the neighboring agents that have influence on the agent determined by the topological network can be input into the large language model to obtain the self-confidence score updated in this round of iteration.

[0109] After obtaining the updated self-restraint willingness score and self-confidence score, the updated self-features in this round of iteration can be input into the large language model to obtain the predicted behavior information of the intelligent agent for the target event, and based on the behavior information, the topological network is updated for the next round of iteration.

[0110] Here, a specific example of a prompt sentence input into a large language model is given (but the form of the prompt sentence input into the large language model in practice is not limited).

[0111] Regarding the self-confidence score: It is known that Xiao Ming's current self-confidence is 8 points. Regarding the incident of a child falling into the water (target event), he thinks that he should not act bravely. Xiaohong, as a person in his follow-up list, thinks that he should act bravely. Xiaobai, as his fan, also thinks that he should act bravely. Please help me correct Xiao Ming's self-confidence score at the next moment.

[0112] Regarding the self-willingness constraint score: It is known that Xiao Ming's initial score for self-restraint willingness at this time step is 3 points. He has previously expressed his opinions on event A and event B. Then for the target event, please correct his self-willingness expression score.

[0113] Regarding the predicted behavior information of the intelligent agent for the target event: Given Xiao Ming's own feature M and the public opinion event H (target event) that occurred at this moment, please guess Xiao Ming's attitude towards the event on the social platform, whether it is like, forward, remain silent, or comment. Xiao Ming can take the behavior attitudes of like, forward, or comment at the same time, but if he chooses to remain silent, he cannot choose other behavior attitudes. If he chooses to comment, please output the content of Xiao Ming's comment.

[0114] S108: Issue risk warning based on the behavior information of each intelligent agent predicted in each round of iteration.

[0115] After determining the behavior information of each intelligent agent predicted in each round of iteration, risk warning can be performed based on the behavior information of each intelligent agent predicted in each round of iteration.

[0116] Specifically, the behavior information of each intelligent agent predicted in each round of iteration can be used as the simulated process of public opinion propagation. Through analysis, we can observe the changing trend of the intelligent agent's response to public opinion events on social media over time, as well as the propagation and evolution of public opinion in the network with the changes in the behavioral activities and social relationships of different intelligent agents.

[0117] Therefore, the above method can simulate the process of public opinion from occurrence to climax and then to decline, so as to determine whether risk warning is needed for the target event, so as to facilitate relevant institutions to carry out risk control on the target event.

[0118] Specifically, it is possible to determine whether the target event has the risk of triggering a public opinion crisis and causing adverse effects, and then issue a risk warning. In addition, the number or proportion of negative comments on the target event over a period of time can be simulated to measure whether the target event has risks.

[0119] It should be noted that, for the sake of convenience, the execution subject of the method is described as a server, and the execution subject of the method can be a computer, a large service platform, etc., which is not limited here. It should also be noted that the features in the following embodiments and implementations can be combined with each other if there is no conflict.

[0120] In addition, it should be noted that all actions of acquiring signals, information or data in this manual are performed in compliance with the relevant local data protection laws and policies and with the authorization given by the owner of the corresponding device.

[0121] The above is a method for public opinion propagation modeling simulation and risk warning based on a large language model provided by one or more embodiments of this specification. Based on the same idea, this specification also provides a public opinion propagation modeling simulation and risk warning device based on a large language model, such as Figure 4 shown.

[0122] Figure 4 A schematic diagram of a public opinion propagation modeling simulation and risk warning device based on a large language model provided in this manual includes:

[0123] A fine-tuning module 401 is used to obtain event public opinion information and perform fine-tuning training on a preset large language model according to the event public opinion information;

[0124] Initialization module 402, used to initialize the topological network and initialize the self-characteristics of the intelligent agent, wherein the topological network is used to represent the social relationship between the intelligent agents, wherein the nodes in the topological network are used to represent the intelligent agents, and one intelligent agent is used to simulate one user, and the self-characteristics include: at least one of a self-confidence score and a self-restraint willingness score;

[0125] The screening module 403 is used to determine the memory flow information of the agent in each round of iteration, and screen the target information from the memory flow information, input the self-features updated in the previous round of iteration and the target information into the large language model, and obtain the self-features updated in this round of iteration, wherein the target information includes: the memory information associated with the target event and the memory information corresponding to the neighboring agents that have influence on the agent determined by the topological network;

[0126] An updating module 404 is used to input the updated self-features in the current iteration into the large language model to obtain the predicted behavior information of the agent for the target event, and update the topological network according to the behavior information to perform the next iteration;

[0127] The early warning module 405 is used to issue risk early warnings based on the behavior information of each intelligent agent predicted in each round of iteration.

[0128] Optionally, the fine-tuning module 401 is used to obtain the user's basic information, the public opinion events in which the user participates, and the actual comments made in response to the public opinion events as event public opinion information; input the user's basic information and the public opinion events in which the user participates into a preset large language model, and use the large language model to input the user's actual comments made in response to the public opinion events as an optimization goal, and fine-tune the large language model.

[0129] Optionally, the initialization module 402 is used to initialize the topological network according to the acquired actual user relationships and the attractiveness score corresponding to each agent.

[0130] Optionally, the screening module 403 is used to determine the influence value corresponding to each intelligent agent according to the topological network; and determine the memory information corresponding to the neighboring intelligent agent that has influence on the intelligent agent according to the influence value corresponding to each intelligent agent determined by the topological network.

[0131] Optionally, the screening module 403 is used to determine the adjacency matrix of the topological network, and standardize the adjacency matrix to obtain a standardized adjacency matrix; according to the standardized adjacency matrix, the influence value corresponding to each intelligent agent.

[0132] Optionally, the screening module 403 is used to construct a set B i , the set B i represents the set of opinions of other agents on the target event perceived by agent i; according to the public opinion event set M and set B i , determine the memory flow information of agent i, the public opinion event set M includes time, public opinion event content and behavioral activities taken by each user.

[0133] Optionally, the updating module 404 is used to input the self-restraint willingness score updated in the previous round of iteration and the memory information associated with the target event into the large language model to obtain the self-restraint willingness score updated in the current round of iteration; input the self-confidence score updated in the previous round of iteration and the memory information corresponding to the neighboring intelligent agents that have influence on the intelligent agent determined by the topological network into the large language model to obtain the self-confidence score updated in the current round of iteration.

[0134] This specification also provides a computer-readable storage medium, which stores a computer program, and the computer program can be used to execute the above-mentioned public opinion propagation modeling simulation and risk warning method based on a large language model.

[0135] This manual also provides Figure 5 The schematic structure diagram of the electronic device shown in FIG. Figure 5 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to realize the public opinion propagation modeling simulation and risk warning method based on the large language model.

[0136] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0137] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0138] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0139] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0140] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0141] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0142] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0143] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0144] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0145] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0146] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0147] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0148] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0149] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0150] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0151] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0152] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A method for public opinion propagation modeling simulation and risk warning based on a large language model, characterized in that: include: Obtaining public opinion information about the event, and fine-tuning and training a preset large language model based on the public opinion information about the event; Initialize a topological network and initialize the self-features of the intelligent agent, wherein the topological network is used to represent the social relationship between the intelligent agents, wherein the nodes in the topological network are used to represent the intelligent agents, and one intelligent agent is used to simulate one user, and the self-features include: a self-confidence score and a self-restraint willingness score; In each round of iteration, the memory flow information of the agent is determined, and the target information is filtered out from the memory flow information, and the self-features updated in the previous round of iteration and the target information are input into the large language model to obtain the self-features updated in this round of iteration, wherein the target information includes: memory information associated with the target event and memory information corresponding to neighboring agents that have influence on the agent determined by the topological network; Inputting the updated self-features in the current iteration into the large language model to obtain the predicted behavior information of the agent for the target event, and updating the topological network according to the behavior information to perform the next iteration; Provide risk warning based on the behavior information of each intelligent agent predicted in each round of iteration; Among them, determining the memory flow information of the agent specifically includes: Building a collection , the set represents the set of opinions of other agents on the target event perceived by agent i; according to the public opinion event set M and the set , determine the memory flow information of agent i, the public opinion event set M includes time, content of public opinion events and the behavior activities taken by each user; Inputting the updated self-features in the previous iteration and the target information into the large language model to obtain the updated self-features in this iteration, specifically includes: Inputting the self-restraint willingness score updated in the previous iteration and the memory information associated with the target event into the large language model to obtain the self-restraint willingness score updated in the current iteration; The confidence score updated in the previous iteration and the memory information corresponding to the neighboring agents that have influence on the agent determined by the topological network are input into the large language model to obtain the confidence score updated in this iteration.

2. The method according to claim 1, characterized in that Obtain public opinion information about the event, including: Obtain the user's basic information, the public opinion events in which he / she participated, and the actual comments made on the public opinion events as the event public opinion information; Fine-tune the preset large language model according to the public opinion information of the event, specifically including: The user's basic information and the public opinion events in which he / she participated are input into a preset large language model, and the large language model is fine-tuned and trained by taking the large language model as the input of the actual comments made by the user on the public opinion events as the optimization target.

3. The method according to claim 1, characterized in that Initialize the topology network, including: Initialize the topological network based on the actual user relationships obtained and the attractiveness score corresponding to each agent.

4. The method according to claim 1, characterized in that After initializing the topology network, the method further includes: Determine the influence value corresponding to each intelligent agent according to the topological network; Determining memory information of neighboring agents that have influence on the agent through the topological network, specifically including: According to the influence value corresponding to each intelligent agent determined through the topological network, the memory information corresponding to the neighboring intelligent agents that have influence on the intelligent agent is determined.

5. The method according to claim 4, characterized in that According to the topological network, the influence value corresponding to each intelligent agent is determined, specifically including: Determining an adjacency matrix of the topological network, and standardizing the adjacency matrix to obtain a standardized adjacency matrix; The influence value corresponding to each agent according to the standardized adjacency matrix.

6. A public opinion propagation modeling simulation and risk warning device based on a large language model, the device is applied to the method according to claim 1, characterized in that: include: A fine-tuning module is used to obtain event public opinion information and perform fine-tuning training on a preset large language model based on the event public opinion information; An initialization module is used to initialize a topological network and initialize the self-features of the intelligent agent. The topological network is used to represent the social relationship between intelligent agents. The nodes in the topological network are used to represent intelligent agents. One intelligent agent is used to simulate one user. The self-features include: self-confidence score and self-restraint willingness score. A screening module is used to determine the memory flow information of the agent in each round of iteration, and screen the target information from the memory flow information, input the self-features updated in the previous round of iteration and the target information into the large language model, and obtain the self-features updated in this round of iteration, wherein the target information includes: memory information associated with the target event and memory information corresponding to the neighboring agents that have influence on the agent determined by the topological network; An updating module, used to input the updated self-features in the current iteration into the large language model, obtain the predicted behavior information of the agent for the target event, and update the topological network according to the behavior information to perform the next iteration; The early warning module is used to issue risk warnings based on the behavior information of each intelligent agent predicted in each round of iteration.

7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 5 is implemented.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method described in any one of claims 1 to 5 is implemented.