Abstract:
The present invention relates to a method for quantifying stress in a user, wherein said method allows establishing discrimination between stressed users and relaxed users. The invention is characterized by the use of stress patterns based on sigmoid transfer functions to allow quantifying stress in a larger number of situations.

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application is filed under 35 U.S.C. §119(e) and claims priority to U.S. Provisional Patent Application No. 61/565,206, filed Nov. 30, 2011 and entitled “Method for Quantifying Stress in a User Description” in the name of Carmen SÁNCHEZ ÁVILA et al., which is hereby incorporated herein by reference in its entirety. 
     
    
     OBJECT OF THE INVENTION 
       [0002]    The present invention relates to a method for quantifying stress in a user, wherein said method allows establishing discrimination between stressed users and relaxed users. The invention is characterized by the use of stress patterns based on sigmoid transfer functions to allow quantifying stress in a larger number of situations. 
       BACKGROUND OF THE INVENTION 
       [0003]    Studies which seek to objectively assess the stress level in a user are known in the state of the art. For example, there is enormous interest in developing safety devices which control user access to restricted areas, for example by means of iris or fingerprint recognition or password inputting such that only authorized users have the possibility of having access. 
         [0004]    Nevertheless, the same user can seek access because he/she is violently forced or is threatened to do so. In this situation, the aforementioned safety devices should have resources which allow quantifying the stress level in preventing such coercive access attempt situations. To achieve this objective, it is necessary to have a method, in particular one that can be implemented in the safety device, which obtains a value that is a function of the stress level in the user. 
         [0005]    The detection of stress has been considered from different viewpoints and methods of approach. For example, there are studies providing a system which assess the stress level in a user by the manner and the rate at which he/she types characters in a computer keyboard. 
         [0006]    Other studies make use of facial recognition techniques to assess the stress level. 
         [0007]    There are studies closer to the present invention in which the stress level assessment techniques only make use of not necessarily invasive physiological signals. This is the case of measuring finger temperature, heart rate or blood pressure. 
         [0008]    In these cases, the physiological signals are modeled as random signals, mathematically manipulated as random variables, and therefore with an unpredictable behavior even though they are treatable by means of statistical techniques. As the present invention will do, stress level detection is sought by making use of these random signals assuming that their behavior on a statistical level changes in relation to the individual&#39;s mood. In the present invention, the random signals used are heart rate (HR) and galvanic skin response (GSR). The variables will be identified as “h” for heart rate and “g” for galvanic skin response. 
         [0009]    These signals are easily acquired from the human body of the user by means of sensors placed on his/her fingertips and offer a direct relationship with any alteration experienced in the user, such as a mood change, being in a dangerous situation, etc. Furthermore, this easy signal acquisition allows integrating these sensors in any access device. 
         [0010]    The response of a user to an external change modifying his/her stress level is not the same for each person. In order for the method to work properly, what will be referred to as a stress pattern or behavior pattern is used, which is simply a set of data associated with the user that allow determining the response or behavior of that user in at least two situations: relaxed and under stress. This stress pattern comprises at least one limited space of pairs, in the particular case of the present invention they will be (h,g), the heart rate and galvanic skin conductivity, respectively, characterizing the individual in the relaxed and stressed states. The limited space of pairs allows characterizing the individual; nevertheless, the invention makes use of the mean and a measure of dispersion as values sufficiently representative of the set of measurements for defining the pattern characterizing the individual. By means of the method according to the invention the current stress level of the individual is determined using the mentioned characterization (or pattern) and a measurement of the) parameters (h,g). This stress level is a real value defined in a specific interval. The range of variation is typically [0,1], the null value corresponding to a situation of complete relaxation and the value 1 to a maximum stress level. Any other interval can be transformed, for example by means of linear transformation, to interval [0,1] without entailing a qualitative difference in the stress assessment. 
         [0011]    The set of all the pairs making up the space of all the possible combinations of h and g is denoted as H×G, and each pair of points (h,g) corresponds to a sample of the heart rate h and galvanic skin response g signals in a specific instant. 
         [0012]    Given a new pair (h,g) taken from a reading, the definition of the stress pattern establishes a function which associates a real value to said pair. 
         [0013]    In the state of the art this function has been implemented as a sum of Gaussian membership functions within the fuzzy logic environment, i.e., each state (relaxed or stressed) has been modeled by including the behavior in one region of space H×G for each state. 
         [0014]    Despite the fact that Gaussian functions are positive functions for any value of their arguments, they rapidly decay for points of the domain located far from the maximum so for all practical purposes, for a specific threshold value, the function is considered null and therefore can be considered a support function limited and small. 
         [0015]    Additionally, Gaussian functions are described in the state of the art by using a mean and a dispersion. It can therefore be said that the support of the function only extends to interval [μ−σ*n,μ+σ*n] wherein and μ and σ denote the Gaussian function mean and dispersion, respectively, and n denotes the number of samples where it is typically high and determined by the pre-established confidence level. 
         [0016]    The following rules are proposed in the literature for detecting stress:
       if (h,g)εH gaussiana   relcjacion ×G gaussiana   relajacion (h,g)εH relaxation   Gaussian ×G relaxation   Gaussian , then stress does not exist   if (h,g)εH gaussiana   estrés ×G gaussiana   estrés , then stress exists;
 
