Pressure identification methods, devices, equipment and storage media
Patent Information
- Application Number
- CN202210845216.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2026-08-11
- Estimated Expiration
- 2042-07-18
AI Technical Summary
[0003]压力有助于个体适应环境,维护机体功能的完整性;但长期处于压力下会产生一系列不良后果,对人的身心健康造成直接的损害
[0036]本发明实施例提供的压力识别方法、装置、设备和存储介质,通过将获取的已标注生理信号样本和待识别生理信号样本输入至孪生网络,实现了基于相同基准提取已标注生理信号样本的深度特征和待识别生理信号样本的深度特征,进而通过将两个生理信号样本之间的差异特征输入至压力识别模型并借助已标注的生理样本的压力强度标注,实现对待识别生理信号样本对应的压力强度的识别。该方法通过预测两个生理信号样本之间的差异,仅利用单个已进行压力强度标注的已标注生理信号样本实现了对同一用户的待识别生理样本的快速和准确识别。
Smart Images

Figure CN115409051B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a pressure recognition method, apparatus, device, and storage medium. Background Technology
[0002] Individual stress refers to the psychological tension or state formed under the influence of emotions such as anxiety or fear. The generation of stress is related to the environmental stimuli an individual faces and their assessment of their coping abilities. For example, when faced with situational stimuli such as major natural or social setbacks, individuals experience stress due to tension when they feel powerless to cope. In this state, biological responses such as muscle tension, increased blood pressure, accelerated heart rate, increased respiratory rate, and enhanced glandular activity occur. In modern society, with the increasingly fast pace of work and life, people face various kinds of stress, such as social environmental stress, work stress, and personal achievement stress.
[0003] Stress helps individuals adapt to their environment and maintain the integrity of bodily functions; however, prolonged stress can lead to a series of adverse consequences, directly harming physical and mental health. Therefore, accurately identifying user stress is a crucial issue that requires attention from those skilled in the art. Summary of the Invention
[0004] To address the problems in the prior art, embodiments of the present invention provide a pressure identification method, apparatus, device, and storage medium.
[0005] Specifically, the embodiments of the present invention provide the following technical solutions:
[0006] In a first aspect, embodiments of the present invention provide a pressure recognition method, comprising:
[0007] Acquire labeled physiological signal samples and unidentified physiological signal samples from the target user;
[0008] The labeled physiological signal sample and the physiological signal sample to be identified are input into a Siamese network to obtain a first deep feature corresponding to the labeled physiological signal sample extracted by a first sub-network of the Siamese network and a second deep feature corresponding to the physiological signal sample to be identified extracted by a second sub-network of the Siamese network; the weights of the first sub-network and the second sub-network of the Siamese network are shared.
[0009] Based on the difference between the first depth feature corresponding to the labeled physiological signal sample and the second depth feature corresponding to the physiological signal sample to be identified, the pressure intensity identification result corresponding to the physiological signal sample to be identified is obtained by using the trained pressure identification model.
[0010] Furthermore, the pressure recognition method also includes:
[0011] Physiological signal samples from at least one user are segmented to obtain multiple physiological signal sample fragments;
[0012] Based on the plurality of physiological signal sample fragments, at least one pair of physiological signal sample fragments is constructed; the pair of physiological signal sample fragments includes a first physiological signal sample fragment and a second physiological signal sample fragment.
[0013] For each pair of physiological signal sample segments, the first physiological signal sample segment is input into the first sub-network of the Siamese network to obtain the third deep feature corresponding to the first physiological signal sample segment.
[0014] The second physiological signal sample fragment is input into the second sub-network of the Siamese network to obtain the fourth deep feature corresponding to the second physiological signal sample fragment.
[0015] The third and fourth depth features are input into the pressure intensity ranking model to obtain the first sequence number corresponding to the first physiological signal sample fragment and the second sequence number corresponding to the second physiological signal sample fragment output by the pressure intensity ranking model.
[0016] Based on the relationship between the first and second serial numbers and the relationship between the pressure intensities corresponding to the first and second physiological signal sample segments, the twin network and the pressure intensity ranking model are trained to obtain the trained twin network and the trained pressure intensity ranking model.
[0017] Furthermore, the pressure recognition method also includes:
[0018] Acquire physiological signal sample pairs, wherein the physiological signal sample pairs include: a first physiological signal sample, a second physiological signal sample, a first pressure intensity corresponding to the first physiological signal sample, and a second pressure intensity corresponding to the second physiological signal sample;
[0019] The first physiological signal sample in the physiological signal sample pair is input into the first sub-network of the trained Siamese network to obtain the fifth deep feature corresponding to the first physiological signal sample;
[0020] The second physiological signal sample from the physiological signal sample pair is input into the second sub-network of the trained Siamese network to obtain the sixth deep feature corresponding to the second physiological signal sample.
[0021] The fifth and sixth depth features are input into the pressure recognition model to obtain the first pressure intensity difference between the third pressure intensity corresponding to the first physiological signal sample and the fourth pressure intensity corresponding to the second physiological signal sample output by the pressure recognition model.
[0022] The pressure recognition model is trained based on the first pressure intensity corresponding to the first physiological signal sample, the second pressure intensity corresponding to the second physiological signal sample, and the difference between the first pressure intensity.
[0023] Further, the step of obtaining the pressure intensity recognition result corresponding to the physiological signal sample to be identified by utilizing the trained pressure recognition model based on the difference features between the first depth features corresponding to the labeled physiological signal sample and the second depth features corresponding to the physiological signal sample to be identified includes:
[0024] The difference between the first depth feature corresponding to the labeled physiological signal sample and the second depth feature corresponding to the physiological signal sample to be identified is input into the trained pressure recognition model to obtain the second pressure intensity difference between the pressure intensity corresponding to the labeled physiological signal sample and the pressure intensity corresponding to the physiological signal sample to be identified, as output by the pressure recognition model.
[0025] The pressure intensity identification result of the physiological signal sample to be identified is obtained based on the difference between the pressure intensity corresponding to the labeled physiological signal sample and the second pressure intensity.
[0026] Furthermore, the identification method also includes:
[0027] Further, the physiological signal sample to be identified is subjected to target processing to obtain the first time-frequency sequence data corresponding to the physiological signal sample to be identified. The first time-frequency sequence data is input into a Siamese network to obtain the first deep feature corresponding to the physiological signal sample to be identified. The target processing includes at least one of the following: cleaning, filtering and smoothing, and spectrum calculation.
[0028] The labeled physiological signal samples are subjected to target processing to obtain the second time-frequency sequence data corresponding to the labeled physiological signal samples. The second time-frequency sequence data is input into a Siamese network to obtain the second deep feature corresponding to the labeled physiological signal samples. The target processing includes at least one of the following: cleaning, filtering and smoothing, and spectrum calculation.
[0029] Secondly, embodiments of the present invention also provide a pressure recognition device, comprising:
[0030] The acquisition module is used to acquire labeled physiological signal samples and physiological signal samples to be identified from the target user.
[0031] The processing module is used to input the labeled physiological signal sample and the physiological signal sample to be identified into a Siamese network to obtain a first deep feature corresponding to the labeled physiological signal sample extracted based on a first sub-network of the Siamese network and a second deep feature corresponding to the physiological signal sample to be identified extracted based on a second sub-network of the Siamese network; the weights of the first sub-network and the second sub-network of the Siamese network are shared.
[0032] The identification module is used to obtain the pressure intensity identification result of the physiological signal sample to be identified by using a trained pressure identification model based on the difference between the first depth feature corresponding to the labeled physiological signal sample and the second depth feature corresponding to the physiological signal sample to be identified.
[0033] Thirdly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the pressure recognition method as described in the first aspect.
[0034] Fourthly, embodiments of the present invention also provide a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the pressure recognition method as described in the first aspect.
[0035] Fifthly, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the pressure recognition method as described in the first aspect.
[0036] The pressure recognition method, apparatus, device, and storage medium provided in this invention, by inputting acquired labeled physiological signal samples and physiological signal samples to be identified into a Siamese network, achieves the extraction of depth features of the labeled physiological signal samples and the physiological signal samples to be identified based on the same benchmark. Then, by inputting the difference features between the two physiological signal samples into a pressure recognition model and utilizing the pressure intensity annotations of the labeled physiological samples, the pressure intensity corresponding to the physiological signal sample to be identified is recognized. This method, by predicting the difference between two physiological signal samples, achieves rapid and accurate identification of the physiological sample to be identified for the same user using only a single labeled physiological signal sample with pressure intensity annotations. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0038] Figure 1 This is a schematic flowchart of the pressure recognition method provided in an embodiment of the present invention;
[0039] Figure 2 This is a schematic diagram of physiological signal sample pairs and physiological signal sample fragment pairs provided in the embodiments of the present invention;
[0040] Figure 3 This is a schematic diagram of twin network feature extraction provided in an embodiment of the present invention;
[0041] Figure 4 This is another schematic flowchart of the pressure recognition method provided in this embodiment of the invention;
[0042] Figure 5 This is a schematic diagram of the pressure recognition device provided in an embodiment of the present invention;
[0043] Figure 6 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0045] The method described in this invention can be applied to stress recognition scenarios to identify user stress.
[0046] In related technologies, stress is associated with environmental stimuli and an individual's assessment of their coping abilities. In modern society, with the increasingly fast pace of work and life, people face various forms of stress, such as social and environmental stress, work stress, and personal achievement stress.
[0047] Stress helps individuals adapt to their environment and maintain the integrity of bodily functions; however, prolonged stress can lead to a series of adverse consequences, directly harming physical and mental health. Therefore, accurately identifying user stress is a crucial issue that requires attention from those skilled in the art.
[0048] The pressure recognition method of this invention, by inputting the acquired labeled physiological signal samples and the physiological signal samples to be identified into a Siamese network, achieves the extraction of depth features of the labeled physiological signal samples and the physiological signal samples to be identified based on the same benchmark. Then, by inputting the difference features between the two physiological signal samples into the pressure recognition model and utilizing the pressure intensity annotations of the labeled physiological samples, the method achieves the identification of the pressure intensity corresponding to the physiological signal sample to be identified. This method, by predicting the difference between two physiological signal samples, achieves rapid and accurate identification of the physiological sample to be identified for the same user using only a single labeled physiological signal sample with pressure intensity annotations.
[0049] The following is combined Figures 1-6 The technical solution of the present invention will be described in detail with reference to specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0050] Figure 1 This is a schematic flowchart of an embodiment of the pressure recognition method provided by the present invention. Figure 1 As shown, the method provided in this embodiment includes:
[0051] Step 101: Obtain labeled physiological signal samples and physiological signal samples to be identified from the target user.
[0052] Specifically, the method in this application embodiment can achieve stress or emotion identification and prediction for other samples of the user by acquiring only a single labeled sample of the user to be tested. That is, when performing user stress identification, it is only necessary to acquire a single labeled physiological signal sample of the user, and the stress identification results corresponding to other physiological signal samples of the user can be obtained based on the single labeled physiological signal sample. Here, the labeled physiological signal sample and the physiological signal sample to be identified are physiological signal samples obtained from stress testing of the same user. Optionally, in this application embodiment, the single labeled physiological signal sample is the labeled physiological signal sample, that is, the physiological signal sample has been identified and labeled with stress intensity (or emotion). The labeling of the physiological signal sample can be done manually or by other methods, and this application embodiment does not limit it; the physiological signal sample to be identified is the physiological signal sample that needs to be identified and predicted, that is, the user stress (or emotion) corresponding to the physiological signal sample to be identified needs to be identified and predicted.
[0053] Step 102: Input the labeled physiological signal samples and the physiological signal samples to be identified into the Siamese network to obtain the first deep features corresponding to the labeled physiological signal samples extracted by the first sub-network of the Siamese network and the second deep features corresponding to the physiological signal samples to be identified extracted by the second sub-network of the Siamese network; the weights of the first sub-network and the second sub-network of the Siamese network are shared.
[0054] Specifically, a Siamese network typically consists of two sub-neural networks with identical structures and shared weights. It measures the similarity between paired physiological signal samples by inputting them and calculating the distance between their feature representations. In this embodiment, the Siamese network comprises a first sub-network and a second sub-network, with shared weights, meaning their structures and parameters are consistent. Because the first and second sub-networks share weights, inputting labeled and unidentified physiological signal samples into the Siamese network ensures that the similarity measurement learning for these samples is based on the same benchmark, accurately achieving similarity measurement learning for physiological signal sample pairs. Optionally, the extracted deep features of the labeled and unidentified physiological signal samples can be different information or different parts of these two physiological signal samples.
[0055] Step 103: Based on the difference between the first depth features corresponding to the labeled physiological signal sample and the second depth features corresponding to the physiological signal sample to be identified, the pressure intensity identification result corresponding to the physiological signal sample to be identified is obtained by using the trained pressure identification model.
[0056] Specifically, after obtaining the first depth features corresponding to the labeled physiological signal sample and the second depth features corresponding to the physiological signal sample to be identified based on the Siamese network, the difference features between the first depth features corresponding to the labeled physiological signal sample and the second depth features corresponding to the physiological signal sample to be identified can be calculated, thereby inferring the state difference between the two physiological signal samples. In this embodiment, the pressure recognition model is used for user pressure recognition. The pressure recognition model obtains the difference features between the labeled physiological signal sample and the physiological signal sample to be identified, as well as the pressure intensity label of the labeled physiological signal sample, and outputs the pressure intensity corresponding to the physiological signal sample to be identified, thus realizing the pressure recognition of the physiological signal sample to be identified. That is, by inputting the difference features between two physiological signal samples into the trained pressure recognition model, the pressure recognition model can realize the recognition of the pressure intensity corresponding to the physiological signal sample to be identified based on the difference features between the two physiological signal samples and the pressure intensity label of the labeled physiological sample. This achieves fast and accurate identification of the physiological sample to be identified for the same user by predicting the state difference between two physiological signal samples and using only a single labeled physiological signal sample.
[0057] Furthermore, it is important to note that in existing technologies, the physiological signal characteristics of different subjects (test users) vary significantly due to factors such as age, gender, and physical condition. Moreover, their self-evaluation labels (annotations) exhibit substantial subjective bias. Therefore, using a general model to identify stress in new test users can lead to significant errors. To address these issues, current research typically requires collecting large amounts of data from test subjects to directly train individual models or fine-tune general models. However, collecting sufficient training data for each individual (user) consumes considerable human and time resources. Personalized modeling with only a small number of physiological signal samples from test subjects presents a more practical challenge.
[0058] This invention proposes a stress recognition method based on Siamese networks, aiming to model the stress intensity differences between paired physiological signal samples of the same subject. Because the constructed paired physiological signal samples come from different stress states of the same subject, modeling their stress intensity differences helps the proposed Siamese network learn deep features that are independent of individual characteristics but related to stress intensity. This method does not require acquiring new data from new test users during the training phase, and only requires a single labeled physiological signal sample from the test user for personalized calibration during the recognition phase. This reduces the number of physiological signal samples required from each test user while still achieving good stress recognition performance and results.
[0059] The method described in the above embodiments, by inputting the acquired labeled physiological signal samples and the physiological signal samples to be identified into a Siamese network, achieves the extraction of depth features of the labeled physiological signal samples and the physiological signal samples to be identified based on the same benchmark. Then, by inputting the difference features between the two physiological signal samples into the pressure recognition model, the pressure recognition model can identify the pressure intensity corresponding to the physiological signal sample to be identified based on the difference features between the two physiological signal samples and the pressure intensity label of the labeled physiological sample. This achieves rapid and accurate identification of the physiological sample to be identified for the same user by predicting the feature differences between the two physiological signal samples and using only a single labeled physiological signal sample with pressure intensity labeling.
[0060] In one embodiment, the stress recognition method further includes: segmenting the physiological signal sample of at least one user to obtain multiple physiological signal sample fragments;
[0061] Based on multiple physiological signal sample fragments, at least one pair of physiological signal sample fragments is constructed; the pair of physiological signal sample fragments includes a first physiological signal sample fragment and a second physiological signal sample fragment.
[0062] For each pair of physiological signal sample fragments, the first physiological signal sample fragment is input into the first sub-network of the Siamese network to obtain the third deep feature corresponding to the first physiological signal sample fragment;
[0063] The second physiological signal sample fragment is input into the second sub-network of the Siamese network to obtain the fourth deep feature corresponding to the second physiological signal sample fragment;
[0064] Inputting the third and fourth depth features into the pressure intensity ranking model yields the first sequence number corresponding to the first physiological signal sample fragment and the second sequence number corresponding to the second physiological signal sample fragment output by the pressure intensity ranking model.
[0065] Based on the relationship between the first and second serial numbers and the relationship between the pressure intensities corresponding to the first and second physiological signal sample segments, the twin network and the pressure intensity ranking model are trained to obtain the trained twin network and the trained pressure intensity ranking model.
[0066] Specifically, this embodiment of the application identifies the physiological samples of the same user by predicting the feature differences between two physiological signal samples, using only a single labeled physiological signal sample with pressure intensity annotation. To make the identification results more accurate, during the identification process, it is necessary to accurately extract the depth features of both the labeled and unlabeled physiological signal samples to accurately obtain the feature differences between the two samples. This allows for rapid and accurate identification of the unlabeled sample based on these feature differences. In this embodiment, the depth features of the physiological signal samples are extracted using a Siamese network. To ensure that the Siamese network accurately extracts the depth features and thus accurately determines the differences between the features, the Siamese network needs to be trained to achieve the desired effect of accurate extraction of depth features from the physiological signal samples.
[0067] However, collecting sufficient training data for Siamese network training consumes significant human and time resources, posing a serious challenge in modeling and training with limited physiological signals. This application addresses this issue by segmenting physiological signal samples into shorter segments to increase the amount of training data. On the other hand, since the intensity of the stimulus corresponding to each physiological signal sample is not uniformly distributed, the instantaneous pressure intensity of the same physiological signal sample will also vary. Using the pressure intensity label of the physiological signal sample itself instead of the pressure intensity label of the physiological signal sample segments would lead to significant labeling errors. Therefore, this application does not simply replace the pressure intensity label of each physiological signal sample segment with the pressure intensity label of the physiological signal sample sample before segmentation. Considering that although the absolute value of the pressure intensity corresponding to each physiological signal sample segment is difficult to estimate, their relative strength relationship is relatively clear, this application annotates the pressure strength relationship of each physiological signal sample segment to improve the accuracy of pressure labeling of physiological signal sample segments and the training effect of the Siamese network.
[0068] This application embodiment aims to enhance the accuracy of Siamese networks in recognizing deep features of physiological signal samples by segmenting the physiological signal samples to achieve data augmentation. Because the stimulus intensity of psychological state-evoking materials is not uniform, labeling segmented physiological signal sample fragments with the annotations of complete physiological signal samples will introduce significant errors. Therefore, this application embodiment, based on the characteristics of stress or emotion recognition tasks, generates physiological signal sample fragments sorted by the intensity of emotion or stress to train the Siamese network and the stress intensity ranking model. Supported by relevant psychological research, this application embodiment is based on the following assumption: for a specific user, compared to the natural state without stimulation, the intensity of emotion or stress during the evoked phase will change in the expected evoked direction. Therefore, in stress detection and recognition tasks, the goal of both the stimulus materials and the cognitive task is to increase the psychological stress of the participants. Thus, the ranking rule is set so that the stress score of the physiological signal sample fragments in the evoked phase is higher than that in the natural state phase without stimulus. Optionally, in emotion recognition tasks, the most commonly used continuous emotion quantification model is the valence-arousal two-dimensional model. The stress intensity ranking model and Siamese network are trained using the strength labels of the above two dimensions. Based on the content of the stimulus materials, each segment of the physiological signal sample can be labeled as either an increasing or decreasing intensity phase, thereby obtaining pairs of physiological signal sample fragments with a clear strength relationship. Further, after segmenting the physiological signal samples, the subset of physiological signal sample fragments with higher intensity is denoted as D. h A subset of physiological signal sample fragments with lower intensity is denoted as D. l For example, physiological signal sample fragments such as... Figure 2 As shown, the segmented physiological signal sample fragment can be represented as s i The corresponding stage is denoted as a(s) i If ), then the physiological signal sample fragment pair can be represented as (s i ,s j ), where a(s) i )∈D h ,a(s j )∈D l In this embodiment, physiological signal samples are segmented to obtain multiple physiological signal sample fragments, and physiological signal sample fragment pairs are constructed based on these fragments. Each physiological signal sample fragment pair includes a first physiological signal sample fragment and a second physiological signal sample fragment. The first and second physiological signal sample fragments correspond to different pressure intensity levels. Optionally, the first physiological signal sample fragment is labeled as the intensity increase stage, and the second physiological signal sample fragment is labeled as the intensity decrease stage.
[0069] The physiological signal sample fragments constructed by further augmenting the physiological signal samples are input into the Siamese network. For the input physiological signal sample fragment pairs (s) i ,s j The deep features output by the Siamese network can be denoted as (f(s)). i ),f(s j Further, physiological signal sample fragments are paired (s) i ,s j The depth features of f(s) i ),f(s j The third and fourth deep features are input into the pressure intensity ranking model. Then, the strength ranking of each physiological signal sample fragment in the physiological signal sample fragment pair output by the pressure intensity ranking model is compared with the pressure intensity labeling of each physiological signal sample fragment. Based on the comparison results, the Siamese network and the pressure intensity ranking model can be trained. Optionally, the pressure intensity ranking model consists of multiple fully connected layers, and the output layer maps the output to the (0,1) range through an activation function. Each branch within the pressure intensity ranking model should output a larger scalar for physiological signal sample fragments with higher intensity and a smaller scalar for physiological signal sample fragments with lower intensity. Inputting each physiological signal sample fragment in the physiological signal sample fragment pair into the Siamese network yields the corresponding deep features. Then, inputting the deep features corresponding to each physiological signal sample fragment into the pressure intensity ranking model yields two scalars representing the intensity of the physiological signal sample fragments, denoted as rank. i =f rank (f(s i ())(The first sequence number corresponding to the first physiological signal sample segment) and rank j =f rank (f(s j (The second sequence number corresponding to the second physiological signal sample segment) is used to optimize the emotional ranking of the segments by applying a loss function:
[0070]
[0071] The loss function accurately evaluates the accuracy of the pressure intensity ranking of each physiological signal sample output by the pressure intensity ranking model. ε is a margin selected within the range (0,1), representing the minimum allowable difference between two physiological signal sample segments of different intensities. When the ranking result matches the set strength relationship and the intensity difference is greater than ε, the loss function outputs 0. When the ranking result is inconsistent with the expectation, the network optimizes the Siamese network and the intensity ranking model by increasing the output of high-intensity segments and decreasing the output of low-intensity segments. Optionally, when the ranking result output by the intensity ranking model is inconsistent with the strength relationship determined based on the pressure intensity labels of each physiological signal sample segment, the Siamese network and the intensity ranking model continue to be trained. When the ranking result output by the intensity ranking model matches the strength relationship determined based on the pressure intensity labels of each physiological signal sample segment, it indicates that the Siamese network and the intensity ranking model have achieved the expected results after training. This application embodiment trains a Siamese network model, enabling the Siamese network to accurately extract the depth features of each physiological signal sample. This allows for accurate determination of the feature differences between the depth features of the physiological signal samples, and thus accurate identification of the physiological signal to be identified based on these feature differences, thereby improving the accuracy of user stress identification.
[0072] The method of the above embodiments, in a first aspect, increases the amount of training data by segmenting user physiological signal samples, reduces the manpower and time resources required for training data collection, and improves the efficiency of acquiring training data. Simultaneously, to avoid the problem of large labeling errors caused by using the labeling of physiological signal samples instead of physiological signal sample segments when labeling segmented physiological signal sample fragments (which are shorter than physiological signal samples) and making it difficult to estimate the absolute value of pressure intensity corresponding to each physiological signal sample fragment, the method addresses this issue. Firstly, since the intensity of the stimulus source corresponding to the physiological signal sample is not uniformly distributed, the instantaneous pressure intensity corresponding to the same physiological signal sample will also change. This application is based on the principle that the pressure intensity changes towards increasing pressure intensity when the user is in a stimulated state compared to their natural state without stimulation. That is, it applies pressure to each physiological signal sample fragment based on the relative strength relationship of each physiological signal sample fragment. The labeling of force intensity makes the labeling of each physiological signal sample segment more accurate and reasonable. This allows for more accurate training of the Siamese network and pressure intensity ranking model based on the relative strength relationships of each physiological signal sample segment. Optionally, if the ranking result output by the pressure intensity ranking model is inconsistent with the strength relationship determined by the pressure intensity labeling of each physiological signal sample segment, the Siamese network and pressure intensity ranking model can be further trained and their parameters adjusted based on the training samples. This makes the depth features of each physiological signal sample segment output by the Siamese network more accurate, and the pressure intensity ranking of each physiological signal sample segment output by the pressure intensity ranking model more accurate. When the ranking result output by the pressure intensity ranking model is consistent with the strength relationship determined by the pressure intensity labeling of each physiological signal sample segment, it indicates that the Siamese network and pressure intensity ranking model have achieved the expected results after training. In summary, this application trains a Siamese network model by segmenting user physiological signal samples and labeling the stress intensity of the physiological signal sample segments. This enables the trained Siamese network to accurately extract the depth features of each physiological signal sample and physiological signal sample segment, and to accurately determine the feature differences between the depth features of physiological signal samples. Consequently, it can accurately identify the physiological signal to be identified based on the feature differences between the depth features of physiological signal samples, thereby improving the accuracy of user stress identification.
[0073] In one embodiment, the pressure recognition method includes: acquiring a pair of physiological signal samples, wherein the pair of physiological signal samples includes: a first physiological signal sample, a second physiological signal sample, a first pressure intensity corresponding to the first physiological signal sample, and a second pressure intensity corresponding to the second physiological signal sample;
[0074] The first physiological signal sample in the physiological signal sample pair is input into the first sub-network of the trained Siamese network to obtain the fifth deep feature corresponding to the first physiological signal sample.
[0075] The second physiological signal sample from the physiological signal sample pair is input into the second sub-network of the trained Siamese network to obtain the sixth deep feature corresponding to the second physiological signal sample.
[0076] Input the fifth and sixth depth features into the pressure recognition model to obtain the first pressure intensity difference between the third pressure intensity corresponding to the first physiological signal sample and the fourth pressure intensity corresponding to the second physiological signal sample output by the pressure recognition model.
[0077] The pressure recognition model is trained based on the first pressure intensity corresponding to the first physiological signal sample, the second pressure intensity corresponding to the second physiological signal sample, and the difference between the first and second pressure intensities.
[0078] Specifically, in order for the pressure recognition model to accurately estimate and predict the pressure intensity difference between various sample pairs, the pressure recognition model needs to be trained. In this embodiment, physiological signal sample pairs are constructed using different physiological signal samples from the same user or different users, thus obtaining the training dataset for the pressure recognition model. Optionally, the physiological signal sample pairs are constructed as follows: Figure 2 As shown, the physiological signal sample pairs are all derived from physiological signal samples labeled with pressure intensity. For example, a sample pair consists of the first physiological signal sample (x... i ,y i ) and second physiological signal sample (x j ,y j ) constitutes, where y i and y j These are the pressure intensity labels corresponding to the first physiological signal sample and the second physiological signal sample, respectively. Optionally, d can be set. ij =y i -y j , where d ij The positive and negative signs were retained to characterize the relationship between the pressure intensity of the first physiological signal sample and the second physiological signal sample.
[0079] After constructing physiological signal sample pairs, the deep features corresponding to each physiological signal sample in the physiological signal sample pair are obtained by inputting the physiological signal sample pairs into the trained Siamese network. Optionally, the first physiological signal sample in the physiological signal sample pair is input into the first sub-network of the trained Siamese network to obtain the fifth deep feature corresponding to the first physiological signal sample; the second physiological signal sample in the physiological signal sample pair is input into the second sub-network of the trained Siamese network to obtain the sixth deep feature corresponding to the second physiological signal sample; then, the deep features corresponding to each physiological signal sample in the physiological signal sample pair are input into the pressure recognition model to obtain the first pressure intensity difference between the third pressure intensity corresponding to the first physiological signal sample and the fourth pressure intensity corresponding to the second physiological signal sample, thus realizing the estimation of the pressure difference between each physiological signal sample. It should be noted that the pressure recognition model obtains only the first pressure intensity difference between the third pressure intensity corresponding to the first physiological signal sample and the fourth pressure intensity corresponding to the second physiological signal sample, but does not obtain the third pressure intensity corresponding to the first physiological signal sample and the fourth pressure intensity corresponding to the second physiological signal sample. That is, this invention is based on the pressure intensity difference and the labeled physiological signal samples with pressure intensity annotation to realize the identification of the pressure intensity corresponding to other physiological signal samples.
[0080] Optionally, (x) i ,x j ,d ij The input Siamese network and the output deep features can be denoted as (f(x)). i ),f(x j The stress recognition model consists of multiple fully connected layers, with the output layer having only one neuron and not using an activation function. The difference between two deep features, i.e., (f(x)... i )-f(x j The input is fed into the pressure recognition model, and its output represents the pressure intensity difference between two physiological signal samples, denoted as reg. ij =f reg (f(x i ),f(x j To make this strength difference consistent with d ij To minimize the differences between them, the loss function can be defined as:
[0081]
[0082] The loss function can accurately evaluate the accuracy of the pressure intensity difference corresponding to each physiological signal sample output by the pressure recognition model. Specifically, under the condition that the loss function of the pressure recognition model satisfies certain conditions, optionally, when the value of the loss function is sufficiently small, i.e., the pressure intensity difference output by the pressure recognition model is equal to the pressure intensity difference d determined based on the pressure intensity labels of each physiological signal sample... ij When they are sufficiently close, it indicates that the Siamese network and the pressure recognition model have achieved the expected results after training; the pressure intensity difference output by the pressure recognition model and the pressure intensity difference d determined based on the pressure intensity labels of each physiological signal sample are considered to be close. ij If the difference is significant, it indicates that the Siamese network and the pressure recognition model need further training and parameter adjustments to make the depth features of each physiological signal sample output by the Siamese network more accurate, and the pressure intensity and the difference between pressure intensities of each physiological signal sample output by the pressure recognition model more accurate. Furthermore, if the depth features of each physiological signal sample output by the Siamese network and the pressure intensity differences of each physiological signal sample output by the pressure recognition model are sufficiently accurate, then accurate identification of the physiological signal sample to be identified can be achieved.
[0083] It should also be noted that the twin network is trained using an alternating training method in this embodiment. That is, both the stress intensity ranking model and the stress recognition model require feature extraction from physiological signal samples during training. The twin network is shared during the training of the stress intensity ranking model and the stress recognition model. After training the stress intensity ranking model and the twin network based on the output results of the stress intensity ranking model and the loss function, the trained twin network can be applied to the training of the stress recognition model. Furthermore, based on the training of the stress recognition model using the output results and the loss function, the twin network can be trained again using the same output results and loss function. This achieves alternating training of the twin network. By using this alternating training method, the twin network can be trained first during the training of the stress intensity ranking model, and then switched to the training of the stress recognition model. This process is repeated until the expected training goal of the twin network is achieved. This allows the alternatingly trained twin network to more accurately extract the deep features of physiological signal samples, thus enabling accurate identification of the physiological signal samples based on these accurate features.
[0084] The method described in the above embodiment constructs physiological signal sample pairs by using physiological signal samples labeled with pressure intensity, and inputs these physiological signal sample pairs into a trained Siamese network. This allows for the accurate acquisition of the depth features corresponding to each physiological signal sample in the physiological signal sample pair. Furthermore, the depth features corresponding to each physiological signal sample in the physiological signal sample pair are input into a pressure recognition model to obtain the pressure intensity difference between each physiological signal sample output by the pressure recognition model. The pressure intensity difference between the physiological signal samples output by the pressure recognition model is then compared with the pressure intensity difference determined based on the pressure intensity labels of each physiological signal sample. Based on the comparison result, the pressure recognition model can be accurately trained. The trained pressure recognition model can then accurately output the pressure intensity difference between each physiological signal sample, and finally, based on the accurate pressure intensity difference output by the pressure recognition model, the physiological signal sample to be identified can be recognized.
[0085] In one embodiment, based on the difference between the first depth feature corresponding to the labeled physiological signal sample and the second depth feature corresponding to the physiological signal sample to be identified, a trained pressure recognition model is used to obtain the pressure intensity recognition result corresponding to the physiological signal sample to be identified, including:
[0086] The difference between the first depth feature corresponding to the labeled physiological signal sample and the second depth feature corresponding to the physiological signal sample to be identified is input into the trained pressure recognition model to obtain the second pressure intensity difference between the pressure intensity corresponding to the labeled physiological signal sample and the pressure intensity corresponding to the physiological signal sample to be identified, as output by the pressure recognition model.
[0087] Based on the difference between the pressure intensity corresponding to the labeled physiological signal sample and the second pressure intensity, the pressure intensity identification result corresponding to the physiological signal sample to be identified is obtained.
[0088] Specifically, the labeled physiological signal samples and the physiological signal samples to be identified are input into a Siamese network to obtain the first depth feature corresponding to the labeled physiological signal sample and the second depth feature corresponding to the physiological signal sample to be identified. Then, the difference between the first depth feature corresponding to the labeled physiological signal sample and the second depth feature corresponding to the physiological signal sample to be identified can be determined. Furthermore, in this embodiment, the pressure recognition model can determine the pressure intensity difference between physiological signal samples based on the depth features corresponding to each physiological signal sample. That is, the first depth feature and the second depth feature are input into the pressure recognition model to obtain the pressure intensity difference between the pressure intensity corresponding to the labeled physiological signal sample and the pressure intensity corresponding to the physiological signal sample to be identified, as output by the pressure recognition model. This determines the corresponding pressure intensity difference between the labeled physiological signal sample and the physiological signal sample to be identified. Since the labeled physiological signal samples have already been identified and their pressure intensity labeled, given the determination of the corresponding pressure intensity difference between the physiological signal samples to be identified and the pressure intensity corresponding to the labeled physiological signal sample, the pressure intensity recognition result of the physiological signal sample to be identified can be obtained using the following formula:
[0089]
[0090] in, This indicates the pressure intensity identification result corresponding to the physiological signal sample to be identified. reg represents the pressure intensity difference between the labeled physiological signal sample and the physiological signal sample to be identified. y0 represents the pressure intensity corresponding to the labeled physiological signal sample, that is, the pressure intensity labeling of the labeled physiological signal sample.
[0091] In the above embodiments, by inputting the difference features between the first depth features corresponding to the labeled physiological signal sample and the second depth features corresponding to the physiological signal sample to be identified into the trained pressure recognition model, the pressure intensity difference between the pressure intensity corresponding to the labeled physiological signal sample and the pressure intensity corresponding to the physiological signal sample to be identified, as output by the pressure recognition model, is obtained. In other words, the pressure difference between each physiological signal sample is determined through the pressure recognition model. Since the labeled physiological signal sample has been labeled with pressure intensity, the pressure intensity recognition result of the physiological signal sample to be identified can be calculated based on the determined pressure intensity of the labeled physiological signal sample and the pressure intensity difference between the pressure intensity corresponding to the labeled physiological signal sample and the pressure intensity corresponding to the physiological signal sample to be identified, as output by the pressure model.
[0092] In one embodiment, the pressure recognition method includes: performing target processing on a physiological signal sample to be recognized to obtain first time-frequency sequence data corresponding to the physiological signal sample to be recognized; inputting the first time-frequency sequence data into a Siamese network to obtain first depth features corresponding to the physiological signal sample to be recognized; the target processing includes at least one of the following: cleaning, filtering and smoothing, and spectrum calculation;
[0093] The labeled physiological signal samples are subjected to target processing to obtain the second time-frequency sequence data corresponding to the labeled physiological signal samples. The second time-frequency sequence data is input into the Siamese network to obtain the second deep feature corresponding to the labeled physiological signal samples. The target processing includes at least one of the following: cleaning, filtering and smoothing, and spectrum calculation.
[0094] Specifically, in order to model the similarity between various physiological signal samples, this embodiment of the application utilizes a Siamese network to map the physiological signal samples to a new feature space. The Siamese network consists of two sub-neural networks with identical structures and shared weights. The feature extraction process of the Siamese network for physiological signal samples is as follows: Figure 3 As shown. Figure 3 As shown, before inputting physiological signal samples into the Siamese network, the physiological signal samples and the segmented physiological signal sample fragments need to undergo target processing. First, abnormal samples or abnormal sample fragments are deleted and filtered and smoothed for the input physiological signals such as photoplethysmography (PPG), electrical activity (EDA), and skin temperature (SKT). Second, artificial features are extracted according to the characteristics of each physiological signal: for EDA signals, the signal is decomposed into tonic and phasic components, and features such as mean, standard deviation, rise time, and number of fluctuations are extracted; for PPG signals, waveform peaks are detected, and features such as heart rate and heart rate variability are extracted; for SKT signals, features such as mean and standard deviation are extracted. In order to perform a more comprehensive analysis of the time-frequency domain information of the physiological signal samples, the spectral components of EDA and PPG signals are calculated by short-time Fourier transform to obtain time-frequency sequence data, which is then input into the Siamese network.
[0095] Optionally, in this embodiment, the Siamese network consists of two sub-networks with identical structures, sharing weights. For a single sub-network, the time-frequency sequence data obtained through short-time Fourier transform is first input into a two-layer bidirectional long short-term memory network (BLSTM) for deep feature extraction. Then, the dimensionality-reduced deep features are concatenated with artificial features and fused through a fully connected layer. This Siamese network is used during the training of the stress recognition model and the stress intensity ranking model to extract a deep representation in the new feature space. Optionally, inputting the processed physiological signal sample pairs or physiological signal sample fragment pairs into the Siamese network can obtain paired fused features (deep features), which can then be input into the stress prediction model to achieve user stress recognition. Optionally, in this embodiment, target processing is performed on the physiological signal sample to be identified and the labeled physiological signal sample respectively. Target processing includes cleaning, filtering and smoothing, and spectral calculation, achieving noise reduction of the physiological signal. This allows for more accurate extraction of the depth features corresponding to the physiological signal sample from the target-processed physiological signal sample. Specifically, after target processing of the physiological signal sample to be identified, a first time-frequency sequence data is obtained. Then, the first time-frequency sequence data and the artificial features extracted from the physiological signal sample to be identified are input into a Siamese network to obtain the first depth feature corresponding to the physiological signal sample to be identified. Similarly, the second time-frequency sequence data and the artificial features extracted from the labeled physiological signal sample are input into the Siamese network to obtain the second depth feature corresponding to the labeled physiological signal sample. Accurate extraction of the depth features of the physiological signal sample to be identified and the labeled physiological signal sample can accurately predict the pressure intensity corresponding to the physiological signal sample to be identified, thereby improving the accuracy of user pressure identification.
[0096] The method described in the above embodiment performs target processing on physiological signal samples, including cleaning, filtering and smoothing, and spectrum calculation, thereby achieving noise reduction of the physiological signal samples. Then, the noise-reduced physiological signal samples are input into a Siamese network, which enables accurate extraction of the depth features of the physiological signal samples. Based on the accurate depth features of the physiological signal samples, the pressure intensity between each physiological signal sample can be accurately determined, thereby improving the accuracy of user pressure recognition.
[0097] For example, the pressure recognition network structure and pressure recognition method flow of this application embodiment are as follows: Figure 4 As shown, the pressure recognition network structure consists of a Siamese network for feature extraction, a pressure recognition model, and a pressure intensity ranking model. First, it constructs pairs of physiological signal sample fragments (s... i ,s jThe physiological signal sample fragments are input into the Siamese network. Optionally, the physiological signal sample fragments s i Input the first subnetwork in the Siamese network, and input the physiological signal sample fragment s j The second subnetwork in the Siamese network is input, and the weights of the first and second subnetworks are shared. This yields the deep feature pairs (f(s)) corresponding to the physiological signal sample fragments output by the Siamese network. i ),f(s j Then, by inputting the depth feature pairs corresponding to the physiological signal sample fragment pairs into the pressure intensity ranking model, the rank of each physiological signal sample fragment in the physiological signal sample fragment pair output by the pressure intensity ranking model can be obtained. i ,rank j The ranking of physiological signal sample segments based on their strength and weakness is further compared with the labeling of each physiological signal sample segment in the physiological signal sample segment pair output by the pressure intensity ranking model. Based on the loss function L... rank This allows for the training of the Siamese network and the stress intensity ranking model. Then, the trained Siamese network is used to analyze the input physiological signal sample pairs (x... i ,x j By processing these features, the depth features f(x) corresponding to each physiological signal in the physiological signal sample pair can be obtained. i ),f(x j Then, the difference features f(xi)-f(xj) of the depth features corresponding to each physiological signal are input into the pressure recognition model, so that the pressure intensity difference reg corresponding to each physiological signal sample output by the pressure recognition model can be obtained. ij Then, the pressure intensity difference between two physiological signal samples output by the pressure recognition model is compared with the pressure intensity difference determined by the annotation of each physiological signal sample, based on the loss function L. regThis allows for alternating training of the Siamese network and training of the stress recognition model. Optionally, in this embodiment, the stress recognition model and stress intensity ranking model can be multilayer perceptrons. Finally, after completing the alternating training of the Siamese network and the training of the stress recognition model, the acquired labeled physiological signal samples and the physiological signal samples to be identified can be input into the alternatingly trained Siamese network to obtain the depth features of the labeled physiological signal samples and the depth features of the physiological signal samples to be identified. Then, by inputting the difference features between the two physiological signal samples into the stress recognition model, the stress recognition model can identify the stress intensity corresponding to the physiological signal sample to be identified based on the difference features between the two physiological signal samples and the stress intensity label of the labeled physiological sample. This achieves rapid and accurate identification of the physiological sample to be identified for the same user by predicting the state difference between the two physiological signal samples and using only a single labeled physiological signal sample.
[0098] The pressure identification device provided by the present invention is described below. The pressure identification device described below and the pressure identification method described above can be referred to in correspondence.
[0099] Figure 5 This is a structural schematic diagram of the pressure recognition device provided by the present invention. The pressure recognition device provided in this embodiment includes:
[0100] The acquisition module 710 is used to acquire labeled physiological signal samples and physiological signal samples to be identified from the target user.
[0101] The processing module 720 inputs the labeled physiological signal samples and the physiological signal samples to be identified into the Siamese network to obtain the first deep features corresponding to the labeled physiological signal samples extracted based on the first sub-network of the Siamese network and the second deep features corresponding to the physiological signal samples to be identified extracted based on the second sub-network of the Siamese network; the weights of the first sub-network and the second sub-network of the Siamese network are shared.
[0102] The recognition module 730 uses the trained pressure recognition model to obtain the pressure intensity recognition result of the physiological signal sample to be identified, based on the difference between the first depth feature corresponding to the labeled physiological signal sample and the second depth feature corresponding to the physiological signal sample to be identified.
[0103] Optionally, the processing module 720 is further configured to: segment the physiological signal sample of at least one user to obtain multiple physiological signal sample fragments;
[0104] Based on multiple physiological signal sample fragments, at least one pair of physiological signal sample fragments is constructed; the pair of physiological signal sample fragments includes a first physiological signal sample fragment and a second physiological signal sample fragment.
[0105] For each pair of physiological signal sample fragments, the first physiological signal sample fragment is input into the first sub-network of the Siamese network to obtain the third deep feature corresponding to the first physiological signal sample fragment;
[0106] The second physiological signal sample fragment is input into the second sub-network of the Siamese network to obtain the fourth deep feature corresponding to the second physiological signal sample fragment;
[0107] Inputting the third and fourth depth features into the pressure intensity ranking model yields the first sequence number corresponding to the first physiological signal sample fragment and the second sequence number corresponding to the second physiological signal sample fragment output by the pressure intensity ranking model.
[0108] Based on the relationship between the first and second serial numbers and the relationship between the pressure intensities corresponding to the first and second physiological signal sample segments, the twin network and the pressure intensity ranking model are trained to obtain the trained twin network and the trained pressure intensity ranking model.
[0109] Optionally, the processing module 720 is further configured to: acquire a pair of physiological signal samples, the pair of physiological signal samples including: a first physiological signal sample, a second physiological signal sample, a first pressure intensity corresponding to the first physiological signal sample, and a second pressure intensity corresponding to the second physiological signal sample;
[0110] The first physiological signal sample in the physiological signal sample pair is input into the first sub-network of the trained Siamese network to obtain the fifth deep feature corresponding to the first physiological signal sample.
[0111] The second physiological signal sample from the physiological signal sample pair is input into the second sub-network of the trained Siamese network to obtain the sixth deep feature corresponding to the second physiological signal sample.
[0112] Input the fifth and sixth depth features into the pressure recognition model to obtain the first pressure intensity difference between the third pressure intensity corresponding to the first physiological signal sample and the fourth pressure intensity corresponding to the second physiological signal sample output by the pressure recognition model.
[0113] The pressure recognition model is trained based on the first pressure intensity corresponding to the first physiological signal sample, the second pressure intensity corresponding to the second physiological signal sample, and the difference between the first and second pressure intensities.
[0114] Optionally, the recognition module 730 is specifically used to: input the difference features between the first depth features corresponding to the labeled physiological signal sample and the second depth features corresponding to the physiological signal sample to be identified into the trained pressure recognition model to obtain the second pressure intensity difference between the pressure intensity corresponding to the labeled physiological signal sample and the pressure intensity corresponding to the physiological signal sample to be identified, as output by the pressure recognition model.
[0115] Based on the difference between the pressure intensity corresponding to the labeled physiological signal sample and the second pressure intensity, the pressure intensity identification result corresponding to the physiological signal sample to be identified is obtained.
[0116] Optionally, the processing module 720 is further configured to: perform target processing on the physiological signal sample to be identified to obtain the first time-frequency sequence data corresponding to the physiological signal sample to be identified, and input the first time-frequency sequence data into the Siamese network to obtain the first deep feature corresponding to the physiological signal sample to be identified; the target processing includes at least one of the following: cleaning, filtering and smoothing, and spectrum calculation;
[0117] The labeled physiological signal samples are subjected to target processing to obtain the second time-frequency sequence data corresponding to the labeled physiological signal samples. The second time-frequency sequence data is input into the Siamese network to obtain the second deep feature corresponding to the labeled physiological signal samples. The target processing includes at least one of the following: cleaning, filtering and smoothing, and spectrum calculation.
[0118] The apparatus of this invention is used to execute the method in any of the foregoing method embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.
[0119] Figure 6 A schematic diagram of the physical structure of an electronic device is provided. This electronic device may include a processor 810, a communication interface 820, a memory 830, and a communication bus 840. The processor 810, communication interface 820, and memory 830 communicate with each other via the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute a pressure recognition method. This method includes: acquiring labeled physiological signal samples and physiological signal samples to be recognized from a target user; inputting the labeled physiological signal samples and physiological signal samples to be recognized into a Siamese network to obtain a first depth feature corresponding to the labeled physiological signal samples extracted by a first sub-network of the Siamese network and a second depth feature corresponding to the physiological signal samples to be recognized extracted by a second sub-network of the Siamese network; sharing weights between the first and second sub-networks of the Siamese network; and, based on the difference between the first depth feature corresponding to the labeled physiological signal samples and the second depth feature corresponding to the physiological signal samples to be recognized, using a trained pressure recognition model to obtain the pressure intensity recognition result corresponding to the physiological signal samples to be recognized.
[0120] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0121] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein when the program instructions are executed by a computer, the computer is able to execute the stress recognition method provided by the above methods, the method comprising: acquiring labeled physiological signal samples and physiological signal samples to be identified from a target user; inputting the labeled physiological signal samples and physiological signal samples to be identified into a Siamese network to obtain a first depth feature corresponding to the labeled physiological signal samples extracted based on a first sub-network of the Siamese network and a second depth feature corresponding to the physiological signal samples to be identified extracted based on a second sub-network of the Siamese network; the weights of the first sub-network and the second sub-network of the Siamese network are shared; and based on the difference features between the first depth feature corresponding to the labeled physiological signal samples and the second depth feature corresponding to the physiological signal samples to be identified, using a trained stress recognition model to obtain a stress intensity recognition result corresponding to the physiological signal samples to be identified.
[0122] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the stress recognition methods provided above. The method includes: acquiring labeled physiological signal samples and physiological signal samples to be identified from a target user; inputting the labeled physiological signal samples and physiological signal samples to be identified into a Siamese network to obtain a first depth feature corresponding to the labeled physiological signal samples extracted by a first sub-network of the Siamese network and a second depth feature corresponding to the physiological signal samples to be identified extracted by a second sub-network of the Siamese network; sharing weights between the first and second sub-networks of the Siamese network; and, based on the difference features between the first depth feature corresponding to the labeled physiological signal samples and the second depth feature corresponding to the physiological signal samples to be identified, using a trained stress recognition model to obtain a stress intensity recognition result corresponding to the physiological signal samples to be identified.
[0123] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0124] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A pressure recognition method, characterized by, include: Acquire labeled physiological signal samples and unidentified physiological signal samples from the target user; The physiological signals include pulse waves, electrical skin signals, and skin temperature; The labeled physiological signal sample and the physiological signal sample to be identified are input into a Siamese network to obtain a first deep feature corresponding to the labeled physiological signal sample extracted by a first sub-network of the Siamese network and a second deep feature corresponding to the physiological signal sample to be identified extracted by a second sub-network of the Siamese network; the weights of the first sub-network and the second sub-network of the Siamese network are shared. Based on the difference between the first depth feature corresponding to the labeled physiological signal sample and the second depth feature corresponding to the physiological signal sample to be identified, the pressure intensity identification result corresponding to the physiological signal sample to be identified is obtained by using the trained pressure identification model. The method further includes: The physiological signal sample of at least one user is segmented to obtain multiple physiological signal sample fragments; Based on the plurality of physiological signal sample fragments, at least one pair of physiological signal sample fragments is constructed; the pair of physiological signal sample fragments includes a first physiological signal sample fragment and a second physiological signal sample fragment. For each pair of physiological signal sample segments, the first physiological signal sample segment is input into the first sub-network of the Siamese network to obtain the third deep feature corresponding to the first physiological signal sample segment. The second physiological signal sample fragment is input into the second sub-network of the Siamese network to obtain the fourth deep feature corresponding to the second physiological signal sample fragment. The third and fourth depth features are input into the pressure intensity ranking model to obtain the first sequence number corresponding to the first physiological signal sample fragment and the second sequence number corresponding to the second physiological signal sample fragment output by the pressure intensity ranking model. Based on the relationship between the first and second serial numbers and the relationship between the pressure intensities corresponding to the first and second physiological signal sample segments, the twin network and the pressure intensity ranking model are trained to obtain the trained twin network and the trained pressure intensity ranking model.
2. The pressure identification method according to claim 1, characterized in that, Also includes: Acquire physiological signal sample pairs, wherein the physiological signal sample pairs include: a first physiological signal sample, a second physiological signal sample, a first pressure intensity corresponding to the first physiological signal sample, and a second pressure intensity corresponding to the second physiological signal sample; The first physiological signal sample in the physiological signal sample pair is input into the first sub-network of the trained Siamese network to obtain the fifth deep feature corresponding to the first physiological signal sample; The second physiological signal sample from the physiological signal sample pair is input into the second sub-network of the trained Siamese network to obtain the sixth deep feature corresponding to the second physiological signal sample. The fifth and sixth depth features are input into the pressure recognition model to obtain the first pressure intensity difference between the third pressure intensity corresponding to the first physiological signal sample and the fourth pressure intensity corresponding to the second physiological signal sample output by the pressure recognition model. The pressure recognition model is trained based on the first pressure intensity corresponding to the first physiological signal sample, the second pressure intensity corresponding to the second physiological signal sample, and the difference between the first pressure intensity.
3. The pressure identification method according to claim 1 or 2, characterized in that, The step of obtaining the pressure intensity recognition result corresponding to the physiological signal sample to be identified by using the trained pressure recognition model based on the difference features between the first depth features corresponding to the labeled physiological signal sample and the second depth features corresponding to the physiological signal sample to be identified includes: The difference between the first depth feature corresponding to the labeled physiological signal sample and the second depth feature corresponding to the physiological signal sample to be identified is input into the trained pressure recognition model to obtain the second pressure intensity difference between the pressure intensity corresponding to the labeled physiological signal sample and the pressure intensity corresponding to the physiological signal sample to be identified, as output by the pressure recognition model. The pressure intensity identification result of the physiological signal sample to be identified is obtained based on the difference between the pressure intensity corresponding to the labeled physiological signal sample and the second pressure intensity.
4. The pressure identification method according to claim 3, characterized in that, Also includes: The target processing is performed on the physiological signal sample to be identified to obtain the first time-frequency sequence data corresponding to the physiological signal sample to be identified. The first time-frequency sequence data is input into a Siamese network to obtain the first deep feature corresponding to the physiological signal sample to be identified. The target processing includes at least one of the following: cleaning, filtering and smoothing, and spectrum calculation. The labeled physiological signal samples are subjected to target processing to obtain the second time-frequency sequence data corresponding to the labeled physiological signal samples. The second time-frequency sequence data is input into a Siamese network to obtain the second deep feature corresponding to the labeled physiological signal samples. The target processing includes at least one of the following: cleaning, filtering and smoothing, and spectrum calculation.
5. A pressure identification device, characterized by include: The acquisition module is used to acquire labeled physiological signal samples and physiological signal samples to be identified from the target user. The physiological signals include pulse waves, electrical skin signals, and skin temperature; The processing module is used to input the labeled physiological signal sample and the physiological signal sample to be identified into a Siamese network to obtain a first deep feature corresponding to the labeled physiological signal sample extracted based on a first sub-network of the Siamese network and a second deep feature corresponding to the physiological signal sample to be identified extracted based on a second sub-network of the Siamese network; the weights of the first sub-network and the second sub-network of the Siamese network are shared. The identification module is used to obtain the pressure intensity identification result of the physiological signal sample to be identified by using the trained pressure identification model based on the difference between the first depth feature corresponding to the labeled physiological signal sample and the second depth feature corresponding to the physiological signal sample to be identified. The processing module is also used to: segment the physiological signal sample of at least one user to obtain multiple physiological signal sample fragments; Based on the plurality of physiological signal sample fragments, at least one pair of physiological signal sample fragments is constructed; the pair of physiological signal sample fragments includes a first physiological signal sample fragment and a second physiological signal sample fragment. For each pair of physiological signal sample segments, the first physiological signal sample segment is input into the first sub-network of the Siamese network to obtain the third deep feature corresponding to the first physiological signal sample segment. The second physiological signal sample fragment is input into the second sub-network of the Siamese network to obtain the fourth deep feature corresponding to the second physiological signal sample fragment. The third and fourth depth features are input into the pressure intensity ranking model to obtain the first sequence number corresponding to the first physiological signal sample fragment and the second sequence number corresponding to the second physiological signal sample fragment output by the pressure intensity ranking model. Based on the relationship between the first and second serial numbers and the relationship between the pressure intensities corresponding to the first and second physiological signal sample segments, the twin network and the pressure intensity ranking model are trained to obtain the trained twin network and the trained pressure intensity ranking model.
6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the pressure recognition method as described in any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by the processor, it implements the pressure recognition method as described in any one of claims 1 to 4.
8. A computer program product having stored thereon executable instructions which, when executed by a computer, cause the computer to carry out the method of claim 1. When executed by the processor, this instruction causes the processor to implement the pressure identification method as described in any one of claims 1 to 4.