A method for detecting foreign matter in a bed

Through the combination of ultraviolet lamps and electronic noses, foreign objects on the bed are detected and identified, which solves the problem that the prior art cannot effectively detect and remove foreign objects in the bed, and realizes the identification and cleaning prompts of foreign objects that are difficult for users to observe, improving sleep Experience and health and safety.

CN118470653BActive Publication Date: 2024-12-10GREE ELECTRIC (GANZHOU) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410924323.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-12-10
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

Existing air-conditioning products cannot effectively detect and remove foreign objects and odors from the bed, especially in situations that are difficult for users to observe, affecting their sleep experience and physical health.

Method used

The detection method of combining ultraviolet lamps and electronic noses is used to irradiate the bed by ultraviolet rays and collect foreign object images for image recognition. If it is not recognized, electronic noses are used to detect the odor to judge the type of foreign object, and provide foreign object detection and cleaning prompts for beds.

Benefits of technology

It can detect foreign objects in bed that are difficult for users to observe, judge their type and provide cleaning tips to improve the user's sleep experience and avoid the impact on physical health.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118470653B_ABST
    Figure CN118470653B_ABST
Patent Text Reader

Abstract

The present invention provides a method for detecting foreign matter in a bed, which is applied to an air conditioner. The method includes a bed range, and the irradiation range of an ultraviolet lamp is determined according to the bed range, and the irradiation range is greater than or equal to the bed range. The ultraviolet lamp is started, and if reflected ultraviolet rays are detected, an image of the foreign matter under ultraviolet irradiation is collected. Image recognition is performed on the foreign matter according to the foreign matter image. If the type of the foreign matter cannot be identified, an electronic nose is used to perform foreign matter detection to obtain the type of the foreign matter. First, the ultraviolet irradiation bed is determined so that the irradiation range of the ultraviolet rays is greater than or equal to the bed range. In the case of reflected ultraviolet rays and the type of foreign matter cannot be identified, a secondary foreign matter detection is performed in combination with an electronic nose, which can detect foreign matter that cannot be detected by ultraviolet rays and foreign matter that is difficult for users to observe. The type of foreign matter can also be determined. The user can clean the bedding in time according to the type of foreign matter, thereby improving the user's sleep experience and avoiding affecting the user's physical health.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of foreign body detection, and in particular to a method for detecting foreign bodies on a bed. Background Art

[0002] Currently, air-conditioning products on the market generally have a wide range of air purification functions, but they cannot solve users' problems in some common sleeping scenarios. For example, in the south during the return of the south wind or in humid environments, bedding will often breed mold or foreign objects due to moisture, causing odors, which affects the user's sleep experience.

[0003] Some existing air conditioners are equipped with air purification devices, which include positioning plates and negative ion generators. The negative ion generators sterilize and remove dust from indoor air, thereby improving indoor air quality. However, this solution can only remove bacteria or foreign matter in the air, but cannot detect and remove foreign matter and odor on the bedding of the bed. In addition, in most cases, users are tired of frequently washing bedding with odors. If there are obvious stains such as urine marks, users will generally wash them in time when they see them. However, when damp and odorous, the foreign matter on the bedding is not obvious, and users cannot wash the bedding in time, which will affect the user's sleep experience and physical health.

[0004] Therefore, there is a need for a bed foreign object detection method that can detect foreign objects on the bed that are difficult for users to observe and can also determine the type of foreign objects. Summary of the invention

[0005] In order to overcome the problems existing in the related art, the purpose of the present invention is to provide a method for detecting foreign objects on the bed, which can detect foreign objects on the bed that are difficult for users to observe and can also determine the type of foreign objects.

[0006] A method for detecting foreign matter in a bed, applied to an air conditioner, comprising:

[0007] Acquire a bed range, and determine an irradiation range of the ultraviolet lamp according to the bed range, wherein the irradiation range is greater than or equal to the bed range;

[0008] The ultraviolet lamp is started, and if reflected ultraviolet rays are detected, an image of the foreign body under ultraviolet rays is collected; the ultraviolet lamp is installed on the air conditioner;

[0009] The foreign object is image-recognized according to the foreign object image. If the type of the foreign object cannot be identified, an electronic nose is used to detect the foreign object to obtain the type of the foreign object.

[0010] In a preferred technical solution of the present invention, if the reflected ultraviolet rays are detected, the image of the foreign body under the ultraviolet rays is collected, including:

[0011] Obtaining a reading of an ultraviolet sensor; wherein the ultraviolet sensor is arranged at a position away from the ultraviolet lamp;

[0012] detecting whether the reading is 1, and if so, determining that reflected ultraviolet light is detected;

