A method and system for simulating crowd emotion propagation in a special scene based on Unity3D
By using Unity3D-based 3D modeling and heat transfer mechanisms, and dynamically linking individual emotional states with emotional transmission capabilities, this technology solves the problem of distorted simulation effects of emotional transmission in special scenarios such as warships, enabling early detection and accurate simulation of high-risk oversights.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN UNIV
- Filing Date
- 2023-05-22
- Publication Date
- 2026-06-26
AI Technical Summary
Existing models of crowd emotion transmission suffer from simulation distortion in special scenarios such as warships, failing to accurately reflect the continuity and bidirectional nature of emotion transmission, and are unable to perform spatial modeling and high-risk omission screening for specific environments.
Using 3D modeling technology based on the Unity3D platform and combining heat transfer mechanisms, this paper dynamically correlates individual emotional states with the ability to spread emotions, designs a simulation method for the spread of emotions in a crowd under special scenarios, simulates the process of emotion spread through algorithm deduction, and performs real-time visualization.
It improves the accuracy of emotion transmission simulation, enables spatial modeling of specific environments, assists in the early detection of high-risk oversights, and is suitable for simulating crowd emotions in special scenarios such as warships.
Smart Images

Figure CN116738688B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of crowd emotion propagation simulation in special scenarios, and in particular to a method and system for crowd emotion propagation simulation in special scenarios based on Unity3D. Background Technology
[0002] In real-world crowd movements, emotional contagion is a common phenomenon. Emotions are psychological activities arising from cognition and consciousness, influencing not only individual behavior but also the emotions of others, and consequently, their behavior. The identification and efficient analysis of group behavior patterns is at the forefront of information science research and represents a significant need for national social security and strategic development.
[0003] Major biosafety emergencies exert immense pressure and impact on human psychology and physiology. Such events are particularly prone to causing emotional fluctuations, inducing anxiety, depression, and other negative emotions. Furthermore, these negative emotions spread rapidly, potentially leading to loss of control over group behavior. On warships, soldiers frequently operate in high-pressure, highly stressful environments, spending extended periods in confined spaces performing complex tasks and facing various challenges and dangers. In this environment, the spread of emotions can be amplified, negatively impacting soldiers' physical and mental health, such as causing depression, anxiety, and stress. The spread of emotions can also lead to tension and disharmony among soldiers, affecting their cooperation and teamwork abilities. In severe cases, it can directly threaten national defense, economic, and social security.
[0004] However, existing research on the spread of emotions in crowds primarily relies on classic epidemiological models or emotion transmission models based on heat transfer mechanisms. While both models can reflect the patterns of emotion transmission within a group to some extent, they still have many shortcomings. Epidemiological-based emotion transmission models neglect the continuity and bidirectional nature of emotion transmission. Existing emotion transmission models based on heat transfer mechanisms, although considering the bidirectional and continuous nature of emotion transmission, do not account for the direct impact of an individual's current emotional state. Therefore, they are prone to distortion in simulation results and cannot accurately simulate reality. Furthermore, existing crowd emotion transmission simulations are usually only used for experimental comparisons in evacuation scenarios and cannot simulate the patterns of crowd emotion transmission in special scenarios such as warships. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention proposes a simulation method and system for the transmission of emotions among people in special scenarios based on Unity3D. It achieves modeling of the emotion transmission process of special individuals at the micro level and visualizes the phenomenon of emotion transmission among people in special scenarios at the macro level, which helps to identify high-risk vulnerabilities in advance.
[0006] To achieve the above objectives, the technical solution of the present invention is as follows:
[0007] The first aspect provides a simulation method for crowd emotion propagation in a special scenario based on Unity3D, including:
[0008] S1: Based on real-world scene data, construct a 3D special scene model using the Unity3D platform;
[0009] S2: Build individual models on the Unity3D platform and set up individual pathfinding control scripts;
[0010] S3: Design simulation configuration scheme;
[0011] S4: Design a heat transfer mechanism-based model for the transmission of emotions among people in a three-dimensional special scene model, including setting the emotional state and emotional transmission ability of individuals, calculating the channel strength value for emotional transmission between individuals, calculating the overall transmission strength of emotions received by individual R from other members in the group, and performing emotional transmission calculations.
[0012] S5: A model based on the heat transfer mechanism for the propagation of emotions among people and a designed simulation configuration scheme. Iteratively updates the position and emotional state of individuals during the simulation process and provides a real-time and intuitive reflection of the group's emotional state in special scenarios.
[0013] In one implementation, step S1 includes:
[0014] S1.1: Model the three main active deck structure of an aircraft carrier and draw a scaled map based on the Unity3D platform as the simulation scene map.
[0015] S1.2: Set the positions of the light sources and cameras in the scene model, and draw and render the scene to build a three-dimensional special scene model.
[0016] In one implementation, step S2 includes:
[0017] S2.1: Create an individual model preset and instantiate the individual model;
[0018] S2.2: Add the NavMeshAgent automatic pathfinding component to the individual model and add a pathfinding control script. When an event occurs, obtain the individual model's own position and the target point position to realize automatic pathfinding and obstacle avoidance as the individual moves towards the target.
[0019] In one implementation, step S3 includes:
[0020] The simulation configuration can be designed by calling the exercise plan management module, the personnel addition module, and the emotion propagation setting module; or by calling the data management module, importing the pre-set exercise plan and population plan, and then calling the emotion propagation setting module to design the corresponding simulation configuration.
[0021] In one embodiment, the method further includes:
[0022] Configure the simulated crowd by calling the Add Personnel module to create a simulated crowd, setting the birth point, movement plan, and emotional values, emotional reception ability, and emotional expression ability of each individual; or by calling the Data Management module to import a pre-set crowd plan stored in a file to complete the simulated crowd configuration.
[0023] Call the emotion propagation settings module to set the perceptual radius distance where emotion propagation can occur macroscopically, the macroscopic channel strength of emotion propagation in the crowd, and the time interval between each occurrence of emotion propagation in the crowd.
[0024] In one implementation, step S4 includes:
[0025] S4.1: Set the individual's emotional state, defining the individual's emotional value q, which represents the intensity of the individual's emotion, as a continuous value between 0 and 1. Based on the emotional value, the individual is divided into four states:
[0026]
[0027] S4.2: Set the individual's emotional transmission ability, including the individual's emotional expression ability and emotional acceptance ability, and modify the individual's current emotional transmission ability in combination with the individual's current emotional state;
[0028] The more pronounced an individual's negative emotions, the stronger their expressive abilities, thus enhancing their emotional expression capabilities. Defined as:
[0029]
[0030]
[0031] in The ability of an individual to express emotions, influenced by their personality traits. This is a correction value for an individual's emotional expression ability influenced by their current emotional state.
[0032] An individual's emotional receptiveness Defined as:
[0033]
[0034]
[0035] in The ability of an individual to accept emotions influenced by their personality traits. This is a correction value for an individual's emotional acceptance ability affected by their current emotional state. When an individual is in a state of panic, their rationality and judgment drop sharply, and their emotional acceptance ability is significantly weakened.
[0036] S4.3: Calculate the channel strength value for emotion transmission between individuals. During emotion transmission, when the emotion sender S expresses emotion to the emotion receiver R, Let S be the channel strength value between the emotion sender S and the emotion receiver R. This value is related to the distance between the sender and receiver. This represents the physical distance between the emotion sender S and the emotion receiver R. The channel strength of emotion propagation is represented by the radius of the perceptual domain in which emotion can propagate. Defined as:
[0037]
[0038] S4.4: If within the physical radius of individual R If there are multiple individuals capable of expressing emotions, then these individuals can transmit emotions to individual R. These individuals, along with individual R, are denoted as group G. The overall intensity of emotion transmission received by individual R from other members within the group is calculated. :
[0039]
[0040] in This represents the intensity of the emotion transmitted from the sender S to the receiver R:
[0041]
[0042] S4.5: In a group G, for any ,calculate:
[0043]
[0044]
[0045] in This represents the weighted average of the intensity of the emotion transmitted from sender S to individual R. This represents the emotion value from sender S. This represents the weighted sentiment value from other individuals in group G;
[0046] S4.6: For each individual R in group G, This represents the emotional value of individual R at this moment, calculated using the differential equation of emotional propagation, combined with the weighted emotional values from other individuals in group G obtained above. and the overall intensity of emotion transmission from other members in group G. Perform emotion propagation calculations:
[0047] 。
[0048] In one implementation, step S5 includes:
[0049] S5.1: Call the simulation control module, click the start button to start the simulation of the spread of emotions among people in a special scenario;
[0050] S5.2: Obtain crowd information from the emotion propagation simulation, and execute the corresponding crowd emotion propagation process according to the pre-set time interval parameter T for each occurrence of crowd emotion propagation, specifically including:
[0051] S5.2.1: Iterate through each individual R, based on the perceptual radius distance parameter of emotion propagation. Find the set of neighboring individuals S and the group G consisting of R that satisfy the following conditions:
[0052]
[0053] in Let R be the position coordinates of individual R in the simulation system. Let S be the position coordinates of individual S in the simulation system;
[0054] S5.2.2: Based on the heat transfer mechanism-based model of crowd emotion transmission in the three-dimensional special scene model in step S4, assign an emotion value to individual R. renew;
[0055] S5.2.3: Temporarily store the updated sentiment value in an array;
[0056] S5.2.4: After all individuals have undergone emotion propagation calculations, the emotion values are updated based on the temporary emotion value array. Simultaneously, individual abilities are adjusted according to their emotional states, updating their real-time emotion expression and acceptance abilities. Then, the average emotion intensity of the group is calculated. :
[0057]
[0058] in This refers to the set of all individuals in this specific scenario. For set The number of individuals within, Let R be the emotion value of individual R at the next time step t+1;
[0059] S5.3: Transmit the calculation results of crowd emotion propagation to the simulation statistics module to update the crowd emotion status and display the current crowd emotion status.
[0060] S5.4: Update the location of each individual;
[0061] S5.5: Iteratively execute steps S5.2 to S5.4 to achieve a visual simulation of the spread of emotions among people in a special scenario.
[0062] Based on the same inventive concept, a second aspect of the present invention provides a simulation system for the transmission of crowd emotions in a special scene based on Unity3D, comprising:
[0063] 3D special scene model, used to build 3D special scene models based on real-world scene data and the Unity3D platform;
[0064] The Individual Model Building Module is used to build individual models on the Unity3D platform and set up individual pathfinding control scripts.
[0065] The simulation configuration scheme design module is used to design simulation configuration schemes;
[0066] The model building module based on the heat transfer mechanism is used to design a model based on the heat transfer mechanism for the transmission of emotions among people in a 3D special scene model. This includes setting the emotional state and emotional transmission ability of individuals, calculating the channel strength value for emotional transmission between individuals, calculating the overall transmission strength of emotions received by individual R from other members in the group, and performing emotional transmission calculations.
[0067] The simulation module is used for models based on heat transfer mechanisms for the spread of emotions among people, as well as the designed simulation configuration schemes. It iteratively updates the position and emotional state of individuals during the simulation process and provides real-time and intuitive reflection of the emotional state of groups in special scenarios.
[0068] Based on the same inventive concept, a third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the method described in the first aspect.
[0069] Based on the same inventive concept, a fourth aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect.
[0070] Compared with the prior art, the advantages and beneficial technical effects of the present invention are as follows:
[0071] 1. The method disclosed in this invention provides a simulation method for the transmission of emotions among people in special scenarios based on an improved heat transfer mechanism. It dynamically correlates an individual's ability to express and receive emotions during the process of transmitting emotions with others with the individual's current emotional state, highlighting the differences in the ability of individuals under the influence of emotions in different emotional states, and improving the accuracy of the simulation of the transmission process.
[0072] 2. The system disclosed in this invention performs spatial modeling of a specific environment, and can configure specific personnel and movement plans according to actual special scenarios. It can simulate the spread of emotions and infections among special personnel through algorithmic deduction, which helps to assist in the early detection of high-risk oversights. Attached Figure Description
[0073] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0074] Figure 1 This is a flowchart illustrating a simulation method for the propagation of crowd emotions in a special scene based on Unity3D, as disclosed in an embodiment of the present invention.
[0075] Figure 2 This is a system architecture diagram of a crowd emotion propagation simulation system based on Unity3D in a special scene, as disclosed in an embodiment of the present invention.
[0076] Figure 3 This is a diagram of the main interface of a simulation system for the transmission of emotions in a crowd under special scenarios based on Unity3D, as described in an embodiment of the present invention. Detailed Implementation
[0077] Through extensive research and practice, the inventors of this application have discovered that existing studies on the transmission of emotions in populations primarily rely on classic epidemiological models or emotion transmission models based on heat transfer mechanisms. While both models can reflect the patterns of emotion transmission within a group to some extent, they still have many shortcomings. In epidemiological-based emotion transmission models, an individual's emotional state only influences the emotional state of others when that individual has a clear emotional expression; a lower emotional state does not affect the emotions of others. This type of model often only considers the contagious effect of negative emotions on individuals with normal emotions, neglecting the calming effect of normal emotions on individuals with negative emotions, and ignoring the continuity and bidirectional nature of emotion transmission. Existing models of emotion transmission based on heat transfer mechanisms, while considering the bidirectional and continuous nature of emotion transmission and viewing it as a continuous emotional exchange between two people, acknowledging that even minor emotions can spread, treat an individual's emotional receptiveness and expression abilities as fixed values solely related to their personality traits. However, according to fundamental theories of emotion transmission, an individual's emotional receptiveness and expression abilities during the transmission process are not only determined by their personality traits but also directly influenced by their current emotional state. Failure to incorporate these factors into simulation systems when studying group emotion transmission leads to distorted simulation results and an inability to accurately reflect reality. Furthermore, existing simulations of crowd emotion transmission are typically limited to comparative experiments in evacuation scenarios and cannot simulate the patterns of crowd emotion transmission in specific environments such as warships.
[0078] Therefore, this invention proposes an improved crowd emotion transmission model based on heat transfer mechanism in special scenarios. According to the basic theory of emotion transmission, the ability of an individual to transmit emotions to others is dynamically correlated with the individual's current emotional state. It focuses on the differences in the ability performance of individuals under different emotional states. At the same time, for special scenarios such as warships where terrain is limited and personnel activity rules are highly restricted, a simulation method and system for crowd emotion transmission in special scenarios based on Unity3D is designed. The specific environment is spatially modeled, and the simulation of the emotion transmission mechanism of special personnel is carried out through algorithm deduction, which helps to realize the early detection of high-risk oversights.
[0079] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0080] Example 1
[0081] This embodiment provides a method for simulating the propagation of emotions among crowds in a special scenario based on Unity3D. Please refer to [link / reference]. Figure 1 The method includes:
[0082] S1: Based on real-world scene data, construct a 3D special scene model using the Unity3D platform;
[0083] S2: Build individual models on the Unity3D platform and set up individual pathfinding control scripts;
[0084] S3: Design simulation configuration scheme;
[0085] S4: Design a heat transfer mechanism-based model for the transmission of emotions among people in a three-dimensional special scene model, including setting the emotional state and emotional transmission ability of individuals, calculating the channel strength value for emotional transmission between individuals, calculating the overall transmission strength of emotions received by individual R from other members in the group, and performing emotional transmission calculations.
[0086] S5: A model based on the heat transfer mechanism for the propagation of emotions among people and a designed simulation configuration scheme. Iteratively updates the position and emotional state of individuals during the simulation process and provides a real-time and intuitive reflection of the group's emotional state in special scenarios.
[0087] Specifically, building a 3D special scene model based on the Unity3D platform is intended to provide physical space support for subsequent human movement. By designing a heat transfer mechanism-based model of crowd emotion transmission, this study investigates the intrinsic laws governing the influence of individual differences and the individual's current emotional state on the transmission of emotions in special scenes.
[0088] In one implementation, step S1 includes:
[0089] S1.1: Model the three main active deck structure of an aircraft carrier and draw a scaled map based on the Unity3D platform as the simulation scene map.
[0090] S1.2: Set the positions of the light sources and cameras in the scene model, and draw and render the scene to build a three-dimensional special scene model.
[0091] Specifically, based on real-world scenario data, a model was created that replicates the three main operational decks of the HMS Queen Elizabeth aircraft carrier, excluding the decks that primarily support normal carrier operations and are largely unoccupied. A scaled-down map was then created using the Unity3D platform to serve as the simulation scene map. The positions of light sources and cameras were then set within the scene model for rendering and drawing.
[0092] In one implementation, step S2 includes:
[0093] S2.1: Create an individual model preset and instantiate the individual model;
[0094] S2.2: Add the NavMeshAgent automatic pathfinding component to the individual model and add a pathfinding control script. When an event occurs, obtain the individual model's own position and the target point position to realize automatic pathfinding and obstacle avoidance as the individual moves towards the target.
[0095] In the specific implementation process, when instantiating the individual model, rigid bodies of different colors, Spheres, are used to represent individuals with different emotional states, such as green for individuals in a normal state, yellow for individuals in a worried state, orange for individuals in an anxious state, and red for individuals in a panic state.
[0096] In one implementation, step S3 includes:
[0097] The simulation configuration can be designed by calling the exercise plan management module, the personnel addition module, and the emotion propagation setting module; or by calling the data management module, importing the pre-set exercise plan and population plan, and then calling the emotion propagation setting module to design the corresponding simulation configuration.
[0098] Specifically, in one implementation method, the motion plan management module can be called to create corresponding and reasonable motion plans based on the different identities and responsibilities of people in the group, and control individual movements to design a simulation configuration plan; in another implementation method, the data management module can be called to import the motion plans stored in the pre-set .json file to complete the simulation motion plan configuration.
[0099] In one embodiment, the method further includes:
[0100] Configure the simulated crowd by calling the Add Personnel module to create a simulated crowd, setting the birth point, movement plan, and emotional values, emotional reception ability, and emotional expression ability of each individual; or by calling the Data Management module to import a pre-set crowd plan stored in a file to complete the simulated crowd configuration.
[0101] Call the emotion propagation settings module to set the perceptual radius distance where emotion propagation can occur macroscopically, the macroscopic channel strength of emotion propagation in the crowd, and the time interval between each occurrence of emotion propagation in the crowd.
[0102] Specifically, simulated crowds can be created by calling the Add Personnel module or by importing pre-set files using the Data Management module.
[0103] In one implementation, step S4 includes:
[0104] S4.1: Set the individual's emotional state, defining the individual's emotional value q, which represents the intensity of the individual's emotion, as a continuous value between 0 and 1. Based on the emotional value, the individual is divided into four states:
[0105]
[0106] S4.2: Set the individual's emotional transmission ability, including the individual's emotional expression ability and emotional acceptance ability, and modify the individual's current emotional transmission ability in combination with the individual's current emotional state;
[0107] The more pronounced an individual's negative emotions, the stronger their expressive abilities, thus enhancing their emotional expression capabilities. Defined as:
[0108]
[0109]
[0110] in The ability of an individual to express emotions, influenced by their personality traits. This is a correction value for an individual's emotional expression ability influenced by their current emotional state.
[0111] An individual's emotional receptiveness Defined as:
[0112]
[0113]
[0114] in The ability of an individual to accept emotions influenced by their personality traits. This is a correction value for an individual's emotional acceptance ability affected by their current emotional state. When an individual is in a state of panic, their rationality and judgment drop sharply, and their emotional acceptance ability is significantly weakened.
[0115] S4.3: Calculate the channel strength value for emotion transmission between individuals. During emotion transmission, when the emotion sender S expresses emotion to the emotion receiver R, Let S be the channel strength value between the emotion sender S and the emotion receiver R. This value is related to the distance between the sender and receiver. This represents the physical distance between the emotion sender S and the emotion receiver R. The channel strength of emotion propagation is represented by the radius of the perceptual domain in which emotion can propagate. Defined as:
[0116]
[0117] S4.4: If within the physical radius of individual R If there are multiple individuals capable of expressing emotions, then these individuals can transmit emotions to individual R. These individuals, along with individual R, are denoted as group G. The overall intensity of emotion transmission received by individual R from other members within the group is calculated. :
[0118]
[0119] in This represents the intensity of the emotion transmitted from the sender S to the receiver R:
[0120]
[0121] S4.5: In a group G, for any ,calculate:
[0122]
[0123]
[0124] in This represents the weighted average of the intensity of the emotion transmitted from sender S to individual R. This represents the sentiment value from sender S. This represents the weighted sentiment value from other individuals in group G;
[0125] S4.6: For each individual R in group G, This represents the emotional value of individual R at this moment, calculated using the differential equation of emotional propagation, combined with the weighted emotional values from other individuals in group G obtained above. and the overall intensity of emotion transmission from other members in group G. Perform emotion propagation calculations:
[0126] 。
[0127] In actual calculations, considering the efficiency of the solution, the differential equation is discretized. Instead of solving the differential equation, the solution is transformed into the form of the previous moment's emotion value plus the change at this moment:
[0128]
[0129] In one implementation, step S5 includes:
[0130] S5.1: Call the simulation control module, click the start button to start the simulation of the spread of emotions among people in a special scenario;
[0131] S5.2: Obtain crowd information from the emotion propagation simulation, and execute the corresponding crowd emotion propagation process according to the pre-set time interval parameter T for each occurrence of crowd emotion propagation, specifically including:
[0132] S5.2.1: Iterate through each individual R, based on the perceptual radius distance parameter of emotion propagation. Find the set of neighboring individuals S and the group G consisting of R that satisfy the following conditions:
[0133]
[0134] in Let R be the position coordinates of individual R in the simulation system. Let S be the position coordinates of individual S in the simulation system;
[0135] S5.2.2: Based on the heat transfer mechanism-based model of crowd emotion transmission in the three-dimensional special scene model in step S4, assign an emotion value to individual R. renew;
[0136] S5.2.3: The updated sentiment value is temporarily stored in an array to avoid affecting the subsequent sentiment value update process of other individuals;
[0137] S5.2.4: After all individuals have undergone emotion propagation calculations, the emotion values are updated based on the temporary emotion value array. Simultaneously, individual abilities are adjusted according to their emotional states, updating their real-time emotion expression and acceptance abilities. Then, the average emotion intensity of the group is calculated. :
[0138]
[0139] in This refers to the set of all individuals in this specific scenario. For set The number of individuals within, Let R be the emotion value of individual R at the next time step t+1;
[0140] S5.3: Transmit the calculation results of crowd emotion propagation to the simulation statistics module to update the crowd emotion status and display the current crowd emotion status.
[0141] S5.4: Update the location of each individual;
[0142] S5.5: Iteratively execute steps S5.2 to S5.4 to achieve a visual simulation of the spread of emotions among people in a special scenario.
[0143] In step S5.3, the current emotional state of the crowd can be displayed in the form of specific numbers or statistical charts.
[0144] In step S5.4, the motion control of each individual is implemented based on the AI engine and physics engine built into Unity3D. The FixedUpdate() function in the C# script bound to each individual is used for updating. If the current simulation system time t is greater than the start time of the next time item in the current motion plan, the SetDestination() function in the NavMeshAgent component is used to set the target point agent.destination of the individual's current motion to a random position in the destination space of the next time item, guiding the individual to move towards the target point.
[0145] Example 2
[0146] Based on the same inventive concept, this invention discloses a simulation system for the transmission of crowd emotions in a special scene based on Unity3D, comprising:
[0147] 3D special scene model, used to build 3D special scene models based on real-world scene data and the Unity3D platform;
[0148] The Individual Model Building Module is used to build individual models on the Unity3D platform and set up individual pathfinding control scripts.
[0149] The simulation configuration scheme design module is used to design simulation configuration schemes;
[0150] The model building module based on the heat transfer mechanism is used to design a model based on the heat transfer mechanism for the transmission of emotions among people in a 3D special scene model. This includes setting the emotional state and emotional transmission ability of individuals, calculating the channel strength value for emotional transmission between individuals, calculating the overall transmission strength of emotions received by individual R from other members in the group, and performing emotional transmission calculations.
[0151] The simulation module is used for models based on heat transfer mechanisms for the spread of emotions among people, as well as the designed simulation configuration schemes. It iteratively updates the position and emotional state of individuals during the simulation process and provides real-time and intuitive reflection of the emotional state of groups in special scenarios.
[0152] In one implementation, the simulation configuration scheme design module specifically includes:
[0153] The motion plan management module is used to create and manage the motion plans of crowds during the simulation. Because the movement of people in strictly closed management places such as military bases often exhibits strong regularity, the simulation system provided in this paper supports the subdivision of crowd motion plans down to the hour. It can create corresponding and reasonable motion plans for individuals in the crowd based on their different identities and responsibilities.
[0154] The Add Personnel module is used to create groups of people with specified exercise plans, birthplaces, and initial emotional information.
[0155] The macro-setting module for emotion propagation is used to macro-regulate the perceptual domain distance at which emotion propagation can occur, control the macro-channel strength of emotion propagation to control the speed of emotion propagation in the crowd, and control the time interval between each occurrence of emotion propagation in the crowd.
[0156] The personnel management module is used to view the changes in the emotional values of a specified individual during the simulation. It also supports the modification of emotional transmission parameters such as emotional value, emotional expression ability, and emotional acceptance ability, as well as the selection of movement schemes for a specified individual during the simulation.
[0157] The data management module is used to import and export personnel and motion plans in the form of JSON files during the simulation process, and supports the saving and reuse of simulation plans.
[0158] The simulation module specifically includes:
[0159] The simulation control module is used to control the start, pause, and resume of the simulation, and also supports real-time adjustment of the simulation speed.
[0160] The simulation visualization module presents the evolutionary trends of crowd movement and emotional transmission during the simulation process in an intuitive way.
[0161] The simulation statistics module displays the current emotional state of the crowd using specific numbers and statistical charts, making it easier to understand the group's emotional state.
[0162] This invention provides a simulation system for the propagation of crowd emotions in a special scene based on Unity3D, such as... Figure 2 The image shows a simulation system based on a Windows operating environment. The UI and scene transitions are primarily implemented using Panel components. The `SetActive()` function in Unity3D, which controls the activation and deactivation of game objects, is used to control the display and hiding of each Panel, thus avoiding the use of Scene transitions. Specifically, after all operations on the current Panel are completed, it is deactivated and its interface is hidden, while the associated next Panel is displayed to achieve a similar effect. This method not only reduces the parameters for scene loading and transitions but also significantly improves the system's smoothness.
[0163] Figure 3 This diagram shows the main interface of a Unity3D-based simulation system for simulating the spread of emotions in a specific scene. To display images related to different deck levels on the main interface, the system uses a secondary camera to monitor the activity space within the scene and projects these images as textures onto the Unity graphical user interface (UGUI) for real-time display of the simulation process. Furthermore, considering the three-deck structure, the system provides corresponding scene switching buttons. Users can freely click the corresponding button components to switch camera positions and view different deck levels, facilitating observation of the emotional state of people on different deck levels and a better understanding of the evolution of the simulation process.
[0164] The functional modules employ modular programming. The main system functional modules include a motion plan management module, a personnel addition module, an emotion propagation macro-setting module, a personnel management module, a data management module, a simulation control module, a simulation visualization module, and a simulation statistics module. The functions of each module are described below:
[0165] The motion plan management module is used to create and manage the motion plans of crowds during the simulation process. Since the movement of people in strictly closed management places such as military bases often exhibits strong regularity, the simulation system provided by this invention supports the subdivision of crowd motion plans down to the hour. It can create corresponding and reasonable motion plans for individuals in the crowd based on their different identities and responsibilities.
[0166] The Add Personnel module is used to create groups of people with specified exercise plans, birthplaces, and initial emotional information.
[0167] The macro-level settings module for emotion propagation is used to macroscopically regulate the perceptual range at which emotion propagation can occur, control the macro-level channel strength of emotion propagation to regulate the speed of emotion propagation within a crowd, and control the time interval between each occurrence of emotion propagation. This module provides users with the possibility of customizing macro-level factors related to emotion propagation. Users can increase the perceptual range radius to expand the impact of emotion propagation and accelerate its spread within a crowd by increasing the macro-level channel strength value. This functionality is primarily implemented using the InputField component in Unity3D, which provides input fields for users to enter their own content.
[0168] The personnel management module is used to view the changes in the emotional values of a specified individual during the simulation. It also supports the modification of emotional transmission parameters such as emotional value, emotional expression ability, and emotional acceptance ability, as well as the selection of movement schemes for a specified individual during the simulation.
[0169] The data management module is used to import and export personnel and motion plans in JSON file format during the simulation process, supporting the saving and reuse of simulation plans. The system uses JSON files for data management, implemented using the LitJson library within the Unity system. LitJson is a C#.NET library used for handling JSON string conversions. LitJson includes the JsonMapper class, which provides two methods, JsonMapper.ToObject() and JsonMapper.ToJson(), to achieve JSON-to-object and object-to-JSON conversions. The system primarily uses these two methods to serialize and deserialize the crowd and motion plans.
[0170] The simulation control module controls the start, pause, and resume of the simulation, and supports real-time adjustment of the simulation speed. Starting the simulation is controlled by modifying a boolean variable. Initially, the boolean value is false; when the Button component is clicked to start the simulation, the boolean variable is changed to true, and the simulation begins. Resuming and pausing the simulation are controlled by modifying the value of `Time.timeScale`. `Time.timeScale` affects the scaling ratio of Unity's game time; its range is a floating-point number between 0 and 100. Modifying `timeScale` affects the execution speed of `FixedUpdate`. When `Time.timeScale` = 0, the simulation pauses; when `Time.timeScale` = 1, the simulation resumes. When the Slider component is used to zoom in or out on `Time.timeScale`, the simulation speed increases or decreases accordingly.
[0171] The simulation visualization module presents the evolutionary trends of crowd movement and emotional transmission during the simulation process in an intuitive way.
[0172] The simulation statistics module displays the current emotional state of the crowd using concrete numbers and statistical charts, facilitating a better understanding of the group's emotional state. The data statistics module primarily includes real-time updates of the number of people in different situations, and the use of the XCharts plugin to display the changes in the average emotional value of the current group as a curve chart, making the data on the spread and evolution of group emotions clearer and more intuitive.
[0173] Since the system described in Embodiment 2 of this invention is the system used to implement the simulation method for crowd emotion propagation in a special scenario based on Unity3D in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this system based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All systems used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.
[0174] Example 3
[0175] Based on the same inventive concept, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the method described in Embodiment 1.
[0176] Since the computer-readable storage medium described in Embodiment 3 of this invention is the same computer-readable storage medium used in implementing the simulation method for crowd emotion propagation in a special scenario based on Unity3D in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this computer-readable storage medium based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All computer-readable storage media used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.
[0177] Example 4
[0178] Based on the same inventive concept, this application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method in Embodiment 1.
[0179] Since the computer device described in Embodiment 4 of this invention is the same computer device used to implement the simulation method for crowd emotion propagation in a special scenario based on Unity3D in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this computer device based on the method described in Embodiment 1 of this invention, and therefore will not be described again here. All computer devices used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.
[0180] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied 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.
[0181] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0182] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various modifications and variations to the embodiments of the invention without departing from the spirit and scope of the invention. Thus, if these modifications and variations of the embodiments of the invention fall within the scope of the claims of the invention and their equivalents, the invention also intends to include these modifications and variations.
Claims
1. A simulation method for the propagation of crowd emotions in a special scene based on Unity3D, characterized in that, include: S1: Based on real-world scene data, construct a 3D special scene model using the Unity3D platform; S2: Build individual models on the Unity3D platform and set up individual pathfinding control scripts; S3: Design simulation configuration scheme; S4: Design a heat transfer mechanism-based model for the transmission of emotions among people in a three-dimensional special scene model, including setting the emotional state and emotional transmission ability of individuals, calculating the channel strength value for emotional transmission between individuals, calculating the overall transmission strength of emotions received by individual R from other members in the group, and performing emotional transmission calculations. S5: A model based on the heat transfer mechanism for the spread of emotions among people and a simulation configuration scheme designed to iteratively update the position and emotional state of individuals during the simulation process, and to provide real-time and intuitive reflection of the emotional state of the group in special scenarios. Step S4 includes: S4.1: Set the individual's emotional state, defining the individual's emotional value q, which represents the intensity of the individual's emotion, as a continuous value between 0 and 1. Based on the emotional value, the individual is divided into four states: S4.2: Set the individual's emotional transmission ability, including the individual's emotional expression ability and emotional acceptance ability, and modify the individual's current emotional transmission ability in combination with the individual's current emotional state; The more pronounced an individual's negative emotions, the stronger their expressive abilities, thus enhancing their emotional expression capabilities. Defined as: in The ability of an individual to express emotions, influenced by their personality traits. This is a correction value for an individual's emotional expression ability influenced by their current emotional state. An individual's emotional receptiveness Defined as: in The ability of an individual to accept emotions influenced by their personality traits. This is a correction value for an individual's emotional acceptance ability affected by their current emotional state. When an individual is in a state of panic, their rationality and judgment drop sharply, and their emotional acceptance ability is significantly weakened. S4.3: Calculate the channel strength value for emotion transmission between individuals. During emotion transmission, when the emotion sender S expresses emotion to the emotion receiver R, Let S be the channel strength value between the emotion sender S and the emotion receiver R. This value is related to the distance between the sender and receiver. This represents the physical distance between the emotion sender S and the emotion receiver R. The channel strength of emotion propagation is represented by the radius of the perceptual domain in which emotion can propagate. Defined as: S4.4: If within the physical radius of individual R If there are multiple individuals capable of expressing emotions, then these individuals can transmit emotions to individual R. These individuals, along with individual R, are denoted as group G. The overall intensity of emotion transmission received by individual R from other members within the group is calculated. : in This represents the intensity of the emotion transmitted from the sender S to the receiver R: S4.5: In a group G, for any ,calculate: in This represents the weighted average of the intensity of the emotion transmitted from sender S to individual R. This represents the sentiment value from sender S. This represents the weighted sentiment value from other individuals in group G; S4.6: For each individual R in group G, This represents the emotional value of individual R at this moment, calculated using the differential equation of emotional propagation, combined with the weighted emotional values from other individuals in group G obtained above. and the overall intensity of emotion transmission from other members in group G. Perform emotion propagation calculations: 。 2. The simulation method for crowd emotion propagation in special scenarios based on Unity3D as described in claim 1, characterized in that, Step S1 includes: S1.1: Model the three main active deck structure of an aircraft carrier and draw a scaled map based on the Unity3D platform as the simulation scene map. S1.2: Set the positions of the light sources and cameras in the scene model, and draw and render the scene to build a three-dimensional special scene model.
3. The simulation method for crowd emotion propagation in special scenarios based on Unity3D as described in claim 1, characterized in that, Step S2 includes: S2.1: Create an individual model preset and instantiate the individual model; S2.2: Add the NavMeshAgent automatic pathfinding component to the individual model and add a pathfinding control script. When an event occurs, obtain the individual model's own position and the target point position to realize automatic pathfinding and obstacle avoidance as the individual moves towards the target.
4. The simulation method for crowd emotion propagation in special scenarios based on Unity3D as described in claim 1, characterized in that, Step S3 includes: The simulation configuration can be designed by calling the exercise plan management module, the personnel addition module, and the emotion propagation setting module; or by calling the data management module, importing the pre-set exercise plan and population plan, and then calling the emotion propagation setting module to design the corresponding simulation configuration.
5. The simulation method for crowd emotion propagation in special scenarios based on Unity3D as described in claim 4, characterized in that, The method further includes: Configure the simulated crowd by calling the Add Personnel module to create a simulated crowd, setting the birth point, movement plan, and emotional values, emotional reception ability, and emotional expression ability of each individual; or by calling the Data Management module to import a pre-set crowd plan stored in a file to complete the simulated crowd configuration. Call the emotion propagation settings module to set the perceptual radius distance where emotion propagation can occur macroscopically, the macroscopic channel strength of emotion propagation in the crowd, and the time interval between each occurrence of emotion propagation in the crowd.
6. The simulation method for crowd emotion propagation in special scenarios based on Unity3D as described in claim 1, characterized in that, Step S5 includes: S5.1: Call the simulation control module, click the start button to start the simulation of the spread of emotions among people in a special scenario; S5.2: Obtain crowd information from the emotion propagation simulation, and execute the corresponding crowd emotion propagation process according to the pre-set time interval parameter T for each occurrence of crowd emotion propagation, specifically including: S5.2.1: Iterate through each individual R, based on the perceptual radius distance parameter of emotion propagation. Find the set of neighboring individuals S and the group G consisting of R that satisfy the following conditions: in Let R be the position coordinates of individual R in the simulation system. Let S be the position coordinates of individual S in the simulation system; S5.2.2: Based on the heat transfer mechanism-based model of crowd emotion transmission in the three-dimensional special scene model in step S4, assign an emotion value to individual R. renew; S5.2.3: Temporarily store the updated sentiment value in an array; S5.2.4: After all individuals have undergone emotion propagation calculations, the emotion values are updated based on the temporary emotion value array. Simultaneously, individual abilities are adjusted according to their emotional states, updating their real-time emotion expression and acceptance abilities. Then, the average emotion intensity of the group is calculated. : in This refers to the set of all individuals in this specific scenario. For set The number of individuals within, Let R be the emotion value of individual R at the next time step t+1; S5.3: Transmit the calculation results of crowd emotion propagation to the simulation statistics module to update the crowd emotion status and display the current crowd emotion status. S5.4: Update the location of each individual; S5.5: Iteratively execute steps S5.2 to S5.4 to achieve a visual simulation of the spread of emotions among people in a special scenario.
7. A simulation system for the transmission of emotions among people in a special scene based on Unity3D, characterized in that, Based on the method described in claim 1, it includes: 3D special scene model, used to build 3D special scene models based on real-world scene data and the Unity3D platform; The Individual Model Building Module is used to build individual models on the Unity3D platform and set up individual pathfinding control scripts. The simulation configuration scheme design module is used to design simulation configuration schemes; The model building module based on the heat transfer mechanism is used to design a model based on the heat transfer mechanism for the transmission of emotions among people in a 3D special scene model. This includes setting the emotional state and emotional transmission ability of individuals, calculating the channel strength value for emotional transmission between individuals, calculating the overall transmission strength of emotions received by individual R from other members in the group, and performing emotional transmission calculations. The simulation module is used for models based on heat transfer mechanisms for the spread of emotions among people, as well as the designed simulation configuration schemes. It iteratively updates the position and emotional state of individuals during the simulation process and provides real-time and intuitive reflection of the emotional state of groups in special scenarios.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed, it implements the method as described in any one of claims 1 to 6.
9. A computer 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, it implements the method as described in any one of claims 1 to 6.