Human body allergen detection sensor recommendation method, equipment and medium
Through the combination of image recognition and classification models, allergens in the home environment are identified and marked, detection values are calculated and detection weight values are determined, and detection information of allergen detection sensors is recommended, which solves the problem of frequent allergen detection in the prior art, and achieves the effect of reducing costs and improving detection convenience.
Patent Information
- Application Number
- CN202411769577.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-04
AI Technical Summary
In the prior art, allergen detection in the home environment requires frequent on-site testing, resulting in high labor costs and increased time costs, which have limitations.
The initial image of the target space is obtained through image recognition technology, target object recognition and marking, input the marked image to the classification model for detection value calculation, and determine the detection weight value based on the tidy frequency, thereby recommending the detection information of the allergen detection sensor.
It realizes that there is no need for staff to come to the door for testing, reduces labor costs, and provides users with the convenience of detecting allergens at any time, improving detection efficiency and accuracy.
Smart Images

Figure CN119723034A_ABST
Abstract
Description
Background Art
[0002] Common human allergens include pollen, mites, dust, etc. If the content of allergens exceeds a certain concentration, it is possible to cause allergic reactions in people with allergic diseases, posing a life-threatening risk to the human body. Currently, there are more and more patients with allergic diseases, and severe allergic reactions can threaten the patient's life. Therefore, in order to reduce the onset of allergic diseases in patients, the World Health Organization has proposed a low-allergy home visit program. The low-allergy home visit program is to help users find allergens and irritants in the home environment and provide users with environmental intervention plans to cut off the causes of repeated allergies in family members from the source, and prevent and control allergens and irritants in the home environment through environmental and behavioral interventions.
[0003] In order to determine the probability that allergic diseases may be caused by allergic sources in the home environment, it is necessary to conduct periodic allergy testing on the allergens in the home environment (that is, the allergens must be tested once every specific time period). If the staff conducts on-site allergen testing for each family in each testing time period, the manpower cost will be very high, and the staff will need to negotiate the testing time with family members. During the testing time period, family members are required to cooperate with the staff at home to conduct allergen testing, which also increases the time cost for family members. Therefore, this allergen detection method has limitations. Summary of the invention
[0004] In view of the above technical problems, the technical solution adopted by the present invention is:
[0005] According to one aspect of the present application, a method for recommending a human allergy source detection sensor is provided, comprising the following steps:
[0006] Step S100, obtaining a number of initial images corresponding to the target space;
[0007] Step S200, performing image recognition on each initial image to determine the target object included in each initial image;
[0008] Step S300, marking the target object included in each initial image to obtain a plurality of marked images;
[0009] Step S400, input each labeled image into a preset classification model to obtain an initial detection value of the target object included in each labeled image output by the classification model; the classification model is obtained by training a number of historical images of the target space;
[0010] Step S500, determining a detection weight value of each target object according to the neat frequency of each target object;
[0011] Step S600, determining a target detection object from a plurality of target objects according to an initial detection value and a detection weight value of each target object;
[0012] Step S700: output detection information of a preset allergen detection sensor corresponding to the target detection object.
[0013] In an exemplary embodiment of the present application, the classification model is obtained by the following steps:
[0014] Step S401, obtaining a number of historical images corresponding to the target space;
[0015] Step S402: performing image recognition on each historical image to determine the target object included in each historical image;
[0016] Step S403: according to the image features of each target object in the plurality of historical images, the plurality of target objects are grouped by features to obtain a historical image feature group corresponding to each target object; each historical image feature group includes the image features of the corresponding target object in each historical image;
[0017] Step S404, according to the preset neatness detection value evaluation rules, traverse each historical image feature group, and process a number of image features of the target object in the historical image included in each historical image feature group to obtain a neatness detection value corresponding to the target object in each historical image; wherein the neatness of the target object in the historical image is inversely proportional to the neatness detection value corresponding to the target object in the historical image.
[0018] In an exemplary embodiment of the present application, after receiving a number of labeled images, the classification model is used to perform the following steps:
[0019] Step S410: Obtain the image features of each target object included in each marked image to obtain a marked image feature list set A1, A2, ..., A m ,...,A n ; Where m = 1, 2, ..., n; n is the number of labeled images; A m is the set of labeled image feature lists corresponding to the mth labeled image;
[0020] A m =(A m1 ,A m2 ,...,A mi ,...,A mj(m) ), i = 1, 2, ..., j(m), j(m) is the number of target objects included in the mth labeled image, A mi is a list of labeled image features of the i-th target object included in the m-th labeled image;
[0021] A mi =(A mi1 ,A mi2 ,...,A mis ,...,A mit(mi) );s=1,2,...,t(mi);t(mi) is the number of image features of the i-th target object included in the m-th labeled image; A mis is the sth image feature of the ith target object included in the mth labeled image;
[0022] Step S420: Obtain the image features of the ith target object included in the mth marked image in each historical image to obtain a historical image feature list set B corresponding to the ith target object included in the mth marked image. mi =(B mi1 ,B mi2 ,...,B mie ,...,B mif ), where e = 1, 2, ..., f, and f is the number of historical images; B mie is a list of historical image features of the ith target object in the eth historical image included in the mth labeled image;
[0023] B mie =(B mie1 ,B mie2 ,...,B mieg ,...,B mieh(mie) ); g = 1, 2, ..., h(mie); h(mie) is the number of image features of the i-th target object in the e-th historical image included in the m-th labeled image; B mieg is the g-th image feature of the i-th target object in the e-th historical image included in the m-th labeled image;
[0024] Step S430: mi and B mie Perform feature comparison to obtain the corresponding feature matching degree C mie ;
[0025] Step S440: If C mie If the feature matching degree is greater than a preset threshold, the e-th historical image is determined as the target historical image corresponding to the i-th target object included in the m-th marked image;
[0026] Step S450, obtaining a neat detection value of the i-th target object included in the m-th marked image in each of its corresponding target history images;
[0027] Step S460: Determine the maximum neat detection value corresponding to the i-th target object included in the m-th labeled image as the initial detection value of the i-th target object included in the m-th labeled image.
[0028] In an exemplary embodiment of the present application, step S500 includes:
[0029] Step S510, obtaining the neat frequency of each target object;
[0030] Step S520: determine the detection weight value corresponding to the neat frequency of each target object from a preset first detection weight mapping table; wherein the first detection weight mapping table includes a mapping relationship between a number of neat frequencies and their corresponding detection weight values; the neat frequency is inversely proportional to the detection weight value corresponding to the neat frequency.
[0031] In an exemplary embodiment of the present application, step S520 further includes:
[0032] Step S521: if the tidy frequency of any target object fails to be obtained, or if there is no detection weight value corresponding to the tidy frequency of the target object in the preset first detection weight mapping table, then the object category of the target object is obtained;
[0033] Step S522: Determine the detection weight value corresponding to the object category of the target object from a preset second detection weight mapping table; wherein the second detection weight mapping table includes a mapping relationship between several object categories and their corresponding detection weight values.
[0034] In an exemplary embodiment of the present application, step S600 includes:
[0035] Step S610, removing duplicates from a number of target objects in a number of marked images to obtain a number of detected objects;
[0036] Step S620: Obtain the initial detection value corresponding to each detection object in each marked image to obtain an initial detection value list set D = (D1, D2, ..., D a ,...,D b );a=1,2,...,b;b is the number of detected objects; D a is the list of initial detection values corresponding to the a-th detected object;
[0037] D a =(D a1 ,D a2 ,...,D am ,...,D an );D am is the initial detection value corresponding to the a-th detected object in the m-th marked image;
[0038] Step S630: MAX(D a ) is determined as the target detection value of the a-th detection object; wherein MAX() is a preset maximum value determination function;
[0039] Step S640: Determine a target detection object from a plurality of detection objects according to the target detection value and the detection weight value of each detection object.
[0040] In an exemplary embodiment of the present application, step S640 includes:
[0041] Step S641: Obtain the target detection value corresponding to each detected object to obtain a target detection value list E=(E1, E2, ..., E a ,...,E b );E a is the target detection value corresponding to the a-th detected object;
[0042] Step S642: Obtain the detection weight value corresponding to each detected object to obtain a detection weight value list F=(F1, F2, ..., F a ,...,F b );F a is the detection weight value corresponding to the a-th detected object;
[0043] Step S643: Determine the total detection value corresponding to each detected object according to the target detection value list E and the detection weight value list F, and obtain the total detection value list G = (G1, G2, ..., G a ,...,G b );G a is the total detection value corresponding to the a-th detected object; G a =E a ×F a ;
[0044] Step S644, traverse the total detection value list G, if G a If the value is greater than the preset detection total value threshold, the ath detected object is determined as the target detection object.
[0045] In an exemplary embodiment of the present application, step S700 includes:
[0046] Step S710, obtaining the object category of each target detection object;
[0047] Step S720, removing duplicates from the object categories of a plurality of target detection objects to obtain a plurality of target object categories;
[0048] Step S730, determining the preset allergen corresponding to each target object category as the target allergen;
[0049] Step S740: output detection information of the detection sensor corresponding to the target allergen.
[0050] According to one aspect of the present application, a non-transitory computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored in the storage medium, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the aforementioned human allergen detection sensor recommendation method.
[0051] According to one aspect of the present application, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0052] The present invention has at least the following beneficial effects:
[0053] The human allergen detection sensor recommendation method of the present invention determines the target object included in each initial image by performing image recognition on a plurality of initial images corresponding to the target space, marks the target object included in each initial image to obtain a plurality of marked images, and then inputs each marked image into a classification model to obtain an initial detection value of each target object, and determines a detection weight value of each target object according to the neat frequency of each target object, and finally determines a target detection object from a plurality of target objects according to the initial detection value and the detection weight value of each target object, and outputs detection information of the allergen detection sensor corresponding to the target detection object, determines a target detection object with a higher allergen content by calculating the detection value of the target object in the target space, and outputs the detection information of the allergen detection sensor corresponding to the target detection object to the user, and the user can perform allergen detection on the target detection object in the target space by the allergen detection sensor, so as to timely discover allergens and eliminate the harm caused by allergens in time, and there is no need for staff to conduct on-site detection, which reduces the labor cost and provides convenience for users to detect allergens at any time. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0055] Figure 1 This is a flow chart of a method for recommending a human allergen detection sensor provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0057] A human allergen detection sensor recommended method described in this application, such as Figure 1 As shown, the following steps are included:
[0058] Step S100, obtaining a number of initial images corresponding to the target space;
[0059] The target space can be a space within the home, or other space that requires allergen testing.
[0060] The initial images are images at different positions or orientations in the target space, so as to ensure that the environmental information of the target space at the time of acquiring the initial images can be obtained through a number of initial images.
[0061] Step S200, performing image recognition on each initial image to determine the target object included in each initial image;
[0062] An image object recognition model (such as a CNN convolutional neural network model) can be used to perform object recognition on the initial image. Each initial image is input into the image object recognition model, which extracts features from each initial image and compares them with the image features of the training samples of the image object recognition model (the training samples are the entire image or partial image of each target object in different orientations). If the comparison is successful, the corresponding target object in the initial image is determined.
[0063] The target object can be an object of a specific type or an object placed on a specific type, or an object covered with allergens that may cause allergic diseases (such as respiratory allergies, skin itching allergies, eye stinging allergies, etc.), such as beds, carpets, coffee tables, flowers, etc.
[0064] The image recognition step in step S200 can be implemented by the following source code:
[0065] import numpy as np
[0066] import os
[0067]
[0068] In the above code, the pre-trained model can be an image object recognition model.
[0069] Step S300, marking the target object included in each initial image to obtain a plurality of marked images;
[0070] The target objects identified in each initial image are marked in the initial image, so as to determine the corresponding position of each target object in the marked image, so as to facilitate the subsequent calculation of the detection value.
[0071] Step S400, inputting each marked image into a preset classification model to obtain an initial detection value of the target object included in each marked image output by the classification model;
[0072] The initial detection value of the target object is an initial neatness detection value determined according to the neatness of the target object in the corresponding marked image. By detecting the neatness of the target object, the allergen content of the target object is inferred. That is, the lower the neatness of the target object, the higher the allergen content of the target object.
[0073] The classification model is obtained by training several historical images of the target space, as described in steps S401 to S404:
[0074] Step S401, obtaining a number of historical images corresponding to the target space;
[0075] Historical images are images of the target space taken during historical periods.
[0076] Step S402: performing image recognition on each historical image to determine the target object included in each historical image;
[0077] The image recognition method for historical images is the same as the image recognition method for initial images, and will not be repeated here.
[0078] Step S403: grouping the target objects according to the image features of each target object in the historical images to obtain a historical image feature group corresponding to each target object;
[0079] The historical image feature group corresponding to each target object includes the image features of the target object in each historical image.
[0080] Step S404: traverse each historical image feature group according to a preset neatness detection value evaluation rule, and process a number of image features of the target object in the historical image included in each historical image feature group to obtain a neatness detection value corresponding to the target object in each historical image;
[0081] Among them, the neatness of the target object in the historical image is inversely proportional to the neatness detection value corresponding to the target object in the historical image. The preset neatness detection value evaluation rule can be a detection value evaluation rule defined by the staff or the user, that is, the user determines the neatness detection value corresponding to the neatness by checking the neatness of the target object in the historical image. For example, the neatness is divided into five levels, the higher the level, the lower the neatness, and the higher the corresponding neatness detection value.
[0082] After receiving a number of labeled images, the classification model executes steps S410 to S460:
[0083] Step S410: Obtain the image features of each target object included in each marked image to obtain a marked image feature list set A1, A2, ..., A m ,...,A n ; Where m = 1, 2, ..., n; n is the number of labeled images; A m is the set of labeled image feature lists corresponding to the mth labeled image;
[0084] A m =(A m1 ,A m2 ,...,A mi ,...,A mj(m) ), i = 1, 2, ..., j(m), j(m) is the number of target objects included in the mth labeled image, A mi is a list of labeled image features of the i-th target object included in the m-th labeled image;
[0085] A mi =(A mi1 ,A mi2 ,...,A mis ,...,A mit(mi) );s=1,2,...,t(mi);t(mi) is the number of image features of the i-th target object included in the m-th labeled image; A mis is the sth image feature of the ith target object included in the mth labeled image;
[0086] Step S420: Obtain the image features of the ith target object included in the mth marked image in each historical image to obtain a historical image feature list set B corresponding to the ith target object included in the mth marked image. mi =(B mi1 ,B mi2 ,...,B mie ,...,B mif ), where e = 1, 2, ..., f, and f is the number of historical images; B mieis a list of historical image features of the ith target object in the eth historical image included in the mth labeled image;
[0087] B mie =(B mie1 ,B mie2 ,...,B mieg ,...,B mieh(mie) ); g = 1, 2, ..., h(mie); h(mie) is the number of image features of the i-th target object in the e-th historical image included in the m-th labeled image; B mieg is the g-th image feature of the i-th target object in the e-th historical image included in the m-th labeled image;
[0088] Step S430: mi and B mie Perform feature comparison to obtain the corresponding feature matching degree C mie ;
[0089] Step S440: If C mie If the feature matching degree is greater than a preset threshold, the e-th historical image is determined as the target historical image corresponding to the i-th target object included in the m-th marked image;
[0090] Step S450, obtaining a neat detection value of the i-th target object included in the m-th marked image in each of its corresponding target history images;
[0091] Step S460: Determine the maximum neat detection value corresponding to the i-th target object included in the m-th labeled image as the initial detection value of the i-th target object included in the m-th labeled image.
[0092] In order to reduce the judgment error of allergens, the maximum neatness detection value corresponding to the target object is determined as the initial detection value.
[0093] Step S500, determining a detection weight value of each target object according to the neat frequency of each target object;
[0094] In order to further improve the accuracy of allergen determination, in addition to using the cleanliness of the target object for judgment, it is also proposed to use the cleanliness frequency of the target object for judgment. The detection weight value of the target object is determined by the cleanliness frequency of the target object. The larger the cleanliness frequency, the cleaner the target object is, the less allergen content is, and the lower the detection weight value is.
[0095] Further, step S500 includes steps S510 to S522:
[0096] Step S510, obtaining the neat frequency of each target object;
[0097] The cleaning frequency of the target object may be input by the user. For example, if the user cleans or wipes a target object every first time period, the first time period is the cleaning frequency of the target object.
[0098] Step S520: determining a detection weight value corresponding to the neat frequency of each target object from a preset first detection weight mapping table;
[0099] Among them, the first detection weight mapping table includes a mapping relationship between several neat frequencies and their corresponding detection weight values; the neat frequency is inversely proportional to the detection weight value corresponding to the neat frequency; the mapping relationship in the first detection weight mapping table can be set by the user.
[0100] Step S521: if the tidy frequency of any target object fails to be obtained, or if there is no detection weight value corresponding to the tidy frequency of the target object in the preset first detection weight mapping table, then the object category of the target object is obtained;
[0101] Since some target objects cannot be tidy (such as flowers and plants), or the user does not know the tidying frequency of a certain target object (such as the user has forgotten the tidying frequency of a certain target object), the detection weight value of the target object cannot be determined by the tidying frequency. It is necessary to determine the detection weight value according to the object category of the target object. The object category of the target object is the type of the target object (such as if the target object is flowers and plants, its object category is plants; if the target object is a sofa, its object category is furniture).
[0102] Step S522: determining a detection weight value corresponding to the object category of the target object from a preset second detection weight mapping table;
[0103] The second detection weight mapping table includes mapping relationships between several object categories and their corresponding detection weight values, and the mapping relationships in the second detection weight mapping table are set by the user.
[0104] Step S600, determining a target detection object from a plurality of target objects according to an initial detection value and a detection weight value of each target object;
[0105] The target detection object is a target object that has a high content of allergens and requires regular allergen detection.
[0106] Further, step S600 includes step S610-step S640:
[0107] Step S610, removing duplicates from a number of target objects in a number of marked images to obtain a number of detected objects;
[0108] Step S620: Obtain the initial detection value corresponding to each detection object in each marked image to obtain an initial detection value list set D = (D1, D2, ..., D a ,...,D b );a=1,2,...,b;b is the number of detected objects; D a is the list of initial detection values corresponding to the a-th detected object;
[0109] D a =(D a1 ,D a2 ,...,D am ,...,D an );D am is the initial detection value corresponding to the a-th detected object in the m-th marked image;
[0110] Step S630: MAX(D a ) is determined as the target detection value of the a-th detection object; wherein MAX() is a preset maximum value determination function;
[0111] Step S640: Determine a target detection object from a plurality of detection objects according to the target detection value and the detection weight value of each detection object.
[0112] Wherein, step S640 includes steps S641 to S644:
[0113] Step S641: Obtain the target detection value corresponding to each detected object to obtain a target detection value list E=(E1, E2, ..., E a ,...,E b );E a is the target detection value corresponding to the a-th detected object;
[0114] Step S642: Obtain the detection weight value corresponding to each detected object to obtain a detection weight value list F=(F1, F2, ..., F a ,...,F b );F a is the detection weight value corresponding to the a-th detected object;
[0115] Step S643: Determine the total detection value corresponding to each detected object according to the target detection value list E and the detection weight value list F, and obtain the total detection value list G = (G1, G2, ..., G a ,...,G b );G a is the total detection value corresponding to the a-th detected object; G a =E a ×F a ;
[0116] Step S644, traverse the total detection value list G, if G a If the value is greater than the preset detection total value threshold, the ath detected object is determined as the target detection object.
[0117] Step S700: outputting detection information of a preset allergen detection sensor corresponding to the target detection object;
[0118] Further, step S700 includes step S710-step S740:
[0119] Step S710, obtaining the object category of each target detection object;
[0120] Step S720, removing duplicates from the object categories of a plurality of target detection objects to obtain a plurality of target object categories;
[0121] Step S730, determining the preset allergen corresponding to each target object category as the target allergen;
[0122] Step S740: output detection information of the detection sensor corresponding to the target allergen.
[0123] Each object category corresponds to a number of allergens (for example, the allergens corresponding to the object category of furniture may be mites, dust, etc.), and each allergen corresponds to a detection sensor to detect the corresponding allergen content.
[0124] By calculating the allergy detection value of the target object in the target space, the detection sensor corresponding to the target allergen is determined. The user can also use the human allergen detection sensor recommendation method described in the present application to take pictures in the target space at specific intervals to detect the allergen content of the target object and adapt the detection sensor of the target allergen.
[0125] The human allergen detection sensor recommendation method of the present invention performs image recognition on a plurality of initial images corresponding to a target space to determine a target object included in each initial image, marks the target object included in each initial image to obtain a plurality of marked images, and then inputs each marked image into a classification model to obtain an initial detection value of each target object, and determines a detection weight value of each target object according to the neat frequency of each target object, and finally determines a target detection object from a plurality of target objects according to the initial detection value and the detection weight value of each target object, and outputs detection information of an allergen detection sensor corresponding to the target detection object, determines a target detection object with a higher allergen content by calculating the detection value of the target object in the target space, and outputs the detection information of the allergen detection sensor corresponding to the target detection object to a user, so that the user can perform allergen detection on the target detection object in the target space by the allergen detection sensor by himself, without the need for staff to conduct on-site detection, which reduces labor costs and provides convenience for users to detect allergens at any time.
[0126] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.
[0127] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0128] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0129] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0130] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".
[0131] The electronic device according to this embodiment of the present invention is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0132] The electronic device is presented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: the at least one processor mentioned above, the at least one storage device mentioned above, and a bus connecting different system components (including storage devices and processors).
[0133] The storage stores program codes, which can be executed by the processor, so that the processor executes the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.
[0134] The memory may include readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read only memory (ROM).
[0135] The storage may also include a program / utility having a set (at least one) of program modules, such program modules including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0136] The bus may represent one or more of several types of bus structures including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.
[0137] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface. Furthermore, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter.
[0138] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0139] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0140] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0141] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0142] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0143] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0144] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0145] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for recommending a sensor for detecting human allergens, characterized in that: The method comprises the following steps: Step S100, obtaining a number of initial images corresponding to the target space; Step S200: performing image recognition on each of the initial images to determine a target object included in each of the initial images; Step S300, marking the target object included in each of the initial images to obtain a plurality of marked images; Step S400: input each of the marked images into a preset classification model to obtain an initial detection value of the target object included in each of the marked images output by the classification model; The classification model is obtained by training a number of historical images of the target space; Step S500, determining a detection weight value of each target object according to the neat frequency of each target object; Step S600, determining a target detection object from a plurality of target objects according to an initial detection value and a detection weight value of each target object; Step S700: output detection information of the preset allergen detection sensor corresponding to the target detection object.
2. The method according to claim 1, characterized in that The classification model is obtained by the following steps: Step S401, obtaining a number of historical images corresponding to the target space; Step S402: performing image recognition on each of the historical images to determine a target object included in each of the historical images; Step S403, according to the image features of each target object in the plurality of historical images, feature grouping the plurality of target objects to obtain a historical image feature group corresponding to each target object; Each of the historical image feature groups includes the corresponding image features of the target object in each of the historical images; Step S404, according to the preset neatness detection value evaluation rules, traverse each of the historical image feature groups, and process a number of image features of the target object in the historical image included in each of the historical image feature groups to obtain a neatness detection value corresponding to the target object in each of the historical images; wherein the neatness of the target object in the historical image is inversely proportional to the neatness detection value corresponding to the target object in the historical image.
3. The method according to claim 2, characterized in that After receiving the plurality of labeled images, the classification model is used to perform the following steps: Step S410: Obtain image features of each target object included in each of the labeled images to obtain a list of labeled image features A1, A2, ..., A m ,...,A n ; Wherein, m=1, 2, ..., n; n is the number of the labeled images; A m is a list set of marked image features corresponding to the mth marked image; A m =(A m1 ,A m2 ,...,A mi ,...,A mj(m) ), i = 1, 2, ..., j(m), j(m) is the number of target objects included in the mth labeled image; A mi is a list of marked image features of the i-th target object included in the m-th marked image; A mi =(A mi1 ,A mi2 ,...,A mis ,...,A mit(mi) ), s = 1, 2, ..., t(mi), t(mi) is the number of image features of the i-th target object included in the m-th labeled image, A mis is the sth image feature of the ith target object included in the mth labeled image; Step S420: Obtain image features of the ith target object included in the mth tagged image in each of the historical images, so as to obtain a historical image feature list set B corresponding to the ith target object included in the mth tagged image. mi =(B mi1 ,B mi2 ,...,B mie ,...,B mif ); wherein, e=1,2,...,f; f is the number of the historical images; B mie A historical image feature list of the i-th target object included in the m-th marked image in the e-th historical image; B mie =(B mie1 ,B mie2 ,...,B mieg ,...,B mieh(mie) ); g = 1, 2, ..., h(mie); h(mie) is the number of image features of the i-th target object in the e-th historical image included in the m-th labeled image; B mieg is the g-th image feature of the i-th target object included in the m-th marked image in the e-th historical image; Step S430: mi and B mie Perform feature comparison to obtain the corresponding feature matching degree C mie ; Step S440: If C mie If the feature matching degree is greater than a preset threshold, the e-th historical image is determined as the target historical image corresponding to the i-th target object included in the m-th marked image; Step S450, obtaining a neat detection value of the i-th target object included in the m-th marked image in each of its corresponding target history images; Step S460: Determine the maximum neat detection value corresponding to the i-th target object included in the m-th labeled image as the initial detection value of the i-th target object included in the m-th labeled image.
4. The method according to claim 3, characterized in that: The step S500 includes: Step S510, obtaining the neatness frequency of each target object; Step S520: determine the detection weight value corresponding to the neat frequency of each target object from a preset first detection weight mapping table; wherein the first detection weight mapping table includes a mapping relationship between a plurality of neat frequencies and their corresponding detection weight values; the neat frequency is inversely proportional to the detection weight value corresponding to the neat frequency.
5. The method according to claim 4, characterized in that The step S520 further includes: Step S521: if the tidy frequency of any target object fails to be obtained, or if there is no detection weight value corresponding to the tidy frequency of the target object in the preset first detection weight mapping table, then the object category of the target object is obtained; Step S522: determine the detection weight value corresponding to the object category of the target object from a preset second detection weight mapping table; wherein the second detection weight mapping table includes a mapping relationship between several object categories and their corresponding detection weight values.
6. The method according to claim 5, characterized in that The step S600 includes: Step S610, removing duplicates from a plurality of target objects in a plurality of the marked images to obtain a plurality of detected objects; Step S620: Obtain the initial detection value corresponding to each of the detected objects in each of the marked images to obtain an initial detection value list set D = (D1, D2, ..., D a ,...,D b );a=1,2,...,b;b is the number of the detected objects;D a is a list of initial detection values corresponding to the a-th detected object; D a =(D a1 ,D a2 ,...,D am ,...,D an );D am is the initial detection value corresponding to the a-th detected object in the m-th marked image; Step S630: MAX(D a ) is determined as the target detection value of the a-th detected object; wherein MAX() is a preset maximum value determination function; Step S640: Determine a target detection object from the plurality of detection objects according to the target detection value and the detection weight value of each detection object.
7. The method according to claim 6, characterized in that The step S640 includes: Step S641: Obtain the target detection value corresponding to each of the detected objects to obtain a target detection value list E=(E1, E2, ..., E a ,...,E b );E a is the target detection value corresponding to the a-th detected object; Step S642: Obtain the detection weight value corresponding to each of the detection objects to obtain a detection weight value list F=(F1, F2, ..., F a ,...,F b );F a is the detection weight value corresponding to the a-th detected object; Step S643: Determine the total detection value corresponding to each detected object according to the target detection value list E and the detection weight value list F, and obtain the total detection value list G = (G1, G2, ..., G a ,...,G b );G a is the total detection value corresponding to the a-th detected object; G a =E a ×F a ; Step S644, traverse the total detection value list G, if G a If the value of the a-th detected object is greater than a preset detection total value threshold, the a-th detected object is determined as a target detected object.
8. The method according to claim 7, characterized in that The step S700 includes: Step S710, obtaining the object category of each target detection object; Step S720, removing duplicate object categories of the target detection objects to obtain a plurality of target object categories; Step S730, determining the preset allergen corresponding to each target object category as a target allergen; Step S740: output detection information of the detection sensor corresponding to the target allergen.
9. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the method as claimed in any one of claims 1 to 8.
10. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.
Citation Information
Patent Citations
Device for acquiring allergic information, server for processing allergic information, system for acquiring and processing allergic information, method for acquiring allergic information and method for processing allergic information
CN106845148A
Image processing method for environment cleanliness detection
CN107341790A
Prompting method for allergens and mobile terminal
CN107677636A
Cleanness detection method and device, computer equipment and storage medium
CN110688945A
Method and system for preventing skin allergy
CN112998657A