[0013] When the ultraviolet rays irradiate the bed, a camera device is used to collect a foreign object image, wherein the foreign object image includes the bed and the foreign object.

[0014] In a preferred technical solution of the present invention, before performing image recognition on the foreign object according to the foreign object image, the method further includes:

[0015] Performing image denoising on the foreign body image to obtain a denoised image;

[0016] Contrast enhancement is performed on the denoised image to obtain an enhanced image.

[0017] In a preferred technical solution of the present invention, the step of performing image recognition on the foreign object according to the foreign object image includes:

[0018] extracting image features of the enhanced image;

[0019] The image features are input into a classification model for classification.

[0020] In a preferred technical solution of the present invention, if the type of the foreign body cannot be identified, using an electronic nose to detect the foreign body to obtain the type of the foreign body includes:

[0021] If the type of foreign matter cannot be identified, the electronic nose is controlled to convert the gas signal into a voltage signal;

[0022] Detecting a change amplitude of the voltage signal within a first time period;

[0023] If the variation amplitude is less than the variation amplitude threshold, calculating the average value of the voltage signal;

[0024] The type of the foreign matter is determined according to an average value of the voltage signal.

[0025] In a preferred technical solution of the present invention, after starting the ultraviolet lamp, the method further comprises:

[0026] If the reflected ultraviolet light is not detected, adjusting the angle of the ultraviolet lamp and the irradiation range;

[0027] If the reflected ultraviolet rays are detected, the angle and the irradiation range of the ultraviolet lamp are fixed.

[0028] In a preferred technical solution of the present invention, before inputting the image features into a classification model for classification, the method further includes:

[0029] Collect image datasets of foreign bodies under UV light;

[0030] Identifying the location and type of foreign matter in the image data set to obtain a labeled data set;

[0031] Dividing the labeled data set into a training set and a validation set;

[0032] Using the training set to train the ResNet neural network;

[0033] The ResNet neural network in training is verified using the verification set. If the verification meets expectations, the training is stopped to obtain a classification model.

[0034] In a preferred technical solution of the present invention, after obtaining the type of the foreign matter, the method further includes:

[0035] If the foreign object type is a first type of foreign object, a voice device in the air conditioner is controlled via Bluetooth to prompt the user to clean the first type of foreign object;

[0036] If the foreign object type is the second type of foreign object, the voice device in the air conditioner is controlled by Bluetooth to prompt the user to turn on the ultraviolet sterilization mode.

[0037] In a preferred technical solution of the present invention, after adjusting the angle of the ultraviolet lamp and the irradiation range, the method further comprises:

[0038] If the reflected ultraviolet rays are not detected, an electronic nose is used to detect foreign matter to obtain the type of the foreign matter.

[0039] In a preferred technical solution of the present invention, if the reflected ultraviolet rays are not detected, the method comprises:

[0040] Check whether the reading of the ultraviolet sensor is 0. If so, it is determined that the reflected ultraviolet light is not detected.

[0041] The beneficial effects of the present invention are:

[0042] A method for detecting foreign matter in a bed provided by the present invention includes obtaining a bed range, and determining an irradiation range of an ultraviolet lamp according to the bed range. After determining the position of the bed, the edge of the bed and the bed range can be judged. Start the ultraviolet lamp so that the irradiation range of the ultraviolet lamp includes the bed range. When the ultraviolet rays emitted by the ultraviolet lamp are irradiated on the bed, reflection will occur. Different foreign objects may present different fluorescent characteristics under ultraviolet rays, such as color, intensity and / or distribution area. If reflected ultraviolet rays are detected, it means that the ultraviolet rays are irradiated on the bed, which can highlight the characteristics of the foreign objects on the bed. At this time, an image of the foreign object under ultraviolet irradiation is collected. Image recognition of the foreign object is performed according to the foreign object image, and the type of the foreign object is detected. If the type of the foreign object cannot be identified, an electronic nose is used to detect the foreign object. The electronic nose detects the type of foreign object based on the different odors emitted by different foreign objects and the voltage signal corresponding to the odor is detected. First, determine the position of the bed to be irradiated by ultraviolet rays so that the irradiation range of the ultraviolet rays is greater than or equal to the range of the bed. In the presence of reflected ultraviolet rays and the inability to identify the type of foreign matter, a secondary foreign matter detection is performed in combination with an electronic nose. This can detect foreign matter that cannot be detected by ultraviolet rays and foreign matter that is difficult for users to observe. It can also determine the type of foreign matter. Users can clean bedding in time according to the type of foreign matter, thereby improving the user's sleep experience and avoiding effects on the user's physical health. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a schematic diagram of the process of the bed foreign body detection method provided by the present invention;

