Sleep quality monitoring system based on big data
Technical Field
The invention relates to the field of intelligent testing, in particular to a sleep quality monitoring system based on big data.
Background
The modern society rhythm is faster and faster, and people's working pressure is also bigger and bigger, and the too big pressure can influence people's healthy, receives working pressure's puzzlement for a long time and makes people unable to feel confident sleep, and the sleep quality in evening is worse and worse, and then can influence the work efficiency on the next day, and people can become more and more anxiety, dysphoria for a long time, can form vicious circle.
People often neglect the quality of sleep of the people, and the people cannot find problems in time when the sleep quality state of the people is poor, and the existing sleep quality monitoring methods monitor the sleep quality of the people, but the following problems exist in the monitoring process:
1. the sleep quality monitoring data is too complex, so that the user cannot clearly know the quality of the sleep of the user, and errors can occur in the judgment of the sleep quality of the user;
2. in the motion monitoring link, the accuracy and timeliness of the data for monitoring the sleep quality of the user are not high due to the movement of the position, and the monitoring difficulty is increased.
Therefore, a sleep quality monitoring system based on big data is needed to solve the above problems.
Disclosure of Invention
The invention aims to provide a sleep quality monitoring system based on big data so as to solve the problems in the background technology.
In order to solve the technical problems, the invention provides the following technical scheme: a big data based sleep quality monitoring system, the system for sleep quality monitoring comprising: the system comprises a monitoring end, a central processing unit, a voice recognition broadcasting module, a WIFI module, a control module, a big data server, a light emitting diode and a display module;
the output end of the monitoring end is connected with the input end of the central processing unit, the output end of the central processing unit is connected with the input end of the voice recognition broadcasting module through an IO port, the other output end of the central processing unit is connected with the input end of the WIFI module, the output end of the WIFI module is connected with the input end of the control module, the output end of the control module is connected with the big data server, the light emitting diode and the input end of the display module, the output end of the big data server is connected with the input end of the control module, and the control module is connected with the big data server in a two-way communication mode.
Further, the monitoring end comprises an infrared body temperature monitoring module, a heart rate monitoring module, a blood pressure monitoring module, a respiratory rate monitoring module, a motion monitoring module and a blood oxygen monitoring module, wherein the infrared body temperature monitoring module is used for detecting the body temperature of a user during sleeping, the heart rate monitoring module is used for detecting the heart beating frequency of the user during sleeping, the blood pressure monitoring module is used for detecting the blood pressure condition of the user during sleeping, the respiratory rate monitoring module is used for detecting the respiratory frequency of the user during sleeping, the motion monitoring module is used for detecting the turn-over times of the user during sleeping and the time for maintaining a sleeping gesture, the blood oxygen monitoring module is used for detecting the oxygen content of blood during sleeping of the user, the sleeping quality of the user is monitored from multiple aspects, the monitored data are more comprehensive, the accuracy of the sleeping quality monitoring data of the user is improved, and the sleeping quality of the user can be clearly and accurately judged.
Further, the voice recognition broadcasting module is configured to broadcast the data information monitored by the monitoring end, firstly, initialize the voice recognition broadcasting module, after the voice recognition broadcasting module receives the data information monitored by the monitoring end and transmitted by the central processing unit, detect whether the serial port of the voice recognition broadcasting module receives voice, after the serial port receives voice, the user speaks a wake-up word, after the wake-up word is recognized by the serial port, the voice recognition broadcasting module starts to work, after the voice recognition broadcasting module starts to work, the user sends a second-level voice command, after the second-level voice command is received by the serial port, the voice recognition broadcasting module can broadcast corresponding voice, namely, the data information monitored by the monitoring end is broadcast, and the sleep quality monitoring information of the user can accurately know the sleep condition of the user without checking the monitoring data of the user, thereby reducing the difficulty of the user in recognizing the sleep quality of the user.
Furthermore, the wake-up word is customized, the second-level voice command is set as "last night sleep monitoring information" (which can be changed according to actual conditions), and after the second-level voice command is sent out, the voice recognition broadcasting module can play the corresponding monitored data information.
Further, when the voice broadcasting module plays the monitored data information, normal sleep monitoring information of the user is stored in the big data server, the normal sleep monitoring information is compared with the monitoring information received by the control module, and the comparison result is displayed through the display module.
Further, the motion monitoring module is used for detecting the times of turning over when a user sleeps and the time for maintaining a sleeping gesture, the motion monitoring module needs to use a motion monitoring tool, the motion monitoring tool is used for scanning the user after the user falls asleep, after the motion monitoring tool is fixed, the motion monitoring tool scans the user and identifies the position coordinates of a specified point (such as a nose, a point on an arm and the like), and the motion monitoring tool simultaneously observes the coordinate change of the specified point in real time.
Further, when the motion monitoring tool performs real-time observation on the coordinate change of the specified point, if the position coordinate of the specified point does not change, the motion monitoring tool calculates the time when the position coordinate of the specified point is unchanged, if the position coordinate of the specified point changes, the motion monitoring tool counts the number of times of the coordinate change of the specified point and describes the motion track of the specified point by using a moving point space-time model, the motion monitoring tool is also used for identifying the latest position coordinate of the specified point, the sleeping posture change of the whole body of the user during sleeping can be estimated from the local position change, and the whole body can be observed through the local part, so that the working difficulty of the motion monitoring tool is reduced.
Furthermore, the time-space model of the moving point represents the future position of the moving point by using a time function, the position attribute is a dynamic attribute of the moving point, the value of the dynamic attribute is determined by time, when the deviation between the position of the moving point and the initial position exceeds a certain threshold value, a position updating system is triggered, the position updating system is used for updating the position coordinate of the pointed point, and the position coordinate of the pointed point is updated and identified in real time, so that the accuracy of sleep posture change data of the user is improved.
Further, the motion trail of the specified point is composed of seven-tuple sequence (x
i ,y
i ,z
i ,t
i ,d
i ,v
i Delta t), wherein said x
i 、y
i 、z
i Expressed as the specified point t
i Time space position, d
i Representing t
i A time trace direction, v
i Representing said t
i The time speed, the delta t represents a time updated threshold value, the motion trail of the appointed point is determined by the delta t value, if the appointed point is at the time t
i The position coordinates of (2) are P
i (x
i ,y
i ,z
i ) The appointed point is in a time interval [ t ]
i ,t
i+1 ]Upper slave point P
i (x
i ,y
i ,z
i ) To point P
i+1 (x
i+1 ,y
i+1 ,z
i+1 ) At said velocity v
i To perform uniform linear motion, then
In said time interval [ t ]
i ,t
i+1 ]The appointed point is P on the motion trail
i (x
i ,y
i ,z
i ) And point P
i+1 (x
i+1 ,y
i+1 ,z
i+1 ) The position between the two is obtained by a linear interpolation method, and the user can perform tiny actions besides turning over during sleeping, wherein v is as follows
i Is set to v
max When said v
i Less than said v
max When the user sleeps, the user is judged to have a tiny action without turning over, and when v is
i Greater than or equal to said v
max When the user is judged to turn over during sleeping, the user can more clearly know the sleeping posture change of the user under the sleeping state through displaying the movement track, and then the sleeping quality is judged.
Further, the light emitting diode has three colors, and the three colors are respectively: green light, yellow light and red light, wherein the three colors are used for judging the sleep quality of a user, the green light represents the sleep quality of the user to be good, the yellow light represents the sleep quality of the user to be general, the red light represents the sleep quality of the user to be poor, the user is not always clear of the sleep quality of the user, and the color change of the light emitting diode enables the user to easily understand the sleep quality of the user.
Compared with the prior art, the invention has the following beneficial effects:
1. the motion monitoring module in the monitoring end presumes the turn-over times of the user during sleeping and maintains the time of a sleeping gesture unchanged by monitoring the change times of the position coordinates of the body part of the user, so that the sleeping quality of the user is judged, the whole body can be observed through parts, the working difficulty of the motion monitoring tool is reduced, the motion track of the body part of the user is described by using a moving point space-time model, and the user is helped to more clearly see the motion track of the user in a sleeping state;
2. the central processing unit receives the monitoring data transmitted by the monitoring end, is connected with the voice recognition broadcasting module through the IO port, transmits the data to the voice recognition broadcasting module, and then broadcasts the monitoring data, if a user does not hear own sleep monitoring information in time, the user can check own sleep condition through the monitoring data displayed by the display module, and can accurately know own sleep condition without checking own monitoring data, so that the difficulty of the user in cognizing own sleep quality is reduced, the user is helped to take corresponding measures to improve own sleep quality, and the working efficiency in daytime is improved;
3. when facing a stack of data, the user often cannot comprehensively know and accurately judge the sleep quality of the user, the control module is used for controlling the light emitting diode to emit light with different colors, the light with different colors represents different sleep quality, the user can know the sleep condition of the user in a simpler mode, and the user can be helped to more comprehensively know and judge the sleep quality of the user by combining the comparison result of the monitoring information displayed by the display module and the normal monitoring information of the big data server.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a basic framework diagram of a big data based sleep quality monitoring system of the present invention;
FIG. 2 is a software flow chart of the voice recognition broadcast module of the present invention;
FIG. 3 is a diagram of the components of the monitoring end of the present invention;
FIG. 4 is a monitoring flow chart of the motion monitoring module in the monitoring end of the present invention;
FIG. 5 is a schematic view of sleep quality represented by different lights of the LEDs of the present invention;
FIG. 6 is a graph of a designated point motion trajectory for a moving point spatiotemporal model of the present invention;
in the figure: 1. a monitoring end; 2. a central processing unit; 3. a voice recognition broadcasting module; 4. a WIFI module; 5. a control module; 6. a big data server; 7. a light emitting diode; 8. a display module; 9. an infrared body temperature monitoring module; 10. a heart rate monitoring module; 11. a blood pressure monitoring module; 12. a respiratory rate monitoring module; 13. a motion monitoring module; 14. and a blood oxygen monitoring module.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. 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.
Referring to fig. 1-6, the present invention provides the following technical solutions: a sleep quality monitoring system based on big data, the sleep quality monitoring system comprising: the system comprises a monitoring end 1, a central processing unit 2, a voice recognition broadcasting module 3, a WIFI module 4, a control module 5, a big data server 6, a light emitting diode 7 and a display module 8;
the output end of the monitoring end 1 is connected with the input end of the central processing unit 2, the output end of the central processing unit 2 is connected with the input end of the voice recognition broadcasting module through an IO port, the other output end of the central processing unit 2 is connected with the input end of the WIFI module 4, the output end of the WIFI module 4 is connected with the input end of the control module 5, the output end of the control module 5 is connected with the big data server 6, the light emitting diode 7 and the input end of the display module 8, the output end of the big data server 6 is connected with the input end of the control module 5, the control module 5 is connected with the big data server 6 in a two-way communication mode, and the information stored in the big data server 6 when a user sleeps normally is compared with the information received by the control module 5 from the monitoring end 1, so that the judgment result of the sleeping quality of the user can be obtained.
The monitoring end 1 comprises an infrared body temperature monitoring module 9, a heart rate monitoring module 10, a blood pressure monitoring module 11, a respiratory rate monitoring module 12, a motion monitoring module 13 and a blood oxygen monitoring module 14, wherein the infrared body temperature monitoring module 9 is used for detecting the body temperature of a user during sleeping, the heart rate detecting module 10 is used for detecting the heart beat frequency of the user during sleeping, the blood pressure monitoring module 11 is used for detecting the blood pressure condition of the user during sleeping, the respiratory rate detecting module 12 is used for detecting the respiratory frequency of the user during sleeping, the motion monitoring module 13 is used for detecting the times of turning over the user during sleeping and maintaining the time of a sleeping gesture, and the blood oxygen monitoring module 14 is used for detecting the oxygen content of blood during sleeping.
The voice recognition broadcasting module 3 is used for broadcasting the data information monitored by the monitoring end 1, firstly, the voice recognition broadcasting module 3 is initialized, after the voice recognition broadcasting module 3 receives the data information monitored by the monitoring end 1 and transmitted by the central processing unit 2, whether the serial port of the voice recognition broadcasting module 3 receives voice is detected, after the serial port receives voice, a user speaks a wake-up word, after the wake-up word is recognized by the serial port, the voice recognition broadcasting module 3 starts to work, after the voice recognition broadcasting module 3 starts to work, the user sends a secondary voice instruction, after the secondary voice instruction is received by the serial port, the voice recognition broadcasting module 3 can play corresponding voice, namely, the data information monitored by the monitoring end 1.
The wake-up word is customized, the second-level voice command is set as 'last night sleep monitoring information' (which can be changed according to actual conditions), and after the second-level voice command is sent out, the voice recognition broadcasting module 3 can play the corresponding monitored data information for a user to know the sleep condition more conveniently.
When the voice broadcasting module 3 plays the monitored data information, the big data server 2 stores the normal sleep monitoring information of the user, the normal sleep monitoring information is compared with the monitoring information received by the control module 5, the comparison result is displayed through the display module 8, and if the user can find data on the display screen when not listening to the sleep monitoring information of the user, the omission of the monitoring information is avoided.
The motion monitoring module 13 is used for detecting the times of turning over when a user sleeps and the time for maintaining a sleeping gesture, the motion monitoring module 13 needs to use a motion monitoring tool, the motion monitoring tool is used for scanning the user after the user enters the sleeping, after the motion monitoring tool is fixed, the motion monitoring tool scans the user and identifies the position coordinates of a specified point (such as a nose, a point on an arm and the like), and the motion monitoring tool simultaneously observes the coordinate change of the specified point in real time, so that the integrity of monitoring records is ensured.
When the motion monitoring tool performs real-time observation on the coordinate change of the designated point, if the position coordinate of the designated point is not changed, the motion monitoring tool calculates the time when the position coordinate of the designated point is unchanged, if the position coordinate of the designated point is changed, the motion monitoring tool counts the number of times of the change of the position coordinate of the designated point, describes the motion track of the designated point by using a moving point space-time model, and is also used for identifying the latest position coordinate of the designated point, generating new position information when the position coordinate of the designated point is updated, and timely identifying the new position coordinate is favorable for accurately judging the next change of the designated point.
The time-space model of the moving point represents the future position of the moving point by using a time function, the position attribute is the dynamic attribute of the moving point, the value of the dynamic attribute is determined by time, and when the deviation between the position of the moving point and the initial position exceeds a certain threshold value, the position updating system is triggered and used for updating the position coordinate of the moving point.
The motion trail of the designated point is composed of seven-element group sequence (x
i ,y
i ,z
i ,t
i ,d
i ,v
i Delta t), wherein x
i 、y
i 、z
i Represented as a specified point t
i Time space position, d
i Representing t
i Direction of time trace, v
i Representing t
i Time speed, deltat represents a time updated threshold value, the motion trail of a specified point is determined by the value of Deltat, if the specified point is at time t
i The position coordinates of (2) are P
i (x
i ,y
i ,z
i ) The specified point is within the time interval t
i ,t
i+1 ]Upper slave point P
i (x
i ,y
i ,z
i ) To point P
i+1 (x
i+1 ,y
i+1 ,z
i+1 ) At a speed v
i To perform uniform linear motion, then
In time interval t
i ,t
i+1 ]On the designated point P on the motion trail
i (x
i ,y
i ,z
i ) And point P
i+1 (x
i+1 ,y
i+1 ,z
i+1 ) The position between the two parts is obtained by a linear interpolation method, and a user can perform tiny actions besides turning over during sleeping, v
i Is set to v
max When v
i Less than v
max When the user sleeps, the user is judged to have tiny actions without turning over, and when v
i Greater than or equal to v
max And judging that the user turns over during sleeping.
The light emitting diode 7 has three colors, which are respectively: the three colors are used for judging the sleep quality of the user, green light represents good sleep quality of the user, yellow light represents general sleep quality of the user, red light represents poor sleep quality of the user, and different colors of light represent different sleep quality, so that the user can clearly know the sleep condition of the user.
Embodiment one: as shown in fig. 6, a specified point P is set
i The initial position coordinates of (1, 2) are (c) if the user moves to point P in the sleep state
i+1 (4, 5, 7), required time△t=t
i+1 -t
i Set to 3s, v
i Maximum value v of (2)
max Set to 5cm/s according to the formula
Calculating the motion velocity v of the specified point
i =/>
cm/s because of v
i Less than v
max Therefore, it is determined that the user only performs a minute motion without turning over in this period of time, and the time is accumulated to a time when the coordinates of the designated point remain unchanged, and the total time when the coordinates of the designated point remain unchanged is counted before the next change of the designated point.
The working principle of the invention is as follows: the monitoring end 1 transmits the monitored body temperature information, heart beating frequency, blood pressure, breathing frequency, turning times, time for maintaining a sleeping posture and oxygen content information in blood of the user to the central processing unit 2, wherein the motion monitoring module 13 scans the user to monitor the sleeping information through a motion monitoring tool, and the motion monitoring tool scans and identifies a specified point (such as: nose, a point on the arm), if the position of the designated point is unchanged, calculating the time when the position of the designated point is maintained unchanged, if the position of the designated point is changed, counting the number of times of the position coordinate change of the designated point, describing the movement track, after the position change of the designated point, updating and identifying the new position coordinate of the designated point by the movement monitoring tool so as to accurately judge the next position change of the designated point, connecting the central processing unit 2 with the voice recognition broadcasting module 3 through an IO port, transmitting the information to the voice recognition broadcasting module 3, playing corresponding sleep monitoring information by sending an instruction similar to 'late yesterday sleep condition' to the voice recognition broadcasting module 3, simultaneously, connecting the output end of the central processing unit 2 with the input end of the WIFI module 4, transmitting the information to the control module 5 through the WIFI module 4, storing the monitoring information of the user during normal sleep in the big data server 6, comparing the monitoring information with the monitoring information of the control module 5, displaying the compared result through the display module 8, simultaneously, controlling the output end of the control module 5 to be connected with the output end of the light emitting diode 7 to control the light emitting diode 7 to emit different representing different sleep quality lights with good quality, wherein the different sleep quality represent different sleep quality, yellow light represents the general sleep quality of a user, and red light represents the poor sleep quality of the user, so that the user knows the sleep condition of the user in a simple way. The invention is convenient for the user to accurately judge the sleep quality of the user, thereby adopting corresponding measures to improve the sleep quality of the user and improving the working efficiency of the next day.
Finally, it should be noted that: it will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.