Threshold calibration method, device and snore-preventing pillow
By collecting pressure signals from the anti-snoring pillow using sensors and calculating the target threshold using the signal energy value, the pillow's state is automatically calibrated. This solves the problem of misjudgment of state caused by device deformation and improves the accuracy of the anti-snoring pillow's state judgment and its anti-snoring effect.
Patent Information
- Application Number
- CN202411567148.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2044-11-05
AI Technical Summary
Existing anti-snoring pillows may deform due to manufacturing process errors or prolonged use, causing fixed threshold settings to affect status judgment and thus impacting the anti-snoring effect.
By collecting pressure signals from the anti-snoring pillow using sensors and calculating the target threshold using the signal energy value, the pillow's status is automatically calibrated, improving the accuracy of status judgment.
Reduce the misjudgment rate of anti-snoring pillow status, improve the accuracy of anti-snoring pillow status determination, and ensure anti-snoring effect.
Smart Images

Figure CN119555275B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of threshold calibration, and in particular to a threshold calibration method and device and a snore-stopping pillow. BACKGROUND
[0002] The state of the snore-stopping pillow has a great influence on the snore-stopping operation, and further affects the sleep quality of the user. Therefore, it is necessary to accurately detect the state of the snore-stopping pillow. Different states of the snore-stopping pillow are subjected to different pressures or deformations. Generally, the pressure value of the snore-stopping pillow is compared with a corresponding threshold to determine the state of the snore-stopping pillow.
[0003] However, due to errors in the production process of the device or deformation caused by long-term use of the snore-stopping pillow, setting a fixed threshold will affect the determination of the state of the snore-stopping pillow, leading to misjudgment of the state of the snore-stopping pillow and further affecting the snore-stopping effect. SUMMARY
[0004] The present application at least solves one of the above technical problems to some extent. To this end, the present application provides a threshold calibration method, device and snore-stopping pillow, which can automatically calibrate the threshold for determining the state of the snore-stopping pillow and improve the accuracy of determining the state of the snore-stopping pillow.
[0005] In a first aspect, the present application provides a threshold calibration method applied to a threshold calibration device, the threshold calibration device comprising a sensor for collecting a pressure value of a snore-stopping pillow, and the method comprising:
[0006] obtaining a first signal collected by the sensor, wherein the first signal represents the pressure value of the snore-stopping pillow;
[0007] sequentially intercepting m first time window signals of the first signal by a first step length to obtain m second signals, wherein m is an integer greater than or equal to 1;
[0008] obtaining signal energy values of the m second signals;
[0009] determining a target threshold according to the m signal energy values, wherein the target threshold is used to determine the state of the snore-stopping pillow, and the state of the snore-stopping pillow includes a pillow state and a pillow-away state.
[0010] In some embodiments, the obtaining of the signal energy values of the m second signals comprises:
[0011] if the mth second signal is P mn wherein n is the serial number of the second signal, and n is an integer greater than or equal to 1;
[0012] the signal energy value of the mth second signal is calculated by the following formula:
[0013] Em= [P m1 ^2+P m2 ^2+…+P m(n-1) ^2+P mn ^2] / n;
[0014] Wherein, Em is the signal energy value corresponding to the mth second signal.
[0015] In some embodiments, the target threshold value is determined according to the m signal energy values, comprising:
[0016] The maximum value, the minimum value and the average value in the m signal energy values are obtained.
[0017] The target threshold value is determined according to the maximum value, the minimum value and the average value.
[0018] In some embodiments, the maximum value, the minimum value and the average value in the m signal energy values are obtained, comprising:
[0019] The m signal energy values are stored in an energy array.
[0020] The signal energy values in the energy array are sorted in descending order to obtain a target array.
[0021] The first value in the target array is taken as the maximum value, and the last value in the target array is taken as the minimum value.
[0022] The average value is determined according to the target array.
[0023] In some embodiments, the average value is determined according to the target array, comprising:
[0024] The signal energy value at the middle position in the target array is taken as the average value; or
[0025] The signal energy values in the target array are averaged to obtain the average value.
[0026] In some embodiments, the target threshold value is determined according to the maximum value, the minimum value and the average value, comprising:
[0027] Whether the pressure value of the snore-preventing pillow fluctuates is determined according to the maximum value and the minimum value.
[0028] If no fluctuation occurs, the target threshold value is determined according to the average value.
[0029] In some embodiments, whether the pressure value of the snore-preventing pillow fluctuates is determined according to the maximum value and the minimum value, comprising:
[0030] If the maximum value is less than or equal to the minimum value multiplied by a first preset multiple, it is determined that the pressure value does not fluctuate.
[0031] In some embodiments, the determining the target threshold value according to the average value comprises:
[0032] determining the average value multiplied by a second preset multiple as the target threshold value.
[0033] In a second aspect, the embodiments of the present application provide a state detection method of a snore-preventing pillow, comprising:
[0034] obtaining a target threshold value, wherein the target threshold value is obtained based on the threshold value calibration method as described above;
[0035] obtaining a real-time acquisition signal acquired by a sensor;
[0036] obtaining a real-time signal energy value of the real-time acquisition signal;
[0037] If the real-time signal energy value is greater than the target threshold value, it is determined that the state of the snore-preventing pillow is in a pillow state.
[0038] Otherwise, it is determined that the state of the snore-preventing pillow is in a pillow-removing state.
[0039] In a third aspect, the embodiments of the present application provide a threshold value calibration device, comprising:
[0040] a sensor configured to acquire a pressure value of a snore-preventing pillow; and
[0041] a controller in communication connection with the sensor, the controller comprising at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the threshold value calibration method as described above.
[0042] In a fourth aspect, the embodiments of the present application provide a snore-preventing pillow, comprising: a pillow main body, a USB main control box, and the threshold value calibration device as described above;
[0043] The pillow main body is provided with a USB interface, and the sensor is arranged in the pillow main body;
[0044] The controller is arranged in the USB main control box, and the sensor and the controller are in wired communication connection through the USB interface.
[0045] Compared with the prior art, the threshold calibration method in the application has at least the following beneficial effects: in the threshold calibration method in the application, first, a first signal collected by a sensor is acquired, wherein the first signal represents a pressure value of a snore stopping pillow, the first signal is sequentially intercepted in a first step length to obtain m second signals of m first time windows, the signal energy values of the m second signals are acquired, and finally, a target threshold is determined according to the m signal energy values, wherein the target threshold is used to determine the state of the snore stopping pillow, and the state of the snore stopping pillow includes a pillow state and a pillow leaving state. Therefore, the threshold calibration method automatically calibrates the target threshold according to the pressure value of the snore stopping pillow, improves the accuracy of the target threshold, and further reduces the misjudgment rate of the snore stopping pillow state and improves the accuracy of the determination of the snore stopping pillow state. BRIEF DESCRIPTION OF DRAWINGS
[0046] One or more embodiments are illustrated by way of example in the accompanying drawings that are not intended to be limiting of the application, in which like references indicate similar elements. The drawings are not necessarily to scale, the emphasis instead being placed upon illustrating the principles of the embodiments.
[0047] Figure 1 is a structural schematic diagram of one of the snore stopping pillows provided by the embodiments of the application;
[0048] Figure 2 is a circuit structural schematic diagram of one of the threshold calibration devices provided by the embodiments of the application;
[0049] Figure 3 is a controller structural schematic diagram provided by the embodiments of the application;
[0050] Figure 4 is an application environment schematic diagram of one of the threshold calibration devices provided by the embodiments of the application;
[0051] Figure 5 is a threshold calibration method flow process schematic diagram provided by the embodiments of the application;
[0052] Figure 6 is Figure 5 is a flow process schematic diagram of step S54 in
[0053] Figure 7 is a state detection method flow process schematic diagram of one of the snore stopping pillows provided by the embodiments of the application;
[0054] Figure 8 is a timing diagram of one of the signal energy values provided by the embodiments of the application;
[0055] Figure 9 is a structural schematic diagram of one of the threshold calibration devices provided by the embodiments of the application. DETAILED DESCRIPTION
[0056] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not used to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0057] It should be noted that the various features in the embodiments of the present application can be combined with each other without conflict, and all fall within the scope of protection of the present application. In addition, although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from the module division in the device or the order in the flowchart. Furthermore, the "first", "second", "third" and the like used in the present application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same function and effect.
[0058] The threshold calibration device of the embodiments of the present application can be constructed into any suitable shape and placed in various snore stopping pillows to automatically calibrate the threshold of the snore stopping pillow state.
[0059] Please refer to Figure 1 , Figure 1 is a schematic diagram of a snore stopping pillow provided by the embodiments of the present application, as Figure 1 shown, the snore stopping pillow 100 includes a pillow main body 10, a USB main control box 20 and a threshold calibration device 30.
[0060] Please refer to Figure 2 , Figure 2 is a circuit structure schematic diagram of a threshold calibration device provided by the embodiments of the present application. As Figure 2 shown, the threshold calibration device 30 includes a sensor 31 and a controller 32.
[0061] The pillow main body 10 is provided with a USB interface 11, and the sensor 31 is arranged in the pillow main body 10. The controller 32 is arranged in the USB main control box 20, and the sensor 31 and the controller 32 are connected in wired communication through the USB interface 11.
[0062] The USB interface 11 can be connected with the controller 32 in the USB main control box 20 through a signal transmission line. The USB interface 11 can be a Type-C interface, or can be other stable and easy-to-connect interfaces. The USB interface 11 supports plugging and unplugging. When snore stopping operation or threshold calibration is needed, the plug of the signal transmission line can be inserted into the USB interface 11.
[0063] Sensor 31 can be a piezoelectric sensor. In this embodiment, it can be a piezoelectric sensor, which acts as a dynamic strain sensor. When the piezoelectric material of the sensor is subjected to force, a charge is generated on its surface. This charge is amplified by a charge amplifier and a measuring circuit, and after impedance transformation, it becomes an electrical output proportional to the applied external force. Therefore, a piezoelectric sensor can be used to detect the pressure on the pillow body 10 to determine whether a user is resting on the pillow body 10.
[0064] During sleep, the user's head rests on the pillow body 10. The sensor 31 can collect the pressure value of the pillow body 10 and convert the collected pressure value into a piezoelectric signal. The piezoelectric signal is transmitted to the controller 32 through the USB interface 11 and the signal transmission line. The controller 32 receives and processes the signal to analyze whether the user is snoring during sleep. When snoring is present, the controller controls the inflation and deflation of airbags at different positions in the pillow body 10 to stop snoring.
[0065] When performing anti-snoring operations on the user, the status of the anti-snoring pillow is also judged. If the user's head is on the pillow body 10, the anti-snoring pillow is determined to be in the pillow state. If the user's head is not on the pillow body 10, the anti-snoring pillow is determined to be in the pillow state.
[0066] It should be noted that the above embodiments use the user's head as an example to illustrate the state of the anti-snoring pillow. In other embodiments, if other parts of the user are on the pillow body 10, or as long as there is an object on the pillow body 10, the state of the anti-snoring pillow is determined to be the pillow state.
[0067] The pressure values collected by the sensor differ between the pillow-on and pillow-off states. The controller compares these pressure values with a threshold value to determine the pillow's state. However, due to manufacturing errors or deformation caused by prolonged use, setting a fixed threshold can affect the pillow's state assessment, leading to misjudgments and ultimately impacting its anti-snoring effectiveness.
[0068] For the reasons mentioned above, this application provides a threshold calibration method for use in a threshold calibration device. This method can autonomously calibrate the threshold, reduce misjudgments of the anti-snoring pillow's state, and improve the accuracy of state judgment.
[0069] Please refer to the following: Figure 3 The controller 32 includes at least one processor 321 that is communicatively connected via a system bus or other means. Figure 3 (Taking a processor as an example) and memory 322. The controller 32 can exist in the form of a chip.
[0070] The memory 322 stores instructions executable by the at least one processor 321 for providing computing and control capabilities to control the threshold calibration apparatus 30 to perform relevant commands, e.g., to control the threshold calibration apparatus 30 to perform any of the threshold calibration methods provided in the embodiments described below.
[0071] The memory 322, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the threshold calibration methods provided in the embodiments described below. The processor 321 can implement the threshold calibration methods in any of the method embodiments described below by running the non-transitory software programs, instructions and modules stored in the memory 322. Specifically, the memory 322 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory 322 can also include a memory remotely disposed relative to the processor 321, which can be connected to the processor 321 through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0072] Please refer to Figure 4 , Figure 4 is a schematic diagram of an application scenario of a threshold calibration apparatus 30 provided in an embodiment of the present application, as shown in Figure 4 The threshold calibration apparatus 30 can also be communicatively connected to a mobile terminal 200, and the mobile terminal 200 and the threshold calibration apparatus 30 can be communicatively connected in any manner, such as wired connection or wireless connection using wireless fidelity (Wi-Fi), Bluetooth, or mobile communication technologies such as 3rd generation (3G), 4th generation (4G), or 5th generation (5G).
[0073] The mobile terminal 200 can be configured with one or more different user interaction devices to collect user instructions or to show and feed back information to the user. These interaction devices include, but are not limited to, keys, a display screen, a touch screen, and a speaker. For example, the mobile terminal 200 can be equipped with a touch display screen to receive user remote control instructions for the threshold calibration apparatus and to show the calibrated threshold to the user through the touch display screen.
[0074] The mobile terminal 200 and the threshold calibration device 30 transmit communication data to each other, for example, the threshold calibration device 30 can transmit the calibrated threshold to the mobile terminal 200 for the user to view in time, and the mobile terminal 200 can display the calibrated threshold and the state of the snore-preventing pillow in real time, which can be displayed in various forms to facilitate the user to view, and the user can also control the threshold calibration device through the mobile terminal 200 to set the threshold calibration device to work in an appropriate mode, for example, before the user lies down to sleep, the threshold calibration device is automatically calibrated through the mobile terminal 200, and after the calibrated threshold is obtained, the user lies down to sleep, so as to improve the detection accuracy of the subsequent snore-preventing pillow state and ensure the sleep effect.
[0075] It should be noted that the mobile terminal 200 can be a smart phone, a tablet computer, a personal digital assistant, etc. hardware devices with various operating systems.
[0076] Please continue to refer to Figure 2 The threshold calibration device 30 further comprises a signal processing circuit 33, which is electrically connected with the sensor 31 and the controller 32 respectively, for processing the piezoelectric signal and transmitting the processed piezoelectric signal to the controller 32.
[0077] The signal processing circuit 33 can amplify and filter the piezoelectric signal, and the amplified signal is easier to be processed by the controller 32, and different filtering methods can be used according to different stages. In some embodiments, the signal processing circuit 33 can also perform AD conversion on the piezoelectric signal to convert the piezoelectric signal into a digital signal, and the controller 32 receives and processes the digital signal. In some embodiments, the signal processing circuit 33 can also be integrated into the controller 32 to realize amplification, filtering and AD conversion of the piezoelectric signal by the controller 32.
[0078] In some embodiments, the threshold calibration device 30 further comprises a wireless module 34, which is in communication connection with the controller 32, for data communication with the mobile terminal 200.
[0079] The wireless module 34 can be implemented in various ways, such as a Bluetooth module, a WI FI module, etc.
[0080] In some embodiments, the threshold calibration device 30 further comprises a power module 35, which is electrically connected with the controller 32, the signal processing circuit 33 and the wireless module 34 respectively, for supplying power to the controller 32, the signal processing circuit 33 and the wireless module 34.
[0081] The power module 35 is composed of a rechargeable battery, a charging circuit and a voltage conversion circuit, the voltage conversion circuit is responsible for providing the voltage required for the normal operation of each circuit, wherein the rechargeable battery can be charged through the charging circuit using the USB port, or wireless charging.
[0082] In some embodiments, the threshold calibration device 30 can also include a voice module (not shown in the figure) electrically connected with the controller 32, which can issue an abnormal alarm through the voice module when an abnormal situation occurs, and the controller 32 can also send the abnormal situation to the mobile terminal 200 to facilitate the user to check in time. For example: when the threshold calibration fails, the voice module can play the "threshold calibration failure" voice to remind the user, or report the threshold calibration failure to the mobile terminal 200, and the mobile terminal 200 plays or displays, etc.
[0083] Among them, the signal processing circuit, the wireless module, the power module and the voice module can be placed in the USB main control box 20.
[0084] Please refer to Figure 5 , Figure 5 is a threshold calibration method flowchart provided by the embodiment of the application, as Figure 5 shown, the threshold calibration method comprises:
[0085] S51, acquiring a first signal collected by the sensor, wherein the first signal represents a pressure value of the snore pillow;
[0086] The first signal is a piezoelectric signal, which represents the pressure value of the snore pillow. Before the user lies down to sleep, if there is no object on the snore pillow and the snore pillow is in a stationary state, the pressure received by the snore pillow should be very small and the fluctuation is small, if the snore pillow is in a deformation process, the pressure received by the snore pillow is fluctuant. Therefore, the pressure received by the snore pillow is different in different states, and the size of the first signal represents the pressure value of the pressure received by the snore pillow.
[0087] A faster sampling frequency can be used to sample the first signal to obtain more piezoelectric data to obtain a more accurate threshold. The sampling frequency of the sensor can be set according to the needs, and in the embodiment, the sampling frequency is 800HZ.
[0088] S52, sequentially intercepting the signals of m first time windows according to a first step length, to obtain m second signals, wherein m is an integer greater than or equal to 1;
[0089] The first signal is intercepted, for example, the signal of the first first time window is intercepted first to obtain the first second signal, the signal of the second first time window is intercepted after the first step to obtain the second second signal, the signal of the third first time window is intercepted after the first step to obtain the third second signal, and so on. After the signal of the m-1th first time window is intercepted to obtain the m-1th second signal, the signal of the mth first time window is intercepted after the first step, and thus m first time window signals, i.e., m second signals, can be finally obtained.
[0090] The length of the first time window determines the length of the second signal and the number of data in the second signal. For example, if the sampling frequency of the piezoelectric signal is 800 HZ and the first time window is 10 seconds, the data points of the second signal are 10*800 = 8000. In other embodiments, the length of the first time window can be set as needed, such as 8 seconds.
[0091] The first step and m can be set as needed. In the embodiments of the present application, the first step is 1 second and m is 90.
[0092] S53, obtaining the signal energy value of the m second signals;
[0093] The signal energy value refers to the cumulative effect of the signal in a period of time, which reflects the total energy delivered by the signal in a specific period of time. The signal energy is the accumulation of signal intensity in a period of time, similar to the relationship between light intensity and illumination time, where the intensity of light can be understood as the "brightness" of light, and the illumination time corresponds to the time during which the signal intensity lasts. The energy of the signal is the accumulation of power over time, and power represents the energy delivered per unit time. The greater the power, the more energy is delivered per unit time, and the accumulation of energy is related to the time during which the signal lasts. Therefore, the signal energy value is not only related to the signal power of the signal emitted, but also affected by the attenuation in the signal propagation process, such as the obstacles encountered by the wireless signal in the air, which will cause the signal power to gradually attenuate, thereby affecting the accumulation of signal energy.
[0094] If the signal is an analog signal, the signal energy value is the integral of the square of the signal amplitude, and if the signal is a digital signal, the signal energy value is the sum of the square of the signal amplitude of each point. In the embodiments of the present application, the second signal is a digital signal, and thus the square of the signal amplitude of each point in the second signal is summed to obtain the signal energy value.
[0095] Each second signal contains n data points, where n = sampling frequency * first time window length, as in the above embodiment, n = 800 * 10 = 8000. Therefore, the average energy value is obtained by averaging the energy values of the n data points, and the average energy value is taken as the signal energy value of the final second signal.
[0096] Specifically, if the mth second signal is P mn where n is the sequence number of the second signal, and n is an integer greater than or equal to 1, the signal energy value of the mth second signal is calculated by the following formula:
[0097] Em= [P m1 ^2+P m2 ^2+…+P m(n-1) ^2+P mn ^2] / n.
[0098] where Em is the signal energy value corresponding to the mth second signal.
[0099] For example, if n = 8000, the signal energy value corresponding to the mth second signal is Em= [P m1 ^2+P m2 ^2+…+P m7999 ^2+P m8000 ^2] / 8000.
[0100] If m = 90, the signal energy value E1 corresponding to the first second signal is calculated, then the signal energy value E2 corresponding to the second second signal is calculated, and so on, until the signal energy value E 90 .
[0101] S54, determining a target threshold value according to the m signal energy values, wherein the target threshold value is used to determine the state of the snore-preventing pillow, and the state of the snore-preventing pillow includes the pillow state and the away pillow state.
[0102] The size of the m signal energy values represents the pressure value currently received by the snore-preventing pillow, which can reflect whether the snore-preventing pillow is in deformation, whether the pressure value is in fluctuation, and also can reflect the pressure value received by the snore-preventing pillow when it is in a stationary state and has not deformed. Based on the pressure value, a threshold value for determining the state of the snore-preventing pillow can be obtained.
[0103] Specifically, as shown in Figure 6 step S54 includes:
[0104] S541, obtaining the maximum value, the minimum value and the average value in the m signal energy values;
[0105] In some embodiments, the m signal energy values can be compared one by one, and the maximum value, the minimum value and the average value can be obtained.
[0106] In some embodiments, the m signal energy values can also be sorted in descending order, and the signal energy value in the first position is the maximum value, the signal energy value in the last position is the minimum value, and the signal energy value in the middle position is the average value. For example, if m is 90, the signal energy value in the 45th position is the average value. The average value can also be obtained by averaging the m signal energy values.
[0107] In some embodiments, the m signal energy values can also be sorted in ascending order, and the signal energy value in the first position is the minimum value, the signal energy value in the last position is the maximum value, and the signal energy value in the middle position is the average value, or the average value can be obtained by averaging the m signal energy values.
[0108] In some embodiments, the m signal energy values can also be stored in an energy array, and the signal energy values in the energy array can be sorted in descending order to obtain a target array. The first value in the target array is the maximum value, the last value in the target array is the minimum value, and the average value can be determined according to the target array. For example, the signal energy value in the middle position of the target array is the average value, or the average value can be obtained by averaging the signal energy values in the target array.
[0109] For example, the m signal energy values can also be stored in an energy array EnergyArr1, EnergyArr1=[E1,E2,…,E m-1 m ], and the energy array EnergyArr1 can be sorted in descending order to obtain a target array EnergyArr2. The maximum value Emax=EnergyArr2[0], the minimum value Emin=EnergyArr2
[89] , and the average value Emid=EnergyArr2
[45] can be obtained, or the average value Emid can be obtained by averaging the signal energy values in the target array EnergyArr2.
[0110] In some embodiments, the energy array can also be sorted in ascending order to obtain a target array, and the maximum value, the minimum value and the average value can be obtained in a similar manner as in the above embodiments, which will not be described here.
[0111] S542、According to the maximum value, the minimum value and the average value, a target threshold value is determined.
[0112] The maximum value and the minimum value represent whether the pressure value of the snore-preventing pillow fluctuates. If the pressure value fluctuates, it means that the snore-preventing pillow is still in a deformation process and cannot be calibrated. If the pressure value does not fluctuate, the target threshold value is determined again for threshold calibration.
[0113] Specifically, whether the pressure value of the snore-preventing pillow fluctuates is determined according to the maximum value and the minimum value. If the pressure value does not fluctuate, the target threshold value is determined according to the average value. If the pressure value fluctuates, it is determined that threshold calibration fails, and an abnormal state is marked. The abnormal state is uploaded to the mobile terminal.
[0114] The difference between the maximum value and the minimum value, or the multiple relationship between the maximum value and the minimum value, can represent whether the pressure value of the snore-preventing pillow fluctuates. In some embodiments, if the maximum value is less than or equal to the minimum value multiplied by a first preset multiple, it is determined that the pressure value does not fluctuate, for example: Emax≦A1*Emin, where A1 is the first preset multiple.
[0115] The first preset multiple can be set as needed. In the embodiments of the present application, the first preset multiple is 7. In some embodiments, if the difference between the maximum value and the minimum value is less than or equal to a preset difference, it is determined that the pressure value does not fluctuate.
[0116] If it is determined that the pressure value does not fluctuate, the target threshold value is determined according to the average value, for example, the average value multiplied by a second preset multiple is determined as the target threshold value, that is, the target threshold value=A2*Emid, where A2 is the second preset multiple.
[0117] The second preset multiple can be set as needed. In the embodiments of the present application, the second preset multiple is 3.
[0118] In summary, the threshold calibration method automatically calibrates the target threshold value according to the pressure value of the snore-preventing pillow, improves the accuracy of the target threshold value, and further reduces the misjudgment rate of the snore-preventing pillow state, and improves the accuracy of the snore-preventing pillow state determination.
[0119] After obtaining the target threshold value by the threshold calibration method provided in the embodiments of the present application, the target threshold value can be used to detect the state of the snore-preventing pillow. The snore-preventing pillow state detection method provided in the embodiments of the present application can be implemented by various types of electronic devices with computing processing capability, such as smart terminals and servers.
[0120] Referring to Figure 7 , Figure 7 is a flowchart of a snore-preventing pillow state detection method provided in the embodiments of the present application. The method S700 includes the following steps:
[0121] S71, obtaining a target threshold value;
[0122] S72, acquire the real-time acquisition signal collected by the sensor;
[0123] S73, acquire the real-time signal energy value of the real-time acquisition signal;
[0124] S74, if the real-time signal energy value is greater than the target threshold value, determine that the state of the snore-preventing pillow is in the pillow state;
[0125] S75, otherwise, determine that the state of the snore-preventing pillow is in the off-pillow state.
[0126] The target threshold value is obtained by using the threshold value calibration method in any one of the above embodiments.
[0127] In combination Figure 8 The process of the snore-preventing pillow state detection method can be described as follows, Figure 8 is a time sequence diagram of the signal energy value. The time sequence diagram is divided into two stages. The first stage is between 0-52 seconds, and the second stage is after 52 seconds. The first stage is the user's non-sleeping stage. In this stage, the target threshold value is obtained by using the threshold value calibration method, and then the target threshold value is stored in the controller. The second stage is the snore-preventing pillow state detection stage, which is the user's sleeping stage after lying on the pillow. The signal energy value fluctuates greatly.
[0128] In the second stage, the target threshold value is acquired, and the real-time signal energy value is acquired. The target threshold value is compared with the real-time signal value. According to the comparison result, the state of the snore-preventing pillow is determined. After 52 seconds, it can be seen from Figure 8 that the real-time signal energy value is large and greater than the target threshold value. It can be determined that the state of the snore-preventing pillow is in the pillow state.
[0129] Therefore, the target threshold value in the snore-preventing pillow state detection method is the threshold value after real-time calibration, which has a small error, thereby reducing the misjudgment of the state of the snore-preventing pillow and improving the accuracy of the snore-preventing pillow state detection.
[0130] It should be noted that in the above various embodiments, there is no certain sequence between the above steps. Those skilled in the art can understand from the description of the embodiments of the present application that the above steps can have different execution sequences in different embodiments, that is, they can be executed in parallel, or they can be exchanged and executed, and the like.
[0131] As another aspect of the embodiments of the present application, the embodiments of the present application provide a threshold value calibration device 30. The threshold value calibration device 30 can be a software module. The software module includes a plurality of instructions stored in the memory of the controller 32, and the processor can access the memory to call the instructions for execution to complete the threshold value calibration method described in the above various embodiments.
[0132] In some embodiments, the threshold calibration apparatus 30 can also be built by hardware devices, for example, the threshold calibration apparatus 30 can be built by one or more chips, and each chip can work in coordination with each other to complete the threshold calibration method described in each of the above embodiments. For another example, the threshold calibration apparatus 30 can also be built by various logic devices, such as general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), single-chip microcomputers, ARM (Acorn RISC Machine) or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, or any combination of these components.
[0133] Please refer to Figure 9 , Figure 9 The embodiment of the present application provides a threshold calibration apparatus, which comprises a first acquisition module 91, an intercepting module 92, a second acquisition module 93 and a first determination module 94.
[0134] The first acquisition module 91 is used for acquiring a first signal collected by the sensor, wherein the first signal represents a pressure value of the snore-preventing pillow.
[0135] The intercepting module 92 is used for sequentially intercepting signals of m first time windows according to a first step length to obtain m second signals, wherein m is an integer greater than or equal to 1.
[0136] The second acquisition module 93 is used for acquiring signal energy values of the m second signals.
[0137] The first determination module 94 is used for determining a target threshold according to the m signal energy values, wherein the target threshold is used for determining a state of the snore-preventing pillow, and the state of the snore-preventing pillow comprises a pillow state and a pillow-removing state.
[0138] Therefore, the threshold calibration apparatus automatically calibrates the target threshold according to the pressure value of the snore-preventing pillow, improves the accuracy of the target threshold, and further reduces the misjudgment rate of the snore-preventing pillow state and improves the accuracy of the determination of the snore-preventing pillow state.
[0139] It should be noted that, since the threshold calibration apparatus and the threshold calibration method in the above embodiments are based on the same application concept, the corresponding contents in the method embodiments are also applicable to the apparatus embodiments, which will not be described in detail here.
[0140] The embodiment of the present application also provides a non-transitory computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are executed by one or more processors, for example Figure 3The one processor 321 in the one or more processors 321 can cause the one or more processors to perform the threshold calibration method in any of the method embodiments described above.
[0141] The embodiments of the present application also provide a computer program product, which comprises a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that, when executed by a controller 32, cause the controller 32 to perform any of the threshold calibration methods.
[0142] In summary, the threshold calibration method automatically calibrates the target threshold value according to the pressure value of the snore-preventing pillow, improves the accuracy of the target threshold value, and further reduces the misjudgment rate of the snore-preventing pillow state and improves the accuracy of the snore-preventing pillow state determination.
[0143] The device or equipment embodiments described above are merely illustrative, wherein the unit modules described as separate components can or can not be physically separated, and the components displayed as module units can or can not be physical units, i.e., can be located in one place or distributed on multiple network module units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment scheme.
[0144] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus a general hardware platform, and of course can also be implemented by hardware. Based on such understanding, the above technical solutions essentially or in terms of related technology can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the threshold calibration method described in each embodiment or some part of the embodiment.
[0145] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; under the idea of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes of the different aspects of the present application as described above, which are not provided in detail for the sake of simplicity; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A threshold calibration method applied to a threshold calibration device, characterized in that, The threshold calibration device comprises a sensor for collecting a pressure value of the snore-preventing pillow, and the method comprises: obtaining a first signal collected by the sensor, wherein the first signal represents the pressure value of the snore-preventing pillow; sequentially intercepting, by a first step, signals of m first time windows from the first signal to obtain m second signals, wherein m is an integer greater than or equal to 1; obtaining signal energy values of the m second signals; determining a target threshold value according to the m signal energy values, wherein the target threshold value is used to determine a state of the snore-preventing pillow, and the state of the snore-preventing pillow comprises a pillow state and a pillow-removing state; the obtaining of the signal energy values of the m second signals comprises: If the mth second signal is P mn wherein n is a serial number of the second signal, n is an integer greater than or equal to 1; calculating the signal energy value of the mth second signal by the following formula: Em=[P m1 ^2+P m2 ^2+…+P m(n-1) ^2+P mn ^2] / n; wherein Em is the signal energy value corresponding to the mth second signal; the determining of the target threshold value according to the m signal energy values comprises: obtaining a maximum value, a minimum value and an average value in the m signal energy values; determining the target threshold value according to the maximum value, the minimum value and the average value.
2. The threshold calibration method of claim 1, wherein, the obtaining of the maximum value, the minimum value and the average value in the m signal energy values comprises: storing the m signal energy values in an energy array; sorting the signal energy values in the energy array in descending order to obtain a target array; taking a first value in the target array as the maximum value and taking a last value in the target array as the minimum value; determining the average value according to the target array.
3. The threshold calibration method of claim 2, wherein, the determining of the average value according to the target array comprises: taking a signal energy value at a middle position in the target array as the average value; or performing an average operation on the signal energy values in the target array to obtain the average value.
4. The threshold calibration method of claim 1, wherein, the determining of the target threshold value according to the maximum value, the minimum value and the average value comprises: determining whether a pressure value of the snore-preventing pillow fluctuates according to the maximum value and the minimum value; if no fluctuation occurs, determining the target threshold value according to the average value.
5. The threshold calibration method of claim 4, wherein, the determining of whether the pressure value of the snore-preventing pillow fluctuates according to the maximum value and the minimum value comprises: if the maximum value is less than or equal to a first preset multiple of the minimum value, determining that the pressure value does not fluctuate.
6. The threshold calibration method of claim 4, wherein, the determining of the target threshold value according to the average value comprises: determining a second preset multiple of the average value as the target threshold value.
7. A method for detecting the state of an anti-snoring pillow, characterized in that, comprises: obtaining a target threshold value, wherein the target threshold value is obtained based on the threshold calibration method according to any one of claims 1-6; obtaining a real-time collection signal collected by a sensor; obtaining a real-time signal energy value of the real-time collection signal; if the real-time signal energy value is greater than the target threshold value, determining that a state of the snore-preventing pillow is a pillow state; otherwise, determining that the state of the snore-preventing pillow is a pillow-removing state.
8. A threshold calibration apparatus characterized by comprising: the threshold calibration device comprises: a sensor for collecting a pressure value of a snore-preventing pillow; and A controller in communication with the sensor, the controller comprising at least one processor; and a memory in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the threshold calibration method of any one of claims 1-6.
9. A snore stop pillow, characterized in that The snore-preventing pillow comprises a pillow main body, a USB main control box, and the threshold calibration device of claim 8. The pillow main body is provided with a USB interface, and the sensor is arranged in the pillow main body. The controller is arranged in the USB main control box, and the sensor and the controller are in wired communication connection through the USB interface.
Citation Information
Patent Citations
Detection method and device of microphone state
CN101778333A
Earphone wearing state determination method, electronic equipment control method and electronic equipment
CN110896509A