[0044] Figure 2 It is a schematic diagram of a process for collecting foreign body images under ultraviolet irradiation provided by the present invention;

[0045] Figure 3 It is a schematic diagram of the process of using the electronic nose to detect foreign matter provided by the present invention;

[0046] Figure 4 It is a schematic diagram of the process of training the ResNet neural network provided by the present invention. DETAILED DESCRIPTION

[0047] The preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.

[0048] Example 1

[0049] like Figure 1 As shown, this embodiment provides a method for detecting foreign matter in a bed, which is applied to an air conditioner. The method includes:

[0050] S1: Acquire a bed range, and determine an irradiation range of the ultraviolet lamp according to the bed range, wherein the irradiation range is greater than or equal to the bed range.

[0051] Choose a suitable UV sensor to detect the reflection and absorption of UV rays according to the size of the room and the bed. The sensor can be a UV photodiode or a UV photoresistor. A photoresistor is a special resistor that uses the photoconductivity effect. As the light intensity increases, the resistance decreases; as the light intensity decreases, the resistance increases. UV photoresistors include cadmium sulfide UV photoresistors and cadmium selenide UV photoresistors. Gallium arsenide photodiodes have a sensitivity that can measure up to the ultraviolet field. Using this characteristic, they can be made into UV photodiodes. Using a UV selective filter in conjunction with a gallium arsenide photodiode can make it sensitive within the wavelength range of 260 to 400 nanometers.

[0052] When the ultraviolet light emitted by the UV lamp shines on the bedding and pillow on the bed, the bedding and pillow will reflect the ultraviolet light. When the angle is adjusted properly, the UV photodiode or UV photoresistor will detect the reflected ultraviolet light.

[0053] The Bluetooth millimeter-wave radar technology is used to determine the monitoring edge range and the range of the entire bed, expand the bed range, obtain the ultraviolet lamp irradiation range, or use the bed range as the ultraviolet lamp irradiation range.

[0054] S2: Start the ultraviolet lamp, and if reflected ultraviolet rays are detected, collect the image of the foreign matter under the ultraviolet rays; the ultraviolet lamp is installed on the air conditioner.

[0055] Set the ultraviolet lamp toward the bed, connect the ultraviolet lamp to the power supply, press the start button on the ultraviolet lamp, and the ultraviolet lamp starts to work. In the second time period, read the reading of the ultraviolet sensor. The reading of the ultraviolet sensor is Boolean type, which is divided into two values ​​0 and 1. If the reading of the ultraviolet sensor in the second time period is 0, it means that no reflected ultraviolet rays are detected. At this time, adjust the angle of the ultraviolet lamp and / or adjust the relative distance between the ultraviolet lamp and the bed. The reflected ultraviolet rays are the ultraviolet rays formed by the bed reflecting the ultraviolet rays emitted by the ultraviolet lamp; if the reading of the ultraviolet sensor in the second time period is 1, it means that the reflected ultraviolet rays are detected, and the angle of the ultraviolet lamp and the relative distance between the ultraviolet lamp and the bed remain unchanged; if the reading of the ultraviolet sensor in the second time period includes both 1 and 0, then the second time period is extended on the basis of the second time period, and the reading of the ultraviolet sensor is read. During this period, the angle of the ultraviolet lamp and / or the relative distance between the ultraviolet lamp and the bed can be adjusted, or the angle of the ultraviolet lamp and the relative distance between the ultraviolet lamp and the bed can not be adjusted, which is not limited here.

[0056] When the reading of the ultraviolet sensor in the second time period is 1, a camera device is used to collect an image of the foreign object under ultraviolet irradiation. Different foreign objects may exhibit different fluorescence characteristics under ultraviolet light, such as color, intensity and / or distribution area.

[0057] S3: performing image recognition on the foreign object according to the foreign object image. If the type of the foreign object cannot be recognized, using an electronic nose to perform foreign object detection to obtain the type of the foreign object.

[0058] First, extract the image features of the foreign body image, and then match the image features with the preset template to identify the type of foreign body. If the preset template corresponding to the image features is not matched, it means that the foreign body on the bed is not sensitive to ultraviolet rays, that is, the foreign body cannot be distinguished from the background area under ultraviolet rays. At this time, the type of foreign body cannot be identified and a secondary foreign body detection is required.

[0059] The electronic nose is fixed near the bed, for example, at any one or multiple locations at the head, foot, and side of the bed. When the type of foreign matter cannot be identified by irradiating the bed with ultraviolet light alone, the electronic nose or the electronic nose and ultraviolet light are used simultaneously to identify the type of foreign matter.

