Emotion analysis method and device
Through multi-faceted analysis of sand tool attribute information and layout information, the subjectivity of traditional psychological sand table treatment results is solved, and more objective and accurate emotional analysis is achieved, helping to formulate more targeted treatment plans.
Patent Information
- Application Number
- CN202411656252.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-11
AI Technical Summary
Traditional psychological sand table therapy relies on the experience of analysts, and the results are highly subjective, resulting in insufficient objectivity of the analysis results.
Through multi-faceted analysis based on sand tool attribute information and layout information, the evaluation value is determined, and the corresponding report template is selected to output sentiment analysis results, improving the objectivity of the analysis results.
A more comprehensive and accurate analysis of the client's emotional state is achieved, and personalized emotional analysis results are generated, helping analysts better understand the client's unique psychological state and formulate more targeted treatment plans.
Smart Images

Figure CN119418871A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the field of data processing technology, and more specifically, to a sentiment analysis method and device. Background Art
[0002] Psychological sandplay therapy is a method of psychotherapy and psychological counseling that mainly uses sand, sand trays, and miniature models of people or objects (sand tools). It has "non-verbal" and "non-directive" characteristics, and has advantages that cannot be replaced by other treatment methods for people who are not good at expressing themselves, have a strong defensive psychology, or have autism.
[0003] Traditional psychological sand tray therapy has high requirements for sand tray analysts (such as: more than 50 hours of personal sand tray experience process, 100 hours of required professional course study, papers, supervision, internships, and case studies); the analysis results depend on the analyst's personal experience, and the results given by different analysts will have certain deviations and are highly subjective. Summary of the invention
[0004] The purpose of the present invention is to provide a sentiment analysis method and device to assist analysts in performing sentiment analysis and improve the objectivity of the analysis results.
[0005] A first aspect of the embodiments of the present disclosure provides a sentiment analysis method, including: Determining a first evaluation value based on attribute information of sand tools in a first sand tool set; the first sand tool set is a collection of sand tools in a sand table work; Determine the layout information of the sand tools in the sand table work based on the image of the sand table work; Adjusting the first evaluation value based on the layout information of the sand tools in the sand table work to obtain a second evaluation value; A corresponding report template is selected based on the second evaluation value, and a sentiment analysis result is output based on the report template.
[0006] A second aspect of the embodiments of the present disclosure provides a sentiment analysis device, including: A first calculation module is used to determine a first evaluation value based on attribute information of sand tools in a first sand tool set; the first sand tool set is a set of sand tools in a sand table work; An image recognition module, used to determine the layout information of the sand tools in the sand table work based on the image of the sand table work; A second calculation module is used to adjust the first evaluation value based on the layout information of the sand tools in the sand table work to obtain a second evaluation value; A result output module is used to select a corresponding report template based on the second evaluation value and output a sentiment analysis result based on the report template.
[0007] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above-mentioned sentiment analysis method when executing the computer program.
[0008] According to a fourth aspect of an embodiment of the present disclosure, 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 steps of the above-mentioned sentiment analysis method are implemented.
[0009] The beneficial effects of the sentiment analysis method and device provided by the embodiments of the present disclosure are: The disclosed embodiment determines the first evaluation value through the sand tool attribute information, and can understand the visitor's inner potential emotions, needs and conflicts from multiple aspects such as the category, emotional attributes, life attributes, and symbolic meaning represented by the sand tools; at the same time, the second evaluation value is obtained in combination with the sand tool layout information, which can make a more comprehensive and accurate analysis of the visitor's emotional state.
[0010] By selecting the corresponding report template according to different second evaluation values, personalized emotion analysis results can be generated for each visitor, which improves the objectivity of the analysis results, helps analysts better understand the unique psychological state of the visitors, and develop more targeted treatment plans. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0012] Figure 1 A flowchart of a sentiment analysis method provided by an embodiment of the present disclosure; Figure 2 A structural block diagram of a sentiment analysis device provided in one embodiment of the present disclosure; Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0013] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.
[0014] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, specific embodiments will be described below in conjunction with the accompanying drawings.
[0015] Please refer to Figure 1 , Figure 1 A flow chart of a sentiment analysis method provided by an embodiment of the present disclosure, the method comprising: S101: Determine a first evaluation value based on attribute information of sand tools in a first sand tool set; the first sand tool set is a collection of sand tools in a sand table work.
[0016] In this embodiment, the sand tray work is a scene created in the sand tray by the client receiving psychotherapy using various sand tools during the sand tray game. The sand tools used in the sand tray work constitute the first sand tool set.
[0017] A sand tool knowledge base can be established to store the attribute information of various sand tools, which mainly includes: (1) Sand tool number: It is equivalent to the identity ID of the sand tool and is unique.
[0018] (2) Photos of sand tools: Each sand tool can include photos from multiple angles, such as the front, back, and side. (3) The sand tool category includes multiple levels of classification. The first-level classification mostly includes: people, animals, plants, building materials, transportation tools, daily necessities, religious and cultural shapes, and others; each first-level classification has a second-level classification, such as transportation tools can be divided into land transportation tools, water transportation tools, aircraft, etc.; the second-level classification has a third-level classification, such as land transportation tools include buses, cars, trains, bicycles, etc.
[0019] (4) Emotional attributes of sand toys: Not every sand toys have obvious emotions. Label the emotions of sand toys that most people think have certain obvious emotions (such as fear, sadness, anger). For example, demons, skulls, and coffins may represent fear, and characters with expressions also have emotional attributes.
[0020] (5) The life attribute of the sand objects: that is, whether they are alive. For example, ordinary people, animals, and plants are alive, while incomplete human bodies and skeletons are not alive.
[0021] (6) Description of sand tools: The same sand tools may have different descriptions. For example, one person may think that the same animal is a wolf while another may think it is a dog. Also, some sand tools may look very different from different angles. Try to include more comprehensive information in the description.
[0022] (7) Symbolic meaning of sand tools: not unique. For example, mountains represent goals and the courage to climb to the top; they represent male strength; sometimes mountains also symbolize protection, such as a backer; and sometimes they may also mean pressure.
[0023] In this embodiment, by setting up an intelligent sand tool display stand, the results of visitors using sand tools can be obtained. When the sand table game starts, the sand table analyst turns on the intelligent sand tool display stand, and the display screen of the intelligent sand tool display stand starts timing, and the duration of the game and the number of sand tools taken from the sand tool stand are displayed in real time during the game. When the sand table analyst and the visitor confirm that "the sand table work is completed", the display stand is controlled to end timing, and the numbers of all sand tools used in this sand table game are saved. According to the sand tool numbers, the relevant data of these sand tools are obtained from the sand tool knowledge base, and a subset of the sand tool knowledge base is obtained, which is called the first sand tool set. Statistics are performed on the first sand tool set, and a report is generated and displayed on the display screen. The report includes the use time of this game, the total number of sand tools used, the number of sand tools of different categories, the proportion of various types of sand tools calculated according to the first-level classification, the number and proportion of life sand tools, and the number of sand tools with different emotional attributes.
[0024] Based on the attribute information of the sand tools in the first sand tool set, the visitor's emotional state can be preliminarily evaluated to obtain a first evaluation value. For example, if there are more sand tools representing positive emotions in the first sand tool set, such as smiling figures, beautiful flowers, etc., a higher first evaluation value can be given; if there are more sand tools with negative emotional attributes, such as demons, skeletons, etc., a lower first evaluation value can be given.
[0025] The same sand tool may have different descriptions. For example, the same animal may be considered a wolf by some people and a dog by others. In addition, some sand tools may look very different from different angles. Therefore, the analyst needs to communicate with the client verbally and record the client's feelings and understanding of the work or certain sand tools in order to accurately determine the attribute information of the sand tools.
[0026] S102: Determine layout information of sand tools in the sand table work based on the image of the sand table work.
[0027] In this embodiment, each time the sand table work is completed, take a photo and take two photos, one from the visitor's perspective and another from an overall overhead view (to avoid overlapping of the sand tools due to the shooting angle and to better reflect the positional relationship between the sand tools).
[0028] By processing the images of sand table works using image analysis technology, we can identify the layout information of the sand tools, such as their position, direction, and distance between each other. For example, whether the sand tools are concentrated in a certain area of the sand table, and whether there is an obvious grouping or arrangement pattern.
[0029] The emotional state of the visitor can also be obtained based on the layout information of the sand tray. If the sand tools are concentrated in the center of the sand tray, it means that the visitor has a strong concern about a certain topic; if the sand tools are scattered at the edge of the sand tray, it may imply the visitor's escape or retreat mentality.
[0030] S103: adjusting the first evaluation value based on the layout information of the sand tools in the sand table work to obtain a second evaluation value.
[0031] In this embodiment, on the basis of obtaining the first evaluation value, the first evaluation value can be adjusted based on the layout information of the sand tools to obtain a second evaluation value, and the second evaluation value can comprehensively reflect the emotional state of the visitor in the sand table game.
[0032] For example, if the layout information shows positive characteristics, such as balanced distribution of sand tools and a clear theme structure, the first evaluation value can be appropriately increased; if the layout information shows negative characteristics, such as chaotic and extremely uneven distribution of sand tools, the first evaluation value should be lowered.
[0033] S104: Select a corresponding report template based on the second evaluation value, and output a sentiment analysis result based on the report template.
[0034] In this embodiment, based on the size of the second evaluation value, the visitor's emotional state can be divided into four stages: problem presentation stage, struggle transformation stage, solution growth stage, and ending stage. There is a corresponding report template for each stage. The report template provides specific emotional and psychological analysis content according to the emotional state and development needs of different stages. By selecting the corresponding report template, a preliminary emotional and psychological analysis report can be generated to provide a targeted reference for the sand table analyst.
[0035] The analyst can revise the preliminary emotional and psychological analysis report based on the client's feelings and the unique meaning of the sand tools, and get the final conclusion of this sand tray game therapy. According to the different stages, the analyst can better adjust the guidance strategy to help the client achieve recovery as soon as possible and shorten the treatment cycle.
[0036] In addition, the meaning of sand tools will vary depending on the visitor. For example, poisonous insects such as snakes and lizards are symbols of fear in the eyes of most people, but for a child who prefers such animals, they may be a symbol of security. After each sand tray game, the analyst summarizes the visitor's explanation and records the description and symbolic meaning of the sand tools from the summary records, and dynamically updates the sand tool knowledge base, making the content of the sand tool knowledge base more and more rich and comprehensive, providing sand tray analysts with more analytical ideas, no longer limited to personal cognition and understanding.
[0037] From the above, it can be concluded that this embodiment determines the first evaluation value through the sand tool attribute information, and can understand the visitor's inner potential emotions, needs and conflicts from multiple aspects such as the category, emotional attributes, life attributes, and symbolic meaning represented by the sand tools; at the same time, the second evaluation value is obtained in combination with the sand tool layout information, which can make a more comprehensive and accurate analysis of the visitor's emotional state.
[0038] By selecting the corresponding report template according to different second evaluation values, personalized emotion analysis results can be generated for each visitor, which improves the objectivity of the analysis results, helps analysts better understand the unique psychological state of the visitors, and develop more targeted treatment plans.
[0039] The sentiment analysis results output by the report template can serve as an important basis for communicating with visitors, helping them better understand their inner world and promote self-exploration and growth.
[0040] In one embodiment of the present disclosure, determining a first evaluation value based on attribute information of sand tools in a first sand tool set includes: Determine a third evaluation value based on the number of the first type of sand tools; the first type of sand tools are sand tools whose corresponding attribute information contains negative emotional attributes; Determine a fourth evaluation value based on the number of the second type of sand tools; the second type of sand tools are sand tools whose corresponding attribute information includes life attributes; Determine a fifth evaluation value based on the number of types of all sand tools in the sand table work; The third evaluation value, the fourth evaluation value and the fifth evaluation value are weightedly summed to obtain the first evaluation value.
[0041] In this embodiment, the third evaluation value is used to characterize the emotional stability of the client, the fourth evaluation value is used to characterize the vitality of the client, and the fifth evaluation value is used to characterize the psychological richness of the client. Analyzing the sand tray work from the three perspectives of emotional stability, vitality and psychological richness can provide a more comprehensive understanding of the client's psychological state.
[0042] The first type of sand tools are sand tools with negative emotional attributes, such as demons, skeletons and other sand tools representing fear, and human sand tools with sad expressions may reflect sad emotions, etc. The third evaluation value can be determined by counting the number of sand tools in the first category. If there are more sand tools of this type in the sand tray work, it means that the visitor has more negative emotions, troubles or conflicts in his heart, and the corresponding third evaluation value is smaller.
[0043] Optionally, a reference value of the third evaluation value may be preset. and the first proportional coefficient k1, the number S1 of the first type of sand tools is multiplied by the first proportional coefficient k1 to obtain the change in the third evaluation value , then at the base value Subtract the change in the third evaluation value from the The third evaluation value is obtained, and the calculation formula is as follows: .
[0044] The second type of sand tools are sand tools with life attributes, such as people, animals, plants, etc. The number of sand tools can represent the visitor's attention to life and the vitality and vitality in his heart. For example, more animal sand tools indicate the visitor's desire for vitality and energy, and the corresponding fourth assessment value is larger.
[0045] Optionally, a reference value of the fourth evaluation value may be preset. The change in the fourth evaluation value is obtained by multiplying the number S2 of the second type of sand tools by the second proportional coefficient k2. , then at the base value Increase the change in the fourth evaluation value based on The fourth evaluation value is obtained, and the calculation formula is as follows: .
[0046] The more types of sand tools there are, the richer the psychological content of the visitor is and the more active his thinking is. Therefore, the fifth evaluation value can be determined based on the number of types of all sand tools in the sand table work. Optionally, a reference value of the fifth evaluation value can be pre-set. and the benchmark value of the number of sand tool types , then based on the number of types of sand tools With the fifth assessment value The positive correlation determines the fifth evaluation value , the following formula can be used: .
[0047] On the basis of obtaining the third evaluation value, the fourth evaluation value and the fifth evaluation value, the third evaluation value, the fourth evaluation value and the fifth evaluation value are weighted and summed to obtain the first evaluation value.
[0048] It can be concluded from the above that this embodiment quantifies the first evaluation value from the three perspectives of emotional stability, vitality and psychological richness, so that the analyst can more objectively evaluate the emotional state of the visitor, rather than relying solely on subjective observation and feelings. The quantified evaluation value is also convenient for comparison and analysis between different visitors, and tracking the changes of the visitor during the treatment process.
[0049] In one embodiment of the present disclosure, the sentiment analysis method further includes: Selecting a second set of sand tools for reuse from a plurality of first sets of sand tools corresponding to a plurality of historical sand table works; The weights of the third evaluation value and the fourth evaluation value are adjusted based on the attribute information of the sand tools in the second sand tool set.
[0050] In this embodiment, the sand tools used by the visitor are different in each sand tray game. Considering that the sand tools that appear repeatedly in multiple sand tray games have special meanings to the visitor, they can reflect the visitor's more persistent concerns, conflicts or needs deep in his heart. For example, if the visitor uses a sand tool representing a lonely person in multiple sand tray works, then this sand tool is likely to be a manifestation of a long-standing emotional state in the visitor's heart.
[0051] Therefore, we can first select the intersection of multiple first sand tool sets corresponding to multiple historical sand table works to obtain sand tools that are repeatedly used in multiple sand table games, record these sand tools as the second sand tool set, and then adjust the first evaluation value (specifically the third evaluation value and the fourth evaluation value) based on the attribute information of the sand tools in the second sand tool set.
[0052] Optionally, adjusting the weights of the third evaluation value and the fourth evaluation value based on the attribute information of the sand tools in the second sand tool set includes: If the proportion of the third category of sand tools in the second sand tool set is greater than the first threshold, and the proportion of the second category of sand tools in the second sand tool set is less than the second threshold, the weight of the third evaluation value is increased by the first step length, and the weight of the fourth evaluation value is reduced by the first step length; wherein the third category of sand tools are sand tools whose corresponding attribute information contains emotional attributes, and the first threshold is greater than the second threshold.
[0053] If the proportion of the second type of sand tools in the second sand tool set is greater than the first threshold, and the proportion of the third type of sand tools in the second sand tool set is less than the second threshold, the weight of the fourth evaluation value is increased by the first step, and the weight of the third evaluation value is reduced by the first step.
[0054] In this embodiment, if the repeatedly used sand tools mostly have obvious emotional attributes, the weight of the third evaluation value can be appropriately increased. For example, if the repeatedly used sand tools mostly represent negative emotions such as fear and sadness, it means that the visitor has more prominent emotional problems. The weight of the third evaluation value is increased by the first step length, and the weight of the fourth evaluation value is reduced by the first step length. For example, the weight of the third evaluation value is increased from 40% to 50%, and the weight of the fourth evaluation value is reduced from 30% to 20%.
[0055] If the reused sand tools mostly have life attributes, the weight of the vitality index can be increased. For example, if the repeated sand tools are mostly animal sand tools, the weight of the fourth evaluation value is increased by the first step length, and the weight of the third evaluation value is reduced by the first step length. For example, the weight of the fourth evaluation value is increased from 30% to 40%, and at the same time, the weight of the third evaluation value is reduced from 40% to 30%. Among them, the first step length is a preset constant, and those skilled in the art can flexibly design the specific value of the first step length according to the actual quantification method.
[0056] It can be concluded from the above that this embodiment adjusts the weights of the third evaluation value and the fourth evaluation value based on the attribute information of the sand tools in the second sand tool set, and can perform targeted analysis according to the specific circumstances of the visitor, thereby improving the accuracy and effectiveness of sentiment analysis.
[0057] In one embodiment of the present disclosure, the sentiment analysis method further includes: Performing target recognition on the sand tools in the image of the sand table work, and determining a third sand tool set based on the target recognition result; Compare the third set of sand tools with the first set of sand tools to obtain the fourth set of sand tools that is covered in the sand table work; The third evaluation value and the fourth evaluation value are adjusted based on the attribute information of the sand tools in the fourth sand tool set.
[0058] In this embodiment, the sand tools that exist in the first sand tool set but are not detected in the image of the sand tray work may be buried in the sand. Such sand tools (that is, the sand tools in the fourth sand tool set) also require the analyst's attention and may be the source of the visitor's problem.
[0059] Optionally, the YOLO algorithm can be used to detect the sand tools contained in the current sand tool work in the image of the sand table work to obtain a third sand tool set, and then the third sand tool set is compared with the first sand tool set. By comparing the differences between the two sets, the sand tools that are not recognized in the image but actually exist in the sand table, that is, the masked fourth sand tool set, can be determined.
[0060] On the basis of obtaining the masked fourth sand tool set, the third evaluation value and the fourth evaluation value may be adjusted based on the attribute information of the sand tools in the fourth sand tool set to improve the accuracy of the third evaluation value and the fourth evaluation value.
[0061] Optionally, adjusting the third evaluation value and the fourth evaluation value based on the attribute information of the sand tools in the fourth sand tool set can be described in detail as follows: If the fourth set of sand tools contains the first type of sand tools, the third evaluation value is reduced by a second step length; If the fourth sand tool set includes the second type of sand tools, the fourth evaluation value is reduced by a third step length.
[0062] In this embodiment, if the buried sand tool has obvious negative emotional attributes (i.e., the first type of sand tool), the third evaluation value can be appropriately reduced. For example, if the buried sand tool represents fear, it means that the visitor has a strong fear, and the third evaluation value can be reduced by the second step, for example, by 5-10 points.
[0063] If the buried sand tool has life attributes (i.e. the second type of sand tool), it may indicate that the visitor has some kind of repression or neglect of life. The fourth assessment value can be reduced by the third step. For example, the fourth assessment value can be reduced by 5-8 points.
[0064] It can be concluded from the above that this embodiment takes into account that the covered sand tools can reflect the visitor's deep inner hidden emotions, conflicts or wishes, and adjusts the third evaluation value and the fourth evaluation value based on the covered sand tools, which can improve the accuracy of sentiment analysis.
[0065] In one embodiment of the present disclosure, determining the layout information of sand tools in the sand table work based on the image of the sand table work includes: Determine a blank area in the sand table artwork based on color information of the sand in the image of the sand table artwork; Add up the areas of the blank areas to get the area of the blank areas; Determine the density of the sand table artwork based on the area of the blank area and the total area of the sand table artwork; Determine the density as the layout information of the sand tools in the sand table work.
[0066] In this embodiment, since sand generally has a specific color feature, by setting a specific color threshold, an area with a color similar to that of the sand can be identified as a blank area. The areas of the identified blank areas are accumulated to obtain the area of the blank area. The area of each blank area can be characterized by calculating the number of pixels in each blank area.
[0067] Based on the area of the blank area, the density of the sand table work can be calculated. For example, the density of the sand table work can be calculated by the following formula: Density = 1 - the area of the blank area / the total area of the sand table work; Density reflects the distribution of sand tools in the sand tray space and is an important indicator for measuring the layout of the sand tray. The layout information of sand tools can provide important basis for psychological analysis. For example, sand tray works with higher density indicate the visitor's inner tension, depression or strong emotional conflict; while works with lower density indicate the visitor's inner emptiness, confusion or exploration state.
[0068] It can be concluded from the above that this embodiment calculates the density of the sand tools based on the image recognition method, and can use specific values to describe the distribution of the sand tools, thereby avoiding the uncertainty of subjective judgment.
[0069] In one embodiment of the present disclosure, determining the layout information of the sand tools in the sand table work based on the image of the sand table work also includes: Divide the image of the sand table work into multiple areas; Determine the balance of the sand table artwork’s image distribution based on the density of each area; The density and the balance of screen distribution are determined as the layout information of the sand tools in the sand table work.
[0070] In this embodiment, the sand table work can be further divided into multiple areas. For example, the rectangular sand table is taken as a plane, the center of the sand table is taken as the origin, and the plane rectangular coordinate system is established with the straight lines parallel to the bottom frame and the side frame of the sand table as the horizontal axis and the vertical axis, respectively, and the sand table is divided into four areas, each area corresponds to a quadrant, and the density and sparseness of the sand tools in each quadrant are calculated, and the differences in the density and sparseness of the sand tools in each quadrant are compared. If the density of each area is relatively close, it means that the picture distribution is relatively balanced; if the density of some areas is significantly higher or lower than that of other areas, it means that the picture distribution is unbalanced.
[0071] Optionally, the following formula may be used to calculate the screen distribution balance: Screen distribution balance = 1-(maximum density-minimum density) / maximum density The maximum density is the maximum value of the density in each region, and the minimum density is the minimum value of the density in each region.
[0072] The balance of the picture distribution can also provide an important basis for psychological analysis. Unbalanced picture distribution may reflect the client's inner contradictions, conflicts or specific psychological tendencies. For example, if a client's sand tray work has a very high density in one area, while other areas have almost no sand tools, it may suggest that the client is overly concerned about one aspect or avoids other aspects in real life.
[0073] From the above, it can be concluded that density reflects the overall distribution of sand tools in the entire sand tray space, while the balance of picture distribution reflects the degree of distribution balance of sand tools between different areas. Determining density and picture distribution balance together as the layout information of sand tools in sand tray works can analyze the distribution of sand tools more carefully and help analysts develop more targeted treatment plans.
[0074] In one embodiment of the present disclosure, adjusting the first evaluation value based on the layout information of the sand tools in the sand table work includes: adjusting the third evaluation value and the fifth evaluation value based on the density; Determining a first adjustment parameter based on the picture distribution balance; The first evaluation value is adjusted based on the first adjustment parameter.
[0075] In this embodiment, a specific implementation method of adjusting the first evaluation value based on the layout information of the sand tools in the sand table work is provided.
[0076] Optionally, adjusting the third evaluation value and the fifth evaluation value based on the density may be described in detail as follows: If the density is greater than the third threshold, the third evaluation value is reduced by a fourth step length; If the density is less than the fourth threshold, the fifth evaluation value is reduced by a fifth step; wherein the third threshold is greater than the fourth threshold.
[0077] In this embodiment, if the density of the sand tray work is greater than the third threshold, it indicates that the sand tray work is very dense, the visitor's inner emotions are relatively strong and complex, and the emotional stability is poor, and the third evaluation value can be reduced by the fourth step. For example, the third evaluation value was originally 30 points. If it is detected that the density is greater than the third threshold, the third evaluation value can be reduced by 5-10 points. If the density of the sand tray work is less than the fourth threshold, it indicates that the work is very sparse, the visitor's heart is relatively empty or in an exploratory state, the psychological content is relatively small, and the psychological richness is poor. The fifth evaluation value can be reduced by the fifth step. For example, the fifth evaluation value was originally 20 points. If it is detected that the density is less than the fourth threshold, the fifth evaluation value can be reduced by 5-8 points.
[0078] Furthermore, considering that the distribution of pictures is well balanced, it indicates that the client is relatively balanced and has a good overall emotional state, and the first evaluation value can be increased; on the contrary, if the distribution of pictures is unbalanced, it indicates that there is an imbalance in some or certain aspects of the client's inner and outer, past and future, consciousness and unconsciousness, emotion and reality, and the first evaluation value needs to be lowered.
[0079] Optionally, the first adjustment parameter may be determined based on the positive correlation between the picture distribution balance and the first adjustment parameter, and then the adjusted first evaluation value may be obtained by multiplying the first adjustment parameter and the first evaluation value. The first adjustment parameter may be calculated using the following formula:
[0080] in, represents the first adjustment parameter, is the preset scaling factor, Indicates the balance of picture distribution.
[0081] It can be concluded from the above that this embodiment adjusts the first evaluation value based on the density and the picture distribution balance, which can more accurately capture the visitor's emotional state changes and improve the accuracy of emotional state evaluation.
[0082] Corresponding to the sentiment analysis method of the above embodiment, Figure 2 This is a structural block diagram of a sentiment analysis device provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 2The sentiment analysis device 20 includes: a first calculation module 21, an image recognition module 22, a second calculation module 23 and a result output module 24. The first calculation module 21 is used to determine a first evaluation value based on the attribute information of the sand tools in the first sand tool set; the first sand tool set is a set of sand tools in the sand table work; An image recognition module 22 is used to determine the layout information of the sand tools in the sand table work based on the image of the sand table work; A second calculation module 23 is used to adjust the first evaluation value based on the layout information of the sand tools in the sand table work to obtain a second evaluation value; The result output module 24 is used to select a corresponding report template based on the second evaluation value, and output the sentiment analysis result based on the report template.
[0083] In one embodiment of the present disclosure, the first calculation module 21 is specifically used for: Determining a first evaluation value based on attribute information of sand tools in a first sand tool set; the first sand tool set is a set of sand tools in a sand table work; Determine the layout information of the sand tools in the sand table work based on the image of the sand table work; The first evaluation value is adjusted based on the layout information of the sand tools in the sand table work to obtain a second evaluation value; A corresponding report template is selected based on the second evaluation value, and a sentiment analysis result is output based on the report template.
[0084] In one embodiment of the present disclosure, the first calculation module 21 is further configured to: Determine a third evaluation value based on the number of the first type of sand tools; the first type of sand tools are sand tools whose corresponding attribute information contains negative emotional attributes; Determine a fourth evaluation value based on the number of the second type of sand tools; the second type of sand tools are sand tools whose corresponding attribute information includes life attributes; Determine a fifth evaluation value based on the number of types of all sand tools in the sand table work; The third evaluation value, the fourth evaluation value and the fifth evaluation value are weightedly summed to obtain the first evaluation value.
[0085] In one embodiment of the present disclosure, the first calculation module 21 is further configured to: Performing target recognition on the sand tools in the image of the sand table work, and determining a third sand tool set based on the target recognition result; Compare the third set of sand tools with the first set of sand tools to obtain the fourth set of sand tools that is covered in the sand table work; The third evaluation value and the fourth evaluation value are adjusted based on the attribute information of the sand tools in the fourth sand tool set.
[0086] In one embodiment of the present disclosure, the image recognition module 22 is specifically used for: Determine a blank area in the sand table artwork based on color information of the sand in the image of the sand table artwork; Add up the areas of the blank areas to get the area of the blank areas; Determine the density of the sand table artwork based on the area of the blank area and the total area of the sand table artwork; Determine the density as the layout information of the sand tools in the sand table work.
[0087] In one embodiment of the present disclosure, the image recognition module 22 is further configured to: Divide the image of the sand table work into multiple areas; Determine the balance of the sand table artwork’s image distribution based on the density of each area; The density and the balance of screen distribution are determined as the layout information of the sand tools in the sand table work.
[0088] In one embodiment of the present disclosure, the second calculation module 23 is specifically used to: adjusting the third evaluation value and the fifth evaluation value based on the density; Determining a first adjustment parameter based on the picture distribution balance; The first evaluation value is adjusted based on the first adjustment parameter.
[0089] See also Figure 3 , Figure 3 Schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Figure 3 The electronic device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of each module / unit in the above-mentioned device embodiments, such as Figure 2 The functions of modules 21 to 24 are shown.
[0090] It should be understood that in the embodiment of the present disclosure, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0091] The input device 302 may include a touch panel, a fingerprint collection sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.
[0092] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.
[0093] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present disclosure can execute the implementation methods described in the first and second embodiments of the sentiment analysis method provided in the embodiments of the present disclosure, and can also execute the implementation methods of the electronic device described in the embodiments of the present disclosure, which will not be repeated here.
[0094] In another embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the processor, all or part of the processes in the above-mentioned embodiment method are implemented, and the computer program can also be completed by instructing the relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0095] The computer-readable storage medium may be an internal storage unit of the electronic device of any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0096] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.
[0097] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0098] In the several embodiments provided in the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.
[0099] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure.
[0100] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0101] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A sentiment analysis method, characterized in that: include: Determining a first evaluation value based on attribute information of sand tools in a first sand tool set; the first sand tool set is a collection of sand tools in a sand table work; Determine the layout information of the sand tools in the sand table work based on the image of the sand table work; Adjusting the first evaluation value based on the layout information of the sand tools in the sand table work to obtain a second evaluation value; A corresponding report template is selected based on the second evaluation value, and a sentiment analysis result is output based on the report template.
2. The sentiment analysis method according to claim 1, characterized in that: The determining of the first evaluation value based on the attribute information of the sand tools in the first sand tool set includes: Determine a third evaluation value based on the number of the first type of sand tools; the first type of sand tools are sand tools whose corresponding attribute information contains negative emotional attributes; Determine a fourth evaluation value based on the number of the second type of sand tools; the second type of sand tools are sand tools whose corresponding attribute information includes life attributes; Determine a fifth evaluation value based on the number of types of all sand tools in the sand table work; The first evaluation value is obtained by weighted summing the third evaluation value, the fourth evaluation value and the fifth evaluation value.
3. The sentiment analysis method according to claim 2, characterized in that: Also includes: Selecting a second set of sand tools for reuse from a plurality of first sets of sand tools corresponding to a plurality of historical sand table works; The weights of the third evaluation value and the fourth evaluation value are adjusted based on the attribute information of the sand tools in the second sand tool set.
4. The sentiment analysis method according to claim 2, characterized in that: Also includes: Performing target recognition on the sand tools in the image of the sand table work, and determining a third sand tool set based on the target recognition result; Comparing the third sand tool set with the first sand tool set to obtain a fourth sand tool set covered in the sand table work; The third evaluation value and the fourth evaluation value are adjusted based on the attribute information of the sand tools in the fourth sand tool set.
5. The sentiment analysis method according to claim 2, characterized in that: The step of determining the layout information of the sand tools in the sand table work based on the image of the sand table work includes: Determine a blank area in the sand table artwork based on the color information of the sand in the image of the sand table artwork; Adding up the areas of the blank areas to obtain the area of the blank areas; Determine the density of the sand table artwork based on the area of the blank area and the total area of the sand table artwork; The density is determined as layout information of the sand tools in the sand table work.
6. The sentiment analysis method according to claim 5, characterized in that: The step of determining the layout information of the sand tools in the sand table work based on the image of the sand table work also includes: Dividing the image of the sand table work into a plurality of areas; Determining the image distribution balance of the sand table work based on the density of each area; The density and the screen distribution balance are determined as layout information of the sand tools in the sand table work.
7. The sentiment analysis method according to claim 6, characterized in that: The adjusting the first evaluation value based on the layout information of the sand tools in the sand table work includes: adjusting the third evaluation value and the fifth evaluation value based on the density; Determining a first adjustment parameter based on the picture distribution balance; The first evaluation value is adjusted based on the first adjustment parameter.
8. A sentiment analysis device, characterized in that: include: A first calculation module is used to determine a first evaluation value based on attribute information of sand tools in a first sand tool set; the first sand tool set is a set of sand tools in a sand table work; An image recognition module, used to determine the layout information of the sand tools in the sand table work based on the image of the sand table work; A second calculation module is used to adjust the first evaluation value based on the layout information of the sand tools in the sand table work to obtain a second evaluation value; A result output module is used to select a corresponding report template based on the second evaluation value and output a sentiment analysis result based on the report template.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.