Social network modeling method and system based on SEIR model
Through the dynamic evolution method based on the SEIR model, a directed social network that conforms to the power law distribution is formed, which solves the problem that the existing technology is difficult to simulate the social network relationship of new media platforms, and realizes the retention of real simulation and complex network characteristics.
Patent Information
- Application Number
- CN202411617576.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-04-08
AI Technical Summary
Existing social network modeling methods are difficult to simulate social network relationships under new media platforms, especially the combination of directionality and complex network characteristics.
Using the SEIR model-based method, a directed network that conforms to the power law distribution is formed through dynamic evolution, the conversion of nodes between different states is simulated, and the interaction behavior between nodes is recorded, and the social network structure is finally reconstructed.
The real simulation of the social network relationship of new media platforms is realized, the power law distribution characteristics of complex networks are retained, the group differentiation and dynamic adjustment of relationships are simulated, and network multiplexing and visualization are supported.
Smart Images

Figure CN119782632A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer simulation, and in particular relates to a social network modeling method and system based on a SEIR model. Background Art
[0002] In the process of more than half a century of development, social networks have gradually evolved into an academic branch of social network analysis based on the integration of multiple disciplines such as informatics, mathematics, sociology, management, and psychology. The research content of social network analysis mainly includes several directions such as network communication analysis, sentiment analysis, and user behavior analysis. It specifically studies the structure of social networks and their evolution trends, the law of information dissemination, the emotional polarity of users, opinions and attitudes around events, and the behavior of individual and group users based on social networks. In short, the objects of social network analysis are graph-structured social networks, user nodes on the network, and various behaviors and information flowing on the network. Therefore, studying the structural characteristics of social networks and constructing network structures through modeling and simulation is the basis of social network analysis. At present, the main methods of social network modeling are:
[0003] (1) Methods based on graph theory. This method represents a social network as a graph, with users as vertices and interactions between users as edges. According to the characteristics of complex networks, social networks have small-world and scale-free properties. Classic social network construction methods include regular graphs, ER random network models, BA scale-free network models, and WS small-world models.
[0004] (2) Methods based on dynamic evolution analysis. This method focuses on the temporal changes and evolution of social networks, and simulates the growth mechanism and structural changes of social networks by analyzing macro or local evolution laws. The classic method is to use system dynamics models or epidemic models to simulate the evolution of social networks.
[0005] Current social network modeling methods find it difficult to simulate social network relationships on new media platforms because social networks on new media platforms are directional, that is, they support one-way attention relationships between users; at the same time, social networks conform to the characteristics of traditional complex networks. Summary of the invention
[0006] The purpose of the present invention is to provide a social network modeling method based on the SEIR model, which can realize the formation of a directed network that conforms to the power-law distribution through dynamic evolution based on the BA scale-free network, effectively simulate the social network relationship on the new media platform, and help to analyze user interaction behavior in the new media environment.
[0007] The technical solution adopted by the present invention is:
[0008] A social network modeling method based on the SEIR model includes the following steps:
[0009] (1) Set the assumptions of the social network and initialize a scale-free network with a BA structure as the initial social network;
[0010] (2) Carry out propagation evolution simulation on the initialized social network, simulate the transition of nodes between different states based on the SEIR model, including susceptible, latent, propagator and immune, and record the interaction behavior between nodes;
[0011] (3) After the propagation evolution simulation is completed, the social network is reconstructed based on the interaction behaviors between nodes to obtain the final social network structure.
[0012] Furthermore, the assumptions set in step (1) include: the total number of people participating in the spread in the social network, each node has an equal opportunity to publish a topic, latent persons automatically transform into infected persons after the latent period, and immune persons transform into susceptible persons with a small probability.
[0013] Furthermore, in step (1), a scale-free network with BA structure is initialized using the networkx library. During the initialization process, two edges are connected each time a new node is added.
[0014] Furthermore, in step (2), the transition process of nodes between different states based on the SEIR model simulation is:
[0015] At each time point, the reduction in the number of susceptibles is determined by the inter-node contact rate and the probability of susceptibles turning into latents, and is calculated based on the proportional relationship between susceptibles and latents; immunes turn into susceptibles according to probability;
[0016] At each time point, a latent person becomes a transmitter after a latent period; a susceptible person becomes a new latent person due to contact, and the conversion amount is determined by the contact rate and the probability of susceptible people turning into latent people, and is calculated based on the ratio of susceptible people to latent people;
[0017] At each time point, latent persons become transmitters after the latent period, and transmitters become immune persons according to the conversion probability;
[0018] At each time point, spreaders transform into immune persons according to the transformation probability, and immune persons transform into susceptible persons according to the transformation probability.
[0019] Furthermore, the contact rate is expressed by the Jaccard similarity between two nodes.
[0020] Furthermore, the step of reconstructing the social network according to the interaction behaviors between nodes in step (3) includes:
[0021] Traverse each propagation node p in the initialized social network;
[0022] For the nodes in the node set P1 with the strongest propagation power, if there is no one-way connection between these nodes and node p, a one-way connection relationship is established;
[0023] For nodes in the node set P2 that are not of interest, if there is a unidirectional connection relationship between these nodes and the node p pointing to the node p, the connection relationship is deleted.
[0024] Furthermore, the power law distribution verification is performed on the social network structure reconstructed in step (3), and the verification steps include:
[0025] Calculate the degree of each node in the reconstructed social network, that is, the number of connections of each node;
[0026] Count the degree distribution of all nodes and get the frequency of occurrence of each degree value;
[0027] Perform logarithmic transformation on the degree distribution to obtain logarithmic data of degree value and frequency;
[0028] The logarithmic data is linearly fitted and the slope of the fitted line is calculated as the power exponent to verify the power-law distribution characteristics of social networks.
[0029] A social network modeling system based on SEIR model, comprising:
[0030] The initialization module is used to set the assumptions of the social network and initialize a scale-free network with a BA structure as the initial social network;
[0031] The network construction module is used to perform propagation evolution simulation on the initialized social network. It simulates the transition of nodes between different states based on the SEIR model, including susceptible, latent, propagator and immune, and records the interaction between nodes. After the propagation evolution simulation is completed, the social network is reconstructed according to the interaction between nodes to obtain the final social network structure.
[0032] The output module is used to verify the power-law distribution of the reconstructed social network structure and output the reconstructed social network structure.
[0033] The beneficial effects achieved by the present invention are:
[0034] 1. Conform to the characteristics of new media social networks: The network generated by the present invention is a directed network, which can truly simulate the user relationship characteristics of the new media platform, which is different from the traditional undirected network simulation.
[0035] 2. Preserve the power-law distribution characteristics of complex networks: During the network evolution process, the present invention verifies the power-law distribution to ensure that the generated social network structure conforms to the power-law distribution characteristics of complex networks and is more in line with the actual social network.
[0036] 2. Simulate group differentiation and dynamic adjustment of relationships: The present invention adjusts the degree of node isolation through Jaccard similarity, reflecting the social network law of "birds of a feather flock together", making the relationship between nodes more diverse and close to the real social network evolution model.
[0037] 3. Support network reuse and visualization: The social network generated by the present invention can be exported as an adjacency list, which is convenient for reuse on other platforms; at the same time, it provides a visual display of the sub-network, which is convenient for analyzing the network structure and node relationship characteristics. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 The architecture diagram of the social network modeling system based on the SEIR model;
[0039] Figure 2 It is the relationship diagram of SEIR model parameters;
[0040] Figure 3 It is a trend chart of the percentage of nodes with propagation power in the network;
[0041] Figure 4 is the logarithmic plot of degree distribution;
[0042] Figure 5 This is the reconstructed social network graph. DETAILED DESCRIPTION
[0043] In order to make the various technical features and advantages or technical effects in the above technical solutions of the present invention more obvious and easy to understand, they are described in detail below with reference to the accompanying drawings.
[0044] The embodiment of the present invention specifically provides a social network modeling method and system based on the SEIR model. The method and system have the same data processing process. The system architecture is as follows: Figure 1 As shown, it includes three modules: initialization module, network construction module and output module.
[0045] Initialization module: sets the assumptions of the social network model and initializes a scale-free network with a BA (Barabási-Albert) structure to establish the initial state of the social network;
[0046] Network construction module: Based on the SEIR model, propagation evolution simulation is performed to record the interaction status between nodes, and the network is reconstructed based on the interaction behavior between nodes, forming the terminal state of the social network through iterative evolution;
[0047] Output module: Calculate the power exponent of the network structure output by the network construction module through power law fitting to verify whether it conforms to the structural characteristics of the social network, that is, the power law distribution characteristics, and then output the overall structure and select the sub-network for visualization.
[0048] Among them, the SEIR (Susceptible-Exposed-Infected-Recovered) model is an information propagation dynamics model based on the infectious disease model. It adds the exposed state to the SIR (Susceptible-Infected-Recovered) model, that is, the individual has been exposed to the pathogen but has not yet shown the characteristics of infection (or transmission). The SEIR model is considered to be a classic simulation model for public opinion propagation, so the present invention uses the SEIR model to simulate the spread of information on social networks. The SEIR model contains the following four states:
[0049] Susceptible (S): refers to people who have not been exposed to a certain topic in the public opinion field but may be interested in it.
[0050] Exposed (E): refers to people who have been exposed to the topic in the public opinion field but have not yet spread it.
[0051] Infected (I): refers to the group of people who are spreading topics in the public opinion field.
[0052] Recovered (R): refers to people who are no longer interested in a topic in the public opinion field and have stopped spreading it.
[0053] The specific processing steps of this method and system are described as follows:
[0054] 1. Initialization of social network
[0055] Before the initialization module generates the initial state of the social network, it is necessary to set the assumptions first. Figure 2 As shown in the figure, the following assumptions are set before the evolutionary simulation:
[0056] (1) Assume that the total number of people in the public opinion field is N, N = S + E + I + R, that is, the sum of the people in the four states covers all people in the public opinion field;
[0057] (2) Every node in the public opinion field has an equal opportunity to publish a topic, that is, the topic initiation node has nothing to do with the network structure or temporal changes;
[0058] (3) In order to prolong the discussion time and increase the popularity of the topic, it is assumed that state E will automatically transform into state I after a certain period of latency;
[0059] (4) State R has a small probability of transforming into state S, that is, people who are immune to the topic still have a chance of transforming into susceptible people.
[0060] This embodiment uses the networkx library to generate a BA scale-free network with a total number of nodes N=200, and adds 2 edges each time. Then, any node is randomly selected to initiate a topic, and the topic propagation simulation is performed 100 times in the initial setting.
[0061] 2. Simulation of the propagation evolution of social networks
[0062] The network construction module generates the terminal state of the social network and first performs a propagation evolution simulation. The parameter definitions of the SEIR model and their practical significance are shown in Table 1:
[0063] Table 1
[0064] parameter Parameter Description Practical significance S(t) Susceptible people at time T Nodes that may be interested in a topic at time T E(t) Lurker at T moment Nodes that have been exposed to the topic but have not yet spread it at time T I(t) T-moment communicator The node that is currently spreading the topic at time T R(t) T-moment immune Nodes that are not interested in the topic at time T σ Factors affecting the transition from S to E Contact rate between susceptible persons β Factors affecting the transition from S to E The probability of susceptible people becoming latent people after exposure D Latent cycle The cycle of people learning about a topic and then spreading it α The transition probability from I to R The probability that the group loses interest in the topic γ The probability of R to S The probability that people will regain interest in the topic
[0065] Propagation evolution simulation process: According to the system dynamics, the following differential equations can be established:
[0066]
[0067] Among them, α is the probability of losing interest, the default value is 0.1; β is the conversion probability, the default value is 0.9; D is the latent period, the default value is 15; γ is the probability of picking up interest, the default value is 0.01; σ is the contact rate.
[0068] The above equation (1) indicates that at each time point, the reduction in the number of susceptibles is determined by the contact rate between nodes and the probability of susceptibles turning into latents, and is calculated based on the proportional relationship between susceptibles and latents; immune persons turn into susceptibles according to probability.
[0069] The above equation (2) indicates that at each time point, a latent person becomes a transmitter after a latent period; a susceptible person becomes a new latent person due to contact, and the conversion amount is determined by the contact rate and the probability of susceptible persons becoming latent persons, and is calculated based on the ratio of susceptible persons to latent persons.
[0070] The above equation (3) indicates that at each time point, a latent person becomes a transmitter after a latent period, and a transmitter becomes an immune person according to the conversion probability
[0071] The above equation (4) indicates that a transmitter becomes an immune person with a probability of one, and an immune person becomes a susceptible person with a probability of one.
[0072] Among them, σ represents the contact rate between nodes, which is expressed by the similarity between nodes, that is, calculating the Jaccard similarity of two nodes. The specific calculation method is as follows:
[0073] Assume that the sets of neighbor nodes of two nodes x and y are A and B respectively, then:
[0074]
[0075] Because the value of σ is different for different node pairs, the network structure is diverse and reflects the objective law of "birds of a feather flock together". This improvement to the SEIR model can effectively simulate the real social network structure.
[0076] 3. Reconstruction of social networks
[0077] like Figure 3 As shown in the figure, when the number of iterations reaches about 350, the proportion of nodes with propagation capabilities in the network is basically stable, so the number of iterations is set to 350, and the following information is recorded during the propagation process:
[0078] Table 2
[0079]
[0080] The communication power mentioned in Table 2 refers to the length of time that the node is in the communicator state during the process of spreading the topic initiated by the p node. The longer the time, the stronger the communication power of the current node to the p node.
[0081] After completing the simulation of all propagation behaviors and recording the information shown in Table 2, the social network is reconstructed. The reconstruction process is as follows: traverse the BA scale-free network, obtain the P1 set and P2 set of each node p, establish a unidirectional connection relationship when there is no unidirectional connection relationship between the node in P1 and p, and delete this connection relationship when there is a unidirectional connection relationship between the node in the P2 set and p from p2 to p. Finally, the terminal state of the social network is formed.
[0082] Social network verification:
[0083] The output module verifies that the social network reconstructed by the network construction module has the characteristics of a social network and outputs the generated network. Because the generated network is evolved from the BA scale-free network, it is assumed here that the characteristics of the social network are to retain the power law distribution characteristics. Studies have shown that the degree distribution d(x) of nodes in real-world social networks is proportional to the power function:
[0084] d(x)∝x -α
[0085] y=d(x)=x -α
[0086] Where d(x) represents the proportion of nodes with degree x in the network, and α represents the power exponent, which is the target of the calculation.
[0087] Taking the logarithm of both sides gives the following formula:
[0088] log(y)=-αlog(x)
[0089] like Figure 4As shown in the figure, the scattered degrees generated by taking the logarithm of both sides of the degree distribution can be fitted into a straight line, and the slope of this straight line is the power exponent. After calculation, the power exponent is about 2.65. Historical research shows that when the power exponent is greater than 2 and less than 3, it conforms to the power law distribution. Therefore, the network still meets the characteristics of a social network after reconstruction.
[0090] For a clear visualization effect, a directed social network with a total of 20 nodes is generated according to the above algorithm. The generated effect is as follows: Figure 5 As shown. The following characteristics can be observed from the figure:
[0091] (1) The relationship between nodes is directed;
[0092] (2) The number of fans (in-degree) of nodes is uneven, with a few nodes having a large number of fans;
[0093] (3) Nodes with similar numbers of followers are more likely to follow each other;
[0094] (4) The followers (out-degree) and fans (in-degree) of the same node are uneven. Some nodes are highly followed, while some nodes follow others a lot.
[0095] The above characteristics are consistent with people’s general understanding of social network relationships on new media platforms.
[0096] In summary, both numerical analysis and visual analysis can verify that the method of the present invention can generate a social network that meets the characteristics of new media platforms. The social network output by the network construction module is exported in the form of an adjacency list and can be reused on other platforms.
[0097] The present invention does not elaborate on some of the well-known technologies that belong to those skilled in the art.
[0098] Although the present invention has been disclosed as above by way of embodiments, it is not intended to limit the present invention. Appropriate modifications or equivalent substitutions of the technical solutions of the present invention made by ordinary technicians in the field should all be included in the protection scope of the present invention. The protection scope of the present invention shall be based on what is defined in the claims.
Claims
1. A social network modeling method based on SEIR model, characterized in that: The following steps are involved: (1) Set the assumptions of the social network and initialize a scale-free network with a BA structure as the initial social network; (2) Carry out propagation evolution simulation on the initialized social network, simulate the transition of nodes between different states based on the SEIR model, including susceptible, latent, propagator and immune, and record the interaction behavior between nodes; (3) After the propagation evolution simulation is completed, the social network is reconstructed based on the interaction behaviors between nodes to obtain the final social network structure.
2. The method according to claim 1, characterized in that The assumptions set in step (1) include: the total number of people participating in the spread in the social network, each node has an equal opportunity to publish a topic, latent persons automatically become infected persons after the latent period, and immune persons are converted to susceptible persons with a small probability.
3. The method according to claim 1 or 2, characterized in that In step (1), the networkx library is used to initialize a scale-free network with a BA structure. During the initialization process, two edges are connected each time a new node is added.
4. The method according to claim 1, characterized in that In step (2), the transition process of nodes between different states based on the SEIR model simulation is as follows: At each time point, the reduction in the number of susceptibles is determined by the inter-node contact rate and the probability of susceptibles turning into latents, and is calculated based on the proportional relationship between susceptibles and latents; immunes turn into susceptibles according to probability; At each time point, latent individuals become spreaders after a latent period; Susceptibles are transformed into new latents due to contact. The transformation amount is determined by the contact rate and the probability of susceptibles transforming into latents, and is calculated based on the ratio of susceptibles to latents. At each time point, latent persons become transmitters after the latent period, and transmitters become immune persons according to the conversion probability; At each time point, spreaders transform into immune persons according to the transformation probability, and immune persons transform into susceptible persons according to the transformation probability.
5. The method according to claim 4, characterized in that The contact rate is expressed by the Jaccard similarity between two nodes.
6. The method according to claim 1, characterized in that The steps of reconstructing the social network according to the interaction behaviors between nodes in step (3) include: Traverse each propagation node p in the initialized social network; For the nodes in the node set P1 with the strongest propagation power, if there is no one-way connection between these nodes and node p, a one-way connection relationship is established; For nodes in the node set P2 that are not of interest, if there is a unidirectional connection relationship between these nodes and the node p pointing to the node p, the connection relationship is deleted.
7. The method according to claim 1, characterized in that The power law distribution verification is performed on the social network structure reconstructed in step (3). The verification steps include: Calculate the degree of each node in the reconstructed social network, that is, the number of connections of each node; Count the degree distribution of all nodes and get the frequency of occurrence of each degree value; Perform logarithmic transformation on the degree distribution to obtain logarithmic data of degree value and frequency; The logarithmic data is linearly fitted and the slope of the fitted line is calculated as the power exponent to verify the power-law distribution characteristics of social networks.
8. A social network modeling system based on the SEIR model, implementing the method according to any one of claims 1 to 7, characterized in that: include: The initialization module is used to set the assumptions of the social network and initialize a scale-free network with a BA structure as the initial social network; The network construction module is used to perform propagation evolution simulation on the initialized social network. It simulates the transition of nodes between different states based on the SEIR model, including susceptible, latent, propagator and immune, and records the interaction between nodes. After the propagation evolution simulation is completed, the social network is reconstructed according to the interaction between nodes to obtain the final social network structure. The output module is used to verify the power-law distribution of the reconstructed social network structure and output the reconstructed social network structure.
Citation Information
Cited By
A method for modeling dynamic evolution of enterprise network embedded with information sharing mechanism
CN122741375A