[0060] The electronic nose collects the odor data emitted by the foreign object and sends the odor data to the processor inside the air conditioner, and the processor determines the type of the foreign object based on the odor data. Preferably, after the electronic nose collects the odor data emitted by the foreign object, the odor data is sent to the amplification circuit inside the air conditioner, and the amplification circuit processes the odor data to obtain amplified data, and sends the amplified data to the processor inside the air conditioner.

[0061] A method for detecting foreign matter in a bed provided in this embodiment includes obtaining a bed range, and determining an irradiation range of an ultraviolet lamp according to the bed range. After determining the location of the bed, the edge of the bed and the bed range can be determined. Start the ultraviolet lamp so that the irradiation range of the ultraviolet lamp includes the bed range. When the ultraviolet rays emitted by the ultraviolet lamp are irradiated on the bed, reflection will occur. Different foreign objects may show different fluorescence characteristics under ultraviolet rays, such as color, intensity and / or distribution area. If reflected ultraviolet rays are detected, it means that the ultraviolet rays are irradiated on the bed, which can highlight the characteristics of the foreign objects on the bed. At this time, an image of the foreign object under ultraviolet irradiation is collected. Image recognition of the foreign object is performed based on the foreign object image, and the type of foreign object is detected. If the type of foreign object cannot be identified, an electronic nose is used for foreign object detection. The electronic nose detects the type of foreign object based on the different odors emitted by different foreign objects and the voltage signal corresponding to the odor is detected. First, determine the position of the bed to be irradiated by ultraviolet rays so that the irradiation range of the ultraviolet rays is greater than or equal to the range of the bed. In the presence of reflected ultraviolet rays and the inability to identify the type of foreign matter, a secondary foreign matter detection is performed in combination with an electronic nose. This can detect foreign matter that cannot be detected by ultraviolet rays and foreign matter that is difficult for users to observe. It can also determine the type of foreign matter. Users can clean bedding in time according to the type of foreign matter, thereby improving the user's sleep experience and avoiding effects on the user's physical health.

[0062] Example 2

[0063] like Figure 2 As shown, this embodiment provides a method for detecting foreign matter in a bed. This embodiment only describes the difference from Embodiment 1. If reflected ultraviolet rays are detected, an image of the foreign matter under ultraviolet rays is collected, including:

[0064] S22: Obtaining a reading of an ultraviolet sensor; wherein the ultraviolet sensor is arranged at a position far away from the ultraviolet lamp.

[0065] S23: Detect whether the reading is 1, and if so, determine that reflected ultraviolet rays are detected.

[0066] S24: When the ultraviolet rays irradiate the bed, a camera device is used to collect a foreign object image, where the foreign object image includes the bed and the foreign object.

[0067] Before step S22, the method further includes step S21: starting the ultraviolet lamp.

[0068] When the intensity of the reflected ultraviolet light received by the ultraviolet sensor is greater than or equal to the intensity threshold, the reading of the ultraviolet sensor is 1; when the intensity of the reflected ultraviolet light received by the ultraviolet sensor is less than the intensity threshold, the reading of the ultraviolet sensor is 0.

[0069] Preferably, it is detected whether the reading of the ultraviolet sensor is 1 in the first time period, and the initial reading of the ultraviolet sensor is 0. The starting time of the first time period is the time when the reading of the ultraviolet sensor changes from 0 to 1, and the ending time of the first time period is the starting time of the first time period plus 1 minute. When the reading of the ultraviolet sensor is 1 in the first time period, it is determined that the reflected ultraviolet rays are detected.

[0070] When the bed is illuminated by ultraviolet light, visible light also illuminates the bed. At this time, a camera is used to collect images of foreign objects, which include both visible light image information and ultraviolet image information. Different foreign objects may show different fluorescence characteristics under ultraviolet light, such as color, intensity and / or distribution area.

[0071] The UV sensor is set far away from the UV lamp and close to the bed to prevent the UV sensor from receiving the UV emitted by the UV lamp and prevent the UV sensor from misjudging the UV emitted by the UV lamp as UV reflected by the bed. The UV sensor is set close to the bed to facilitate the UV sensor to receive the UV reflected by the bed.

[0072] Before performing image recognition on the foreign object according to the foreign object image, the method further includes:

[0073] S21': performing image denoising on the foreign body image to obtain a denoised image.

[0074] S22': performing contrast enhancement on the denoised image to obtain an enhanced image.

