Disclosure of Invention
The embodiment of the invention provides a sleep information determining method, device and equipment, which improves the accuracy of sleep information determination.
In a first aspect, an embodiment of the present invention provides a sleep information determining method, applied to a server, where the method includes:
Acquiring a ballistocardiogram BCG signal acquired by a sensor, wherein the sensor is arranged on a carrier for bearing a user;
Performing signal processing on the BCG signals to obtain heart physiological information of a user;
And carrying out recognition processing on the heart physiological information through a recognition model to obtain the sleeping information of the user.
In a possible implementation manner, the performing signal processing on the BCG signal to obtain cardiac physiological information includes:
determining a cardiac pulsation point of the user according to the BCG signal;
determining two adjacent minimum value points and two maximum value points of the heart fluctuation point in the BCG signal, wherein the two minimum value points are respectively positioned at two sides of the heart fluctuation point, and the two maximum value points are respectively positioned at two sides of the heart fluctuation point;
and determining the heart physiological information according to the heart beat point, the two minimum value points and the two maximum value points.
In one possible embodiment, the determining the cardiac physiological information according to the cardiac pulsation point, the two minima points, and the two maxima points includes:
Respectively acquiring the positions and the amplitudes of the heart beat point, the two minimum value points and the two maximum value points;
And determining the heart physiological information according to the positions and the amplitudes of the heart beat point, the two minimum value points and the two maximum value points.
In one possible embodiment, the at least two minimum points include a first minimum point and a second minimum point, and the two maximum points include a first maximum point and a second maximum point; the first minimum point and the first maximum point are located to the left of the heart beat point, and the second minimum point and the second maximum point are located to the right of the heart beat point.
In one possible embodiment, the determining the cardiac physiological information according to the positions and magnitudes of the cardiac pulsation point, the two minima points, and the two maxima points includes:
acquiring a first sampling distance between the first maximum point and the first minimum point, a second sampling distance between the first minimum point and the cardiac activity point, a third sampling distance between the cardiac activity point and the second minimum point, and a fourth sampling distance between the second minimum point and the second maximum point;
Acquiring a first amplitude difference between the first maximum point and the first minimum point, a second amplitude difference between the first minimum point and the heart beat point, a third amplitude difference between the heart beat point and the second minimum point, and a fourth amplitude difference between the second minimum point and the second maximum point;
determining the cardiac physiological information includes the first sampling distance, the second sampling distance, the third sampling distance, the fourth sampling distance, the first amplitude difference, the second amplitude difference, the third amplitude difference, and the fourth amplitude difference.
In one possible implementation, the identification model is learned for a plurality of sets of samples, each set including sample cardiac physiological information and sample sleep information.
In one possible embodiment, the sleep information includes a sleep posture and/or a sleep quality.
In one possible implementation manner, before the BCG signal is subjected to signal processing, the method further includes:
And carrying out wavelet filtering processing on the BCG signal.
In one possible implementation manner, after the cardiac physiological information is identified by the identification model to obtain the sleep information of the user, the method further includes:
Recommending objects to the electronic equipment of the user according to the sleep information.
In a second aspect, an embodiment of the present invention provides a sleep information determining apparatus, applied to a server, where the apparatus includes an acquisition module, a signal processing module, and an identification module,
The acquisition module is used for acquiring a ballistocardiogram BCG signal acquired by a sensor, and the sensor is arranged on a carrier for bearing a user;
The signal processing module is used for performing signal processing on the BCG signals to obtain heart physiological information of a user;
the recognition module is used for recognizing the heart physiological information through a recognition model to obtain the sleeping information of the user.
In one possible implementation manner, the signal processing module is specifically configured to:
determining a cardiac pulsation point of the user according to the BCG signal;
determining two adjacent minimum value points and two maximum value points of the heart fluctuation point in the BCG signal, wherein the two minimum value points are respectively positioned at two sides of the heart fluctuation point, and the two maximum value points are respectively positioned at two sides of the heart fluctuation point;
and determining the heart physiological information according to the heart beat point, the two minimum value points and the two maximum value points.
In one possible implementation manner, the signal processing module is specifically configured to:
Respectively acquiring the positions and the amplitudes of the heart beat point, the two minimum value points and the two maximum value points;
And determining the heart physiological information according to the positions and the amplitudes of the heart beat point, the two minimum value points and the two maximum value points.
In one possible embodiment, the at least two minimum points include a first minimum point and a second minimum point, and the two maximum points include a first maximum point and a second maximum point; the first minimum point and the first maximum point are located to the left of the heart beat point, and the second minimum point and the second maximum point are located to the right of the heart beat point.
In one possible implementation manner, the signal processing module is specifically configured to:
acquiring a first sampling distance between the first maximum point and the first minimum point, a second sampling distance between the first minimum point and the cardiac activity point, a third sampling distance between the cardiac activity point and the second minimum point, and a fourth sampling distance between the second minimum point and the second maximum point;
Acquiring a first amplitude difference between the first maximum point and the first minimum point, a second amplitude difference between the first minimum point and the heart beat point, a third amplitude difference between the heart beat point and the second minimum point, and a fourth amplitude difference between the second minimum point and the second maximum point;
determining the cardiac physiological information includes the first sampling distance, the second sampling distance, the third sampling distance, the fourth sampling distance, the first amplitude difference, the second amplitude difference, the third amplitude difference, and the fourth amplitude difference.
In one possible implementation, the identification model is learned for a plurality of sets of samples, each set including sample cardiac physiological information and sample sleep information.
In one possible embodiment, the sleep information includes a sleep posture and/or a sleep quality.
In a possible embodiment, the apparatus further comprises a filtering module, wherein,
The filtering module is used for performing wavelet filtering processing on the BCG signal before the signal processing module performs signal processing on the BCG signal to obtain the heart physiological information.
In another possible implementation, the apparatus further comprises a recommendation module, wherein,
The recommending module is used for identifying the heart physiological information through the identifying module, and recommending objects to the electronic equipment of the user according to the sleep information after the sleep information of the user is obtained.
In a third aspect, an embodiment of the present invention provides a sleep information determining apparatus, including: a processor coupled to the memory;
the memory is used for storing a computer program;
The processor is configured to execute the computer program stored in the memory, so that the terminal device executes the sleep information determining method according to any one of the above first aspects.
In a fourth aspect, an embodiment of the present invention provides a readable storage medium including a program or instructions which, when executed on a computer, performs the sleep information determining method according to any one of the first aspects above.
According to the sleep information determining method, the device and the equipment provided by the embodiment of the invention, after the BCG signal is obtained, the BCG signal can be processed to obtain the heart physiological information of the user, the heart physiological information of the user is processed through the identification model, the sleep information of the user can be accurately determined, and the sleep information of the user can reflect the health condition of the user, so that the object related to the health of the user can be accurately recommended to the user according to the sleep information of the user, and the accuracy of the sleep information determination is improved.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is an application scenario schematic diagram of a sleep information determining method according to an embodiment of the present invention. Referring to fig. 1, there is shown a bed 101, an electronic device 102 and a server 103. The bed 101 is a carrier for carrying a user, for example, the user can sleep on the bed 101, a mattress is laid on the bed 101, a sensor a is arranged below the mattress, and when the user is on the bed 101, the sensor a can acquire a ballistocardiogram (ballistocardiogram, BCG) signal of the user. Sensor a may send BCG signals to electronic device 102. The electronic device 102 is a device of a user, for example, the electronic device 102 may be a mobile phone, a computer, or the like, the electronic device 102 may also send a BCG signal to the server 103, for example, the server 103 may be an electronic commerce platform, the server 103 may determine to obtain sleep information of the user according to the BCG signal, and recommend an object to the electronic device 102 of the user according to the sleep information of the user, for example, may recommend a commodity, a health management suggestion, or the like to the electronic device 102.
In the application, after the server obtains the BCG signal, the server can process the BCG signal to obtain the heart physiological information of the user, and the heart physiological information of the user is processed through the identification model, so that the sleep information of the user can be accurately determined, and the sleep information of the user can reflect the health condition of the user, therefore, the object related to the health of the user can be accurately recommended to the user according to the sleep information of the user, and the accuracy of determining the sleep information is improved.
It should be noted that fig. 1 illustrates an application scenario by way of example only, and is not limited to the application scenario.
The technical scheme shown in the application is described in detail by specific examples. It should be noted that the following embodiments may be combined with each other, and for the same or similar matters, the description will not be repeated in different embodiments.
Fig. 2 is a flow chart of a sleep information determining method according to an embodiment of the present invention. Referring to fig. 2, the method may include:
s201, acquiring BCG signals acquired by a sensor, wherein the sensor is arranged on a carrier for bearing a user.
The execution subject of the embodiment of the invention may be a server, or may be a sleep information determining device provided in the server. Alternatively, the sleep information determining apparatus may be implemented by software, or may be implemented by a combination of software and hardware.
Alternatively, the server may be an e-commerce platform, for example, the server may be a shopping platform, an entertainment platform, or the like.
The carrier carrying the user may be a bed, sofa or the like. The user can rest and sleep on the carrier. The sensor may be a piezoelectric film sensor, which may be disposed under a mattress when the carrier is a bed, and under a sofa mattress when the carrier is a sofa. Thus, when the user is positioned on the carrier, the user can be prevented from contacting with the sensor, namely, under the condition that the user does not feel, the sensor can collect BCG signals of the user, so that the user experience is good.
Optionally, a connection may be established between the sensor and the electronic device, after the sensor acquires the BCG signal, the BCG signal may be sent to the electronic device, and then the electronic device sends the BCG signal to the server, that is, the server may acquire the BCG signal acquired by the sensor from the electronic device. The electronic equipment and the sensor can be connected through a wireless network, a wired network, bluetooth or the like.
Next, the structure of the sensor will be described with reference to fig. 3.
Fig. 3 is a schematic structural diagram of a sensor according to an embodiment of the present invention. Referring to fig. 3, the sensor includes a sampling module, a signal conditioning circuit, an analog-to-digital conversion circuit, and a communication module. The sampling module can acquire a vibration signal applied to the sensor and convert the vibration signal into an electric charge quantity to be output. The signal conditioning circuit can perform weak signal amplification processing and invalid signal filtering processing on the electric charge quantity output by the sampling module to obtain a voltage signal, for example, the signal conditioning circuit can perform lossy integration, operational amplification, band-pass filtering, power frequency notch, secondary amplification and polarity conversion processing on the electric charge quantity output by the sampling module to obtain the voltage signal meeting the processing requirements of the analog-to-digital conversion circuit. The analog-to-digital conversion circuit can perform analog-to-digital conversion processing on the voltage signal output by the signal conditioning circuit to obtain a BCG signal to be output, and the communication module can send the BCG signal to be output to the electronic equipment.
S202, performing signal processing on the BCG signals to obtain the heart physiological information of the user.
Alternatively, the BCG signal may be subjected to wavelet filtering, and then the cardiac physiological information may be extracted from the filtered or BCG signal.
Alternatively, the wavelet filter may be as shown in equation one:
Wherein ψ (t) is a wavelet function, a and b are preset parameters, and f (t) is a BCG signal.
For example, the wavelet function may be a 6 th order Symlets wavelet, which is an orthogonal set supported wavelet function modified by the db wavelet, which is a discrete sequence wavelet transform based on multi-resolution, multi-sample rate filter theory. The BCG signal may be decomposed into different frequency channel components to obtain a scale factor Ck and a wavelet coefficient dk, where the scale factor Ck and the wavelet coefficient dk are shown in formula two:
Where { aN-2k } and { bN-2k } are decomposition sequences, N is the number of sampling points, and j is the number of decomposition layers.
The high-frequency coefficient of the wavelet is thresholded by adopting a hard thresholding method, and the high-frequency coefficient of the wavelet can be thresholded by a formula III:
where dj,k is the kth wavelet coefficient at the j scale, λ is the threshold,Σ2 is the variance of white noise.
Carrying out one-dimensional wavelet reconstruction according to the low-frequency coefficient of the bottom layer after wavelet decomposition and the high-frequency coefficient of each layer after threshold quantization treatment to obtain a new scale coefficient, wherein the new scale coefficient is shown in a formula IV:
Where { pk-2N } and { qk-2N } are reconstruction sequences, N is the number of sampling points, and j is the number of decomposition layers.
When the sensor does not contact a user, the BCG signal acquired by the sensor is a non-stable signal, and the non-stable signal may include a plurality of signals such as heartbeat, respiration, body movement and the like. By performing wavelet filtering processing on the BCG signal, unnecessary signals can be filtered out from the BCG signal acquired by the sensor, so as to obtain cardiac physiological information reflecting the cardiac physiological characteristics of the user.
The wavelet filtering effect will be described with reference to fig. 4A to 4B.
Fig. 4A is a schematic diagram of BCG signals before filtering according to an embodiment of the present invention. Fig. 4B is a schematic diagram of a filtered BCG signal according to an embodiment of the present invention. Referring to fig. 4A to 4B, the horizontal axis represents time and the vertical axis represents voltage value. Referring to fig. 4A, the BCG signal before the wavelet filtering includes more noise signals, for example, the BCG signal before the wavelet filtering includes various signals such as heartbeat, respiration, and body movement. Referring to fig. 4B, signals such as respiration and body movement are filtered out from the BCG signal after the wavelet filtering, so that the BCG signal after the wavelet filtering is mainly a heartbeat signal (a signal representing the physiological characteristic of the heart).
Optionally, after filtering the BCG signal, signal processing may also be performed on the filtered BCG signal to obtain cardiac physiological information. In the embodiment shown in fig. 5, the process of acquiring cardiac physiological information is described, and will not be described herein.
And S203, carrying out recognition processing on the heart physiological information through the recognition model to obtain sleep information of the user.
Optionally, the sleep information includes a sleep posture and/or a sleep quality. Sleep postures include supine, prone, left-side and right-side. The sleep quality can be represented by parameters such as total sleep duration, deep sleep duration, light sleep duration, night wake times and the like.
Alternatively, the recognition model may be learned for multiple sets of samples, each set including sample cardiac physiological information and sample sleep information.
Alternatively, the recognition model may include a first recognition model and a second recognition module, wherein the first recognition model is learned for a plurality of sets of first samples, each set of first samples including sample cardiac physiological information and sample sleep postures. The second recognition model is learned by a plurality of groups of second samples, and each group of second samples comprises sample heart physiological information and sample sleep quality.
Optionally, the cardiac physiological information may be processed through a first recognition model corresponding to the sleep posture, so as to obtain the sleep posture of the user. For example, cardiac physiological information may be input to a first recognition model, the output of which is a sleep posture.
Optionally, the heart physiological information can be processed through a second recognition model corresponding to the sleep quality to obtain the sleep quality of the user. For example, cardiac physiological information may be input to a second recognition model, the output of which is sleep quality.
In the practical application process, when a user sleeps at night, the sleeping posture, the deep sleep and the light sleep of the user are not frequently changed, in order to reduce the data processing amount, the sensor can periodically acquire data, and the acquired data BCG signals are reported to the server through the electronic equipment, so that the server processes the received BCG signals; or when the vibration signal detected by the sampling module is changed greatly, the sampling module outputs charges so that the sensor outputs a BCG signal; or the sensor can collect BCG signals in real time and send the BCG signals collected in real time to the server through the electronic equipment, and the server processes part of BCG signals in the received BCG signals.
Optionally, after determining to obtain the sleep information of the user, the object may be recommended to the electronic device of the user according to the sleep information.
For example, if it is determined that the user has insomnia according to the sleep information of the user, a related product for treating insomnia may be recommended to the user. For example, if it is determined that there is a problem in the sleeping posture of the user based on the sleeping information of the user, a product for adjusting the sleeping posture may be recommended to the user.
According to the sleep information determining method provided by the embodiment of the invention, after the BCG signal is obtained, the BCG signal can be processed to obtain the heart physiological information of the user, the heart physiological information of the user is processed through the identification model, the sleep information of the user can be accurately determined, and the sleep information of the user can reflect the health condition of the user, so that the object related to the health of the user can be accurately recommended to the user according to the sleep information of the user, and the accuracy of sleep information determination is improved.
With reference to fig. 5, a process of acquiring cardiac physiological information will be described below based on any of the above embodiments.
Fig. 5 is a flowchart of a method for acquiring cardiac physiological information according to an embodiment of the present invention. Referring to fig. 5, the method may include:
S501, determining the heart beat point of the user according to the BCG signal.
Optionally, the voltage value of the heart wave point in the BCG signal is the largest.
The cardiac fluctuation point can be obtained by the following pseudocode:
S502, acquiring a first minimum value point, a second minimum value point, a first maximum value point and a second maximum value point according to the cardiac pulsation point.
Wherein the first minimum point and the first maximum point are located to the left of the heart beat point and the second minimum point and the second maximum point are located to the right of the heart beat point.
Next, a cardiac beat point, a first minimum point, a second minimum point, a first maximum point, and a second maximum point will be described with reference to fig. 6.
Fig. 6 is a schematic diagram of BCG signals provided in an embodiment of the present invention. Referring to fig. 6, the abscissa is a sampling point, and the ordinate is a voltage value (amplitude). Since the human heart is periodically beating, the BCG signal is also a periodic signal. The period of the BCG signal is a heart cycle, one including diastole and systole.
Referring to fig. 6, the BCG signal in the dashed rectangular box is the BCG signal corresponding to one heartbeat period. The J point is a heart beat point, the I point is a first minimum point, the H point is a first maximum point, the K point is a second minimum point, and the L point is a second maximum point.
S503, acquiring a first sampling distance between a first maximum value point and a first minimum value point, a second sampling distance between the first minimum value point and a heart beat point, a third sampling distance between the heart beat point and a second minimum value point, and a fourth sampling distance between the second minimum value point and the second maximum value point.
Where the sampling distance refers to the sampling interval between two points, i.e. the number of sampling points spaced between two points.
For example, referring to fig. 6,H, the lateral distance between the point I and the point I is the first sampling distance, the lateral distance between the point I and the point J is the second sampling distance, the lateral distance between the point J and the point K is the third sampling distance, and the lateral distance between the point K and the point L is the fourth sampling distance.
S504, acquiring a first amplitude difference between the first maximum point and the first minimum point, a second amplitude difference between the first minimum point and the heart beat point, a third amplitude difference between the heart beat point and the second minimum point, and a fourth amplitude difference between the second minimum point and the second maximum point.
Where the amplitude difference refers to the amplitude difference between two points, i.e. the difference in voltage of the two points.
For example, referring to fig. 6,H, the longitudinal distance between the point I and the point I is the first amplitude difference, the longitudinal distance between the point I and the point J is the second amplitude difference, the longitudinal distance between the point J and the point K is the third amplitude difference, and the longitudinal distance between the point K and the point L is the fourth amplitude difference.
S505, determining that the cardiac physiological information comprises a first sampling distance, a second sampling distance, a third sampling distance, a fourth sampling distance, a first amplitude difference, a second amplitude difference, a third amplitude difference and a fourth amplitude difference.
Alternatively, the cardiac physiological information may be represented by vectors (p 1, p2, p3, p4, p5, p6, p7, p 8), p1 representing a first sampling distance, p2 representing a second sampling distance, p3 representing a third sampling distance, p4 representing a fourth sampling distance, p5 representing a first amplitude difference, p6 representing a second amplitude difference, p7 representing a third amplitude difference, and p8 representing a fourth amplitude difference.
In the embodiment shown in fig. 5, the cardiac activity point, the first minimum value point, the second minimum value point, the first maximum value point and the second maximum value point are acquired in the BCG, and the cardiac physiological information can be accurately determined and obtained according to the cardiac activity point, the first minimum value point, the second minimum value point, the first maximum value point and the second maximum value point.
On the basis of any one of the above embodiments, a sleep information determination method will be described below with reference to fig. 7.
Fig. 7 is a flowchart of another sleep information determining method according to an embodiment of the present invention. Referring to fig. 7, the method may include:
s701, acquiring BCG signals acquired by a sensor, wherein the sensor is arranged on a carrier for bearing a user.
It should be noted that, the execution process of S701 may refer to the execution process of S201, and will not be described herein.
S702, performing wavelet filtering processing on the BCG signal.
It should be noted that, the execution process of S702 may refer to the execution process of S202, and will not be described herein.
And S703, performing signal processing on the BCG signal after the filtering processing, and carrying out cardiac physiological information.
It should be noted that, the execution process of S703 may refer to the embodiment shown in fig. 5, and will not be described herein.
And S704, processing the heart physiological information through the first recognition model to obtain the sleeping posture of the user.
Alternatively, the first recognition model may be trained for the BP neural network model, for example, the topology of the BP neural network model may include one input layer, five hidden layers, and one output layer.
And homogenizing the data before training the first recognition model, wherein a logarithmic S-shaped transfer function can be selected as an activation function, and the training function is a gradient descent self-adaptive learning rate for training the BP neural network to obtain the first recognition model.
Alternatively, data representing cardiac physiological information may be input to the first recognition model and a sleep posture of the user determined from an output of the first recognition model.
For example, the person may input vectors (p 1, p2, p3, p4, p5, p6, p7, p 8) representing cardiac physiological information to the first recognition model, and the output of the first recognition model may be the vectors (o 1, o2, o3, o 4). The output vector of the first recognition model may be subjected to a bipartite process, and the sleep posture of the user may be determined according to the bipartite processed vector. The elements in the bipartite processed vector are 1 or 0, wherein the relationship between the bipartite processed vector and the sleep posture may be as shown in table 1:
TABLE 1
| Vector quantity | Sleeping posture |
| (1,0,0,0) | Supine position |
| (0,1,0,0) | Prone position |
| (0,0,1,0) | Lying on the left side |
| (0,0,0,1) | Right side lying |
For example, assuming that the vector output by the first recognition model is (0.8,0.1,1.5,0.5), the vector is halved to obtain (1, 0), and the sleeping posture of the user can be determined to be supine based on the vector.
And S705, performing signal processing on the heart physiological information through the second recognition model to obtain the sleep quality of the user.
Optionally, the second recognition model may extract parameters such as total sleep duration, deep sleep duration, light sleep duration, number of wakefulness and the like of the user from the cardiac physiological information, and generate sleep quality of the user according to the obtained parameters.
In the embodiment shown in fig. 7, after obtaining the BCG signal, the BCG signal may be processed to obtain the cardiac physiological information of the user, and the cardiac physiological information of the user may be processed through the recognition model to accurately determine the sleep information of the user, where the sleep information of the user may reflect the health condition of the user, so that an object related to the health of the user may be accurately recommended to the user according to the sleep information of the user, thereby improving the accuracy of determining the sleep information.
Fig. 8 is a schematic structural diagram of a sleep information determining apparatus according to an embodiment of the present invention. The sleep information determining apparatus 10 may be applied to a server, and the sleep information determining apparatus 10 includes an acquisition module 11, a signal processing module 12, and an identification module 13, wherein,
The acquisition module 11 is used for acquiring a ballistocardiographic BCG signal acquired by a sensor, and the sensor is arranged on a carrier for bearing a user;
the signal processing module 12 is configured to perform signal processing on the BCG signal to obtain cardiac physiological information of the user;
The recognition module 13 is configured to perform recognition processing on the cardiac physiological information through a recognition model, so as to obtain sleep information of the user.
The sleep information determining device provided by the embodiment of the invention can execute the technical scheme shown in the embodiment of the method, and the implementation principle and the beneficial effects are similar, and are not repeated here.
In one possible implementation, the signal processing module 12 is specifically configured to:
determining a cardiac pulsation point of the user according to the BCG signal;
determining two adjacent minimum value points and two maximum value points of the heart fluctuation point in the BCG signal, wherein the two minimum value points are respectively positioned at two sides of the heart fluctuation point, and the two maximum value points are respectively positioned at two sides of the heart fluctuation point;
and determining the heart physiological information according to the heart beat point, the two minimum value points and the two maximum value points.
In one possible implementation, the signal processing module 12 is specifically configured to:
Respectively acquiring the positions and the amplitudes of the heart beat point, the two minimum value points and the two maximum value points;
And determining the heart physiological information according to the positions and the amplitudes of the heart beat point, the two minimum value points and the two maximum value points.
In one possible embodiment, the at least two minimum points include a first minimum point and a second minimum point, and the two maximum points include a first maximum point and a second maximum point; the first minimum point and the first maximum point are located to the left of the heart beat point, and the second minimum point and the second maximum point are located to the right of the heart beat point.
In one possible implementation, the signal processing module 12 is specifically configured to:
acquiring a first sampling distance between the first maximum point and the first minimum point, a second sampling distance between the first minimum point and the cardiac activity point, a third sampling distance between the cardiac activity point and the second minimum point, and a fourth sampling distance between the second minimum point and the second maximum point;
Acquiring a first amplitude difference between the first maximum point and the first minimum point, a second amplitude difference between the first minimum point and the heart beat point, a third amplitude difference between the heart beat point and the second minimum point, and a fourth amplitude difference between the second minimum point and the second maximum point;
determining the cardiac physiological information includes the first sampling distance, the second sampling distance, the third sampling distance, the fourth sampling distance, the first amplitude difference, the second amplitude difference, the third amplitude difference, and the fourth amplitude difference.
In one possible implementation, the identification model is learned for a plurality of sets of samples, each set including sample cardiac physiological information and sample sleep information.
In one possible embodiment, the sleep information includes a sleep posture and/or a sleep quality.
Fig. 9 is a schematic structural diagram of another sleep information determining apparatus according to an embodiment of the present invention. On the basis of the embodiment shown in fig. 8, referring to fig. 9, the sleep information determining apparatus 10 may further include a filtering module 14, wherein,
The filtering module 14 is configured to perform wavelet filtering processing on the BCG signal before the signal processing module performs signal processing on the BCG signal to obtain cardiac physiological information.
In one possible implementation, the sleep information determining apparatus 10 may further include a recommendation module 15, wherein,
The recommending module 15 is configured to recommend an object to the electronic device of the user according to the sleep information after the identifying module 13 identifies the cardiac physiological information through an identifying model to obtain the sleep information of the user.
The sleep information determining device provided by the embodiment of the invention can execute the technical scheme shown in the embodiment of the method, and the implementation principle and the beneficial effects are similar, and are not repeated here.
Fig. 10 is a schematic hardware structure of a sleep information determining apparatus according to an embodiment of the present invention, and as shown in fig. 10, the sleep information determining apparatus 20 includes: at least one processor 21 and a memory 22. Wherein the processor 21 and the memory 22 are connected by a bus 23.
In a specific implementation, at least one processor 21 executes computer-executable instructions stored in the memory 22, so that the at least one processor 21 performs the sleep information determining method as described above.
The specific implementation process of the processor 21 can be referred to the above method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
In the embodiment shown in fig. 10, it should be understood that the Processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, digital signal processors (english: DIGITAL SIGNAL Processor, abbreviated as DSP), application specific integrated circuits (english: application SPECIFIC INTEGRATED Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise high speed RAM memory or may further comprise non-volatile storage NVM, such as at least one disk memory.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (PERIPHERAL COMPONENT, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or to one type of bus.
The present application also provides a computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, implement the sleep information determining method as described above.
The computer readable storage medium described above may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. A readable storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. In the alternative, the readable storage medium may be integral to the processor. The processor and the readable storage medium may reside in an Application SPECIFIC INTEGRATED Circuits (ASIC). The processor and the readable storage medium may reside as discrete components in a device.
The division of the units is merely a logic function division, and there may be another division manner when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.