wherein SE  N AL function   estries  corresponds with the signal used (h or g), the state can be relaxed or stress, and the functions described in the state of the art are Gaussian.
       
 
         [0019]    The technical problem that arises in the state of the art can mathematically be expressed as follows: 
         [0000]      [ H   relaxation   Gaussian   ×G   relaxation   Gaussian   ]∪[H   stress   Gaussian   ×G   stress   Gaussian   ]∪H×G    
         [0000]    or in other words, the set of all the pairs included in the stress pattern is strictly contained in space H×G. Therefore, there will be pairs (h,g) of space H×G that are not included in the stress pattern, and the stress assessment level will therefore not be possible under the conditions determined by any sample (h,g). 
         [0020]    The technical problem of how to provide greater coverage in space H×G, the set of all the possible pairs of information provided by the heart rate and galvanic skin response physiological signals, so that the stress pattern more completely describes the entire possible spectrum of pairs of physiological signals arises. 
         [0021]    The present invention according to claim  1  solves said technical problem as well as other particular problems by means of the embodiments established in the dependent claims. 
       DESCRIPTION OF THE INVENTION 
       [0022]    The present invention mainly comprises a method for quantifying stress in a user making use of a stress pattern which allows a better description of the behavior of an individual given that it allows covering the entire spectrum of space H×G. 
         [0023]    It has been seen that Gaussian membership functions are used given that it is considered that said membership functions must have a support that does not go beyond what is described by the acquired data about the behavior of the individual. This is why, for example, the support is limited to interval [μ−σ*n,μ+σ*n]. Any value outside of both states, by making use of Gaussian functions and proceeding according to the state of the art, not only is a suitable output value of the stress level not obtained, but furthermore either the value is indefinite or does not make sense given that its correspondence has not been included in the stress pattern. 
         [0024]    To solve the technical problem raised, the invention makes use of sigmoid functions as membership functions with the particularities that will be described in detail in the detailed description of the invention, and it considers a method for quantifying stress according to claim  1 . It has been experimentally found that the use of sigmoid functions allows describing the behavior of the user not only in a specific region of space H×G, but in its entire completeness. 
         [0025]    The experiments corroborate that the use of such functions covers not only all of space H×G but that the quantification of stress following the method according to the invention is appropriate and coherent when it is carried out in regions of space H×G not described by the pairs that were initially used in constructing the stress patterns against the established belief in this field of the art. From the empirical viewpoint, it has been seen that there are regions within space H×G that correspond to possible states (relaxed/stressed) and that are not covered by the stress pattern defined according to the state of the art. The steps comprised in a first aspect of the invention as well as a device adapted for carrying out said method will be described in the detailed description of the invention section. 
     
    
     
       DESCRIPTION OF THE DRAWINGS 
         [0026]    These and other features and advantages of the invention will be more clearly understood from the following detailed description of a preferred embodiment given only by way of non-limiting illustrative example with reference to the attached drawings. 
           [0027]      FIG. 1  shows a set of functions belonging to the rules making up an embodiment of the method according to a first aspect of the invention. 
           [0028]    The figure shows four rows of graphs distributed in three columns. The first and second rows are directly related with two stress rules, the first row is the row showing the rule corresponding to the stressed state and the second row shows the rule corresponding to the relaxed state. 
           [0029]    The third and fourth rows only have graphs in the third column and contain the end results and the assessment mode from the previous rules. 
           [0030]      FIG. 2  shows a particular way of carrying out the first aspect of the invention by performing heart rate and galvanic skin response time sampling (or galvanic skin conductivity). 
       
    
    
     EMBODIMENTS OF THE INVENTION 
       [0031]    A first aspect of the invention is a method for quantifying stress in a user making use of a stress pattern associated with said user. The stress pattern comprises:
       a mean heart rate value (h μr ) and a heart rate variance value (h σr ) corresponding to a relaxed state of the user,   a mean heart rate value (h μs ) and a heart rate variance value (h σs ) corresponding to a stressed state of the user,   a mean galvanic skin response value (g μr ) and a galvanic skin response variance value (g σr ) corresponding to a relaxed state of the user,   a mean galvanic skin response value (g μs ) and a galvanic skin response variance value (g σs ) corresponding to a stressed state of the user.       
 
         [0036]    Each mean value and each variance value allow defining a sigmoid function as follows: 
         [0000]    
       
         
           
             
                 
             
              
             
               
                 f 
                  
                 
                   ( 
                   
                     x 
                     , 
                     
                       ? 
                     
                     , 
                     
                       ? 
                     
                   
                   ) 
                 
               
               = 
               
                 1 
                 
                   1 
                   + 
                   
                     exp 
                      
                     
                       ( 
                       
                         - 
                         
                           
                             x 
                             - 
                             
                               ? 
                             
                           
                           
                             ? 
                           
                         
                       
                       ) 
                     
                   
                 
               
             
           
         
       
       
         
           
             
               ? 
             
              
             
               indicates text missing or illegible when filed 
             
           
         
       
     
         [0000]    wherein variable x can be either heart rate (h) or galvanic skin response (θ). Value x μ  represents the mean value and value x σ  represents the variance. This sigmoid function is increasing and the positive values above a specific threshold value exist at least to the right of the value of mean x μ  and a specific interval to the left thereof the width of which depends on the variance. 
         [0037]    The method also takes into account decreasing sigmoid functions which adopt the following form: 
         [0000]    
       
         
           
             
                 
             
              
             
               
                 f 
                  
                 
                   ( 
                   
                     x 
                     , 
                     
                       x 
                       μ 
                     
                     , 
                     
                       x 
                       σ 
                     
                   
                   ) 
                 
               
               = 
               
                 1 
                 - 
                 
                   1 
                   
                     1 
                     + 
                     
                       exp 
                        
                       
                         ( 
                         
                           - 
                           
                             
                               x 
                               - 
                               
                                 x 
                                 μ 
                               
                             
                             
                               ? 
                             
                           
                         
                         ) 
                       
                     
                   
                 
               
             
           
         
       
       
         
           
             
               ? 
             
              
             
               indicates text missing or illegible when filed 
             
           
         
       
     
         [0000]    and therefore have positive values above a specific threshold value at least to the left of the value of mean x μ  and a specific interval to the right thereof the width of which depends on the variance. 
         [0038]    The sum of both types of functions always have support on the entire real straight line, hence they solve the technical problem considered. 
         [0039]    In one embodiment these values h μr , h σr , h μs , h σs , g μr , g σr , g μs , g σs  are obtained from experiments conducted on the user evaluating for each state the mean and the dispersion both of the heart rate and of the galvanic skin response. In these experiments the user is subjected to stress and relaxation conditions to measure these values in both states.
       The particular configuration of the sigmoid function is determined with these values and at least two rules are constructed, one rule associated with the relaxed state and another rule associated with stress. A rule for the relaxed state of the user is thus defined which comprises:
           constructing a decreasing function in a pre-established interval [a,b] of real values which can be expressed as:   
               
 
         [0000]    
       
         
           
             
                 
             
              
             
               
                 
                   fH 
                   r 
                 
                  
                 
                   ( 
                   
                     h 
                     , 
                     
                       ? 
                     
                     , 
                     
                       ? 
                     
                   
                   ) 
                 
               
               = 
               
                 1 
                 - 
                 
                   1 
                   
                     1 
                     + 
                     
                       exp 
                        
                       
                         ( 
                         
                           - 
                           
                             
                               h 
                               - 
                               
                                 ? 
                               
                             
                             
                               ? 
                             
                           
                         
                         ) 
                       
                     
                   
                 
               
             
           
         
       
       
         
           
             
               ? 
             
              
             
               indicates text missing or illegible when filed 
             
           
         
       
       
         
           
             
               
                 constructing a decreasing function in interval [a,b] which can be expressed as: 
               
             
           
         
       
     
         [0000]    
       
         
           
             
                 
             
              
             
               
                 
                   fG 
                   r 
                 
                  
                 
                   ( 
                   
                     
                       g 
                       · 
                       
                         g 
                         
                           μ 
                            
                           
                               
                           
                            
                           r 
                         
                       
                     
                     , 
                     
                       g 
                       
                         σ 
                          
                         
                             
                         
                          
                         r 
                       
                     
                   
                   ) 
                 
               
               = 
               
                 1 
                 - 
                 
                   1 
                   
                     1 
                      
                     
                       ? 
                     
                      
                     
                       exp 
                        
                       
                         ( 
                         
                           - 
                           
                             
                               g 
                               - 
                               
                                 ? 
                               
                             
                             
                               ? 
                             
                           
                         
                         ) 
                       
                     
                   
                 
               
             
           
         
       
       
         
           
             
               ? 
             
              
             
               indicates text missing or illegible when filed 
             
           
         
       
       
         
           
             
               
                 constructing a decreasing basis function in interval [a,b] which can be expressed as: 
               
             
           
         
       
     
         [0000]    
       
         
           
             
                 
             
              
             
               
                 
                   B 
                   r 
                 
                  
                 
                   ( 
                   
                     b 
                     , 
                     
                       b 
                       
                         μ 
                          
                         
                             
                         
                          
                         r 
                       
                     
                     , 
                     
                       b 
                       
                         σ 
                          
                         
                             
                         
                          
                         r 
                       
                     
                   
                   ) 
                 
               
               = 
               
                 1 
                 - 
                 
                   1 
                   
                     1 
                     + 
                     
                       exp 
                        
                       
                         ( 
                         
                           - 
                           
                             
                               b 
                               - 
                               
                                 ? 
                               
                             
                             
                               ? 
                             
                           
                         
                         ) 
                       
                     
                   
                 
               
             
           
         
       
       
         
           
             
               ? 
             
              
             
               indicates text missing or illegible when filed 
             
           
         
       
       
         
           
             
               
                 for predetermined values b μr  and b σr . 
               
             
           
         
       
     
         [0045]      FIG. 1  shows in the second row (f 2 ) the three functions making up the rule associated with the relaxed state from the predetermined scalars, function θH r  associated with the heart rate, function ƒG r  associated with the galvanic skin response and a basis function B r  which will allow constructing a final function which establishes the value of the stress level of the user by means of a centralization measurement. 
         [0046]    The same process is used in constructing the functions belonging to the rule associated with stress, where the latter comprises:
       constructing an increasing function in interval [a,b] which can be expressed as:       
 
         [0000]    
       
         
           
             
                 
             
              
             
               
                 f 
                  
                 
                   ? 
                 
                  
                 
                   ( 
                   
                     h 
                     , 
                     
                       ? 
                     
                     , 
                     
                       ? 
                     
                   
                   ) 
                 
               
               = 
               
                 1 
                 
                   1 
                   + 
                   
                     exp 
                      
                     
                       ( 
                       
                         - 
                         
                           
                             h 
                             - 
                             
                               ? 
                             
                           
                           
                             ? 
                           
                         
                       
                       ) 
                     
                   
                 
               
             
           
         
       
       
         
           
             
               ? 
             
              
             
               indicates text missing or illegible when filed 
             
           
         
       
       
         
           
             constructing an increasing function in interval [a,b] which can be expressed as: 
           
         
       
     
         [0000]    
       
         
           
             
                 
             
              
             
               
                 
                   fG 
                   s 
                 
                  
                 
                   ( 
                   
                     g 
                     , 
                     
                       g 
                       
                         μ 
                          
                         
                             
                         
                          
                         s 
                       
                     
                     , 
                     
                       g 
                       
                         σ 
                          
                         
                             
                         
                          
                         s 
                       
                     
                   
                   ) 
                 
               
               = 
               
                 1 
                 
                   1 
                   + 
                   
                     exp 
                      
                     
                       ( 
                       
                         - 
                         
                           
                             g 
                             - 
                             
                               ? 
                             
                           
                           
                             ? 
                           
                         
                       
                       ) 
                     
                   
                 
               
             
           
         
       
       
         
           
             
               ? 
             
              
             
               indicates text missing or illegible when filed 
             
           
         
       
       
         
           
             constructing an increasing basis function in interval [a,b] which can be expressed as: 
           
         
       
     
         [0000]    
       
         
           
             
                 
             
              
             
               
                 
                   B 
                   s 
                 
                  
                 
                   ( 
                   
                     b 
                     , 
                     
                       b 
                       
                         μ 
                          
                         
                             
                         
                          
                         s 
                       
                     
                     , 
                     
                       b 
                       
                         σ 
                          
                         
                             
                         
                          
                         s 
                       
                     
                   
                   ) 
                 
               
               = 
               
                 1 
                 
                   1 
                   + 
                   
                     exp 
                      
                     
                       ( 
                       
                         - 
                         
                           
                             b 
                             - 
                             
                               ? 
                             
                           
                           
                             ? 
                           
                         
                       
                       ) 
                     
                   
                 
               
             
           
         
       
       
         
           
             
               ? 
             
              
             
               indicates text missing or illegible when filed 
             
           
         
       
     
         [0050]    In all the functions shown in  FIG. 1  the value zero is represented by means of a horizontal line and the point where the mean value of the sigmoid function is located is indicated. The functions of the rule associated with relaxation (f 2 ) are decreasing and the rules associated with stress (f 1 ) are increasing functions. 
         [0051]    Having defined the rules associated with the relaxed and stressed states as well as the values of the reading on the user of values (h,g), the following is performed:
       the value of function ƒH r  and ƒG r  is determined for the heart rate (h μ ) and galvanic skin response (g μ ) values measured on the user corresponding to the relaxation conditions and the minimum m r =min(ƒH r ,ƒG r ) is determined   the value of function ƒH s  and ƒG s  is determined for the heart rate (h μ ) and galvanic skin response (g μ ) values measured on the user corresponding to the stress conditions and the minimum m s =min(ƒH s ,ƒG s ) is determined       
 
         [0054]    By resorting to every technical rule, values and h μ  and g μ  of pair (h,g) are common, hence use has been made of a vertical line of dots to find the intersection with both functions ƒH r  and ƒG r  as well as functions ƒH s  and ƒG s . 
         [0055]    By resorting to function ƒH r  with the value of h μ  the value adopted by said function is seen with a horizontal line of more spaced out dots. By resorting to function ƒG r  with the value of g μ , it is found that the value obtained is less. It can be seen that the horizontal line going towards the right, also represented with more spaced out dots, is lower. The calculation of the minimum selects this second value as that which will be used in the basis function. 
         [0056]    The same occurs in the rule associated with the stress, the value measured on function ƒH s  is greater than the value measured on function ƒG s  and therefore it is also the second value (the value which verifies the minimum condition) that is used in the basis function. 
         [0057]    Basis functions are used for constructing what is referred to as weight functions, doing so in a similar manner for either technical rule:
       the weight function P r(x) =min{m r ,Br(x,b μr ,b σr )} is defined for any value of x in interval [a,b],   the weight function P s(x) =min{m s ,B s (x,b μs ,b σs )} is defined for any value of x in interval [a,b],       
 
         [0060]    Once the minimum in the variable heart rate and galvanic skin response has been determined, the basis function is truncated, maintaining only the values that are below that minimum value. In the third column, where the basis functions are represented, it is observed that under the value represented by the line of spaced out dots the area of the basis function is shown with a black background. This area in black corresponds to the construction of the weight function both for the relaxed state P r(x)  and the stressed state P s(x) . The minimum condition between the previously calculated minimum value and the basis function has that effect of truncating the basis function. 
         [0061]    The next step consists of constructing a result function P(s) as P(x)=max(Pr(x),Ps(x)) for any value of x in interval [a,b]. 
         [0062]    In the third column, where the basis functions are represented, there are two areas with a black background, one for the rule corresponding to the relaxed state and the other for the rule corresponding to a stress situation. The two profiles are superimposed in the third row (f 3 ). The result of the maximum function of the step which constructs the result function is a new function, the profile of which follows the highest points of the superposition of the weight functions. The same result function is shown in the fourth row (f 4 ) where it is now shown with the area under the curve in black and constructed by means of the maximum condition. 
         [0063]    Finally, the stress quantification value in the user is determined by evaluating a centralization measurement of function P(x) in interval [a,b]. 
         [0064]    In the experiments conducted, interval [0,1] has been used as a particular case for interval [a,b] and parameters b μr , b σr , b μs , b σs  take the value 1. 
         [0065]    Even though in this simplest example only two rules corresponding to the relaxed state and to the stressed state have been used, it is possible to combine the use of three or more rules. In this second case, two situations are distinguished:
       if the rule corresponds to the relaxed state, said rule has a decreasing sigmoid function for the heart rate, a decreasing sigmoid function for the galvanic skin response and a decreasing sigmoid basis function,   if the rule corresponds to the stressed state, said rule has an increasing sigmoid function for the heart rate, an increasing sigmoid function for the galvanic skin response and an increasing sigmoid basis function.       
 
         [0068]    The manner of proceeding in these cases is the same as in the case described in the first embodiment. The minimum of the sigmoid function corresponding to the heart rate value (h μ ) and of the sigmoid function corresponding to the galvanic skin response value (g μ ), respectively, both measured on the user, is determined for every defined rule. The weight function is also determined for every technical rule as the minimum function between the previous minimum value and the basis function of the technical rule; and, finally the result function P(x) is assessed as the maximum both of the weight functions of the rule for the relaxed state and the rule for the stressed state as well as the weight functions of the additional rules. 
         [0069]    In a final step, the centralization measurement of the weight function obtained in the previous step in interval [a,b] is assessed as a stress quantification value in the user. 
         [0070]    In the experiments conducted it has been observed that there are groups of users with similar features. In other words, given a certain population, it is possible to define groups having close parameters in the rules defining their stress pattern. These groups are formed by individuals whose heart rate response and galvanic skin response have a similar or close behavior given the same stressing stimuli. A stress pattern can thus be pre-assigned to users from different groups of people. 
         [0071]    As an experimental test, a collection of stress patterns which serve as typical patterns has been elaborated such that it is possible to pre-assign a stress pattern to a person without having to initially carry out a heart rate and galvanic skin response assessment task by subjecting the user to stress and relaxation situations. This prior assignment is not known in the state of the art and prevents an expensive and time-consuming operation. 
         [0072]    In the preferred embodiment of the invention the pre-assignment of a typical stress pattern is done by means of a form adapted for determining user&#39;s behavior with respect to stress. This assessment, contrasted with the responses obtained making use of the same test in the individuals used for elaborating the typical patterns, allows defining the correspondence between an individual and his/her pre-assigned group with the closest stress pattern. 
         [0073]    An embodiment of a test and the generation of typical patterns from this test will be described at the end of this description of examples section. 
         [0074]    Another object of this invention is the continuous measurement of heart rate and galvanic skin response values over time. The measurements of the heart rate (h μ ) and of the galvanic skin response (g μ ) of the user is carried out by calculating the arithmetic mean on a set of samples taken over a time period. 
         [0075]    When an individual already has a pre-assigned stress pattern, the application of the method of the invention allows quantifying the stress. Given that this pre-assignment is very generic and each individual is pre-assigned a stress pattern from a group of “typical” users, it is possible to improve the stress pattern over time in order to gradually define it individually and characterize it with specific and more accurate heart rate and galvanic skin response values for that user. In addition, once the pattern is established, preferably if it has been improved with measurements on the user, the measurements of the heart rate and galvanic skin response allow analyzing the evolution of the stress level of the user over time. The improvement of the stress patterns makes sense both when the first assigned pattern corresponds to a pre-classification by “typical users” and because the behavior of an individual with respect to external stressing stimuli also evolves over time. 
         [0076]      FIG. 2  shows a graph resulting from the reading over time in an individual of the physiological signals to be used for correcting the stress pattern. This graph shows the two variables, heart rate (h) and galvanic skin response (g). Graphs are obtained for the two states, stressed and relaxed, (even though only one of them is shown by way of example) so four curves will be obtained: h s , h r , g s , g r . This time evolution is acquired by measuring the heart rate and the galvanic skin response of the user over time by means of continuous control methods, for example, measuring them using a keyboard or mouse monitoring the heart rate and the galvanic skin response. This is how the method acquires values, those which are experimentally measured, which allow characterizing the pattern more precisely because it takes into account both the real response of the user and the evolution of his/her response over time. 
         [0077]    As described in claims  5  and  6 , in this embodiment the time variable has been discretized in equal time intervals, and making use of this discretization, a sampling of samples is carried out over time in instants t i , wherein i=1−m, both of the heart rate (h) and of the measurement of the galvanic skin response (g) of the user. 
         [0078]    A subset of n consecutive samples comprising the sample taken in instant t m  and the previous consecutive samples wherein n&lt;m is taken. In other words, the n consecutive samples in instant t m  and in n−1 previous instants (t m−n , . . . t m−1 ) are selected.  FIG. 2  shows the extension in the time variable reached by the sampling of these n samples by means of an arrow. 
         [0079]    The arithmetic mean is evaluated on the subset of n samples to obtain the measurements both of the heart rate (h μ ) and of the galvanic skin response (g μ ) of the user. The value is evaluated on the subset of n samples to obtain the measures of dispersion both of the heart rate (h σ ) and of the galvanic skin response (g σ ) of the user. Values h μ , h σ , g μ , g σ  thus correspond to a measurement averaged over time. 
         [0080]    The evolution of these averaged variables requires maintaining the sampling both of the heart rate (h) and of the measurement of the galvanic skin response (g) of the user.  FIG. 2  shows the next sample taken in instant t m+1  in variable h by means of a black circular area. A new collection of n consecutive samples is constructed starting from that of n previous samples resulting from adding the sample taken in instant t m+1  and eliminating the oldest sample taken in instant t m−n  which is shown in  FIG. 2  by means of a hollow circle. 
         [0081]    Therefore, by following a more generic manner of proceeding, the evolution of the quantification of stress is assessed by taking as consecutive measurements both of the heart rate (h μ ) and of the galvanic skin response (g μ ) of the user those measurements which result from calculating the arithmetic mean on the subset of samples which results from gradually adding to the subset of n samples a specific number of samples obtained in the following instants of time and in turn discarding the same number of older measurements. 
         [0082]    This final method for assessing heart rate and galvanic skin response over time has been described as one that allows determining the mean on n last samples. These same arguments serve to measure the measure of dispersion. These measurements must be conducted in both the relaxed and stressed states. It is not possible to simultaneously take a measurement on the same individual in the relaxed and stressed states. This means that the preceding method can be interpreted in two different ways. 
         [0083]    A first interpretation carries out the correction over time of the measurements of the mean and the standard deviation for the heart rate and the galvanic response corresponding to one of the states without modifying the parameters characterizing the other state; and in a later time period the correction over time of the parameters corresponding to that other state is carried out. A second interpretation establishes that the discretization over time makes use of very broad time intervals, for example each t i  corresponds to a different day, such that in that time period it is possible to subject the individual to two different states and that the measurements are estimated as if they correspond to the same instant of time. 
         [0084]    As described above, a first way to determine the stress pattern consists of carrying out on the individual direct measurements both of the heart rate and of the galvanic skin response. The previous method allows weighting several measurements in a time period which lead to values that are the closest possible to the real behavior of the individual with respect to stress. It has also been described that to at first avoid subjecting the individual to such tests, it is possible to pre-assign a pattern by subjecting the individual to a test that does not require measuring heart rate and galvanic response. An embodiment of such test for pre-assigning said pattern to a user is described below. 
         [0085]    This test defines three possible aspects: Cognitive, physiological and motor. A set of questions for the user is used for the test; 22 situations which involve the three aspects to be measured (cognitive, physiological and motor) will be used in this embodiment:
       1. Before an exam in which I have a lot at stake or if I am gong to be interviewed for an important job   2. When I am going to be late for an appointment or date   3. When I think about all the things I have to do   4. When making a decision or solving a difficult problem   5. At work or when I study   6. When I am waiting for someone in a crowded place   7. If someone of the opposite sex is very close to me, lightly touching me, or if I am in an intimate sexual situation   8. When someone bothers me or when I argue   9. When I am watched or my job is supervised, when I receive criticism, or whenever I may be negatively evaluated   10. If I have to speak in public   11. When I think about recent experiences where I have felt ridiculous, shy, humiliated, alone or rejected   12. When I have to take a plane or a boat   13. After having made a mistake   14. Before a dentist appointment, injections, wounds or blood.   15. When I am on a date with someone of the opposite sex   16. When I think about my future or about future difficulties or problems   17. In the middle of crowds or in enclosed spaces   18. When I have to attend a social gathering or meet new people   19. In high places or deep waters   20. When observing violent scenes   21. Noting specifically   22. When it is time to go to sleep       
 
         [0108]    The following responses are presented for these possible situations, depending on the factor to be evaluated. 
       Cognitive Aspect 
       [0000]    
       
         
           
             1. I easily worry 
             2. I have negative thoughts or feelings about myself, such as “inferior” to others, clumsy, etc. . . . 
             3. I feel unsure of myself 
             4. I think about things too much without actually making a decision 
             5. I am afraid 
             6. It&#39;s hard to concentrate 
             7. I think that people will notice my problems or my awkward acts 
           
         
       
     
       Physiological Aspect 
       [0000]    
       
         
           
             1. I have an upset stomach 
             2. My hands or another part of my body sweats even on cold days 
             3. My hands or legs shake 
             4. My head hurts 
             5. My body is tense 
             6. I have palpitations, my heart beats very fast 
             7. I feel like I&#39;m suffocating and my breathing is agitated 
             8. I feel nauseous or dizzy 
             9. My mouth becomes dry and it&#39;s hard for me to swallow 
             10. I have chills and shiver even though it is not that could 
           
         
       
     
       Motor Aspect 
       [0000]    
       
         
           
             1. I cry easily 
             2. I make repetitive movements with some part of my body (scratch myself, touch myself, rhythmic movements with my feet or hands, etc. . . . ) 
             3. I smoke, drink or eat too much 
             4. I try to avoid or run away from the situation 
             5. I move or do things without a specific purpose 
             6. I become paralyzed or my movements are awkward 
             7. I stutter or have other verbal expression difficulties 
           
         
       
     
         [0133]    The test requires selecting one and only one response of each aspect to be measured (cognitive, physiological and motor) for each of the 22 situations. 
         [0134]    The scores corresponding to the physiological, motor and cognitive aspects are constructed from these responses 
         [0135]    Use is made of a total value which is calculated as C+F/2+M is, and also of four partial values grouping the scores of the 22 situations in four groups. These four groups are referred to as factors I to IV (in Roman numerals). The following formulas are used to obtain the factors from 1 to IV, where S 22 , are situations 1 to 22. 
         [0000]      F-I: S1+S4+S8+S10+S11+S13 
         [0000]      F-II: S7+S15+S18 
         [0000]      F-III: S12+S14+S17+S19 
         [0000]      F-IV: S5+S21+S22 
         [0136]    The following is a detailed description of what each of the aspects used in the score of each situation includes:
       cognitive: characterized by responses such as fear of being negatively evaluated, difficulties in concentrating, uncertainty or difficulty in making decisions;   physiological: characterized by high saturations of responses relating to physiological aspects such as dizziness, nausea, chills, etc. . . .   motor activation: characterized by activities which relate to performing repetitive movements, scratching oneself, smoking or drinking in excess, etc.       
 
         [0140]    And concerning the four factors also obtained from the test scores:
       Factor I: Situations involving evaluation and taking on responsibilities   Factor II: Sexual and social interaction situations   Factor III: Phobic situations   Factor IV: Common or everyday life situations.       
 
         [0145]    This test in two ways, first to establish the groups sharing a common characterization pattern; and a second used to assign a previously determined pattern to a user. 
         [0146]    To obtain a set of groups of users who share a common pattern, a number of users who have been subjected to the test while at the same time taking measurements both of the heart rate and of the galvanic skin response to determine real individual patterns is selected. 
         [0147]    It is thus possible to create a table where each row of that table corresponds to each of the users who has been subjected both to the test and to the physiological tests where each score obtained in the previous factors is therefore related with the physiological signal dispersions and mean values, making a one-to-one association between user, scores and physiological values. 
         [0148]    Then a clustering algorithm, specifically a k-means clustering algorithm, is produced, grouping all the individuals in 10 possible clusters. The more users that have served as a basis for performing the tests the higher the number of clusters and therefore of “typical” patterns that will result from these experiments will be. 
         [0149]    Each cluster will contain a representative value of the factors relating to stress and a representative value of each physiological value. Therefore, given certain stress scores, those physiological values the responses of which to the stress test more accurately correspond with the stress scores provided will be associated with it. 
         [0150]    80 people have been used in this embodiment to yield 10 clusters and therefore 10 typical patterns: 
         [0000]    
       
         
               
               
               
               
               
               
               
               
               
             
               
               
               
               
               
               
               
               
               
             
               
               
             
           
               
                   
                   
               
               
                   
                 Cognitiv 
                 Physio. 
                 Motor 
                 Total 
                 F1 
                 F2 
                 F3 
                 F4 
               
               
                   
                   
               
             
             
               
                   
               
             
          
           
               
                 1 
                 73 
                 63.5 
                 76 
                 212.5 
                 85 
                 24 
                 36 
                 25 
               
               
                 2 
                 67 
                 23 
                 31 
                 121 
                 54 
                 19 
                 4 
                 33 
               
               
                 3 
                 83 
                 58 
                 96 
                 237 
                 137 
                 40 
                 21 
                 26 
               
               
                 4 
                 134 
                 89 
                 102 
                 325 
                 154 
                 39 
                 87 
                 25 
               
               
                 5 
                 124 
                 72.5 
                 58 
                 254.5 
                 96 
                 34 
                 89 
                 54 
               
               
                 6 
                 79 
                 17.5 
                 39 
                 135.5 
                 74 
                 18 
                 8 
                 13 
               
               
                 7 
                 95 
                 75 
                 78 
                 248 
                 140 
                 28 
                 69 
                 23 
               
               
                 8 
                 57 
                 48.5 
                 65 
                 170.5 
                 78 
                 22 
                 59 
                 5 
               
               
                 9 
                 59 
                 17.5 
                 65 
                 141.5 
                 54 
                 18 
                 20 
                 13 
               
               
                 10 
                 105 
                 57.5 
                 38 
                 200.5 
                 91 
                 26 
                 63 
                 18 
               
             
          
           
               
                   
                 Scores 
               
               
                   
                   
               
             
          
         
       
     
         [0151]    In the first row of the table, in the header, “Cognitiv” identifies the score given for the aspect cognitive, “Physio.” identifies the score given for the physiological aspect and “Motor” identifies the score given for the aspect relating to motor activation which has resulted in each of the patterns after carrying out the clustering. Rows 1 to 10 show the data for each of the 10 patterns obtained in this embodiment. The “Total” column is the total sum of the score; and columns F1, F2, F3 and F4 are the grouped sums of the scores which led to each of the factors I, II, III and IV. 
         [0152]    For the same patterns, the mean and dispersion values for the heart rate and galvanic skin response for the relaxed state are also represented: 
         [0000]                                                                                        mean HR   HR dev   mean SC   SC dev                                    1   76   10   6   1       2   87   12   10   2       3   100   15   5   1       4   98   11   7   3       5   93   17   9   2       6   89   16   14   2       7   81   10   8   1       8   94   12   9   3       9   102   14   10   2       10   95   14   12   2                Relaxed                        