[0075] Since the foreign objects such as bedding and pillows on the bed are small, the noise in the image may interfere with the identification of foreign objects, so it is necessary to perform image denoising on the foreign object image.

[0076] This embodiment uses guided filtering to perform image denoising on a foreign body image as an example, and the guided image used by the guided filtering is the foreign body image, that is, the input image and the foreign body image are the same. When the guided image is the foreign body image, the guided filtering becomes a filtering operation that maintains the image edge.

[0077] Guided filtering has the following characteristics:

[0078] (1) Guided filtering is an image filtering technique that uses a guide image to filter the input image so that the final output image is roughly similar to the input image, but the texture part is similar to the guide image.

[0079] (2) The purpose of guided filtering is to maintain the advantages of bilateral filtering while overcoming its disadvantages.

[0080] (3) Guided filtering can not only achieve edge smoothing of bilateral filtering, but also has good performance when detecting image edges. It can be applied in scenes such as image enhancement, HDR compression, image matting and image dehazing.

[0081] Contrast enhancement uses histogram equalization or gamma transform. Histogram equalization is to adjust the probability density of the histogram to a uniform distribution. Histogram equalization has the advantages of simple algorithm, fast speed, and can improve the overall quality of the image. Gamma transform, also known as power exponential transform, is mainly used for image correction to correct images with too high or too low grayscale and enhance the contrast. The gamma parameter is a very important parameter in image grayscale correction. Its value determines the grayscale mapping method between the input image and the output image, that is, whether to enhance low grayscale or high grayscale. When the gamma parameter is greater than 1, the contrast of the high grayscale area of ​​the image is enhanced; when the gamma parameter is less than 1, the contrast remains unchanged; when the gamma parameter is less than 1, the contrast of the low grayscale area of ​​the image is enhanced.

[0082] The performing image recognition on the foreign object according to the foreign object image comprises:

[0083] S31: Extracting image features of the enhanced image.

[0084] S32: Input the image features into a classification model for classification.

[0085] Use the HOG (Histogram of Oriented Gradient) algorithm, LBP (Local Binary Pattern) algorithm or Haar algorithm to extract the image features of the enhanced image. The HOG algorithm can maintain good invariance to the geometric and optical deformation of the image, and the LBP algorithm has the advantages of rotation invariance and grayscale invariance.

[0086] After extracting the image features of the enhanced image, the image features are input into the ResNet model, the VGG model or the Inception model. This embodiment takes the input of the image features into the ResNet model as an example. The advantages of the ResNet model are that the number of parameters is small, the computational efficiency is high, and it is suitable for deployment on mobile and embedded devices. The advantage of the VGG model is that the required data set is very small, and the disadvantage is that the accuracy of classification cannot be guaranteed. The disadvantage of the Inception model is that it occupies more computing resources and has a higher cost.

[0087] Before the foreign object is image-recognized based on the foreign object image, this embodiment also includes performing image denoising on the foreign object image to obtain a denoised image. The denoised image is contrast-enhanced to obtain an enhanced image. Since the range of foreign objects on the bedding and pillow on the bed is small, the image noise in the foreign object image has a greater impact on the identification of foreign objects. Performing image denoising on the foreign object image can improve the quality of the foreign object image. Using contrast enhancement can improve the contrast of the denoised image, thereby highlighting the characteristics of the foreign object on the bed.

[0088] Example 3

[0089] like Figure 3 As shown, this embodiment provides a method for detecting foreign matter in a bed. This embodiment only describes the differences from Embodiment 1. If the type of the foreign matter cannot be identified, an electronic nose is used to detect the foreign matter to obtain the type of the foreign matter, including:

[0090] S33: If the type of the foreign object cannot be identified, the electronic nose is controlled to convert the gas signal into a voltage signal.

[0091] S34: Detecting a variation amplitude of the voltage signal within a first time period.

[0092] S35: If the variation amplitude is less than the variation amplitude threshold, then calculating the average value of the voltage signal.

[0093] S36: Determine the type of the foreign matter according to the average value of the voltage signal.

[0094] The principle of the electronic nose is to convert the gas components released by foreign objects into corresponding voltage signals. Different foreign objects will release different gas components, thereby generating different voltage signals. By analyzing the size and change amplitude of these voltage signals, the type of foreign object can be determined. Bacteria will produce gases such as ammonia and hydrogen sulfide. The electronic nose converts different gases into voltage signals of different sizes to identify the type of foreign object.

