Pain relief system based on breathing detection and implementation method, device and medium
Through a virtual reality system based on breath detection, the virtual reality scenarios are dynamically adjusted according to the user's breathing frequency and other factors, the problems of insignificant effects and safety of traditional pain relief methods are solved, and personalized pain management and user experience are improved.
Patent Information
- Application Number
- CN202410503255.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-14
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2043-02-14
AI Technical Summary
Existing pain relief methods such as physical massage and medications may not be effective or harmful to the human body, and it is difficult to deal with different pain conditions in a personalized manner.
Using a virtual reality system based on breath detection, the user's breath audio samples are collected through the breath collection module and the detection module, the breathing frequency is determined, and the virtual reality scene is dynamically adjusted to distract attention based on the breathing frequency, age and real-time breathing samples. Relieve pain.
Personalized pain management is realized, effectively alleviating user pain, improving the adaptability and user experience of pain management, and avoiding the potential risks of traditional methods.
Smart Images

Figure CN118430751B_ABST
Abstract
Description
[0001] Description of the case
[0002] This application is a divisional application filed for a Chinese application with a filing date of February 14, 2023, application number 202310109158.1, and invention name “A virtual reality system and method for relieving pain”. Technical Field
[0003] The present specification relates to the field of pain relief, and in particular to a pain relief system and method, device and medium based on breathing detection. Background Art
[0004] In the current field of pain relief, common methods include physical relief (massage, acupuncture, etc.) and drug relief, but these methods may not be effective or may cause certain harm to the human body. Virtual reality technology can divert the user's attention and can be used for pain relief.
[0005] Based on this, it is expected to propose a pain relief system and method, device and medium based on breathing detection, which can effectively relieve the user's pain. Summary of the invention
[0006] One or more embodiments of the present specification provide a pain relief system based on breathing detection, the system comprising: a breathing collection module, configured to collect audio samples of a user's breathing; a breathing detection module, configured to determine the user's breathing frequency based on the audio samples; a virtual reality module, configured to determine a virtual reality scene for pain management, the determination of the virtual reality scene is related to the user's age, the pain level, and the user's real-time exhalation sub-sample and real-time inhalation sub-sample, and the determination of the pain level is related to the breathing frequency; the breathing collection module and the breathing detection module are arranged in a wearable device, and the virtual reality module is arranged in the virtual reality device.
[0007] One or more embodiments of the present specification provide a method for implementing a pain relief system based on breathing detection, the method comprising: collecting an audio sample of a user's breathing; determining the user's breathing frequency based on the audio sample; determining the user's pain level based on the breathing frequency; and determining a virtual reality scene for pain management based on the user's pain level, the user's age, and the user's real-time exhalation sub-sample and real-time inhalation sub-sample.
[0008] One or more embodiments of the present specification provide a virtual reality device for relieving pain, including a processor, wherein the processor is used to execute a method for implementing a pain relief system based on breathing detection.
[0009] One or more embodiments of the present specification provide a computer-readable storage medium, wherein the storage medium stores computer instructions. When a computer reads the computer instructions in the storage medium, the computer executes a method for implementing a pain relief system based on breathing detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] This specification will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:
[0011] Figure 1 is a module diagram of a virtual reality system for relieving pain according to some embodiments of this specification;
[0012] Figure 2 is an exemplary flow chart of a method for determining a virtual reality scene for pain management according to some embodiments of this specification;
[0013] Figure 3 is an exemplary flow chart of a method for determining respiratory rate according to some embodiments of the present specification;
[0014] Figure 4 is an exemplary flow chart of a method for determining a virtual reality scene for pain management based on pain levels according to some embodiments of this specification;
[0015] Figure 5 is an exemplary flow chart of a method for determining a virtual reality scene for pain management based on a user's age and pain level according to some embodiments of this specification;
[0016] Figure 6 It is a model structure diagram of the respiratory rate prediction model and confidence determination model shown in some embodiments of this specification. DETAILED DESCRIPTION
[0017] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of this specification. For ordinary technicians in this field, this specification can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.
[0018] It should be understood that the "system", "device", "unit" and / or "module" used herein are a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.
[0019] As shown in this specification and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "comprise" and "include" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.
[0020] Flowcharts are used in this specification to illustrate the operations performed by the system according to the embodiments of this specification. It should be understood that the preceding or following operations are not necessarily performed precisely in order. Instead, the steps may be processed in reverse order or simultaneously. At the same time, other operations may also be added to these processes, or one or more operations may be removed from these processes.
[0021] Figure 1 is a block diagram of a virtual reality system for relieving pain according to some embodiments of this specification. Figure 1 As shown, the virtual reality system 100 for relieving pain may include a breathing collection module 110 , a breathing detection module 120 and a virtual reality module 130 .
[0022] The breathing collection module 110 may be used to collect audio samples of the user's breathing.
[0023] The audio sample of the user's breathing may refer to the audio data of the user's breathing sound recorded in real time by an audio recording device for the user who needs pain relief. The audio recording device may be configured in the breathing collection module 110 .
[0024] In some embodiments, the audio recording device configured by the breathing collection module 110 may be a high-sensitivity microphone for collecting audio samples of the user's breathing.
[0025] The breathing detection module 120 may be used to determine the breathing rate of the user based on the audio samples.
[0026] The breathing rate may refer to the frequency of a user's breathing in an audio sample of the user's breathing, for example, 18 times / minute.
[0027] In some embodiments, the user's breathing rate may be manually determined based on an audio sample of the user's breathing.
[0028] In some embodiments, the user's breathing frequency can be determined based on the processing of multiple inhalation sub-samples and multiple exhalation sub-samples by the breathing frequency prediction model. For a description of the inhalation sub-sample and the exhalation sub-sample, see Figure 3 For more information about the respiratory rate prediction model, see Figure 6 Related description.
[0029] The virtual reality module 130 may be used to determine a virtual reality scenario for pain management based on the breathing rate.
[0030] Pain management refers to the process of implementing corresponding therapies according to the user's pain level, where the pain level can include no pain, slight pain, moderate pain, and very painful. For more information on how to determine the pain level, see Figure 4 Related description. For example, pain management may include: for users without pain, exposure therapy based on mental psychology may be used; for users with mild pain, mindfulness therapy, music playing, etc. may be used; for users with severe pain or very severe pain, hypnosis therapy, cognitive behavioral therapy, etc. may be used.
[0031] Virtual reality scenes for pain management can allow users to be immersed in virtual reality scenes to distract their attention and reduce the activity of brain areas related to pain perception, thereby reducing the user's pain. Virtual reality scenes can include virtual reality scenes corresponding to different therapies. Virtual reality scenes can refer to scenes simulated by virtual reality equipment, such as virtual park scenes, virtual forest scenes, virtual operating room scenes, etc.
[0032] The virtual reality scene for pain management can be determined in a variety of ways. For example, a comparison relationship between the virtual reality scene for pain management and the respiratory rate can be preset, and the virtual reality scene for pain management can be determined based on the respiratory rate and the comparison relationship. For example, a respiratory rate of less than 18 times / minute can be preset to correspond to a virtual operating room scene; a respiratory rate of more than 20 times / minute can be preset to correspond to a virtual nature scene, etc. For more information on the method for determining the virtual reality scene for pain management, please refer to Figure 4 , Figure 5 Related description.
[0033] In some embodiments, the breathing collection module 110 and the breathing detection module 120 can be configured in a wearable device, and the virtual reality module 130 can be configured in a virtual reality device, wherein the parameter configuration of the wearable device includes: the speaker impedance is 8±1.2 ohms, the microphone sensitivity is -38±3 decibels, and the connection distance with the virtual reality device is greater than 5 meters. The wearable device can refer to a device fixed to the user's body and capable of audio recording, such as a head-mounted microphone, earphones, etc.
[0034] It should be noted that the above description of the pain relief virtual reality system 100 and its modules is only for the convenience of description and cannot limit the present specification to the scope of the embodiments. It is understandable that for those skilled in the art, after understanding the principle of the system, it is possible to arbitrarily combine the modules or form a subsystem to connect with other modules without deviating from the principle. In some embodiments, Figure 1 The respiration collection module 110, the respiration detection module 120 and the virtual reality module 130 disclosed in the specification can be different modules in a system, or a module can realize the functions of two or more modules mentioned above. For example, each module can share a storage module, or each module can have its own storage module. Such variations are all within the protection scope of this specification.
[0035] Figure 2 is an exemplary flow chart of a method for determining a virtual reality scene for pain management according to some embodiments of this specification. Figure 2 As shown, the process 200 includes the following steps. In some embodiments, the process 200 can be executed by the virtual reality system 100 for relieving pain.
[0036] Step 210, collect audio samples of the user's breathing. In some embodiments, step 210 can be performed by the breathing collection module 110. For relevant descriptions of audio samples and their collection methods, please refer to Figure 1 Related description.
[0037] Step 220, based on the audio sample, determine the user's breathing frequency. In some embodiments, step 220 may be performed by the breathing detection module 120. For relevant descriptions of the breathing frequency and its determination method, see Figure 3 Related description.
[0038] Step 230, based on the respiratory rate, determine a virtual reality scene for pain management. In some embodiments, step 230 may be performed by the virtual reality module 130. For relevant descriptions of pain management and methods for determining a virtual reality scene for pain management, see Figure 1 , Figure 4 , Figure 5 Related description.
[0039] In some embodiments of the present specification, through the above method for determining a virtual reality scene for pain management, a suitable and targeted virtual reality scene can be determined for the user's pain management according to the user's pain condition, which can effectively relieve the user's pain.
[0040] It should be noted that the above description of process 200 is only for example and explanation, and does not limit the scope of application of this specification. For those skilled in the art, various modifications and changes can be made to process 200 under the guidance of this specification. However, these modifications and changes are still within the scope of this specification. For example, other methods are used to collect audio samples of the user's breathing.
[0041] Figure 3 FIG. 3 is an exemplary flow chart of a method for determining a respiratory rate according to some embodiments of the present specification. In some embodiments, process 300 may be executed by the respiratory detection module 120 .
[0042] Step 310: Filter the audio samples to obtain noise-removed audio samples.
[0043] The denoised audio sample may refer to the audio data obtained by removing random noise, white noise, etc. from the audio sample of the user's breathing through filtering operations. For relevant descriptions of the audio sample of the user's breathing, see Figure 1 Related description.
[0044] In some embodiments, the audio sample of the user's breathing may be filtered through a filter to obtain a denoised audio sample.
[0045] Step 320: segment the denoised audio sample to obtain a plurality of sub-audio samples.
[0046] The sub-audio sample may refer to an audio sample obtained by segmenting the denoised audio sample, and includes part of the audio data in the denoised audio sample.
[0047] In some embodiments, the denoised audio sample may be divided into a plurality of sub-audio samples of equal duration (the duration being the predetermined duration) according to a predetermined duration, wherein the predetermined duration may be manually preset, for example, 1 second.
[0048] In some embodiments, the denoised audio sample can be segmented based on multiple exhalation times and multiple inhalation times to obtain multiple sub-audio samples. The exhalation time refers to the time period covered by the user completing an exhalation action, and the inhalation time refers to the time period covered by the user completing an inhalation action; among all the sub-audio samples, the sub-audio sample corresponding to the exhalation time is the exhalation sub-sample, and the sub-audio sample corresponding to the inhalation time is the inhalation sub-sample. One exhalation sub-sample corresponds to one exhalation action, and one inhalation sub-sample corresponds to one inhalation action, that is, multiple exhalation sub-samples and multiple inhalation sub-samples correspond to multiple exhalation actions and multiple inhalation actions, respectively.
[0049] In some embodiments, the denoised audio samples may be processed based on a segmentation model to obtain a plurality of exhaled sub-samples and a plurality of inhaled sub-samples. The segmentation model may be a machine learning model, such as a deep neural network (DNN) model, a convolutional neural network (DNN) model, etc., whose input may include the denoised audio samples, and whose output may include a plurality of exhaled sub-samples and a plurality of inhaled sub-samples.
[0050] In some embodiments, the segmentation model can be obtained by training multiple labeled training samples. For example, multiple labeled training samples can be input into the initial segmentation model, and a loss function can be constructed by using the labels and the results of the initial segmentation model, and the parameters of the initial segmentation model can be iteratively updated based on the loss function. When the loss function meets the preset conditions for the end of training, the model training is completed and a trained segmentation model is obtained. Among them, the preset conditions for the end of training can be that the loss function converges, the number of iterations reaches a threshold, etc.
[0051] In some embodiments, the training sample may include a sample denoised audio sample. The label may include a plurality of exhalation subsamples and a plurality of inhalation subsamples corresponding to the training sample. The sample denoised audio sample and its corresponding plurality of exhalation subsamples and a plurality of inhalation subsamples may be determined based on the historical denoised audio sample and the historical plurality of exhalation subsamples and the historical plurality of inhalation subsamples determined therefrom. The label may be determined by manual annotation.
[0052] In step 330 , a breathing frequency is determined based on the plurality of sub-audio samples.
[0053] In some embodiments, the respiratory frequency can be determined based on the number of exhalation subsamples or inhalation subsamples per unit time. For example, if the duration of the denoised frequency sample is 3 minutes and the number of exhalation subsamples obtained by segmenting it is 57, the respiratory frequency is 57÷3=19 times / minute.
[0054] In some embodiments, the user's breathing rate can be determined based on the processing of multiple inhalation sub-samples and multiple exhalation sub-samples by a breathing rate prediction model. For more information about the breathing rate prediction model, see Figure 6 Related description.
[0055] In some embodiments, the confidence level of the breathing frequency may be determined based on the breathing frequency, the historical breathing frequency, the denoising level, and the user information.
[0056] The historical breathing frequency may refer to the breathing frequency result obtained by inputting the historical denoised audio samples of the user into the breathing frequency prediction model. The historical denoised audio samples may refer to the denoised audio samples obtained by filtering the historical audio samples of the user's breathing.
[0057] The historical breathing rate may be obtained based on a record of the user's historical breathing rate.
[0058] The denoising degree may refer to the degree of thoroughness of noise removal after filtering and denoising the audio sample. The denoising degree may be represented by a value in the interval [0, 100%), where the larger the value, the more thorough the noise removal, and the less noise in the denoised audio sample.
[0059] In some embodiments, the denoising degree may be positively correlated with the size of the filtering frequency range, that is, the larger the filtering frequency range, the greater the value of the denoising degree.
[0060] User information may refer to the user's personal information, and may include the user's ID, gender, disease type, etc. For example, the user information may be "No. 613, male, suffering from asthma".
[0061] In some embodiments, the confidence of the respiratory rate can be determined based on the confidence determination model for the respiratory rate determined by the respiratory rate prediction model, as well as the historical respiratory rate, the degree of denoising, and the user information. For more information about the confidence determination model, see Figure 6 Related description.
[0062] In some embodiments, the user's breathing rate may be determined based on an auxiliary detection device, which may be a pulse measurement device, such as a pulse oximeter, an electronic blood pressure monitor, and the like.
[0063] There may be a variety of methods for determining a user's respiratory rate based on an auxiliary detection device (taking the auxiliary detection device as a pulse measurement device as an example), for example: obtaining the user's pulse based on the pulse measurement device; converting the user's respiratory rate based on the user's pulse, for example, the user's pulse obtained by the pulse measurement device is 80 times / minute, and the ratio of the pulse frequency to the respiratory rate may be preset to 4:1, then the corresponding user's respiratory rate is 20 times / minute.
[0064] In some embodiments, the respiratory frequency can be determined by weighting the respiratory frequency determined based on the respiratory frequency prediction model and the respiratory frequency determined by the auxiliary detection device. For example, the respiratory frequency can be determined by the following formula (1):
[0065] P=k1P1+k2P2 (1)
[0066] Among them, P represents the respiratory frequency; P1 represents the respiratory frequency determined based on the respiratory frequency prediction model, and P2 represents the respiratory frequency determined by the auxiliary detection device; k1 represents the weight value corresponding to the respiratory frequency determined based on the respiratory frequency prediction model, and k2 represents the weight value corresponding to the respiratory frequency determined by the auxiliary detection device.
[0067] In some embodiments, the weights may be determined based on the confidence determined by the confidence determination model. For example, k1=Z, k2=1-Z may be preset, where Z represents the confidence, and k1 and k2 have the same meaning as in formula (1).
[0068] In some embodiments of the present specification, the respiratory frequency is adjusted in a weighted manner, which can effectively improve the accuracy of the finally determined respiratory frequency.
[0069] In some embodiments, the virtual reality scene for pain management can be changed in real time based on the weighted respiratory rate. Figure 4 , Figure 5 Related description.
[0070] In some embodiments of the present specification, the above method for determining the user's respiratory frequency improves the efficiency of the determination work and ensures the real-time nature of the determination result while ensuring the accuracy of the determined respiratory frequency.
[0071] It should be noted that the above description of process 300 is only for example and illustration, and does not limit the scope of application of this specification. For those skilled in the art, various modifications and changes can be made to process 300 under the guidance of this specification. However, these modifications and changes are still within the scope of this specification. For example, other methods are used to obtain sub-audio samples.
[0072] Figure 4 is an exemplary flow chart of a method for determining a virtual reality scene for pain management based on pain level according to some embodiments of this specification. In some embodiments, process 400 may be executed by the virtual reality module 130.
[0073] Step 410, based on the breathing rate, determine the pain level.
[0074] The pain level may refer to data that can reflect the severity of the user's pain. The pain level may include no pain, slight pain, moderate pain, and very pain. The pain level may also be represented by an integer value within [1, 5]. The larger the value, the higher the pain level, that is, the more severe the user's pain.
[0075] In some embodiments, a current vector may be constructed based on the breathing rate, and the pain level may be determined based on the current vector.
[0076] An exemplary method for constructing the current vector may be: the element value of the first dimension of the current vector represents the breathing frequency, and the element value of the second dimension represents the denoising degree of the audio sample. For example, the current vector may be (19, 90%), which means that the user's breathing frequency is 19 times / minute and the denoising degree of the audio sample is 90%. For more information about the breathing frequency and denoising degree, see Figure 3 Related description.
[0077] The process of determining the pain level based on the current vector may be: respectively determining the vector distance between the current vector and each historical vector in the vector database; determining the historical vector with the smallest vector distance to the current vector as the reference vector; and determining the historical pain level corresponding to the reference vector as the current pain level. The method for determining the vector distance may be Euclidean distance, Manhattan distance, Chebyshev distance, cosine distance, etc.
[0078] The historical vector may refer to vector data determined based on the historical breathing frequency of the historical user and the denoising degree of the historical audio samples, and the construction principle thereof may be the same as that of the current vector.
[0079] The vector database may refer to a database storing historical vectors and their corresponding historical pain levels.
[0080] In some embodiments, the elements of the current vector may also include the volume of the audio sample and the average historical breathing rate of the user. Exemplarily, based on this, the current vector may be (19, 90%, 30, 18.8), where the elements of the third dimension represent that the volume of the audio sample is 30 decibels, and the elements of the fourth dimension represent that the average historical breathing rate is 18.8 times / minute. The meanings of the elements of other dimensions are the same as in the previous example. The average historical breathing rate may refer to the average of all historical breathing rates of the user. For an explanation of the audio sample, see Figure 1 Related description.
[0081] In some embodiments, the elements of the current vector may also include user information. Exemplarily, based on this, the current vector may be (19, 90%, 30, 18.8, 225, 1, 3), where the elements of the fifth dimension represent that the user number is 225, the elements of the sixth dimension represent that the user gender is male (1 can be preset to represent male, 2 to represent female), the elements of the seventh dimension represent that the user suffers from diabetes (1 can be preset to represent health, 2 to represent that the user suffers from asthma, 3 to represent that the user suffers from diabetes, 4 to represent that the user suffers from rheumatism...), and the meanings of the elements of other dimensions are the same as in the previous example. For instructions on user information, see Figure 3 Related description.
[0082] In some embodiments, when determining the vector distance between the current vector and the historical vector in the vector database, if the user corresponding to the historical vector is the current user, the calculated vector distance is multiplied by a first coefficient, and the result is used as the final determined vector distance, wherein the first coefficient is a constant, and its value can be preset and is less than 1, for example, 0.8.
[0083] In some embodiments, the elements of the current vector may also include the confidence determined by the confidence determination model. For example, based on this, the current vector may be (19, 90%, 30, 18.8, 225, 1, 3, 85%), where the elements of the eighth dimension represent the confidence determined by the confidence determination model, and the meanings of the elements of other dimensions are the same as in the previous example. For an explanation of confidence, see Figure 3 For a description of the confidence determination model, see Figure 6 Related description.
[0084] In some embodiments, if the confidence is less than the confidence threshold, when determining the vector distance between the current vector and the historical vector in the vector database, the calculated vector distance is multiplied by the second coefficient, and the result is used as the final determined vector distance. The confidence threshold can be preset; the second coefficient is a constant, and its value can be preset and is greater than 1, for example, 1.2.
[0085] Step 420 , based on the pain level, determine a virtual reality scene for pain management.
[0086] In some embodiments, a correspondence between pain levels and virtual reality scenes for pain management can be preset, and the virtual reality scenes for pain management can be determined based on the correspondence. For example, it can be preset that mild pain corresponds to a virtual surgery scene, and severe pain corresponds to a virtual nature scene.
[0087] In some embodiments of the present specification, the above method for determining a virtual reality scene for pain management can effectively improve the adaptability of the determined scene to the user and better meet the user's pain management needs.
[0088] It should be noted that the above description of process 400 is only for illustration and description, and does not limit the scope of application of this specification. For those skilled in the art, various modifications and changes can be made to process 400 under the guidance of this specification. However, these modifications and changes are still within the scope of this specification. For example, other methods are used to determine the pain level.
[0089] Figure 5is an exemplary flow chart of a method for determining a virtual reality scene for pain management based on a user's age and pain level according to some embodiments of this specification. In some embodiments, process 500 may be executed by the virtual reality module 130.
[0090] Step 510, determining the user's age based on the breathing frequency.
[0091] In some embodiments, a correspondence between the respiratory rate and the user's age can be preset, and the user's age can be determined based on the correspondence. The user's age can be the age group to which the user belongs. For example, it can be preset that when the respiratory rate is greater than 30 times / minute, the user's age is a child; when the respiratory rate is between 20 (not included) and 30 times / minute, the user's age is a young person; when the respiratory rate is between 16 and 20 times / minute, the user's age is an elderly person.
[0092] Step 520 : Determine a virtual reality scene for pain management based on the user's age and pain level.
[0093] In some embodiments, the correspondence between the user's age, pain level, and the virtual reality scene for pain management can be preset, and the virtual reality scene for pain management can be determined based on the correspondence. For example, it can be preset that the user is an elderly person and the pain level is mild pain, and the virtual park scene corresponds to the user is a child and the pain level is relatively painful, and the virtual amusement park scene corresponds to the user.
[0094] In some embodiments, the virtual reality scene can be determined based on user preferences. For example, if the user likes to watch beach scenery, the virtual reality scene used for pain management can be determined to be a virtual beach scene.
[0095] Based on this, in some embodiments, the characteristics of the current vector may also include the user's historical preference scenes. For example, the current vector may be (19, 90%, 2), which means that the user's breathing rate is 19 times / minute, the denoising degree of the audio sample is 90%, and the historical preference scene is a virtual beach scene (for the elements of the third dimension, the preset value 1 represents a virtual park scene, the value 2 represents a virtual beach scene, the value 3 represents an operating room scene...).
[0096] In some embodiments of the present specification, by referring to the user's preferences when determining the virtual reality scene, the adaptability of the determined virtual reality scene to different users is effectively improved, and the user's usage experience and pain management effect are optimized.
[0097] In some embodiments, a virtual reality scene can also be determined based on the real-time exhalation sub-sample and the real-time inhalation sub-sample to guide the user's breathing. The real-time exhalation sub-sample and the real-time inhalation sub-sample can refer to sub-audio samples obtained after denoising and segmentation based on the user's real-time breathing audio sample. The denoising and segmentation methods can be the same as the methods used to obtain the exhalation sub-sample and the inhalation sub-sample, which can be seen in Figure 3 For example, different brightness, hue, etc. are set for the virtual reality scene within the duration of the real-time exhalation sub-sample and the real-time inhalation sub-sample.
[0098] In some embodiments, the features of the current vector may also include the user's real-time breathing state (inhalation or exhalation). For example, the current vector may be (19, 90%, 1), which means that the user's breathing rate is 19 times / minute, the denoising degree of the audio sample is 90%, and the user's real-time breathing state is inhalation. Among them, for the elements of the third dimension, the value 1 can be preset to represent inhalation, and the value 2 can represent exhalation, and its value can be switched back and forth between 0 / 1 according to the real-time breathing state, so that the current vector of the user when inhaling and exhaling is different, and then the virtual reality scene determined by the user when inhaling and exhaling is different, so as to guide the user to breathe in different virtual reality scenes and adjust his own breathing frequency. The user can adjust the breathing frequency according to the changing frequency of the virtual reality scene to achieve a relaxation effect and relieve pain. The real-time breathing state of the user can be determined based on the real-time exhalation subsample (corresponding to the user's real-time breathing state is exhalation) and the real-time inhalation subsample (corresponding to the user's real-time breathing state is inhalation). For the method of determining the virtual reality scene by the current vector, please refer to Figure 4 Related description.
[0099] In some embodiments of the present specification, the virtual reality scene is adjusted in real time based on the user's real-time inhalation and exhalation movements, and the user can be assisted in adjusting the breathing frequency with the help of scene changes, further optimizing the user's usage experience and pain management effect.
[0100] In some embodiments of the present specification, the above method for determining a virtual reality scene for pain management can further improve the adaptability of the determined scene to the user, and can better meet the user's pain management needs.
[0101] It should be noted that the above description of process 500 is only for illustration and explanation, and does not limit the scope of application of this specification. For those skilled in the art, various modifications and changes can be made to process 500 under the guidance of this specification. However, these modifications and changes are still within the scope of this specification. For example, other methods are used to determine the user's age.
[0102] Figure 6It is a model structure diagram of the respiratory rate prediction model and the confidence determination model shown in some embodiments of this specification.
[0103] In some embodiments, the breathing detection module 120 can process multiple inhalation sub-samples and multiple exhalation sub-samples based on the respiratory frequency prediction model to determine the respiratory frequency. For relevant descriptions of the inhalation sub-samples and the exhalation sub-samples, see Figure 3 Related description.
[0104] The respiratory rate prediction model may refer to a machine learning model for determining the respiratory rate. In some embodiments, the respiratory rate prediction model may include any one or combination of various feasible models such as a recurrent neural network (RNN) model, a deep neural network (DNN) model, a convolutional neural network (CNN) model, etc.
[0105] like Figure 6 As shown, the input of the respiratory frequency prediction model 620 may include multiple inhalation sub-samples 611 and multiple exhalation sub-samples 612 , and the output may include the respiratory frequency 630 .
[0106] In some embodiments, the respiratory rate prediction model 620 can be obtained by training multiple first training samples marked with a first label. For example, multiple first training samples with a first label can be input into the initial respiratory rate prediction model, and a first loss function can be constructed by the first label and the result of the initial respiratory rate prediction model, and the parameters of the initial respiratory rate prediction model can be iteratively updated based on the first loss function. When the first loss function meets the preset conditions for the end of training, the model training is completed and a trained respiratory rate prediction model is obtained. Among them, the preset conditions for the end of training can be that the first loss function converges, the number of iterations reaches a threshold, etc.
[0107] In some embodiments, the first training sample may include multiple sample inhalation subsamples and multiple sample exhalation subsamples. The first label may include the actual breathing frequency of the user corresponding to the first training sample. The multiple sample inhalation subsamples and the multiple sample exhalation subsamples may be determined based on multiple groups of audio samples of the user's breathing after denoising and segmentation, and the actual breathing frequency of the user may be determined based on the actual number of breaths of each group of audio samples divided by the duration of the audio sample. The first label may be manually marked. For instructions on denoising and segmentation, see Figure 3 Related description.
[0108] In some embodiments, the breathing detection module 120 can process the breathing frequency output by the breathing frequency prediction model, the historical breathing frequency, the denoising degree and the user information based on the confidence determination model to determine the confidence of the breathing frequency. For relevant descriptions of the historical breathing frequency, the denoising degree and the user information, see Figure 3 Related description.
[0109] The confidence determination model may refer to a machine learning model for determining confidence. In some embodiments, the confidence determination model may include any one or combination of various feasible models such as a recurrent neural network (RNN) model, a deep neural network (DNN) model, a convolutional neural network (CNN) model, etc.
[0110] like Figure 6 As shown, the input of the confidence determination model 640 may include a respiratory rate 630 , a historical respiratory rate 631 , a denoising level 632 , and user information 633 , and the output may include a confidence level 650 .
[0111] In some embodiments, the confidence determination model 640 can be obtained by training multiple second training samples marked with a second label. For example, multiple second training samples with a second label can be input into the initial confidence determination model, and a second loss function is constructed by the second label and the result of the initial confidence determination model, and the parameters of the initial confidence determination model are iteratively updated based on the second loss function. When the second loss function meets the preset conditions for the end of training, the model training is completed, and a trained confidence determination model is obtained. Among them, the preset conditions for the end of training can be that the second loss function converges, the number of iterations reaches a threshold, etc.
[0112] In some embodiments, the second training sample may include a sample breathing frequency, a sample historical breathing frequency, a sample denoising degree, and a sample user information. The second label may be 1 (representing that the difference between the output of the breathing frequency prediction model and the actual breathing frequency of the user is less than a difference threshold) or 0 (representing that the difference between the output of the breathing frequency prediction model and the actual breathing frequency of the user is greater than a difference threshold), wherein the difference threshold may be preset. The sample breathing frequency may be determined based on the breathing frequency prediction model; the actual breathing frequency of the user may be determined based on the actual number of breaths of each group of audio samples divided by the duration of the audio sample; the sample historical breathing frequency may be obtained based on the historical breathing frequency determination record; the sample denoising degree may be manually preset; and the sample user information may be determined based on the historical user information. The second label may be manually annotated.
[0113] In some embodiments, the respiratory rate prediction model 620 and the confidence determination model 640 can be obtained through joint training. The sample data of the joint training can be a plurality of third training samples marked with a third label. The third training sample may include a plurality of inhalation sub-samples of the sample, a plurality of exhalation sub-samples of the sample, a sample historical respiratory frequency, a sample denoising degree, and a sample user information. The third label can be 1 (representing that the difference between the output of the respiratory rate prediction model and the actual respiratory frequency of the user is less than the difference threshold) or 0 (representing that the difference between the output of the respiratory rate prediction model and the actual respiratory frequency of the user is greater than the difference threshold), wherein the difference threshold can be preset. The actual respiratory frequency of the user can be determined based on the actual number of breaths of each group of audio samples divided by the duration of the audio sample; the sample historical respiratory frequency can be obtained based on the historical respiratory frequency determination record; the sample denoising degree can be manually preset; and the sample user information can be determined based on the historical user information.
[0114] An exemplary joint training process may be: inputting multiple inhalation sub-samples of a sample and multiple exhalation sub-samples of a sample into an initial respiratory frequency prediction model to obtain the respiratory frequency output by the initial respiratory frequency prediction model; inputting the respiratory frequency output by the initial respiratory frequency prediction model as training sample data, together with the sample historical respiratory frequency, sample denoising degree and sample user information, into an initial confidence determination model to obtain the confidence output by the initial confidence determination model; inputting the confidence output by the initial confidence determination model and a third label into a third loss function; updating the initial respiratory frequency prediction model and the initial confidence determination model based on the third loss function to obtain a trained respiratory frequency prediction model and confidence determination model. The preset conditions may include that the third loss function is less than a threshold, converges, or the training cycle reaches a threshold, etc.
[0115] In some embodiments of the present specification, the respiratory frequency and its confidence are determined respectively by a respiratory frequency prediction model and a confidence determination model, which improves the efficiency of the determination work and ensures the real-time nature of the determination work while ensuring the accuracy of the determination result.
[0116] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only for example and does not constitute a limitation of this specification. Although not explicitly stated here, those skilled in the art may make various modifications, improvements and corrections to this specification. Such modifications, improvements and corrections are suggested in this specification, so such modifications, improvements and corrections still belong to the spirit and scope of the exemplary embodiments of this specification.
[0117] At the same time, this specification uses specific words to describe the embodiments of this specification. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of this specification. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, certain features, structures or characteristics in one or more embodiments of this specification can be appropriately combined.
[0118] In addition, unless explicitly stated in the claims, the order of the processing elements and sequences described in this specification, the use of alphanumeric characters, or the use of other names are not intended to limit the order of the processes and methods of this specification. Although the above disclosure discusses some invention embodiments that are currently considered useful through various examples, it should be understood that such details are only for illustrative purposes, and the attached claims are not limited to the disclosed embodiments. On the contrary, the claims are intended to cover all modifications and equivalent combinations that are consistent with the essence and scope of the embodiments of this specification. For example, although the system components described above can be implemented by hardware devices, they can also be implemented only by software solutions, such as installing the described system on an existing server or mobile device.
[0119] Similarly, it should be noted that in order to simplify the description disclosed in this specification and thus help understand one or more embodiments of the invention, in the above description of the embodiments of this specification, multiple features are sometimes combined into one embodiment, figure or description thereof. However, this disclosure method does not mean that the features required by the subject matter of this specification are more than the features mentioned in the claims. In fact, the features of the embodiments are less than all the features of the single embodiment disclosed above.
[0120] In some embodiments, numbers describing the number of components and attributes are used. It should be understood that such numbers used in the description of the embodiments are modified by the modifiers "about", "approximately" or "substantially" in some examples. Unless otherwise specified, "about", "approximately" or "substantially" indicate that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, which may change according to the required features of individual embodiments. In some embodiments, the numerical parameters should take into account the specified significant digits and adopt the general method of retaining digits. Although the numerical domains and parameters used to confirm the breadth of their range in some embodiments of this specification are approximate values, in specific embodiments, the setting of such numerical values is as accurate as possible within the feasible range.
[0121] Each patent, patent application, patent application publication, and other materials, such as articles, books, specifications, publications, documents, etc., cited in this specification are hereby incorporated by reference in their entirety. Except for application history documents that are inconsistent with or conflicting with the contents of this specification, documents that limit the broadest scope of the claims of this specification (currently or later attached to this specification) are also excluded. It should be noted that if the descriptions, definitions, and / or use of terms in the materials attached to this specification are inconsistent or conflicting with the contents described in this specification, the descriptions, definitions, and / or use of terms in this specification shall prevail.
[0122] Finally, it should be understood that the embodiments described in this specification are only used to illustrate the principles of the embodiments of this specification. Other variations may also fall within the scope of this specification. Therefore, as an example and not a limitation, alternative configurations of the embodiments of this specification may be considered consistent with the teachings of this specification. Accordingly, the embodiments of this specification are not limited to the embodiments explicitly introduced and described in this specification.
Claims
1. A pain relief system based on breathing detection, the system comprising: A breathing collection module, configured to collect audio samples of the user's breathing; A breathing detection module is configured to determine the user's breathing frequency based on the audio sample; the breathing detection module is further configured to: Filtering the audio sample to obtain a noise-removed audio sample; Based on multiple exhalation times and multiple inhalation times, the denoised audio sample is segmented to obtain multiple sub-audio samples; the sub-audio samples include exhalation sub-samples and inhalation sub-samples; Based on the plurality of sub-audio samples, determining the breathing frequency of the user as a first frequency; A virtual reality module is configured to determine a virtual reality scenario for pain management, wherein the determination of the virtual reality scenario is related to the user's age, the pain level, and the real-time exhalation subsample and the real-time inhalation subsample of the user, and the determination of the pain level is related to the breathing rate; the virtual reality module is further configured to: Constructing a current vector based on at least one of the first frequency, the denoising degree of the audio sample, the volume of the audio sample, the average historical breathing frequency of the user, the user information, and the confidence of the first frequency; wherein the confidence of the first frequency is determined based on the first frequency, the historical breathing frequency, the denoising degree of the audio sample, and the user information; Determining the vector distance between the current vector and the historical vector in the vector database specifically includes: In response to the user corresponding to the historical vector being the current user, the calculated vector distance between the current vector and the historical vector is used as the intermediate distance, and the product of the intermediate distance and a first coefficient is used as the final vector distance between the current vector and the historical vector; the first coefficient is a preset constant less than 1; In response to the confidence of the first frequency being less than a confidence threshold, taking a product of the intermediate distance multiplied by a second coefficient as the final vector distance between the current vector and the historical vector; the second coefficient is a preset constant greater than 1; Determine the historical vector having the smallest vector distance to the current vector as a reference vector; Determining the historical pain level corresponding to the reference vector as the current pain level; Based on the pain level, determining the virtual reality scenario for pain management; The breathing collection module and the breathing detection module are arranged in a wearable device, and the virtual reality module is arranged in a virtual reality device.
2. The system according to claim 1, wherein the parameter configuration of the wearable device comprises: The speaker impedance is 8±1.2 ohms, the microphone sensitivity is -38±3 decibels, and the connection distance with the virtual reality device is greater than 5 meters.
3. The system of claim 1, wherein the breathing detection module is further configured to: determining the user's breathing frequency as a second frequency based on the auxiliary detection device; The final respiratory frequency is determined through weighting processing based on the first frequency and the second frequency. 4 . The system of claim 1 , wherein the elements of the current vector further include the user's historical preference scenarios.
5. A method for implementing a pain relief system based on breathing detection, the method comprising: Collect audio samples of the user's breathing; Determining the user's breathing frequency based on the audio sample, specifically comprising: Filtering the audio sample to obtain a noise-removed audio sample; Based on multiple exhalation times and multiple inhalation times, the denoised audio sample is segmented to obtain multiple sub-audio samples; the sub-audio samples include exhalation sub-samples and inhalation sub-samples; Based on the plurality of sub-audio samples, determining the breathing frequency of the user as a first frequency; determining a pain level of the user based on the breathing rate; Determining a virtual reality scene for pain management based on the pain level of the user, the user's age, and the real-time exhalation subsample and real-time inhalation subsample of the user, specifically includes: Constructing a current vector based on at least one of the first frequency, the denoising degree of the audio sample, the volume of the audio sample, the average historical breathing frequency of the user, the user information, and the confidence of the first frequency; wherein the confidence of the first frequency is determined based on the first frequency, the historical breathing frequency, the denoising degree of the audio sample, and the user information; Determining the vector distance between the current vector and the historical vector in the vector database specifically includes: In response to the user corresponding to the historical vector being the current user, the calculated vector distance between the current vector and the historical vector is used as the intermediate distance, and the product of the intermediate distance and a first coefficient is used as the final vector distance between the current vector and the historical vector; the first coefficient is a preset constant less than 1; In response to the confidence of the first frequency being less than a confidence threshold, taking a product of the intermediate distance multiplied by a second coefficient as the final vector distance between the current vector and the historical vector; the second coefficient is a preset constant greater than 1; Determine the historical vector having the smallest vector distance to the current vector as a reference vector; Determining the historical pain level corresponding to the reference vector as the current pain level; Based on the pain level, the virtual reality scenario for pain management is determined.
6. A pain relief device based on breathing detection, characterized in that: The apparatus comprises at least one processor and at least one memory; The at least one memory is used to store computer instructions; The at least one processor is configured to execute at least part of the computer instructions to implement the method for implementing the pain relief system based on breathing detection as claimed in claim 5.
7. A computer-readable storage medium, characterized in that: The storage medium stores computer instructions. When the computer reads the computer instructions in the storage medium, the computer executes the implementation method of the pain relief system based on breathing detection as described in claim 5.