and for the stressed state:
 
         [0000]    
       
         
               
               
               
               
               
             
               
               
               
               
               
             
               
               
               
             
           
               
                   
                   
               
               
                   
                 mean HR 
                 HR dev 
                 mean SC 
                 SC dev 
               
               
                   
                   
               
             
             
               
                   
               
             
          
           
               
                 1 
                 120 
                 8 
                 14 
                 7 
               
               
                 2 
                 110 
                 9 
                 17 
                 6 
               
               
                 3 
                 112 
                 13 
                 8 
                 5 
               
               
                 4 
                 108 
                 11 
                 9 
                 5 
               
               
                 5 
                 110 
                 14 
                 10 
                 3 
               
               
                 6 
                 105 
                 11 
                 16 
                 5 
               
               
                 7 
                 109 
                 15 
                 11 
                 6 
               
               
                 8 
                 114 
                 13 
                 8 
                 4 
               
               
                 9 
                 123 
                 10 
                 5 
                 5 
               
               
                 10 
                 112 
                 9 
                 3 
                 4 
               
             
          
           
               
                   
                 Stress 
               
               
                   
                   
               
             
          
         
       
     
         [0153]    In this first step, the test has served to define the “typical” patterns. Once these typical patterns are defined, the same test serves to obtain a particular score on a user; and, by comparing the Euclidean distance between factors F1, F2, F3 and F4 with those obtained in the definition of the typical patterns, the closest pattern is established as the pattern pre-assigned to said user.
       Another object of this invention is a device adapted for quantifying stress in a user according to claim  8 .