[0095] The speed at which foreign matter produces gas varies. When foreign matter appears, it slowly produces gas. As time goes by, the number of foreign matter increases, and the speed at which foreign matter produces gas also increases. The gas produced by foreign matter will gradually accumulate in the air, thereby increasing the concentration of the gas produced by the foreign matter. Therefore, the change amplitude of the voltage signal is detected within the first time period. If the change amplitude of the voltage signal is less than the change amplitude threshold, it means that the gas produced by the foreign matter is stable, and the influence of extreme voltage values ​​on the identification of the foreign matter type can be avoided. The average value of the voltage signal is calculated. At this time, the average value of the voltage signal can more accurately reflect the type of foreign matter.

[0096] Ultraviolet detection technology cannot directly detect many microorganisms such as bacteria and molds that carry odors. Although the waste and toxins produced by the metabolism of these microorganisms will produce odors, most of the waste and toxins do not have obvious ultraviolet light absorption characteristics. In addition, microorganisms are relatively small. When microorganisms do not form colonies, the location of foreign objects cannot be determined in the foreign object image under ultraviolet irradiation, resulting in the inability to identify the type of foreign object. Therefore, the use of electronic noses for secondary detection can detect some foreign objects that cannot be observed in foreign object images under ultraviolet irradiation, such as Penicillium and Aspergillus flavus. The voltage signal of the foreign object is detected by the electronic nose and the voltage signal is sent to the air conditioner.

[0097] After starting the ultraviolet lamp, the method further comprises:

[0098] S22': If the reflected ultraviolet rays are not detected, adjusting the angle of the ultraviolet lamp and the irradiation range.

[0099] S23': If the reflected ultraviolet rays are detected, the angle and the irradiation range of the ultraviolet lamp are fixed.

[0100] When the ultraviolet light from the UV lamp hits the bed, the bedding and pillow on the bed will absorb some of the ultraviolet light and reflect some of it. If no reflected ultraviolet light is detected, you can adjust the angle of the UV lamp, reduce the distance between the UV lamp and the bed, and increase the power of the UV lamp.

[0101] After the reflected ultraviolet rays are detected, the change amplitude of the voltage signal is detected within the first time period. If the change amplitude is less than the change amplitude threshold, it means that the voltage signal of the gas generated by the foreign matter is stable at this time, and the angle and irradiation range of the ultraviolet lamp are fixed.

[0102] If the reflected ultraviolet light is not detected after adjusting the angle and power of the ultraviolet lamp and the distance between the ultraviolet lamp and the bed, an electronic nose is used to detect foreign matter to obtain the type of the foreign matter.

[0103] If the reflected ultraviolet rays are not detected, it includes detecting whether the reading of the ultraviolet sensor is 0. If so, it is determined that the reflected ultraviolet rays are not detected.

[0104] If the type of foreign matter cannot be identified in this embodiment, an electronic nose is used to detect the foreign matter and obtain the type of the foreign matter, including controlling the electronic nose to convert the gas signal into a voltage signal if the type of foreign matter cannot be identified. The change amplitude of the voltage signal is detected within the first time period. If the change amplitude of the voltage signal is less than the change amplitude threshold, it means that the gas generated by the foreign matter is stable, and the influence of extreme voltage values ​​on the identification of the foreign matter type can be avoided. The average value of the voltage signal is calculated. At this time, the average value of the voltage signal can more accurately reflect the type of foreign matter.

[0105] Example 4

[0106] like Figure 4 As shown, this embodiment provides a method for detecting foreign matter in a bed. This embodiment only describes the differences from Embodiment 1. Before inputting the image features into a classification model for classification, it also includes:

[0107] S31': Collect image datasets of foreign objects under ultraviolet irradiation.

[0108] S32': Identify the location and type of foreign matter in the image data set to obtain a labeled data set.

[0109] S33': Divide the labeled data set into a training set and a validation set.

[0110] S34': Use the training set to train the ResNet neural network.

[0111] S35': Use the verification set to verify the ResNet neural network in training. If the verification meets expectations, stop training to obtain a classification model.

[0112] Preferably, the labeled data set is divided into a training set, a validation set, and a test set in a ratio of 7:2:1, and the training set is used to train the ResNet neural network. During the training process, the validation set is used to verify the ResNet neural network, and the network parameters of the ResNet neural network are adjusted. When the number of training times of the ResNet neural network is greater than or equal to the training times threshold, the training is stopped, the classification model is obtained, and the performance of the classification model is tested using the test set.

[0113] In the ResNet neural network, the input foreign body image first passes through a convolution layer and a pooling layer, then passes through multiple residual modules, and finally outputs the final foreign body type through global average pooling and a fully connected layer. ResNet neural network training can avoid gradient vanishing and gradient explosion problems, accelerate network convergence, and improve the network's expression ability and classification performance. Using residual connections can retain the original features, making the network's learning process more stable, and further improving the network's accuracy and generalization ability.

