Threshold value calibration method and device and snore-ceasing pillow
By automatically calibrating the threshold of the snoring pillow, the problem of misjudgment caused by equipment error and deformation is solved, and the accuracy of snoring pillow status judgment and snoring effect are improved.
Patent Information
- Application Number
- CN202411567148.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-11-05
AI Technical Summary
Due to errors in the production process of the equipment or the deformation caused by long-term use of the snoring pillow, setting a fixed threshold will affect the accurate judgment of the snoring pillow state, resulting in misjudgment, and thus affect the snoring effect.
A threshold calibration method and device are provided, which collects the pressure signal of the snoring pillow through sensors, intercepts multiple time window signals, calculates signal energy values, and determines the target threshold based on the maximum value, the minimum value and the average value to realize automatic calibration.
It improves the accuracy of the state judgment of the snoring pillow, reduces the rate of state misjudgment, and ensures the improvement of the snoring effect.
Smart Images

Figure CN119555275A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of threshold calibration, and in particular to a threshold calibration method, device and anti-snoring pillow. Background Art
[0002] The state of the anti-snoring pillow has a great impact on the anti-snoring operation, and further affects the user's sleep quality. Therefore, it is necessary to accurately detect the state of the anti-snoring pillow. Different states of anti-snoring pillows have different pressures or deformations. Generally, the pressure value of the anti-snoring pillow is compared with the corresponding threshold to determine the state of the anti-snoring pillow.
[0003] However, due to errors in the equipment production process, or deformation of the anti-snoring pillow due to long-term use, setting a fixed threshold will affect the judgment of the state of the anti-snoring pillow, resulting in misjudgment of the state of the anti-snoring pillow, thereby affecting the anti-snoring effect. Summary of the invention
[0004] The present application solves at least one of the above-mentioned technical problems to a certain extent. To this end, the present application provides a threshold calibration method, device and anti-snoring pillow, which can automatically calibrate the threshold used to determine the state of the anti-snoring pillow, thereby improving the accuracy of determining the state of the anti-snoring pillow.
[0005] In a first aspect, an embodiment of the present application provides a threshold calibration method, which is applied to a threshold calibration device, wherein the threshold calibration device includes a sensor, and the sensor is used to collect a pressure value of an anti-snoring pillow. The method includes:
[0006] Acquire a first signal collected by the sensor, wherein the first signal represents a pressure value of the anti-snoring pillow;
[0007] Sequentially intercept m signals of the first time window from the first signal according to the first step length to obtain m second signals, where m is an integer greater than or equal to 1;
[0008] Obtaining signal energy values of the m second signals;
[0009] A target threshold is determined according to the m signal energy values, wherein the target threshold is used to determine the state of the anti-snoring pillow, and the state of the anti-snoring pillow includes a pillow-on state and a pillow-off state.
[0010] In some embodiments, obtaining the signal energy values of the m second signals includes:
[0011] If the mth second signal is P mn , wherein n is the sequence 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, determining the target threshold according to the m signal energy values includes:
[0016] Obtaining the maximum value, the minimum value and the average value of the m signal energy values;
[0017] A target threshold is determined according to the maximum value, the minimum value, and the average value.
[0018] In some embodiments, obtaining the maximum value, the minimum value, and the average value of the m signal energy values includes:
[0019] Storing the m signal energy values in an energy array;
[0020] Sorting the signal energy values in the energy array 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 based on the target array.
[0023] In some embodiments, determining the average value according to the target array includes:
[0024] The signal energy value at the middle position in the target array is taken as the average value; or,
[0025] An average operation is performed on the signal energy values in the target array to obtain the average value.
[0026] In some embodiments, determining the target threshold according to the maximum value, the minimum value, and the average value includes:
[0027] Determining whether the pressure value of the anti-snoring pillow fluctuates according to the maximum value and the minimum value;
[0028] If no fluctuation occurs, the target threshold is determined according to the average value.
[0029] In some embodiments, determining whether the pressure value of the anti-snoring pillow fluctuates according to the maximum value and the minimum value includes:
[0030] If the maximum value is less than or equal to the minimum value of the first preset multiple, it is determined that the pressure value does not fluctuate.
[0031] In some embodiments, determining the target threshold according to the average value includes:
[0032] The average value of the second preset multiple is determined as the target threshold.
[0033] In a second aspect, an embodiment of the present application provides a state detection method of an anti-snoring pillow, comprising:
[0034] Obtaining a target threshold, wherein the target threshold is obtained based on the threshold calibration method described above;
[0035] Obtain real-time acquisition signals collected by sensors;
[0036] Acquire the real-time signal energy value of the real-time collected signal;
[0037] If the real-time signal energy value is greater than the target threshold, determining that the state of the anti-snoring pillow is in the pillow state;
[0038] Otherwise, it is determined that the state of the anti-snoring pillow is an off-pillow state.
[0039] In a third aspect, an embodiment of the present application provides a threshold calibration device, the threshold calibration device comprising:
[0040] A sensor for collecting pressure values of the anti-snoring pillow; and
[0041] A controller, the controller is communicatively connected to the sensor, the controller includes at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions are executed by the at least one processor so that the at least one processor can perform the threshold calibration method as described above.
[0042] In a fourth aspect, an embodiment of the present application provides an anti-snoring pillow, the anti-snoring pillow comprising: a pillow body, a USB main control box, and the threshold calibration device as described above;
[0043] The pillow body is provided with a USB interface, and the sensor is arranged in the pillow body;
[0044] The controller is arranged in the USB main control box, and the sensor is connected to the controller by wired communication via the USB interface.
[0045] Compared with the prior art, the present application has at least the following beneficial effects: in the threshold calibration method of the present application, firstly, the first signal collected by the sensor is obtained, wherein the first signal represents the pressure value of the anti-snoring pillow, the first signal is sequentially intercepted according to the first step length, and the signals of m first time windows are obtained, and then the signal energy values of the m second signals are obtained, and finally the target threshold is determined according to the m signal energy values, wherein the target threshold is used to determine the state of the anti-snoring pillow, and the state of the anti-snoring pillow includes the pillow state and the pillow-off state. Therefore, the threshold calibration method automatically calibrates the target threshold according to the pressure value of the anti-snoring pillow, improves the accuracy of the target threshold, and then reduces the misjudgment rate of the anti-snoring pillow state, and improves the accuracy of the anti-snoring pillow state determination. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0047] Figure 1 It is a structural schematic diagram of one of the anti-snoring pillows provided in the embodiments of the present application;
[0048] Figure 2 is a schematic diagram of the circuit structure of one of the threshold calibration devices provided in an embodiment of the present application;
[0049] Figure 3 This is a schematic diagram of a controller structure provided in an embodiment of the present application;
[0050] Figure 4 It is a schematic diagram of an application environment of one of the threshold calibration devices provided in an embodiment of the present application;
[0051] Figure 5 It is a flow chart of a threshold calibration method provided in an embodiment of the present application;
[0052] Figure 6 yes Figure 5 Schematic diagram of the process of step S54;
[0053] Figure 7 It is a flowchart of a state detection method of an anti-snoring pillow provided in an embodiment of the present application;
[0054] Figure 8 is a timing diagram of one of the signal energy values provided in an embodiment of the present application;
[0055] Fig. 9 It is a structural schematic diagram of one of the threshold calibration devices provided in the embodiments of the present application. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0057] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional module division is performed in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a sequence different from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in this application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.
[0058] The threshold calibration device of the embodiment of the present application can be constructed into any suitable shape and placed in various anti-snoring pillows to automatically calibrate the threshold of the anti-snoring pillow state.
[0059] See also Figure 1 , Figure 1 is a schematic diagram of an anti-snoring pillow provided in an embodiment of the present application, such as Figure 1 As shown, the anti-snoring pillow 100 includes a pillow body 10 , a USB main control box 20 and a threshold calibration device 30 .
[0060] Please also read Figure 2 , Figure 2 Schematic diagram of the circuit structure of a threshold calibration device provided in an embodiment of the present application. Figure 2 As shown, the threshold calibration device 30 includes a sensor 31 and a controller 32 .
[0061] The pillow body 10 is provided with a USB interface 11, and the sensor 31 is disposed in the pillow body 10. The controller 32 is disposed in the USB main control box 20, and the sensor 31 is connected to the controller 32 via the USB interface 11 by wired communication.
[0062] The USB interface 11 can be connected to 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 other easy-to-connect and stable interfaces. The USB interface 11 supports plugging and unplugging. When a snoring stop operation or threshold calibration is required, the plug of the signal transmission line can be plugged into the USB interface 11.
[0063] The sensor 31 may be a piezoelectric sensor. In the embodiment of the present application, it may be a piezoelectric sensor. As a dynamic strain sensor, the piezoelectric material of the piezoelectric sensor generates a charge on its surface after being subjected to a force. After the charge is amplified and the impedance is transformed by the charge amplifier and the measurement circuit, the charge becomes an electrical output proportional to the external force. Therefore, the piezoelectric sensor may be used to detect the pressure on the pillow body 10 to determine whether a user is resting on the pillow body 10.
[0064] When the user is sleeping, the head rests on the pillow body 10, and 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 snores during sleep. When snoring occurs, the airbags at different positions in the pillow body 10 are controlled to inflate and deflate to stop snoring.
[0065] When the anti-snoring operation is performed on the user, the state of the anti-snoring pillow is also determined. If the user's head is on the pillow body 10, the state of the anti-snoring pillow is determined to be on the pillow state; if the user's head is not on the pillow body 10, the state of the anti-snoring pillow is determined to be off the pillow state.
[0066] It should be noted that the above embodiment uses 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 on the pillow state.
[0067] The pressure values collected by the sensor are different in the pillow state and the pillow-free state. The controller can compare the pressure value with the threshold value and determine the state of the anti-snoring pillow based on the comparison result. However, due to errors in the equipment production process or deformation of the anti-snoring pillow caused by long-term use, setting a fixed threshold value will affect the judgment of the state of the anti-snoring pillow, leading to misjudgment and thus affecting the anti-snoring effect.
[0068] Based on the above reasons, an embodiment of the present application provides a threshold calibration method, which is applied to a threshold calibration device, which can autonomously calibrate the threshold, reduce the misjudgment of the anti-snoring pillow state, and improve the accuracy of state judgment.
[0069] Please also read Figure 3 The controller 32 includes at least one processor 321 (connected via a system bus or other communication methods). Figure 3 The controller 32 may be in the form of a chip.
[0070] Among them, the memory 322 stores instructions that can be executed by the at least one processor 321, and the instructions are executed by the at least one processor 321. The processor 321 is used to provide computing and control capabilities to control the threshold calibration device 30 to execute relevant commands, for example, to control the threshold calibration device 30 to execute any one of the threshold calibration methods provided in the following embodiments of the present application.
[0071] The memory 322, as a non-transient computer-readable storage medium, can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the threshold calibration method provided in the following embodiments of the present application. The processor 321 can implement the threshold calibration method in any of the following method embodiments by running the non-transient software programs, instructions and modules stored in the memory 322. Specifically, the memory 322 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 322 may also include a memory remotely arranged relative to the processor 321, and these remote memories may be connected to the processor 321 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0072] See also Figure 4 , Figure 4 is a schematic diagram of an application scenario of a threshold calibration device 30 provided in an embodiment of the present application, such as Figure 4 As shown, the threshold calibration device 30 can also be communicatively connected to the mobile terminal 200, and the mobile terminal 200 and the threshold calibration device 30 can be communicatively connected in any manner, such as: wired connection or wireless connection achieved by using wireless fidelity technology (Wireless Fidelity, Wi-Fi), Bluetooth technology or such mobile communication technologies as the 3rd Generation (3G), 4th Generation (4G), or 5th Generation (5G).
[0073] The mobile terminal 200 may be configured with one or more different user interaction devices to collect user instructions or display and feedback information to the user. These interaction devices include, but are not limited to, buttons, display screens, touch screens, and speakers. For example, the mobile terminal 200 may be equipped with a touch display screen, through which the user's remote control instructions for the threshold calibration device are received and the calibrated threshold is displayed 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. The mobile terminal 200 displays the calibrated threshold and the status of the anti-snoring pillow in real time. It can be displayed in various forms to facilitate user viewing. At the same time, the user can also control the threshold calibration device through the mobile terminal 200 to set the threshold calibration device to work in a suitable mode. For example, before the user lies down to sleep, the threshold calibration device is controlled by the mobile terminal 200 to automatically calibrate the threshold. After obtaining the calibrated threshold, the user lies down to sleep to improve the subsequent detection accuracy of the anti-snoring pillow status, thereby ensuring the sleeping effect.
[0075] It should be noted that the mobile terminal 200 may be a smart phone, a tablet computer, a personal digital assistant, or other hardware device with various operating systems.
[0076] Please continue reading Figure 2 The threshold calibration device 30 also includes a signal processing circuit 33, which is electrically connected to the sensor 31 and the controller 32 respectively, and is used to process the piezoelectric signal and transmit the processed piezoelectric signal to the controller 32.
[0077] The signal processing circuit 33 can amplify and filter the piezoelectric signal. 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, converting 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, and the controller 32 can realize the amplification, filtering and AD conversion of the piezoelectric signal.
[0078] In some embodiments, the threshold calibration device 30 further includes a wireless module 34 , which is communicatively connected to the controller 32 and is used 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 WIFI module, or other wireless modules.
[0080] In some embodiments, the threshold calibration device 30 also includes a power module 35, which is electrically connected to the controller 32, the signal processing circuit 33 and the wireless module 34 respectively, and is used to power 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 normal operation of each circuit. The rechargeable battery can be charged through the charging circuit using a USB port or wirelessly charged.
[0082] In some embodiments, the threshold calibration device 30 may also include a voice module (not shown in the figure), which is electrically connected to the controller 32. When an abnormal situation occurs, an abnormal alarm reminder can be issued through the voice module, and the controller 32 can also send the abnormal situation to the mobile terminal 200 so that the user can view it in time. For example: when the threshold calibration fails, the voice module can play a "threshold calibration failed" voice to remind the user, or report the threshold calibration failure to the mobile terminal 200, which is played or displayed by the mobile terminal 200.
[0083] Among them, the signal processing circuit, wireless module, power module and voice module can all be placed in the USB main control box 20.
[0084] See also Figure 5 , Figure 5 is a flow chart of a threshold calibration method provided in an embodiment of the present application, such as Figure 5 As shown, the threshold calibration method includes:
[0085] S51, acquiring a first signal collected by the sensor, wherein the first signal represents a pressure value of the anti-snoring pillow;
[0086] The first signal is a piezoelectric signal, which represents the pressure value of the anti-snoring pillow. Before the user lies down to sleep, if there is no object on the anti-snoring pillow and the anti-snoring pillow is in a static state, the pressure on the anti-snoring pillow should be very small and fluctuate less. If the anti-snoring pillow is in the process of deformation, the pressure on the anti-snoring pillow is fluctuating. Therefore, the anti-snoring pillow is subjected to different pressures in different states, and the size of the first signal represents the pressure value of the pressure on the anti-snoring 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 as needed. In this embodiment, the sampling frequency is 800 Hz.
[0088] S52, sequentially intercepting signals of m first time windows of the first signal according to the first step length to obtain m second signals, where 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 first intercepted to obtain the first second signal. After the first step, the signal of the second first time window is intercepted to obtain the second second signal. After the first step, the signal of the third first time window is intercepted to obtain the third second signal, and so on. After intercepting the signal of the m-1th first time window to obtain the m-1th second signal, the signal of the mth first time window is intercepted again after the first step. Therefore, the signals of m first time windows, 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 also determines 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, then the data points of the second signal are 10*800=8000 in total. In other embodiments, the length of the first time window can also be set as needed, such as 8 seconds.
[0091] The first step length and m can be set as needed. In the embodiment of the present application, the first step length is 1 second and m is 90.
[0092] S53, obtaining signal energy values of the m second signals;
[0093] The signal energy value refers to the cumulative effect of the signal over a period of time, which reflects the total energy transmitted by the signal in a specific period of time. Signal energy is the accumulation of signal strength over a period of time, similar to the relationship between light intensity and illumination time, where light intensity can be understood as the "brightness" of light, and illumination time corresponds to the duration of signal strength. The energy of a signal is the accumulation of power over time, and power represents the energy transmitted per unit time. The greater the power, the more energy is transmitted per unit time, and the accumulation of energy is related to the duration of the signal. Therefore, the signal energy value is not only related to the signal power of the emitted signal, but also affected by the attenuation during signal propagation. For example, the obstacles encountered by wireless signals when propagating in the air 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. If the signal is a digital signal, the signal energy value is the square of the signal amplitude at each point and then summed. In the embodiment of the present application, the second signal is a digital signal. Therefore, it is necessary to square the signal amplitude at each point in the second signal and then sum it to obtain the signal energy value.
[0095] Each second signal contains n data points, where n = sampling frequency * first time window length, such as in the above embodiment, n = 800 * 10 = 8000. Therefore, it is necessary to calculate the average of the signal energy values of the n data points to obtain an average energy value, and use the average energy value as the final signal energy value of the 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] Wherein, Em is the signal energy value corresponding to the mth second signal.
[0099] For example, if n = 8000, then 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, calculate the signal energy values E corresponding to the first and second signals respectively 1 , and then calculate the signal energy value E corresponding to the second signal 2 , and so on, until the signal energy value E corresponding to the 90th second signal is calculated 90 .
[0101] S54. Determine a target threshold value according to the m signal energy values, wherein the target threshold value is used to determine the state of the anti-snoring pillow, and the state of the anti-snoring pillow includes a pillow-on state and a pillow-off state.
[0102] The magnitudes of the m signal energy values represent the current pressure value that the anti-snoring pillow is subjected to. It can reflect whether the anti-snoring pillow is in a state of deformation and whether the pressure value is fluctuating. It can also reflect the pressure value that the anti-snoring pillow is subjected to when it is in a static state and has not been deformed. Based on the pressure value, a threshold value for determining the state of the anti-snoring pillow can be obtained.
[0103] Specifically, Figure 6 As shown, step S54 includes:
[0104] S541, obtaining the maximum value, the minimum value and the average value of the m signal energy values;
[0105] In some embodiments, the m signal energy values may be compared one by one to obtain a maximum value, a minimum value, and an average value.
[0106] In some embodiments, the m signal energy values may be sorted in descending order, and the first signal energy value is the maximum value, the last signal energy value is the minimum value, and the signal energy value in the middle is taken as the average value. For example, if m is 90, the signal energy value at the 45th position is taken as the average value. The m signal energy values may also be averaged to obtain the average value.
[0107] In some embodiments, the m signal energy values can also be sorted in ascending order, so that the signal energy value ranked first is the minimum value, the signal energy value ranked last is the maximum value, the signal energy value ranked in the middle position is taken as the average value, or the m signal energy values are averaged to obtain the average value.
[0108] In some embodiments, m signal energy values can also be stored in an energy array, and then the signal energy values in the energy array are sorted in descending order to obtain a target array, the first value in the target array is taken as the maximum value, the last value in the target array is taken as the minimum value, and finally the average value is determined according to the target array, such as: taking the signal energy value located in the middle position of the target array as the average value, or averaging the signal energy values in the target array to obtain the average value.
[0109] For example, m signal energy values can also be stored in the energy array EnergyArr1, EnergyArr1 = [E 1 ,E 2 ,…,E m-1 ,E m ], and then sort the energy array EnergyArr1 in descending order to obtain the target array EnergyArr2, then the maximum value Emax = EnergyArr2[0], the minimum value Emin = EnergyArr2
[89] , the average value Emid = EnergyArr2
[45] , or the average value Emid is the value obtained after averaging the signal energy values in the target array EnergyArr2.
[0110] In some embodiments, the energy array may also be sorted in ascending order to obtain a target array, and the maximum value, minimum value, and average value are obtained similarly to the above embodiments and will not be described in detail here.
[0111] S542: Determine a target threshold value according to the maximum value, the minimum value, and the average value.
[0112] The maximum value and the minimum value indicate whether the pressure value of the anti-snoring pillow fluctuates. If so, it indicates that the anti-snoring pillow is still in the deformation process and the threshold calibration cannot be performed. If no fluctuation occurs, the target threshold is determined to perform the threshold calibration.
[0113] Specifically, whether the pressure value of the anti-snoring pillow fluctuates is determined based on the maximum and minimum values. If no fluctuation occurs, the target threshold is determined based on the average value. If fluctuation occurs, it is determined that the threshold calibration has failed, marked as an abnormal state, and 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 indicate whether the pressure value of the anti-snoring pillow fluctuates. In some embodiments, if the maximum value is less than or equal to the minimum value of the first preset multiple, it is determined that the pressure value has not fluctuated, for example: Emax≦A1*Emin, it is determined that the pressure value has not fluctuated, where A1 is the first preset multiple.
[0115] The first preset multiple can be set as needed. In the embodiment 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 the preset difference, it is determined that the pressure value has not fluctuated.
[0116] If it is determined that the pressure value has not fluctuated, the target threshold is determined according to the average value, such as determining the average value of the second preset multiple as the target threshold, that is, the target threshold = A2*Emid, where A2 is the second preset multiple.
[0117] The second preset multiple can be set as needed. In the embodiment of the present application, the second preset multiple is 3.
[0118] In summary, the threshold calibration method automatically calibrates the target threshold according to the pressure value of the anti-snoring pillow, improves the accuracy of the target threshold, thereby reducing the misjudgment rate of the anti-snoring pillow state and improving the accuracy of the anti-snoring pillow state determination.
[0119] After obtaining the target threshold value through the threshold calibration method provided in the embodiment of the present application, the target threshold value can be used to detect the state of the anti-snoring pillow. The state detection method of the anti-snoring pillow provided in the embodiment of the present application can be implemented by various types of electronic devices with computing and processing capabilities, such as smart terminals and servers.
[0120] See also Figure 7 , Figure 7 Schematic diagram of the process of detecting the state of the anti-snoring pillow provided in the embodiment of the present application. The method S700 includes the following steps:
[0121] S71, obtaining a target threshold;
[0122] S72, obtaining a real-time acquisition signal acquired by a sensor;
[0123] S73, obtaining a real-time signal energy value of the real-time collected signal;
[0124] S74, if the real-time signal energy value is greater than the target threshold, determining that the state of the anti-snoring pillow is in the pillow state;
[0125] S75: Otherwise, determine that the state of the anti-snoring pillow is the off-pillow state.
[0126] The target threshold is obtained by using the threshold calibration method in any one of the above embodiments.
[0127] Combination Figure 8 The process of the state detection method of the anti-snoring pillow can be described as follows: Figure 8 It is a timing diagram of the signal energy value, which 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 stage when the user does not lie down to fall asleep. In this stage, the threshold calibration method is used to obtain the target threshold, and then the target threshold is stored in the controller. The second stage is the anti-snoring pillow state detection stage. The signal energy value fluctuates greatly during the sleep stage after the user lies on the pillow.
[0128] In the second stage, the target threshold is obtained, and the real-time signal energy value is obtained, the target threshold is compared with the real-time signal value, and the state of the anti-snoring pillow is determined according to the comparison result. Figure 8 It can be seen that the real-time signal energy value is large, greater than the target threshold, and it can be determined that the state of the anti-snoring pillow is in the pillow state.
[0129] Therefore, the target threshold in the state detection method of the anti-snoring pillow is a threshold value after real-time calibration, and its error is small, thereby reducing the misjudgment of the state of the anti-snoring pillow and improving the accuracy of the state detection of the anti-snoring pillow.
[0130] It should be noted that in each of the above embodiments, there is not necessarily a certain order between the above steps. A person skilled in the art can understand, based on the description of the embodiments of the present application, that in different embodiments, the above steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.
[0131] As another aspect of the embodiment of the present application, the embodiment of the present application provides a threshold calibration device 30. The threshold calibration device 30 may be a software module, which includes several instructions stored in the memory of the controller 32. The processor may access the memory and call the instructions for execution to complete the threshold calibration method described in the above embodiments.
[0132] In some embodiments, the threshold calibration device 30 can also be constructed by hardware devices, for example, the threshold calibration device 30 can be constructed by one or more chips, and each chip can work in coordination with each other to complete the threshold calibration method described in the above embodiments. For another example, the threshold calibration device 30 can also be constructed by various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components.
[0133] See also Fig. 9 , Fig. 9 An embodiment of the present application provides a threshold calibration device, and the threshold calibration device 900 includes a first acquisition module 91, a capture module 92, a second acquisition module 93 and a first determination module 94.
[0134] The first acquisition module 91 is used to acquire a first signal collected by the sensor, wherein the first signal represents the pressure value of the anti-snoring pillow;
[0135] The interception module 92 is used to sequentially intercept signals of m first time windows according to the first step length of the first signal to obtain m second signals, where m is an integer greater than or equal to 1;
[0136] The second acquisition module 93 is used to acquire the signal energy values of the m second signals;
[0137] The first determination module 94 is used to determine a target threshold value according to the m signal energy values, wherein the target threshold value is used to determine the state of the anti-snoring pillow, and the state of the anti-snoring pillow includes a pillow-on state and a pillow-off state.
[0138] Therefore, the threshold calibration device automatically calibrates the target threshold according to the pressure value of the anti-snoring pillow, improves the accuracy of the target threshold, and further reduces the misjudgment rate of the anti-snoring pillow state and improves the accuracy of determining the anti-snoring pillow state.
[0139] It should be noted that, since the threshold calibration device and the threshold calibration method in the above embodiment are based on the same application concept, the corresponding contents in the above method embodiment are also applicable to the device embodiment and will not be described in detail here.
[0140] The present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, for example Figure 3A processor 321 in the embodiment may enable the one or more processors to execute the threshold calibration method in any of the above method embodiments.
[0141] An embodiment of the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by the controller 32, the controller 32 executes any one of the threshold calibration methods described.
[0142] In summary, the threshold calibration method automatically calibrates the target threshold according to the pressure value of the anti-snoring pillow, improves the accuracy of the target threshold, thereby reducing the misjudgment rate of the anti-snoring pillow state and improving the accuracy of the anti-snoring pillow state determination.
[0143] The above described device or equipment embodiments are merely illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as module units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0144] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform the threshold calibration method described in each embodiment or some parts 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, rather than to limit them. Under the concept 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 in 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 aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions 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 includes a sensor, and the sensor is used to collect the pressure value of the anti-snoring pillow. The method includes: Acquire a first signal collected by the sensor, wherein the first signal represents a pressure value of the anti-snoring pillow; Sequentially intercept m signals of the first time window from the first signal according to the first step length to obtain m second signals, where m is an integer greater than or equal to 1; Obtaining signal energy values of the m second signals; A target threshold is determined according to the m signal energy values, wherein the target threshold is used to determine the state of the anti-snoring pillow, and the state of the anti-snoring pillow includes a pillow-on state and a pillow-off state.
2. The threshold calibration method according to claim 1, characterized in that: The acquiring the signal energy values of the m second signals comprises: If the mth second signal is P mn , wherein 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: Me:[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.
3. The threshold calibration method according to claim 2, characterized in that: The determining the target threshold according to the m signal energy values comprises: Obtaining the maximum value, the minimum value and the average value of the m signal energy values; A target threshold is determined according to the maximum value, the minimum value, and the average value.
4. The threshold calibration method according to claim 3, characterized in that: The obtaining of the maximum value, the minimum value and the average value of 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; 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; The average value is determined based on the target array.
5. The threshold calibration method according to claim 4, characterized in that: The determining the average value according to the target array comprises: The signal energy value at the middle position in the target array is taken as the average value; or, An average operation is performed on the signal energy values in the target array to obtain the average value.
6. The threshold calibration method according to claim 3, characterized in that: The determining a target threshold value according to the maximum value, the minimum value, and the average value comprises: Determining whether the pressure value of the anti-snoring pillow fluctuates according to the maximum value and the minimum value; If no fluctuation occurs, the target threshold is determined according to the average value.
7. The threshold calibration method according to claim 6, characterized in that: The determining whether the pressure value of the anti-snoring pillow fluctuates according to the maximum value and the minimum value includes: If the maximum value is less than or equal to the minimum value of the first preset multiple, it is determined that the pressure value does not fluctuate.
8. The threshold calibration method according to claim 6, characterized in that: Determining the target threshold according to the average value includes: The average value of the second preset multiple is determined as the target threshold.
9. A method for detecting the state of an anti-snoring pillow, characterized in that: include: Obtaining a target threshold, wherein the target threshold is obtained based on the threshold calibration method according to any one of claims 1 to 8; Obtain real-time acquisition signals collected by sensors; Acquire the real-time signal energy value of the real-time collected signal; If the real-time signal energy value is greater than the target threshold, determining that the state of the anti-snoring pillow is in the pillow state; Otherwise, it is determined that the state of the anti-snoring pillow is an off-pillow state.
10. A threshold calibration device, characterized in that: The threshold calibration device comprises: A sensor for collecting pressure values of the anti-snoring pillow; and A controller, the controller is communicatively connected to the sensor, the controller includes at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions are executed by the at least one processor so that the at least one processor can execute the threshold calibration method as described in any one of claims 1-8.
11. An anti-snoring pillow, characterized in that: The anti-snoring pillow comprises: a pillow body, a USB main control box and the threshold calibration device as claimed in claim 10; The pillow body is provided with a USB interface, and the sensor is arranged in the pillow body; The controller is arranged in the USB main control box, and the sensor is connected to the controller by wired communication via 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
Sleep detection method and device and sleep aiding equipment and method
CN111528839A
Control method of snore stopping pillow and snore stopping pillow
CN117462323A
Snore detecting method and apparatus
US20030066529A1
Cited By
Automatic calibration method and system for photoelectric threshold value of die cutting label, medium and electronic equipment
CN121677561A