Emotion completion method and system based on surrounding environment and context awareness, storage medium and terminal
By employing an emotion completion method based on the surrounding environment and context awareness, and utilizing BERT and Bi-DLSTM neural networks to extract user features and simulate emotional interactions, this approach solves the problem of inaccurate emotion recognition in existing technologies, achieving more accurate emotion completion and personalized services.
Patent Information
- Application Number
- CN202411031620.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-12
AI Technical Summary
Existing emotion recognition models neglect the important role of environment and context in emotion expression, resulting in inaccurate emotion recognition, especially in the case of long conversations where they cannot accurately predict the user's emotional state, and they lack fine-grained emotion completion methods.
An emotion completion method based on surrounding environment and context awareness is adopted. BERT word embedding and Bi-DLSTM neural network are used to extract global and local features of the target user and neighboring users. IDS_EC is used to simulate emotional interaction, and the Softmax function is used for emotion classification to complete the missing emotions of the target user at key historical moments.
It enables more accurate identification of users' emotional states, provides personalized services, enhances user understanding and behavior prediction, optimizes user experience, and assists in decision-making.
Smart Images

Figure CN118940001A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of emotion recognition, and in particular to an emotion completion method, system, storage medium and terminal based on surrounding environment and context perception. Background Art
[0002] Currently, the deep integration of artificial intelligence (AI) technology has become a key path to promoting high-quality development of my country's media. The internet, a globally interconnected network system built on computing and communications technologies, facilitates the global exchange and sharing of information resources and has become a key driving force for economic and social change and innovation. As the world's largest internet market and the largest number of users, China's internet development has had a profound and far-reaching impact and significance both domestically and internationally. Furthermore, survey data indicates that AI technology will play a crucial role in the development of my country's media ecosystem. Therefore, applying AI technology to social media has become a highly valuable research area.
[0003] In today's era of increasingly advanced intelligent and human-computer interaction technologies, social networking platforms have experienced rapid growth. Online social platforms such as Weibo, Zhihu, and Baidu Tieba in China, and Facebook, Twitter, and Truth abroad, have gained popularity among netizens. These platforms have greatly enriched people's lives, recording their daily lives and expressing their opinions on specific events. They also use text, images, videos, and emoticons on these platforms to express their emotions and fulfill their spiritual and practical needs. Consequently, people frequently use social networking platforms to express their opinions and views on a range of events, sparking potential research. According to the "2023 China Internet Network Development Statistics Report," as of June, China had a total of 1.051 billion internet users, accounting for 23.4% of the global total and ranking first globally. Obtaining information, entertainment and leisure, social communication, online shopping, and education and learning are the primary reasons Chinese netizens use the internet, with social communication accounting for 79.8%. This demonstrates that social functions are gradually becoming a core feature of the internet, particularly the mobile internet. Therefore, timely understanding of netizens' dynamics can help guide public opinion, recommend products, monitor the network, and better meet people's daily and spiritual needs. However, understanding and identifying user emotions in sentiment analysis, and providing personalized services and experiences based on user emotions, have become key research issues.
[0004] Research on emotion completion has emerged precisely in this context. In modern society, people's emotions are influenced by a variety of factors, especially in fast-paced, high-pressure environments. First, from a theoretical perspective, human psychology and emotions do not exist in isolation but are influenced by a variety of factors, including the individual's environment, social context, and personal experiences. However, existing emotion recognition models often overlook the important role of these complex non-verbal cues in emotional expression, limiting their understanding and accuracy. Therefore, research on emotion completion based on environmental and contextual awareness can help deepen our understanding of the mechanisms of emotion generation and enrich and improve the theoretical framework of emotional intelligence. Second, from a practical application perspective, emotion understanding is an indispensable and critical component in fields such as human-computer interaction, virtual reality, social robotics, and mental health monitoring. By perceiving and analyzing a user's environmental information and contextual cues in real time, we can more accurately infer their emotional state, enabling more personalized and attentive services and interactions. For example, in healthcare, sentiment analysis technology can help doctors more accurately understand a patient's emotional state and formulate more personalized treatment plans. In education, this technology can improve teaching effectiveness by adjusting teaching content and methods based on students' emotional states. While sentiment analysis brings significant benefits and convenience, it also faces numerous challenges. First, accurately and in real time, sensing and identifying a user's emotional state is a key issue. Second, providing personalized services and experiences based on a user's emotional state is a challenge. Furthermore, protecting user privacy and data security also needs to be considered.
[0005] Prior art document 2018112027681 discloses a method for emotion recognition and prediction in text conversations, proposing a method for predicting a speaker's future emotional state based on their previous speech. Although this method simulates the emotional interactions between different speakers to predict their future emotional state, it fails to effectively extract global features across the entire conversation process over time. Furthermore, it ignores the varying emotional impacts of time on the speakers throughout the conversation. Therefore, over extended periods of time, this method cannot accurately predict the speaker's specific emotions. Furthermore, research on inferring a user's emotions based on missing textual information at historical moments has yet to yield an effective solution. Finally, this method predicts the speaker's emotions based on four-element emotions, rather than extending to more refined emotions. Therefore, effectively addressing the missing emotional information at historical moments and performing more fine-grained emotion completion is crucial for more practical user emotion analysis.
[0006] Furthermore, a large number of current sentiment analysis studies focus on predicting individual emotions based on users' past posts and comments, or studying changes in individual emotions based on events on specific topics. However, they ignore the influence of users' neighbors on individual emotions. At the same time, previous methods all predict emotions at future moments, but have not considered the importance of completing missing individual emotions in irregular time series. In addition, most methods focus on the influence of global context while ignoring the influence of local context. Therefore, for the user's emotions at a certain missing moment, they only consider the emotional impact before the missing moment, but ignore the emotional impact after the missing moment. Therefore, how to better identify the emotions in user-generated text and generate the user's emotions at the missing moment has become an urgent problem to be solved. Summary of the Invention
[0007] The purpose of the present invention is to overcome at least one technical problem existing in the prior art and provide an emotion completion method, system, storage medium and terminal based on surrounding environment and context perception, which can complete the missing emotions of the target user at key historical moments.
[0008] The object of the present invention is achieved through the following technical solutions:
[0009] In a first aspect, a method for emotion completion based on surrounding environment and context perception is provided, the method comprising the following steps:
[0010] S1. Obtain the sentiment embeddings of the target user and neighbor users over the entire time period.
[0011] S2. Extract the global and local features of the target user based on the target user's emotional embedding, and fuse them to obtain contextual features. Extract the global and local features of neighbor users based on their emotional embedding, and fuse them to obtain surrounding environment features.
[0012] S3, fusing the context features with the surrounding environment features to obtain the final emotional features of the target user;
[0013] S4. Simulate the emotional interaction between the target user and neighbor users based on the final emotional characteristics.
[0014] Preferably, the emotion embedding in step S1 adopts the BERT word embedding method.
[0015] Preferably, the global features of the target user / neighboring user are extracted through a Bi-DLSTM neural network model; and the local features of the target user / neighboring user are extracted through multi-head attention.
[0016] Preferably, the simulating emotional interaction between the target user and the neighbor users includes:
[0017] IDS_EC is used to simulate the process of emotional interaction and contagion between individuals and neighboring users.
[0018] Preferably, the simulating emotional interaction between the target user and the neighbor users further includes:
[0019] Use the Softmax function for emotion classification to obtain the missing emotion information of the user.
[0020] Preferably, the method further comprises a data cleaning step before step S1.
[0021] In a second aspect, an emotion completion system based on surrounding environment and context perception is provided, the system comprising:
[0022] The emotion embedding encoder module is configured to obtain the emotion embeddings of the target user and neighbor users over the entire time period respectively;
[0023] The context perception layer module is configured to extract the global features and local features of the target user based on the target user's emotional embedding, and fuse them to obtain the context features;
[0024] The surrounding environment perception module is configured to extract the global and local features of neighbor users based on their emotion embeddings and fuse them to obtain the surrounding environment features;
[0025] a feature interaction learning layer module configured to fuse the contextual features with surrounding environment features to obtain a final emotional feature of the target user;
[0026] The emotion distribution layer module is configured to simulate the emotional interaction between the target user and the neighboring users according to the final emotion characteristics.
[0027] Preferably, the context perception layer module and the surrounding environment perception module are both configured with a Bi-DLSTM neural network model.
[0028] In a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any one of the emotion completion methods based on surrounding environment and context perception is implemented.
[0029] In a fourth aspect, a terminal is provided, comprising a memory and a processor, wherein the memory stores computer instructions that can be executed on the processor, and when the processor executes the computer instructions, the emotion completion method based on surrounding environment and context perception is executed.
[0030] It should be further explained that the technical features corresponding to the above options can be combined or replaced with each other to form a new technical solution if there is no conflict.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] The present invention realizes the formal processing of raw data, effective word vector conversion to improve model training efficiency, detection of post text emotions, fusion of global and local features, and a method for emotional interaction between target users and neighbor users, as well as completion of target user missing emotions. Among them, the innovative improvement of LSTM and the invention of a new neural network DLSTM (Decay Long Short Term Memory) effectively solve the correlation and influence between emotions under irregular time series. The method uses DLSTM and a multi-head attention network to extract the global and local features of the target user and neighbor users respectively, and then simulates the method of emotional interaction between neighbors and target users, restoring the process of the real target user being affected by the surrounding environment, and finally completing the completion of the target user's missing emotions at key historical moments, thereby grasping the user's most real emotional characteristics at the missing moment. Completing the user's missing emotions helps to more deeply understand the user's psychological state and emotional changes. By understanding the user's emotional reactions in different situations, it is possible to reveal deep information such as the user's interests, needs, and values, and provide more accurate user portraits and behavior predictions for enterprises or individuals, thereby enhancing user understanding, optimizing user experience, assisting decision-making, and promoting technological development. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 This is a flow chart of an emotion completion method based on surrounding environment and context perception according to an embodiment of the present invention;
[0034] Figure 2 This is an example of an emotion completion system architecture based on surrounding environment and context perception according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The technical solutions of the present invention are described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings herein can be arranged and designed in various different configurations. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0036] It should be noted that the defects existing in the solutions in the above-mentioned prior art are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above-mentioned problems and the solutions proposed in the embodiments of this application below for the above-mentioned problems should be the contributions made by the inventor to this application in the process of invention and creation, and should not be understood as technical contents known to technical personnel in this field.
[0037] This paper proposes an emotion completion method based on ambient and contextual awareness (SCAEC). This method utilizes the lSTM to design a new neural network, DLSTM (Decay Long Short Term Memory), and multi-head attention to extract global and local features of the target user and neighboring users, respectively. The target user's global and local features are then fused to form contextual features, and the neighboring users' global and local features are fused to form ambient features. The contextual and ambient features are then combined to form a final feature representation of the target user. The interactive double states emotion cell (IDS_EC) is then used to simulate the emotional interaction and contagion between the target user and their neighboring users, thereby completing the missing emotional information of individuals at critical historical moments.
[0038] In response to the technical problems pointed out in the background technology, the embodiments provided by the present invention are as follows:
[0039] Example 1
[0040] Reference Figure 1 In an exemplary embodiment, a method for emotion completion based on surrounding environment and context perception is provided, the method comprising the following steps:
[0041] S1. Obtain the sentiment embeddings of the target user and neighbor users over the entire time period.
[0042] S2. Extract the global and local features of the target user based on the target user's emotional embedding, and fuse them to obtain contextual features. Extract the global and local features of neighbor users based on their emotional embedding, and fuse them to obtain surrounding environment features.
[0043] S3, fusing the context features with the surrounding environment features to obtain the final emotional features of the target user;
[0044] S4. Simulate the emotional interaction between the target user and neighbor users based on the final emotional characteristics.
[0045] Specifically, this invention, based on Ekman's six-element definition of emotion, combines surrounding and context-aware information to complete the missing emotional information of the target user at key historical moments. This in turn forms a complete emotional profile of the target user over a period of time, enabling more accurate character profiling and personalized recommendations. In this method, we first use an encoder layer to obtain the target user's emotional embedding throughout time. Next, we obtain surrounding features and context features from the surrounding and context-aware layers, respectively. Next, we use a feature interaction learning layer to learn the combined features of surrounding and context features. Furthermore, the emotion distribution layer models the emotional interaction between the target user and their surroundings (neighboring users). Finally, we obtain the target user's emotional distribution at the missing moment. This means that we have supplemented the target user's emotions at the missing moment, thereby forming a complete emotional chain over time. Furthermore, this method constructs a decaying LSTM network (denoted as DLSTM), which effectively extracts the emotional features of the individual missing moments and decays the emotional effects to the next moment. We use Bi-DLSTM to extract global features and multi-head attention to extract local features from the sentiment embedding of the target user or neighbor users. We combine global features and local features to enhance the feature extraction capability.
[0046] Furthermore, Bi-DLSTM ensures that the extracted global features encompass emotional information across the entire timeframe, making it possible to infer missing emotions at missing moments. Multi-head attention enables the extracted local features to remove noise from the global context, while the collected local features focus on the emotional information of moments closely related to the missing emotional moments. Furthermore, the influence of the surrounding environment on the target user's emotions is considered. To supplement the missing emotions at historically missing emotional moments, we capture contextual features and surrounding features separately. We then simulate the impact of the environment on the target user's emotions to infer the missing emotions.
[0047] Example 2
[0048] Based on the same inventive concept as in Example 1, this embodiment provides an emotion completion system based on ambient environment and context perception, the system comprising:
[0049] The emotion embedding encoder module is configured to obtain the emotion embeddings of the target user and neighbor users over the entire time period respectively;
[0050] The context perception layer module is configured to extract the global features and local features of the target user based on the target user's emotional embedding, and fuse them to obtain the context features;
[0051] The surrounding environment perception module is configured to extract the global and local features of neighbor users based on their emotion embeddings and fuse them to obtain the surrounding environment features;
[0052] a feature interaction learning layer module configured to fuse the contextual features with surrounding environment features to obtain a final emotional feature of the target user;
[0053] The emotion distribution layer module is configured to simulate the emotional interaction between the target user and the neighboring users according to the final emotion characteristics.
[0054] Specifically, refer to Figure 2 After using web crawlers to obtain text data from social platforms (Twitter and Weibo), we clean the data and filter out useless symbols, URLs, numbers, and other information. The sentiment embedding encoder module then uses BERT, a highly efficient word embedding method in deep learning, to map user comments and post bodies into 300-dimensional word vectors, which serve as input for the neural network model. This method achieves better text feature representation and fully extracts the emotional information contained in the text.
[0055] Context-aware layer modules, such as Figure 2 As shown on the right, the vectorized post text or comments are fed into the Bi-DLSTM neural network model. Bi-DLSTM learns temporal correlations based on sentiment embeddings at different moments, eliminating the impact of inconsistent time intervals and ultimately extracting global features. Next, multi-head attention is used to capture sentiment correlations across time, extracting local features most closely related to the sentiment at the missing moment and identifying which features are most important. Finally, the two different features are fused. The local features extracted by the multi-head attention mechanism aggregate the sentiment features of moments related to the missing moment. To preserve sentiment information across the entire time period, global and local features are combined. This results in sentiment features that encompass both the overall sentiment information and the sentiment information of key moments.
[0056] Surrounding environment perception module, such as Figure 2 As shown on the left. Similar to the context-aware layer module, the present invention uses Bi-DLSTM and multi-head attention to extract global and local feature information of neighboring users, respectively. This information is then fused into surrounding environment features. It should be noted that different neural network parameters are used here, which are not shared with the parameters in the context-aware layer module. After passing through the surrounding environment perception module, the network can effectively extract surrounding environment features, facilitating subsequent feature merging.
[0057] The feature interaction learning layer module, after acquiring both ambient and contextual features, merges these two types of information to represent the target user's final features. The purpose of this merging is to create a single representation at each moment, facilitating subsequent emotional interaction learning.
[0058] The emotion distribution layer module consists of an emotion input gate, a memory unit for the user and their neighbors' emotion states, a gate for the target user's emotion interaction with their neighbors, and an emotion output gate. The emotion distribution layer module simulates the real-time interaction between a user and their neighbors, allowing for more accurate absorption of the influence of the surrounding environment. A softmax function is then used for emotion classification to obtain the missing user emotion information.
[0059] Example 3
[0060] Based on the method of Example 1 and the system of Example 2, this embodiment provides a specific emotion completion process, and its implementation steps are described as follows:
[0061] A. Obtain post text or comments from social platforms (Weibo and Twitter) and perform data cleaning based on requirements. Remove any redundant information, such as incorrect English letters, URLs, email addresses, and phone numbers, to create a cleaned text collection. Sort the text in chronological order.
[0062] B. Use BERT, an efficient word embedding method in deep learning, to map user comments and post text into 300-dimensional word vectors as input to the neural network model. This method can obtain better text feature representation, making model training simple and efficient.
[0063] C. The vectorized target user post or comment is fed into the Bi-DLSTM neural network model. Bi-DLSTM extracts global features based on sentiment embeddings at different moments. Next, multi-head attention is used to identify sentiment correlations across time and extract local features. Finally, the global and local features are combined. This creates sentiment features that encompass both overall sentiment information and sentiment at key moments.
[0064] D. Use BI-DLSTM and multi-head attention to extract the global and local features of neighbor users. Then fuse the global and local features of neighbor users to form the surrounding environment features.
[0065] E. After obtaining the surrounding environment and context features respectively, the feature interaction learning layer module is used to merge these two feature information to represent the final features of the target user.
[0066] F. The target user's final features are input into the emotion input gate, the emotional state memory unit for the user and their neighbors, the emotion interaction gate between the target user and their neighbors, and the emotion output gate to simulate real-time interaction between the user and their neighbors, thereby more accurately absorbing the influence of the surrounding environment. A softmax function is then used for emotion classification to obtain the missing emotional information about the user.
[0067] Example 4
[0068] The specific implementation means corresponding to each step in the method and each layer structure of the system are explained as follows:
[0069] 1. Emotion Embedding Layer
[0070]
[0071] Represents the post or comment u of user u at time t t This process mainly maps the target user’s posts or comments into word vectors so as to facilitate the subsequent learning of the emotional correlation between them.
[0072] 2. Context-aware layer
[0073] 2.1 Global Feature Extraction
[0074]
[0075] Formula (2.1) represents m t Missing mask at time t. m t Indicates whether a post or comment exists at time t. δt in formula (2.2) i Defined as the time interval between the last observed timestamp and the current timestamp. Mainly used in DLSTM to attenuate the impact of different time differences.
[0076]
[0077] Z f =σ(W f (X t-1 ,h t-2 )+b f ) (2.5)
[0078] Z i =σ(W i (X t-1 ,h t-2 )+b i ) (2.6)
[0079] Z=tanh(W c (Xt-1 ,h t-2 )+b c ) (2.7)
[0080] C t-1 =Z f C t-2 Z i Z (2.8)
[0081] Z o =σ(W o (X t-1 ,h t-2 )+b0) (2.9)
[0082] ∈=exp{-max(0,W ∈ δt i +b ∈ )} (2.10)
[0083] h t-1 =m t-1 Z o tanh(C t-1 )+(1-m t-1 )Z o tanh(C t-1 ) (2.11)
[0084] Formulas (2.3)-(2.11) represent the detailed steps of the DLSTM network to process irregular time series.
[0085] Finally, the feature information of the unidirectional sequence is obtained.
[0086]
[0087] Formula (2.12) represents the extraction of the global feature information of the target user in the entire time period to form the individual's emotional characteristics in the entire time period.
[0088] 2.2 Local feature extraction
[0089] Q h =W qh X (2.13)
[0090] K h =W kh X (2.14)
[0091] V h =W vh X (2.15)
[0092]
[0093] O h =Ah V h (2.17)
[0094] MA=tanh(Concat[O1,O2,...,O i ]W MH ) (2.18)
[0095] Formulas (2.13)-(2.18) explain how to use multi-head attention to extract local features of the target user throughout the entire time period. Local features are mainly used to highlight the strong emotional associations of individuals at specific moments.
[0096] 2.3 Global and local feature fusion.
[0097] β lg =σ(W l MA+W g α+b))(2.19)
[0098] Formula (2.19) represents the fusion of the global and local features of the target user, which not only preserves the emotional information of the entire time period but also highlights the emotional expression of important moments.
[0099] 3. Surrounding environment perception layer
[0100]
[0101] Formulas (2.20)-(2.22) represent the fusion of global and local features of neighbor users.
[0102] 4. Feature Interaction Learning Layer
[0103]
[0104] Formula (3.26) integrates the feature information of the target user and neighbor users.
[0105] 5. Emotion Distribution Layer
[0106] i t =σ(W ti E t +b ti +W hi h t-1 +b hi ) (2.24)
[0107] g t =σ(W tg E t +b tg +W hg h t-1 +b hg ) (2.25)
[0108] o t =σ(W to E t +b to +W ho h t-1 +b ho ) (2.26)
[0109] e t TN =σ(W te TN E t +b te TN +W he TN E t-1 +b he TN ) (2.27)
[0110] e t NT =σ(W te NT E t +b te NT +W he NT E t-1 +b he NT ) (2.28)
[0111]
[0112] Formulas (2.24)-(2.32) simulate the process of emotional interaction between neighbor users and individuals, and ultimately derive the emotional information of the target user at the moment of absence.
[0113] Example 5
[0114] Based on the same inventive concept as Example 1, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the emotion completion method based on surrounding environment and context perception provided by the embodiment of the present invention is implemented. Based on such an understanding, the technical solution of this embodiment, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0115] Example 6
[0116] Based on the same inventive concept as Example 1, a network device is provided, including a memory and a processor, wherein the memory stores computer instructions that can be executed on the processor, and when the processor executes the computer instructions, the emotion completion method based on surrounding environment and context perception provided by the embodiment of the present invention is executed.
[0117] The processor may be a single-core or multi-core central processing unit or a specific integrated circuit, or one or more integrated circuits configured to implement the present invention.
[0118] Embodiments of the subject matter and functional operations described in this specification may be implemented in: tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or a combination of one or more thereof. Embodiments of the subject matter described in this specification may be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by a data processing apparatus or to control the operation of the data processing apparatus. Alternatively or in addition, the program instructions may be encoded on an artificially generated propagated signal, such as a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode and transmit information to a suitable receiver apparatus for execution by the data processing apparatus.
[0119] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform the corresponding functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can be implemented as, special purpose logic circuitry, such as an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).
[0120] Processors suitable for executing computer programs include, for example, general-purpose and / or special-purpose microprocessors, or any other type of central processing unit. Typically, a central processing unit will receive instructions and data from a read-only memory and / or random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or the computer will be operably coupled to such a mass storage device to receive data from it or to transmit data to it, or both. However, a computer does not necessarily have such a device. In addition, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.
[0121] It should be understood that each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the part of the module, program segment or code comprises one or more executable instructions for realizing the logical function of the provision. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the function or action of the provision, or can be implemented with a combination of dedicated hardware and computer instructions.
[0122] The above specific implementation methods are detailed descriptions of the present invention. It cannot be considered that the specific implementation methods of the present invention are limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, they can make several simple deductions and substitutions without departing from the concept of the present invention, which should be regarded as falling within the scope of protection of the present invention.
Claims
1. A method for emotion completion based on surrounding environment and context perception, characterized in that: The method comprises the following steps: S1, respectively obtain the emotional embedding of the target user and neighbor users throughout the time; S2. Extract the global and local features of the target user based on the target user's emotional embedding, and fuse them to obtain context features; extract the global and local features of the neighbor users based on the neighbor users' emotional embedding, and fuse them to obtain surrounding environment features; S3, fusing the context features with surrounding environment features to obtain the final emotional features of the target user; S4. Simulate the emotional interaction between the target user and the neighbor users according to the final emotional characteristics.
2. The emotion completion method based on surrounding environment and context perception according to claim 1, characterized in that: The sentiment embedding in step S1 adopts the BERT word embedding method.
3. The emotion completion method based on surrounding environment and context perception according to claim 1, characterized in that: The global features of the target user / neighboring user are extracted through the Bi-DLSTM neural network model; the local features of the target user / neighboring user are extracted through multi-head attention.
4. The emotion completion method based on surrounding environment and context perception according to claim 1, characterized in that: The simulating emotional interaction between the target user and the neighboring users includes: IDS_EC is used to simulate the process of emotional interaction and contagion between individuals and neighboring users.
5. The emotion completion method based on surrounding environment and context perception according to claim 4, characterized in that: The simulating emotional interaction between the target user and the neighboring users also includes: Use the Softmax function for emotion classification to obtain the missing emotion information of the user.
6. The emotion completion method based on surrounding environment and context perception according to claim 1, characterized in that: The method further comprises a data cleaning step before step S1.
7. An emotion completion system based on surrounding environment and context perception, characterized in that: The system comprises: The encoder module for sentiment embedding is configured to obtain the sentiment embeddings of the target user and neighbor users over the entire time period respectively; A context-aware layer module is configured to extract the global features and local features of the target user based on the target user's emotional embedding, and obtain the context features after fusion; A surrounding environment perception module is configured to extract global features and local features of neighbor users based on the emotion embedding of neighbor users, and obtain surrounding environment features after fusion; A feature interaction learning layer module is configured to fuse the context feature with the surrounding environment feature to obtain a final emotional feature of the target user; The emotion distribution layer module is configured to simulate the emotion interaction between the target user and the neighboring users according to the final emotion characteristics.
8. The emotion completion system based on surrounding environment and context perception according to claim 7, characterized in that: The context perception layer module and the surrounding environment perception module are both configured with a Bi-DLSTM neural network model.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the emotion completion method based on surrounding environment and context perception described in any one of claims 1 to 6 is implemented.
10. A terminal comprising a memory and a processor, wherein the memory stores computer instructions that can be executed on the processor, characterized in that: When the processor runs the computer instructions, it executes the emotion completion method based on surrounding environment and context perception as described in any one of claims 1-6.