[0114] Before the image features are input into the classification model for classification, this embodiment also includes collecting an image data set of foreign objects under ultraviolet irradiation, identifying the location and type of foreign objects in the image data set, and obtaining a labeled data set. The labeled data set is divided into a training set and a verification set, and the training set is used to train the ResNet neural network. The ResNet neural network in training is verified using the verification set. If the verification meets expectations, the training is stopped to obtain a classification model. The ResNet neural network can avoid the problems of gradient vanishing and gradient exploding during training, accelerate network convergence, and improve the network's expression ability and classification performance.

[0115] Example 5

[0116] This embodiment provides a method for detecting foreign matter in a bed. This embodiment only describes the differences from Embodiment 1. After obtaining the type of the foreign matter, the method further includes:

[0117] S41: If the type of the foreign object is the first type of foreign object, a voice device in the air conditioner is controlled via Bluetooth to prompt the user to clean the first type of foreign object.

[0118] S42: If the foreign object type is the second type of foreign object, the voice device in the air conditioner is controlled by Bluetooth to prompt the user to turn on the ultraviolet sterilization mode.

[0119] The first category of foreign matter includes urine, saliva and other foreign matter that need to be washed with water. If the foreign matter type is the first category of foreign matter, the voice device in the air conditioner is controlled by Bluetooth technology to remind the user that there is foreign matter on the bedding and it needs to be cleaned in time, otherwise it will affect the user's sleep quality and physical health.

[0120] The second type of foreign matter includes bacteria and fungi. If the foreign matter type is the second type of foreign matter, the voice device in the air conditioner is controlled by Bluetooth to prompt the user to turn on the ultraviolet sterilization mode, that is, to increase the intensity of ultraviolet radiation, extend the ultraviolet radiation time, and prompt the user to exit the bedroom and close the door. The ultraviolet sterilization operation will start one minute later. After one minute, regardless of whether the user leaves the bedroom, the air conditioner will use the human body sensor to determine whether there is someone in the bedroom. If not, the ultraviolet sterilization operation will be started and the voice prompts the user not to enter the room when the sterilization operation starts. The human body sensor makes a judgment every five seconds. If someone enters the room during the sterilization process, the ultraviolet sterilization operation will be interrupted immediately, and the user will be reminded to leave the room if the sterilization operation needs to continue. After the user leaves the room, the ultraviolet sterilization operation will be performed again. If someone still stays in the bedroom, it will be judged every thirty seconds whether someone stays in the bedroom. If someone stays in the bedroom, the user will be reminded to leave the room and prepare for the next scan. If not, the sterilization operation will be started, and the user will be reminded not to enter the bedroom when the sterilization operation starts.

[0121] Preferably, if the type of foreign matter is mold that produces odor when exposed to moisture, in addition to the ultraviolet sterilization operation, the air conditioner will be automatically controlled by the air conditioner controller to dehumidify the room.

[0122] Based on ultraviolet light irradiation of the bedside and image recognition, the electronic nose is used for secondary odor detection, which can detect foreign objects that cannot be observed under ultraviolet light, such as some molds that emit odors due to humidity. Once it is determined that the odor is caused by humidity, the air conditioner controller is used to control the air conditioner to automatically start the dehumidification mode.

[0123] After obtaining the type of foreign matter, this embodiment further includes, if the type of foreign matter is the first type of foreign matter, then the voice device in the air conditioner is controlled via Bluetooth to prompt the user to clean the first type of foreign matter. If the type of foreign matter is the second type of foreign matter, then the voice device in the air conditioner is controlled via Bluetooth to prompt the user to turn on the ultraviolet sterilization mode. By classifying the types of foreign matter, the user can be prompted to wash the foreign matter with water or irradiate the foreign matter with ultraviolet light, thereby enhancing the ability to adapt to the scene.

[0124] Example 6

[0125] This embodiment provides an electronic device, which includes a memory and a processor.

[0126] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0127] The memory may include various types of storage units such as system memory, read-only memory (ROM), and permanent storage.

[0128] The memory stores executable codes, and when the executable codes are processed by the processor, the processor can execute part or all of the above-mentioned bed foreign body detection method.

[0129] Unless otherwise specifically stated, the relative arrangement, numerical expressions and numerical values ​​of the parts and steps set forth in these embodiments do not limit the scope of the application. In all examples shown and discussed here, any specific value should be interpreted as being merely exemplary, rather than as a restriction. Therefore, other examples of exemplary embodiments can have different values. It should be noted that similar reference numerals and letters represent similar items in the following drawings, and therefore, once a certain item is defined in an accompanying drawing, it does not need to be further discussed in the subsequent accompanying drawings.

[0130] It should be understood that spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if the device in the figures is inverted, a device described as "above" or "above other devices or structures" would then be positioned "below" or "below the other devices or structures." Thus, the exemplary term "above" can include both "above" and "below." The device may also be oriented in other different ways (rotated 90 degrees or in other orientations), and the spatially relative descriptions used herein shall be interpreted accordingly.

[0131] In addition, it should be noted that the use of terms such as "first" and "second" to limit components is only to facilitate the distinction between corresponding components. Unless otherwise stated, the above terms have no special meaning and therefore cannot be understood as limiting the scope of protection of this application.

[0132] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for detecting foreign matter in a bed, characterized in that: Applied to air conditioning, the method comprises: Acquire a bed range, and determine an irradiation range of the ultraviolet lamp according to the bed range, wherein the irradiation range is greater than or equal to the bed range; The ultraviolet lamp is started, and if reflected ultraviolet rays are detected, an image of the foreign body under ultraviolet rays is collected; the ultraviolet lamp is installed on the air conditioner; Performing image recognition on the foreign object according to the foreign object image, and if the type of the foreign object cannot be identified, using an electronic nose to perform foreign object detection to obtain the type of the foreign object; If the type of the foreign object cannot be identified, the electronic nose is used to detect the foreign object to obtain the type of the foreign object, including: If the type of foreign matter cannot be identified, the electronic nose is controlled to convert the gas signal into a voltage signal; Detecting a change amplitude of the voltage signal within a first time period; If the variation amplitude is less than the variation amplitude threshold, calculating the average value of the voltage signal; The type of the foreign matter is determined according to an average value of the voltage signal.

2. The method for detecting foreign matter in a bed according to claim 1, characterized in that: If the reflected ultraviolet rays are detected, the image of the foreign body under the ultraviolet rays is collected, including: Obtaining a reading of an ultraviolet sensor; wherein the ultraviolet sensor is arranged at a position away from the ultraviolet lamp; detecting whether the reading is 1, and if so, determining that reflected ultraviolet light is detected; When the ultraviolet rays irradiate the bed, a camera device is used to collect a foreign object image, wherein the foreign object image includes the bed and the foreign object.

3. The method for detecting foreign matter in a bed according to claim 1, characterized in that: Before performing image recognition on the foreign object according to the foreign object image, the method further includes: Performing image denoising on the foreign body image to obtain a denoised image; Contrast enhancement is performed on the denoised image to obtain an enhanced image.

4. The method for detecting foreign matter in a bed according to claim 3, characterized in that: The performing image recognition on the foreign object according to the foreign object image comprises: extracting image features of the enhanced image; The image features are input into a classification model for classification.

5. The method for detecting foreign matter in a bed according to claim 1, characterized in that: After starting the ultraviolet lamp, the method further comprises: If the reflected ultraviolet light is not detected, adjusting the angle of the ultraviolet lamp and the irradiation range; If the reflected ultraviolet rays are detected, the angle and the irradiation range of the ultraviolet lamp are fixed.

6. The method for detecting foreign matter in a bed according to claim 4, characterized in that: Before inputting the image features into the classification model for classification, the method further includes: Collect image datasets of foreign bodies under UV light; Identifying the location and type of foreign matter in the image data set to obtain a labeled data set; Dividing the labeled data set into a training set and a validation set; Using the training set to train the ResNet neural network; The ResNet neural network in training is verified using the verification set. If the verification meets expectations, the training is stopped to obtain a classification model.

7. The method for detecting foreign matter in a bed according to claim 1, characterized in that: After obtaining the type of the foreign body, the method further includes: If the foreign object type is a first type of foreign object, a voice device in the air conditioner is controlled via Bluetooth to prompt the user to clean the first type of foreign object; If the foreign object type is the second type of foreign object, the voice device in the air conditioner is controlled by Bluetooth to prompt the user to turn on the ultraviolet sterilization mode.

8. The method for detecting foreign matter in a bed according to claim 5, characterized in that: After adjusting the angle of the ultraviolet lamp and the irradiation range, the method further comprises: If the reflected ultraviolet rays are not detected, an electronic nose is used to detect foreign matter to obtain the type of the foreign matter.

9. The method for detecting foreign matter in a bed according to claim 5, characterized in that: If the reflected ultraviolet rays are not detected, the method comprises: Check whether the reading of the ultraviolet sensor is 0. If so, it is determined that the reflected ultraviolet light is not detected.