Method and apparatus for detecting open / closed state of enclosed space, and refrigerator
A machine learning model using gas concentration data accurately detects the open/closed state of enclosed spaces, addressing inaccuracies in existing methods and ensuring timely responses.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- BSH HAUSGERATE GMBH
- Filing Date
- 2025-10-23
- Publication Date
- 2026-05-21
Smart Images

Figure EP2025080681_21052026_PF_FP_ABST
Abstract
Description
[0001] METHOD AND APPARATUS FOR DETECTING OPEN / CLOSED STATE OF ENCLOSED SPACE, AND REFRIGERATOR TECHNICAL FIELD
[0002] The present invention relates to the field of intelligent detection technologies, and more specifically, to a method and an apparatus for detecting an open / closed state of an enclosed space, and a refrigerator.
[0003] BACKGROUND
[0004] As a commonly used food storage appliance, a refrigerator is accessed for taking and placing food inside during daily use. However, when closing the door, users often push the door casually, or forget to close the door after taking out items, leading to a breach in a sealed state of the refrigerator. This results in air circulation between the refrigerator and the external air, causing loss of cooling capacity impairment of the food storage environment, and substantial waste of electricity.
[0005] In addition, other enclosed spaces, such as a chemical reagent storage device, a wardrobe, a warehouse, a storage room, and a chemical workshop, in which a gas is generated and an internal gas concentration changes due to an open / closed state, also require an open / closed state detection technology.
[0006] SUMMARY
[0007] Embodiments of the present invention provide a method and an apparatus for detecting an open / closed state of an enclosed space, and a refrigerator.
[0008] According to a first aspect of the present invention, a method for detecting an open / closed state of an enclosed space is provided. The method includes: obtaining gas concentration information sensed by a gas sensor in the enclosed space, where the gas concentration information includes electrical parameter values representing concentrations of a plurality of gases within the enclosed space. The method further includes: detecting the open / closed state of the enclosed space by a machine learning model based on the gas concentration information.
[0009] According to a second aspect of the present invention, an apparatus for detecting an open / closed state of an enclosed space is provided. The apparatus includes a gas concentration information obtaining module, configured to obtain gas concentration information sensed by a gas sensor in the enclosed space, where the gas concentration information includes electrical parameter values representing concentrations of a plurality of gases within the enclosed space. The apparatus further includes an open / closed state detection module, configured to detect the open / closed state of the enclosed space by a machine learning model based on the gas concentration information.
[0010] According to a third aspect of the present invention, an apparatus including an enclosed space is provided. The apparatus includes a gas sensor located in the enclosed space; a processor; and a memory, coupled to the processor and having instructions stored thereon, the instructions, when executed by the processor, causing the method according to the first aspect of the present invention to be performed.
[0011] According to a fourth aspect of the present invention, a computer program product is provided, including a computer program, the computer program being executed by a processor to implement the method according to the first aspect.
[0012] According to a fifth aspect of the present invention, a machine-readable storage medium is provided. The machine-readable storage medium stores machine-executable instructions, where the machine-executable instructions are executed by a processor to implement the method according to the first aspect of the present invention.
[0013] It should be understood that, the content described in the summary of the invention is not intended to define the key or important features of the embodiments of the present invention, and is not intended to limit the scope of the present invention. Other features of the present invention are easily understood through the following descriptions.
[0014] BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The foregoing and other features, advantages, and aspects of embodiments of the present invention will become more apparent with reference to the following detailed descriptions and the accompanying drawings. In the accompanying drawings, same or similar reference numerals represent same or similar elements.
[0016] FIG. l is a schematic diagram of an example environment in which some embodiments of the present invention may be implemented;
[0017] FIG. 2 is a flowchart of a method for detecting an open / closed state of an enclosed space according to some embodiments of the present invention; FIG. 3A is a schematic diagram of relationship curves between concentrations of a plurality of gases and time when an enclosed space is in a sealed state;
[0018] FIG. 3B is a schematic diagram of relationship curves between concentrations of a plurality of gases and time when an enclosed space is in an unsealed state;
[0019] FIG. 4 is a schematic diagram of an example process of generating an open / closed state by using a machine learning model according to some embodiments of the present invention;
[0020] FIG. 5 is a schematic diagram of an example process of generating an open / closed state by using a machine learning model in a training phase according to some embodiments of the present invention;
[0021] FIG. 6Ais a schematic diagram of some example processes of processing data sensed by a gas sensor to obtain gas concentration information according to some embodiments of the present invention;
[0022] FIG. 6B is a schematic diagram of some implementations of processing data sensed by a gas sensor to obtain gas concentration information according to some embodiments of the present invention;
[0023] FIG. 6C is a schematic diagram of some other implementations of processing data sensed by a gas sensor to obtain gas concentration information according to some embodiments of the present invention;
[0024] FIG. 6D is a schematic diagram of some other implementations of processing data sensed by a gas sensor to obtain gas concentration information according to some embodiments of the present invention;
[0025] FIG. 7A is a schematic diagram of another exemplary process of processing data sensed by a gas sensor to obtain gas concentration information according to some embodiments of the present invention;
[0026] FIG. 7B is a schematic diagram of some implementations of processing data sensed by a gas sensor to obtain gas concentration information according to some embodiments of the present invention;
[0027] FIG. 8 A is a schematic diagram of some other example processes of processing data sensed by a gas sensor to obtain gas concentration information according to some embodiments of the present invention;
[0028] FIG. 8B is a schematic diagram of some implementations of processing data sensed by a gas sensor to obtain gas concentration information according to some embodiments of the present invention;
[0029] FIG. 9 is a schematic diagram of an example process of generating three open / closed states by using a machine learning model according to some embodiments of the present invention;
[0030] FIG. 10 is a block diagram of an apparatus for detecting an open / closed state of an enclosed space according to some embodiments of the present invention; and
[0031] FIG. 11 is a block diagram of an electronic device that can implement a plurality of embodiments of the present invention.
[0032] DETAILED DESCRIPTION
[0033] The following describes embodiments of the present invention in more detail with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the accompanying drawings, it should be understood that, the present invention may be implemented in various forms, and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided for a more thorough and complete understanding of the present invention. It should be understood that, the accompanying drawings and the embodiments of the present invention are merely used for exemplary purposes, and are not intended to limit the protection scope of the present invention.
[0034] In the descriptions of the embodiments of the present invention, the term "include" and similar expressions used should be understood as open-ended, that is, "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "an embodiment" or "this embodiment" should be understood as "at least one embodiment". The terms "first", "second", and the like may refer to different objects or the same object. The following may further include other explicit and implicit definitions.
[0035] As described above, open / closed state detection of an enclosed space has a significant impact on storage of food or items within the enclosed space. In the related art, the open / closed state of the enclosed space may be detected by using a temperature or atmospheric pressure change. Because temperature or atmospheric pressure is susceptible to external conditions, for example, weather changes may cause an atmospheric pressure change, and human walking may result in the temperature or atmospheric pressure change, causing incorrect detection readings of a temperature or atmospheric pressure sensor. In addition, a temperature and atmospheric pressure detection method requires time to accumulate changes before the open / closed state of the enclosed space can be accurately detected. This may result in a delay in detection and response.
[0036] In other related art, the open / closed state of the enclosed space may be detected by using a gas concentration value. Generally, it is determined that the enclosed space is in a closed state by determining that the gas concentration value falls within a threshold range, and it is determined that the enclosed space is in an open state by determining that the gas concentration exceeds the threshold range. However, gas concentration changes within the enclosed space are a complex process, in which a threshold cannot be used to determine concentrations of a plurality of gases or determine a concentration in a state during the change process.
[0037] Therefore, the embodiments of the present invention provide a method for detecting an open / closed state of an enclosed space. In the embodiments of the present invention, a machine learning model may be trained by using electrical parameter values representing gas concentration in a usage dataset of the enclosed space, together with the corresponding open / closed state. Then, a trained machine learning model is used to generate the open / closed state of the enclosed space based on the electrical parameter values representing gas concentration that are sensed by a gas sensor within the enclosed space.
[0038] In this manner, the machine learning model can learn, from the usage dataset, the open / closed state corresponding to complex gas concentration changes in various usage scenarios, thereby enabling the machine learning model to adapt over time to changes in refrigerator usage modes and environments. The machine learning model can be used to promptly respond to data sensed by the gas sensor, and extract features from the sensed data to distinguish between normal fluctuations in gas concentration and fluctuations specifically caused by door opening, thereby enabling rapid and more accurate detection of the open / closed state.
[0039] FIG. l is a schematic diagram of an example environment 100 in which some embodiments of the present invention may be implemented. As shown in FIG. 1, the environment 100 includes an enclosed space 102, where the "enclosed space 102" refers to an enclosed space that can be in a sealed state, and the sealed state is adjustable or changeable, for example, by adjusting an open / closed state of a device providing the enclosed space 102. The enclosed space 102 may be an internal space of a device in which a gas is generated and an internal gas concentration changes due to the open / closed state. For example, the enclosed space 102 may be provided by a refrigerator, a medicine storage cabinet, a wardrobe, a chemical reagent storage device, a warehouse, a storage room, a chemical workshop, and the like. As shown in FIG. 1, the enclosed space 102 of the environment 100 includes food or an item 104, and the food or the item 104 may generate a volatile gas. The food or the object may be one or more. For example, various types of food, including vegetables, fruits, meat, and seafood, are usually placed in the refrigerator. For example, one or more types of medicines (such as probiotics) are stored in the medicine storage cabinet. For example, clothes made of a plurality of materials are placed in the wardrobe. For example, one type of chemical reagent or a plurality of chemical reagents that can be allowed to be stored together are placed in the chemical reagent storage device. For example, an item such as an oil tank or a gas cylinder is placed in the warehouse or the storage room. For example, one or more chemical items are placed in the chemical workshop.
[0040] As shown in FIG. 1, the environment 100 further includes a gas sensor 106 disposed within the enclosed space 102, and the gas sensor 106 is configured to sense gas concentration changes within the enclosed space 102.
[0041] As shown in FIG. 1, the environment 100 further includes a controller 108. The controller 108 is in communication connection with the gas sensor 106, and is configured to: receive and process data sensed by the gas sensor 106, to obtain gas concentration information, and detect an open / closed state of the enclosed space 102 based on the gas concentration information. The controller 108 may be disposed on the side of the enclosed space, for example, mounted in the enclosed space, or integrated into an apparatus that provides the enclosed space. The controller 108 may alternatively be disposed at a remote position, for example, at a remote management terminal. Correspondingly, communication between the gas sensor and the controller may be configured with different communication manners, such as wired communication or wireless communication, based on positions at which components are disposed.
[0042] As shown in FIG. 1, the environment 100 further includes a terminal device 110 disposed outside the enclosed space 102, such as a mobile phone, a tablet computer, or a desktop computer. When detecting that the enclosed space 102 is in a closed state, the controller 108 waits for the next detection data for open / closed state detection. When detecting that the enclosed space 102 is in an open state, the controller 108 needs to send an alarm message or a notification to the terminal device 110, to alert a user or a management party. For example, when detecting that the refrigerator door has been open for a period of time, the controller sends a reminder to the terminal device of the user by way of SMS or email. The user promptly closes the refrigerator door after receiving the message. This enables timely prevention of energy waste and also ensures the preservation of food freshness. For example, when detecting that the warehouse has been in the open state for a period of time, the controller sends a reminder to the management party by way of SMS or email. The management party promptly closes the warehouse after receiving the message and, if necessary, further needs to take relevant emergency measures to prevent accidents such as explosions. This enables timely avoidance of potential hazards. As shown in FIG. 1, in the environment 100, an alarm device 112 may further be disposed within the enclosed space, and is configured to generate an alarm on the side of the enclosed space when the controller detects that the enclosed space is in the open state. The alarm device 112 may be a sound alarm, an audio-visual alarm, a light-emitting alarm, or the like.
[0043] As shown in FIG. 1, a ventilation apparatus 114 is further disposed within the enclosed space 102 in the environment 100. In some scenarios, the ventilation apparatus 114 is configured to periodically adjust a gas circulation state within the enclosed space. The ventilation apparatus 114 may be a ventilation system including a fan. For example, in the refrigerator, the fan is required to adjust air within a storage compartment of the refrigerator, to ensure the freshness of the food. For example, in the warehouse, the ventilation system is required to adjust air within the warehouse, to prevent excessive accumulation of gases emitted by items, thereby avoiding overly high gas concentration that may cause personnel poisoning or explosions.
[0044] Under the action of the ventilation apparatus, the gas concentration within the enclosed space is also affected. Therefore, when the embodiments of the present invention are applied in a scenario including the ventilation apparatus, factors that cause gas concentration changes within the enclosed space by the ventilation apparatus further need to be considered. The foregoing factors further need to be considered during subsequent learning by using the machine learning model.
[0045] In this manner, gas concentration data in various usage situations covering the scenario may be collected as much as possible. The machine learning model may learn an open / closed state corresponding to complex gas concentration changes in various usage scenarios based on gas concentration data that truly reflects the gas concentration changes within the enclosed space and the open / closed state during use. An open / closed state detection technology for the enclosed space is more robust and reliable through machine learning. In an inference phase, a trained machine learning model can be used to accurately determine open / closed states corresponding to different gas concentration changes.
[0046] It should be understood that, the exemplary purpose is merely used to describe the architecture and functions of the exemplary environment 100, and does not imply any limitation on the scope of the present invention. The embodiments of the present invention may further be applied to other environments with different structures and / or functions.
[0047] FIG. 2 is a flowchart of a method 200 for detecting an open / closed state of an enclosed space according to some embodiments of the present invention. The method 200 may be performed, for example, by the controller 108 in the environment 100 shown in FIG. 1. As shown in FIG. 2, at block 202, the method 200 may obtain gas concentration information sensed by a gas sensor in the enclosed space, where the gas concentration information includes electrical parameter values representing concentrations of a plurality of gases within the enclosed space. In some embodiments, the gas sensor may be a volatile organic compound (VOC) sensor, which is configured to detect a volatile organic compound. When entering the sensor, VOC molecules may chemically react or adsorb with an adsorptive material at a reaction temperature, causing changes in electrical parameters (such as resistance, current, impedance, and voltage) of the sensor. The changes are directly proportional to a VOC concentration. The VOC concentration in the air may be determined by measuring the changes in the electrical parameters. The reaction temperature is a built-in temperature of the gas sensor, and is configured based on sensitivity of different reaction gases to temperature. For example, a higher temperature is required for hydrogen to react. For another example, a lower temperature is required for ammonia to react. When the gas sensor senses the gas concentration information, reaction is performed at the configured temperature. When the gas sensor is configured with a plurality of reaction temperatures, reaction is performed sequentially at different reaction temperatures. The gas sensor may be provided with a built-in temperature control module, which controls the reaction temperature of the gas sensor to change according to a preset rule, to sense different gases.
[0048] Alternatively, some gas sensors may output an electrical signal, and may further obtain, after analog-to-digital processing by using an analog-to-digital conversion circuit, the electrical parameter values representing the concentrations of the plurality of gases within the enclosed space, such as a resistance value, a current value, an impedance value, and a voltage value. Some gas sensors are integrated with an analog-to-digital conversion circuit, and may output the electrical parameter values representing the concentrations of the plurality of gases within the enclosed space.
[0049] In the environment 100 shown in FIG. 1, the controller 108 obtains the data sensed by the gas sensor 106, and obtains the gas concentration information through data processing, where the gas concentration information includes the electrical parameter values representing the concentrations of the plurality of gases within the enclosed space 102.
[0050] At block 204, the method 200 may detect the open / closed state of the enclosed space by a machine learning model based on the gas concentration information. For example, the machine learning model may be a trained deep learning model, a neural network, a support vector machine, or the like. The machine learning model may learn the corresponding open / closed state of the enclosed space under different gas concentration changes, including a sealed state or an unsealed state. After training, the machine learning model may be used to promptly and accurately detect the open / closed state of the enclosed space based on the gas concentration information sensed by the gas sensor. Further, an alarm can be issued for the unsealed state, so that the enclosed space is promptly adjusted from the unsealed state to the closed state.
[0051] In this manner, the controller 108 performs open / closed state detection by using the machine learning model, making resulting in robust and reliable detection results. The controller 108 may determine the open / closed state by using the machine learning model based on the gas concentration information sensed by the gas sensor. In this way, the open / closed state of the enclosed space can be accurately identified from complex gas concentration changes, thereby avoiding mis-identification and even false alarming.
[0052] FIG. 3A is a schematic diagram of \relationship curves between concentrations of a plurality of gases in an enclosed space and time when the enclosed space is in a sealed state. In the figure, the horizontal axis is time, and the vertical axis is an electrical parameter value representing a gas concentration, such as any one of a resistance value, a reactance value, a voltage value, or a current value. A curve 302 represents a concentration change curve of the enclosed space in the sealed state. The curve 302 presents a stable change trend in continuous time.
[0053] FIG. 3B is a schematic diagram of relationship curves between concentrations of a plurality of gases in an enclosed space and time when the enclosed space is in an unsealed state. In the figure, the horizontal axis is time, and the vertical axis is an electrical parameter value representing a gas concentration, such as any one of a resistance value, a reactance value, a voltage value, or a current value. A curve 304 represents a concentration change curve of the enclosed space in the unsealed state. Due to an opening / closing operation, the enclosed space is switched from the sealed state to an unsealed state for a period of time. Because external air enters the enclosed space, leading to gas concentration changes within the enclosed space, the originally stable change of gas concentration in the closed state is broken, which is represented in a rule shown by the curve 304. The unsealed state described herein may include an unclosed state or a partially closed state. The unclosed state refers to the enclosed space being in an open state under an opening operation. The not completely closed state refers to a state in which the enclosed space cannot be effectively closed under a closing operation.
[0054] FIG. 4 is a schematic diagram of an example process 400 of generating an open / closed state by using a machine learning model according to some embodiments of the present invention. In the process 400, gas concentration information 402 is inputted into a trained machine learning model 404, and the machine learning model 404 may generate an open / closed state 406 of an enclosed space.
[0055] The machine learning model 404 is deployed on the controller 108 in the environment 100 shown in FIG. 1.
[0056] After receiving data sensed by the gas sensor and performing data processing to obtain the gas concentration information 402, the controller 108 may generate the related open / closed state 406 based on the gas concentration information 402. For example, when the gas concentration information 402 presents a change trend of the curve 302 in FIG. 3A, the open / closed state 406 generated by the machine learning model based on the gas concentration information 402 is a closed state. For example, when the gas concentration information 402 presents a change trend of the curve 304 in FIG. 3B, the open / closed state 406 generated by the machine learning model based on the gas concentration information 402 is an opening / closing operation state or an open state.
[0057] In a training phase, the machine learning model 404 needs to be trained based on a training set including the gas concentration information and the open / closed state corresponding to the gas concentration information. The machine learning model 404 generates a predicted open / closed state based on the gas concentration information in the training set. Loss training is performed on the predicted open / closed state and the open / closed state in the training set.
[0058] FIG. 5 is a schematic diagram of an example process 500 of generating an open / closed state by using a machine learning model in a training phase according to some embodiments of the present invention. As shown in FIG. 5, a usage dataset 502 of an enclosed space may include data sensed by gas sensors of similar enclosed spaces in different usage situations. In some examples, the gas sensor senses gas concentration data in a refrigerator, and the usage dataset 502 of the enclosed space may include the data sensed by the gas sensor of the refrigerator in different usage situations. The foregoing data is collected from usage situations of different types of refrigerators (such as a single-door refrigerator and a double-door refrigerator) by using different types of gas sensors (that is, sensors for detecting different types of gases). In the collection process, different foods are placed in each refrigerator, and food storage in the refrigerator also changes in different phases due to user habits. In addition, an environmental temperature and humidity in the refrigerator may vary based on different environmental settings, food types, and user habits of the refrigerator, and the data sensed by the gas sensor is collected based on various environmental temperatures and humidity. During the collection process, different users perform an opening / closing operation on the refrigerator based on different use frequencies and different speeds of opening / closing the refrigerator door. The opening / closing operation includes an opening operation (in this case, the refrigerator is in an unsealed state) and a closing operation. When the closing operation is performed, the refrigerator may be effectively closed (in this case, the refrigerator is in a sealed state), or the refrigerator may fail to effectively close (in this case, the refrigerator is in the unsealed state).
[0059] In other examples, the gas sensor senses gas concentration data in a warehouse, and the usage dataset 502 of the enclosed space may include the data sensed by the gas sensor of the warehouse in different usage situations. Collection of the foregoing data covers various usage situations in a warehouse scenario as much as possible.
[0060] Based on different usage scenarios, for an enclosed space in the same usage scenario, the data sensed by the gas sensor in various usage situations covering the scenario is collected as much as possible. In this way, the machine learning model can learn, for different usage scenarios, gas concentration changes within the enclosed space under the impact of a plurality of variable factors and the corresponding open / closed state.
[0061] In the process 500, a machine learning model 510 determines a training dataset 512 from the usage dataset 502 of the enclosed space, where the training dataset 512 includes sample gas concentration information 512-1 and a corresponding sample open / closed state 512-2. Optionally, data for a detection period may be obtained from the usage dataset 502 and determined as the training dataset 512. The detection period may be determined based on that the gas concentration changes within the enclosed space can be accurately reflected, and may be one sampling period of the gas sensor, or may be a plurality of sampling periods of the gas sensor. The sampling period of the gas sensor is a period in which the gas sensor detects that the gas of the enclosed space enters the sensor and reacts chemically. At different times within the period, the gas sensor may detect changes in electrical parameter values representing the gas concentration within the enclosed space.
[0062] In some implementations, during use of the enclosed space, the sample gas concentration information 512-1 and the corresponding sample open / closed state 512-2 that are sensed by the gas sensor at different environmental temperatures and humidities within the enclosed space are obtained. The sample gas concentration information 512-1 and the corresponding sample open / closed state 512-2 during use of the enclosed space are determined as the usage dataset 502 of the enclosed space. The training dataset 512 is determined from the usage dataset 502 based on the detection period.
[0063] In some other implementations, when a ventilation apparatus is used in an application scenario, for example, a fan is disposed within the refrigerator, data in the usage dataset 502 includes the sample gas concentration information 512-1 and the corresponding sample open / closed state 512-2 that are sensed by the gas sensor at different environmental temperatures and humidities within the enclosed space when the fan stops operating, and the sample gas concentration information 512-1 and the corresponding sample open / closed state 512-2 that are sensed by the gas sensor at different environmental temperatures and humidities within the enclosed space when the fan is operating. By collecting gas concentration change data within the enclosed space under operating and non-operating situations of the fan, an impact factor of the fan on the gas concentration may be considered, so that a machine learning model better conforming to an actual application scenario can be obtained through training.
[0064] As shown in FIG. 5, a generator 514 of the machine learning model 510 performs training based on the sample gas concentration information 512-1 and the sample open / closed state 512-2. The generator 514 may generate a predicted open / closed state 516 based on the sample gas concentration information 512-1. Agenerator loss 518 is used to perform loss determining on the predicted open / closed state 516 and the sample open / closed state 512 corresponding to the sample gas concentration information 512-1. The loss determining may be performed by using a distance loss function. The generator loss 518 may be a relatively large value, and then the generator loss 518 may be back-propagated to the generator 514 to guide optimization of parameters of the generator 514. Such a training process may be iteratively performed until the generator 514 can generate a more accurately predicted open / closed state 516. After the training process ends, the machine learning model 510 may output an open / closed state 520 of the enclosed space.
[0065] Through training, the machine learning model may learn an open / closed state corresponding to different concentration changes under situations close to real-world usage. A machine learning model conforming to usage situation of each scenario may be trained based on different types of enclosed spaces. In this way, the open / closed state of the enclosed space can be accurately detected by using the machine learning model. Further, based on characteristics of the scenario, an alarm may be issued when the enclosed space is in the unsealed state, enabling timely handling of the situation.
[0066] FIG. 6Ais a schematic diagram of an example process 600Aof processing data sensed by a gas sensor to obtain gas concentration information according to some embodiments of the present invention. In the process 600A, a gas sensor 602 sends sensed data 604 representing a gas concentration to a data processing module 606 of a controller. The data processing module 606 of the controller processes the data representing the gas concentration, and outputs gas concentration information 608, which is sent to a machine learning model.
[0067] In some examples, data collected by the gas sensor is inputted into the controller in a form of an electrical signal. Before the data enters the controller for processing, an existing analog-to-digital conversion circuit may be provided to convert the electrical signal into an electrical parameter value. In some other examples, the data collected by the gas sensor is inputted into the controller in the form of the electrical signal. After the data enters the controller, the electrical signal is converted into the electrical parameter value by an analog-to-digital conversion circuit in the data processing module 606 of the controller, and then subsequent processing is performed. In some other examples, the data collected by the gas sensor is inputted as the electrical parameter value into the controller.
[0068] FIG. 6B is a schematic diagram of some implementations of processing data sensed by a gas sensor to obtain gas concentration information according to some embodiments of the present invention. In the process 600B, an example in which the gas sensor outputs an electrical parameter value to the controller is used for description. When one gas sensor is disposed within an enclosed space, upon collecting an electrical parameter value 620 at a moment, the gas sensor sends the electrical parameter value 620 at this moment to the data processing module 606 of the controller. In the figure, ti is collection time of an electrical parameter value ci, where i is a natural number. A receiving unit 622 in the data processing module 606 receives the electrical parameter value 620 sent by the gas sensor at different moments. The receiving unit 622 may receive a set of electrical parameter values 624 sensed by the gas sensor at different moments. Then, the receiving unit 622 sends the received set of electrical parameter values 624 to a first processing unit 626. The first processing unit 626 cleans the data, and obtains a set of electrical parameter values 628 within a detection period from the data. Cleaning the data includes performing denoising, normalization, and the like on the data. In some examples, when the detection period is 11 1, electrical parameter values at consecutive 11 t (that is, a set of electrical parameter values 628 within the detection period in the figure) are obtained from n sets of electrical parameter values 624. Then, the first processing unit 626 sends the set of electrical parameter values 628 within the detection period to a second processing unit 630, and the second processing unit converts, based on a time sequence, the set of electrical parameter values sensed at different moments (that is, the set of electrical parameter values 628 within the detection period in the figure) into a matrix 632 representing the gas concentration information. The detection period includes a sampling period. Within the sampling period, a reaction temperature of the gas sensor performs reaction based on a preset temperature, and a built-in temperature control module of the gas sensor may control the gas sensor to maintain the same reaction temperature at the plurality of moments t.
[0069] In some implementations, the detection period may further include an incomplete sampling period, or include a plurality of incomplete sampling periods, or include a plurality of complete sampling periods. The detection period may be set based on a detection requirement.
[0070] Optionally, each row in the matrix 632 represents an electrical parameter value at a moment. The electrical parameter values at a plurality of moments are arranged into a plurality of rows in the matrix 632 based on a time sequence, forming the matrix 632 representing the gas concentration information shown in FIG. 6B. Such an implementation is merely shown in an exemplary form in the figure.
[0071] In another example, as described above with reference to 628, one detection period has a plurality of data collection moments. The electrical parameter values at the plurality of moments may be arranged into a one-dimensional vector based on a time sequence.
[0072] The gas concentration information obtained based on the process 600B may be inputted into the trained machine learning model 510 in FIG. 5 to generate the open / closed state of the enclosed space. Correspondingly, during training based on the training set, the sample gas concentration information 512-1 inputted into the machine learning model may also be processed based on the process shown in FIG. 6B to obtain the gas concentration information.
[0073] In the foregoing manner, the machine learning model can learn an open / closed state of the enclosed space corresponding to time-varying gas concentrations within the enclosed space at a reaction temperature. In an inference phase, the gas concentration information in a form of a matrix is inputted into the machine learning model, to generate the open / closed state. The open / closed state is determined based on the impact of a time change on a gas concentration change. The machine learning model can detect the open / closed state of the enclosed space from a reaction time dimension, and the determined open / closed state better conforms to an open / closed state corresponding to different reaction effects generated in an actual chemical reaction over time (referring to gas concentrations generated at different reaction extents).
[0074] FIG. 6C is a schematic diagram of some other implementations of processing data sensed by a gas sensor to obtain gas concentration information according to some embodiments of the present invention. In the process 600C, an example in which the gas sensor outputs an electrical parameter value to the controller is used for description. When one gas sensor is disposed within an enclosed space, upon collecting an electrical parameter value 640 at a moment, the gas sensor sends the electrical parameter value 640 at this moment to the data processing module 606 of the controller. In the figure, ti is collection time of an electrical parameter value ci at a reaction temperature Ti, where i is a natural number. A receiving unit 642 in the data processing module 606 receives the electrical parameter value 640 sent by the gas sensor at different moments and different reaction temperatures. The receiving unit 642 may receive a set of electrical parameter values 644 sensed by the gas sensor at different moments and different reaction temperatures. Then, the receiving unit 642 sends the received set of electrical parameter values 644 to a first processing unit 646. The first processing unit 646 cleans the data, and obtains a set of electrical parameter values 648 within a detection period from the data. Cleaning the data includes performing denoising, normalization, and the like on the data. In some examples, when the detection period is 11 1, electrical parameter values at consecutive li t (that is, a set of electrical parameter values 648 within the detection period in the figure) are obtained from n sets of electrical parameter values 644. Then, the first processing unit 646 sends the set of electrical parameter values 648 within the detection period to a second processing unit 650, and the second processing unit 650 converts, based on a time sequence, the set of electrical parameter values sensed at different moments and different temperatures (that is, the set of electrical parameter values 648 within the detection period in the figure) into a matrix 652 representing the gas concentration information. The detection period includes a sampling period. Within the sampling period, the reaction temperature of the gas sensor changes according to a preset rule, for example, rising from a first reaction temperature to a second reaction temperature based on a preset temperature interval, and then falling from the second reaction temperature to the first reaction temperature based on the preset temperature interval, forming one cycle of the reaction temperature change. It is considered that at the same reaction temperature, different times have different effects on a chemical reaction. For the same reaction temperature, data of the gas sensor at a plurality of successive moments t may be collected, and a built-in temperature control module of the gas sensor may control the gas sensor to maintain the gas sensor at the same reaction temperature at the plurality of moments t.
[0075] In some implementations, the detection period may further include an incomplete sampling period, or include a plurality of incomplete sampling periods, or include a plurality of complete sampling periods. The detection period may be set based on a detection requirement.
[0076] Optionally, each row in the matrix 652 represents electrical parameter values at a moment and different reaction temperatures. The electrical parameter values at a plurality of moments and different reaction temperatures are arranged into a plurality of rows in the matrix 652 based on a time sequence, forming the matrix 652 representing the gas concentration information shown in FIG. 6C. Such an implementation is merely shown in an exemplary form in the figure. In addition, it is further considered that at the same reaction temperature, different times have different effects on a chemical reaction. The matrix 652 representing the gas concentration information may further include electrical parameter values at different moments and the same reaction temperature, that is, different rows in the matrix 652 may correspond to the same reaction temperature. For example, when the gas sensor is maintained at the same reaction temperature (T8=T9=T10), a plurality of electrical parameter values c8, c9, and clO are collected at a plurality of moments t8, t9, and tlO.
[0077] In another example, as described above with reference to 648, one detection period has a plurality of moments for collecting the data, and the electrical parameter values at the plurality of moments may be arranged into a one-dimensional vector based on a time sequence.
[0078] The gas concentration information obtained based on the process 600C may be inputted into the trained machine learning model 510 in FIG. 5 to generate the open / closed state of the enclosed space. Correspondingly, during training based on the training set, the sample gas concentration information 512-1 inputted into the machine learning model may also be processed based on the process shown in FIG. 6C to obtain the gas concentration information.
[0079] In the foregoing manner, the machine learning model can learn an open / closed state of the enclosed space corresponding to time-varying gas concentrations within the enclosed space at different reaction temperatures. In an inference phase, the gas concentration information in a form of a matrix is inputted into the machine learning model, to quickly generate an accurate open / closed state. The machine learning model can detect the open / closed state of the enclosed space from two dimensions, namely, a reaction time dimension and a reaction temperature dimension, and the determined open / closed state better conforms to an open / closed state corresponding to different reaction effects generated in an actual chemical reaction with changes in the reaction temperature and over time (referring to gas concentrations generated at different reaction extents).
[0080] There are often a plurality of gases within the enclosed space, and different gases have different reaction sensitivities at different reaction temperatures. Some gases, such as hydrogen and methane, are sensitive at high temperatures, while some gases, such as ammonia, are sensitive at low temperatures. Therefore, data at a plurality of temperatures is collected, and data at the same temperature and different times is collected, so that the gas concentration changes within the enclosed space can be comprehensively reflected.
[0081] FIG. 6D is a schematic diagram of some other implementations of processing data sensed by a gas sensor to obtain gas concentration information according to some embodiments of the present invention. In the process 600D, an example in which the gas sensor outputs an electrical parameter value to the controller is used for description. When one gas sensor is disposed within an enclosed space, upon collecting an electrical parameter value 640 at a moment, the gas sensor sends the electrical parameter value 640 at this moment to the data processing module 606 of the controller. In the figure, ti is collection time of an electrical parameter value ci at a reaction temperature Ti, where i is a natural number. A receiving unit 662 in the data processing module 606 receives the electrical parameter value 660 sent by the gas sensor at different moments and different reaction temperatures. The receiving unit 662 may receive a set of electrical parameter values 664 sensed by the gas sensor at different moments and different reaction temperatures. Then, the receiving unit 662 sends the received set of electrical parameter values 664 to a first processing unit 666. The first processing unit 666 cleans the data, and obtains a set of electrical parameter values 668 within a detection period from the data. Cleaning the data includes performing denoising, normalization, and the like on the data. In some examples, when the detection period includes six sampling periods, and each sampling period includes 10 t, data of consecutive six sampling periods is obtained from n sets of electrical parameter values 664 in a sliding window manner. A size of the sliding window may be determined based on time required for the gas sensor to complete reaction based on different reaction temperatures. In the figure, the size of the sliding window is 10 t. A sliding window 1 is then used to obtain continuous electrical parameter values of consecutive 10 t, that is, a set of electrical parameter values of the first sampling period, from the n sets of electrical parameter values. A sliding window 2 is used to obtain next electrical parameter values of consecutive 10 t, that is, a set of electrical parameter values of the second sampling period, from the n electrical parameter values. By analogy, six sets of electrical parameter values of six sampling periods are obtained (as 668 shown in FIG. 6D). Then, the first processing unit 666 sends a plurality of sets of electrical parameter values 668 within the detection period to a second processing unit 670, and the second processing unit 670 converts, based on a time sequence, the plurality of sets of electrical parameter values sensed at different moments and different temperatures (that is, the set of electrical parameter values 668 within the detection period in the figure) into a matrix 672 representing the gas concentration information.
[0082] Optionally, each row in the matrix 672 represents electrical parameter values at a moment and different reaction temperatures. The electrical parameter values at a plurality of moments and different reaction temperatures are arranged into a plurality of rows in the matrix 672 based on a time sequence, forming the matrix 672 representing the gas concentration information shown in FIG. 6D. Such an implementation is merely shown in an exemplary form in the figure. In addition, it is further considered that at the same reaction temperature, different times have different effects on a chemical reaction. The matrix 672 representing the gas concentration information may further include electrical parameter values at different moments and the same reaction temperature, that is, different rows in the matrix 672 may correspond to the same reaction temperature. For example, when the gas sensor is maintained at the same reaction temperature (T9=T1O=T11), a plurality of electrical parameter values c9, clO, and ell are collected at a plurality of moments t9, tlO, and til.
[0083] In some other embodiments, each row in the matrix (not shown) represents electrical parameter values at a plurality of reaction temperatures in one sampling period. One sampling period has a plurality of data collection moments, and the plurality of sampling periods constitute one detection period. Electrical parameter values at the plurality of moments of one sampling period are arranged within the same row of the matrix based on a time sequence. The plurality of sampling periods are arranged into different rows of the matrix based on a time sequence, forming another implementation of the matrix representing the gas concentration information.
[0084] The gas concentration information obtained based on the process 600D may be inputted into the trained machine learning model 510 in FIG. 5 to generate the open / closed state of the enclosed space. Correspondingly, during training based on the training set, the sample gas concentration information 512-1 inputted into the machine learning model may also be processed based on the process shown in FIG. 6D to obtain the gas concentration information.
[0085] In the foregoing manner, the machine learning model can learn an open / closed state of the enclosed space corresponding to time-varying gas concentrations within the enclosed space at different reaction temperatures. In an inference phase, the gas concentration information in a form of a matrix is inputted into the machine learning model, to quickly generate an accurate open / closed state. The machine learning model can detect the open / closed state of the enclosed space from three dimensions, namely, a reaction time dimension, a reaction temperature dimension, and a sampling period dimension, and the determined open / closed state better conforms to an open / closed state corresponding to different reaction effects generated in an actual chemical reaction with changes in the reaction temperature and over time (referring to gas concentrations generated at different reaction extents).
[0086] There are often a plurality of gases within the enclosed space, and different gases have different reaction sensitivities at different reaction temperatures. Some gases, such as hydrogen and methane, are sensitive at high temperatures, while some gases, such as ammonia, are sensitive at low temperatures. Therefore, collected data at a plurality of temperatures is collected, data at the same temperature and different times is collected, and data of the plurality of sampling periods is included, so that objective gas concentration changes within the enclosed space in a plurality of consecutive sampling periods can be comprehensively reflected.
[0087] In addition to the example processes shown in FIG. 6B, FIG. 6C, and FIG. 6D, the gas concentration information in the embodiments of the present invention may further be represented as a matrix including electrical parameter values at a reaction temperature in a plurality of sampling periods. In this implementation, continuity of data changes in the plurality of sampling periods of the gas sensor is considered, and the machine learning model may be used to learn the open / closed state corresponding to the gas concentration changes in the plurality of sampling periods.
[0088] FIG. 7A is a schematic diagram of another exemplary process 700A of processing data sensed by a gas sensor to obtain gas concentration information according to some embodiments of the present invention. A plurality of gas sensors are disposed within an enclosed space, which may include four gas sensors, but are not limited thereto. The four gas sensors may be gas sensors of the same type, that is, gas sensors configured to detect the same type of gas. Alternatively, some of the four gas sensors may be gas sensors of the same type, and some may be gas sensors of different types. For example, two gas sensors are sensors sensing gas concentration information of a gas A, and the other two gas sensors are sensors sensing gas concentration information of a gas B. Alternatively, the four gas sensors may be all different types of gas sensors, which respectively sense gas concentration information of four gases, namely, the gas A, the gas B, a gas C, and a gas D. In a scenario, a plurality of gas sensors may be respectively distributed within an enclosed space of the scenario, or the plurality of gas sensors are integrated in one or more sensing modules, and the sensing modules are disposed within the enclosed space. In the embodiments of the present invention, a specific quantity of gas sensors may be configured based on requirements of the scenario, or one type or a plurality of types of gas sensors may be configured based on types of gases existing within the enclosed space in the scenario. The four gas sensors are used as an example for description herein.
[0089] In the process 700A, the gas sensors, namely, 702-1, 702-2, 702-3, and 702-4 send sensed data, namely, 704-1, 704-2, 704-3, and 704-4 representing a gas concentration to a data processing module 706 of the controller. The data processing module 706 of the controller processes the data representing the gas concentration, and outputs gas concentration information 708, which is sent to a machine learning model.
[0090] In some examples, data collected by the gas sensor is inputted into the controller in a form of an electrical signal. Before the data enters the controller for processing, an existing analog-to-digital conversion circuit may be provided, to convert the electrical signal into an electrical parameter value. In some other examples, the data collected by the gas sensor is inputted into the controller in the form of the electrical signal. After the data enters the controller, the electrical signal is converted into the electrical parameter value by an analog-to-digital conversion circuit in the controller, and then subsequent processing is performed. In some other examples, the data collected by the gas sensor is inputted as the electrical parameter value into the controller.
[0091] In some implementations, the gas concentration information obtained by processing the data sensed by each gas sensor may be obtained based on the exemplary processes in FIG. 6B, FIG. 6C, or FIG. 6D. The data sensed by each gas sensor is represented as a matrix of the gas concentration, where the matrix includes electrical parameter values at different moments within a detection period, or the matrix includes electrical parameter values at different moments and different temperatures in a detection period, or the matrix includes electrical parameter values at different moments and different temperatures in a plurality of sampling periods. The matrix of each gas sensor is inputted into the machine learning model. Each gas sensor may correspondingly collect different types of gases.
[0092] In some implementations, the controller needs to perform normalization on the gas concentration information sent to the machine learning model. For example, performing normalization on data from different gas sensors includes performing normalization on different types of electrical parameter values (for example, some gas sensors output a resistance value and some gas sensors output a current value), performing normalization on electrical parameter values in different data formats (for example, some gas sensors output data including decimal points, and some gas sensors output integer values), and the like. In an example using neural network modeling, a batch normalization layer may be added to the network, and the layer is configured to perform normalization on the data from different gas sensors. In another example, normalization may also be performed before the data is sent to the model by using a normalization processing formula.
[0093] In the foregoing manner, the machine learning model may learn the open / closed state of the enclosed space corresponding to gas concentrations of different types of gas sensors under different conditions. In an inference phase, the gas concentration information in a form of a matrix is inputted into the machine learning model, to quickly generate an accurate open / closed state.
[0094] FIG. 7B is a schematic diagram of some implementations of processing data sensed by a gas sensor to obtain gas concentration information according to some embodiments of the present invention. In the process 700B, an example in which the gas sensor outputs an electrical parameter value to the controller is used for description. When four gas sensors are disposed within an enclosed space, upon collecting electrical parameter values, namely, 740-1, 740-2, 740-3, and 740-4 at a moment, the gas sensor sends the electrical parameter values, namely, 740-1, 740-2, 740-3, and 740-4 at this moment to a data processing module 706 of the controller. In the figure, ti is collection time of an electrical parameter value ci at a reaction temperature Ti, where i is a natural number. A receiving unit 742 in the data processing module 706 receives the electrical parameter values, namely, 740-1, 740-2, 740-3, and 740-4 sent by the gas sensor at different moments and different reaction temperatures. The receiving unit 742 may receive a set of electrical parameter values, namely, 744-1, 744-2, 744-3, and 744-4 sensed by the gas sensor at different moments and different reaction temperatures. Then, the receiving unit 662 sends the received set of electrical parameter values, namely, 740-1, 740-2, 740-3, and 740-4 of each gas sensor to a first processing unit 746. The first processing unit 746 cleans the data of each gas sensor, and obtains a plurality of sets of electrical parameter values, namely, 748-1, 748-2, 748-3, and 748-4 within a detection period from the data. Cleaning the data includes performing denoising, normalization, and the like on the data. In some examples, when the detection period includes six sampling periods, and each sampling period includes 101, data of consecutive six sampling periods is obtained from n sets of electrical parameter values in a sliding window manner. For a specific process, refer to the process shown in FIG. 6D. Then, the first processing unit 746 sends a plurality of sets of electrical parameter values, namely, 748-1, 748-2, 748-3, and 748-4 within the detection period to a second processing unit 750, and the second processing unit 750 converts, based on a time sequence, the plurality of sets of electrical parameter values sensed at different moments and different reaction temperatures (that is, the plurality of sets of electrical parameter values, namely, 748-1, 748-2, 748-3, and 748-4 within the detection period in the figure) into matrices, namely, 752-1, 752-2, 752-3, and 752-4 representing the gas concentration information.
[0095] Optionally, each row in the matrices, namely, 752-1, 752-2, 752-3, and 752-4 represents electrical parameter values at a moment and different reaction temperatures. The electrical parameter values at a plurality of moments and different reaction temperatures are arranged into a plurality of rows in the matrices, namely, 752-1, 752-2, 752-3, and 752-4 based on a time sequence, forming the matrices, namely, 752-1, 752-2, 752-3, and 752-4 representing the gas concentration information shown in FIG. 7B. Such an implementation is merely shown in an exemplary form in the figure. In addition, it is further considered that at the same reaction temperature, different times have different effects on a chemical reaction. The matrices, namely, 752-1, 752-2, 752-3, and 752-4 representing the gas concentration information include electrical parameter values at different moments and the same reaction temperature.
[0096] Optionally, each row in the matrices, namely, 752-1, 752-2, 752-3, and 752-4 represents electrical parameter values at different reaction temperatures in one sampling period. One sampling period has a plurality of data collection moments, and the plurality of sampling periods constitute one detection period. Electrical parameter values at the plurality of moments of one sampling period are arranged within the same row of the matrices, namely, 752-1, 752-2, 752-3, and 752-4 based on a time sequence. The plurality of sampling periods are arranged into different rows of the corresponding matrix based on a time sequence, forming another implementation of the matrices, namely, 752-1, 752-2, 752-3, and 752-4 representing the gas concentration information.
[0097] The gas concentration information obtained based on the process 700B may be inputted into the trained machine learning model 510 in FIG. 5 to generate the open / closed state of the enclosed space. Correspondingly, during training based on the training set, the sample gas concentration information 512-1 inputted into the machine learning model may also be processed based on the process shown in FIG. 7B to obtain the gas concentration information.
[0098] In the foregoing manner, the machine learning model can learn an open / closed state of the enclosed space corresponding to time-varying gas concentrations within the enclosed space at different reaction temperatures. In an inference phase, the gas concentration information in a form of a matrix is inputted into the machine learning model, to quickly generate an accurate open / closed state. The machine learning model can detect the open / closed state of the enclosed space from four dimensions, namely, a time dimension, a reaction temperature dimension, a sampling period dimension, and a channel dimension (that is, the gas sensor sensing different types of gases), and the determined open / closed state better conforms to an open / closed state corresponding different reaction effects generated in an actual chemical reaction of different gases with changes in the reaction temperature and over time (referring to gas concentrations generated at different reaction extents).
[0099] There are often a plurality of gases within the enclosed space, and different gases have different reaction sensitivities at different reaction temperatures. Some gases, such as hydrogen and methane, are sensitive at high temperatures, while some gases, such as ammonia, are sensitive at low temperatures. Therefore, data at a plurality of reaction temperatures is collected through a plurality of gas sensors collecting different types of gases, data at the same reaction temperature and different times is collected, and data of the plurality of sampling periods is included, so that objective gas concentration changes within the enclosed space in a plurality of consecutive sampling periods can be comprehensively reflected.
[0100] FIG. 8 A shows an embodiment of a gas sensor. In the process 800A, a gas sensor 802 sends sensed data 804 representing a gas concentration to a data processing module 806 of a controller. The data processing module 806 of the controller processes the data representing the gas concentration, and outputs gas concentration information 808, which is sent to a machine learning model.
[0101] As shown in FIG. 8A, the gas concentration information 800 is represented as a curve. A receiving unit in the data processing module 808 receives electrical parameter values obtained by the gas sensor at different moments. Then, a first processing unit in the data processing module 808 obtains a set of electrical parameter values within a detection period. In addition, a second processing unit in the data processing module converts the set of electrical parameter values within the detection period, to generate a curve with the horizontal axis representing time and the vertical axis representing electrical parameter values. In some examples, as shown in FIG. 8A, when the gas sensor operates at a reaction temperature, a time-varying curve of electrical parameter values at the reaction temperature is formed, for input into a machine learning model. In some other examples, when the gas sensor operates at different reaction temperatures, a plurality of time-varying curves of electrical parameter values are formed, and each curve represents a reaction temperature, for input into the machine learning model.
[0102] FIG. 8B shows an embodiment of four gas sensors. In the process 800A, four sensors are disposed within an enclosed space. In the embodiments of the present invention, a specific quantity of gas sensors may be configured based on requirements of a scenario. The four gas sensors are used as an example for description herein.
[0103] In some implementations, upon collecting electrical parameter values, namely, 804-1, 804-2, 804-3, and 804-4 at a moment, the gas sensors, namely, 802-1, 802-2, 802-3, and 802-4 send the electrical parameter values, namely, 804-1, 804-2, 804-3, and 804-4 at this moment to the data processing module 806 of the controller. A receiving unit in the data processing module 806 receives the electrical parameter values, namely, 804-1, 804-2, 804-3, and 804-4 sent by the gas sensor at different moments.
[0104] The receiving unit may receive a set of electrical parameter values sensed by the gas sensor at different moments. Then, the receiving unit sends the received set of electrical parameter values of each gas sensor to a first processing unit. The first processing unit cleans data of each gas sensor, and obtains a set of electrical parameter values (refer to an example in FIG. 6B) within a detection period from the data. Then, the first processing unit sends the set of electrical parameter values within the detection period to a second processing unit, and the second processing unit 750 converts, based on a time sequence, the set of electrical parameter values sensed at different moments into curves, namely, 808-1, 808-2, 808-3, and 808-4 representing the gas concentration information.
[0105] In some implementations, the data processing unit receives electrical parameter values at different moments and different reaction temperatures. For each gas sensor, after processing by the first processing unit and the second processing unit, a plurality of curves representing collection at different reaction temperatures within the detection period are obtained.
[0106] In some implementations, the data processing unit receives electrical parameter values at different moments and different reaction temperatures. For each gas sensor, after processing by the first processing unit and the second processing unit, a plurality of curves representing collection at different reaction temperatures in a plurality of sampling periods are obtained.
[0107] The gas concentration information obtained based on the process 800 A, the process 800B, or the foregoing other implementations may be inputted into the trained machine learning model 510 in FIG. 5 to generate the open / closed state of the enclosed space. Correspondingly, during training based on the training set, the sample gas concentration information 512-1 inputted into the machine learning model may also be processed based on the process 800A, the process 800B, or the foregoing other implementations to obtain the gas concentration information.
[0108] In the foregoing manner, the machine learning model can learn an open / closed state of the enclosed space corresponding to time-varying gas concentrations within the enclosed space at different situations (referring to one or more situations of different reaction times, different reaction temperatures, different sampling periods, and different channels). In an inference phase, the gas concentration information in a form of the curve is inputted into the machine learning model, to quickly generate an accurate open / closed state.
[0109] FIG. 9 is a schematic diagram of an example process 900 of generating three open / closed states by using a machine learning model according to some embodiments of the present invention. As shown in FIG. 9, gas concentration information 902 is inputted into a trained machine learning model 904 to output an open / closed state 906 of an enclosed space.
[0110] In a training phase, a training dataset includes sample gas concentration information and a sample open / closed state. The sample open / closed state includes an open state (that is, the previously mentioned unsealed state), a closed state (that is, the previously mentioned sealed state), or an opening / closing operation state. The opening / closing operation state refers to a state in which an opening / closing operation is performed within a specific threshold time. The threshold time is a time for a normal opening / closing operation defined based on usage habits. For example, when a refrigerator is in use, taking or placing food usually does not exceed two minutes, and then two minutes may be defined as the threshold time.
[0111] Based on the foregoing training dataset, training is performed based on the process shown in FIG. 5, and three open / closed states corresponding to different gas concentration changes can be learned through training. In an inference stage, the machine learning model 904 determines the open / closed state of the enclosed space as an open state 906-1, a closed state 906-2, or an opening / closing operation state 906-3 based on the gas concentration information 902.
[0112] When determining that the open / closed state of the enclosed space is the closed state or the opening / closing operation state, the machine learning model waits for data subsequently collected by the gas sensor, to perform subsequent open / closed state detection. When the machine learning model determines that the open / closed state of the enclosed space is the open state, an alarm message or a notification needs to be sent to a user or a management terminal to promptly handle an unsealed state of the enclosed space.
[0113] FIG. 10 is a block diagram of an apparatus 1000 for detecting an open / closed state of an enclosed space according to some embodiments of the present invention. Referring to FIG. 10, the apparatus 1000 includes a gas concentration information obtaining module 1002, configured to obtain gas concentration information sensed by a gas sensor in the enclosed space, where the gas concentration information includes electrical parameter values representing concentrations of a plurality of gases within the enclosed space. The apparatus 1000 further includes an open / closed state detection module 1004, configured to detect the open / closed state of the enclosed space by a machine learning model based on the gas concentration information.
[0114] In some embodiments, the gas concentration information obtaining module 1002 is configured to: obtain a set of electrical parameter values sensed by the gas sensor at different moments; and convert, based on a time sequence, the set of electrical parameter values sensed at different moments into a matrix representing the gas concentration information.
[0115] In some embodiments, the gas concentration information obtaining module 1002 is configured to: obtain, for each moment, different electrical parameter values sensed by the gas sensor at different reaction temperatures; and convert, based on a time sequence, the set of electrical parameter values sensed at different moments and different reaction temperatures into the matrix representing the gas concentration information.
[0116] In some embodiments, the gas sensor includes a plurality of sensors, and the gas concentration information obtaining module 1002 is configured to: obtain different electrical parameter values sensed by each of the plurality of sensors at different reaction temperatures; and convert the set of electrical parameter values sensed by each gas sensor at different moments and different reaction temperatures into the matrix representing the gas concentration information.
[0117] In some embodiments, the gas concentration information obtaining module 1002 is configured to: obtain a set of electrical parameter values sensed by the gas sensor at different moments and different reaction temperatures; and generate, based on the set of electrical parameter values, a curve representing the gas concentration information.
[0118] In some embodiments, the gas sensor includes the plurality of sensors, and the gas concentration information obtaining module 1002 is configured to: obtain a set of electrical parameter values sensed by each of the plurality of sensors at different moments and different reaction temperatures; and convert the set of electrical parameter values sensed by each gas sensor at different moments and different reaction temperatures into the curve representing the gas concentration information.
[0119] In some embodiments, based on any one of the foregoing implementations, a plurality of sets of electrical parameter values in a plurality of consecutive sampling periods may be sensed, and the matrix or the curve representing the gas concentration information is formed.
[0120] According to the embodiments of the present invention, an apparatus including an enclosed space is further included. The apparatus includes a gas sensor located in an enclosed space, a processor, and a memory, the memory being coupled to the processor and having instructions stored thereon, and the instructions, when executed by the processor, causing the method provided according to the aspects of the present invention to be performed. In some embodiments, the apparatus including an enclosed space may be a refrigerator, a medicine storage cabinet, a wardrobe, a chemical reagent storage device, a warehouse, a storage room, a chemical workshop, or the like.
[0121] FIG. 11 is a schematic block diagram of an example device 1100 that may be used to implement the embodiments of the present invention. As shown in FIG. 11, the device 1100 includes a processor 1101, which may perform various suitable actions and processing based on computer program instructions stored in a read-only memory (ROM) 1102 and computer program instructions loaded into a random access memory (RAM) 1103. The RAM 1103 may also store various programs and data required for operations of the device 1100. The processor 1101, the ROM 1102, and the RAM 1103 are connected to each other through a bus 1104. An input / output (I / O) interface 1105 is connected to the bus 1104.
[0122] The processes and processing described above, for example, the method 200, may be performed by the processor 1101. For example, in some embodiments, the method 200 may be implemented as a software program that is tangibly included in a machine-readable medium. In some embodiments, a part or all of the software program may be loaded and / or installed on the device 1100 through the ROM 1102. When the software program is loaded to the RAM 1103 and is executed by the processor 1101, one or more actions of the method 200 described above may be performed.
[0123] The functions described above in this specification may be at least partially performed by one or more hardware logic components. For example, but not limited to, exemplary types of hardware logic components that may be used include a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system on a chip (SOCID), a load programmable logic device (CPLD), and the like.
[0124] Program code configured to implement the method of the present invention may be written in any combination of one or more programming languages. These program codes may be provided to a processor or a controller of a general-purpose computer, a dedicated computer, or another programmable data processing apparatus, so that when the program codes are executed by the processor or the controller, functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be completely executed on the machine, partially executed on the machine, as an independent software package, partially executed on the machine and partially executed on a remote machine, or completely executed on the remote machine or server.
[0125] The present invention may be a method, an apparatus, a system, and / or a program product. The program product may include a machine-readable storage medium, on which a machine-readable program instruction configured to implement various aspects of the present invention is loaded. The machine-readable program instructions described herein may be downloaded to each computing / processing device from the machine-readable storage medium, or may be downloaded to an external computer or external storage device by using a network such as the Internet, a local area network, a wide area network and / or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or a network interface in each computing / processing device receives the machine-readable program instructions from the network, and forwards the machine-readable program instructions for storage in the machine-readable storage medium in each computing / processing device.
[0126] The machine program instructions configured to perform operations of the present invention may be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages. The programming languages include an object-oriented programming language such as Smalltalk or C++, and a conventional procedural programming language such as a "C" language or a similar programming language. The machine-readable program instructions may be completely executed on the user computer, partially executed on the user computer, executed as an independent software package, partially executed on the user computer and partially executed on a remote computer, or completely executed on the remote computer or server. In a case involving the remote computer, the remote computer may be connected to the user computer through any type of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, which may be connected through the internet by using an internet service provider). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLC), is personalized by using state information of the machine-readable program instructions. The electronic circuit may execute the machine readable-program instructions, to implement various aspects of the present invention.
[0127] In the context of the present invention, the machine-readable medium may be a tangible medium that may include or store a program used by an instruction execution system, apparatus, or device or used in combination with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine- readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing content. More specific examples of the machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer diskette, 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 convenient compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing content. In addition, although the operations are described in a particular order, it should be understood that, the operations are required to be performed in the shown particular order or sequential order, or all the shown operations should be required to be performed to obtain an expected result. In certain environments, multitasking and parallel processing may be beneficial. Similarly, although several specific implementation details are included in the foregoing discussion, these should not be construed as a limitation to the scope of the present invention. Some features described in the context of the separate embodiments may further be implemented in a single implementation in combination. On the contrary, various features described in the context of a single implementation may also be implemented in a plurality of implementations separately or in any suitable sub-combination.
[0128] Although the subject is described by using the language specific to structural features and / or methods and logical actions, it should be understood that, the subject defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms for implementing the claims.
Claims
CLAIMSWhat is claimed is:
1. A method (200) for detecting an open / closed state of an enclosed space, comprising: obtaining (202) gas concentration information sensed by a gas sensor in the enclosed space, wherein the gas concentration information comprises electrical parameter values representing concentrations of a plurality of gases within the enclosed space; anddetecting (204) the open / closed state of the enclosed space by a machine learning model based on the gas concentration information.
2. The method (200) according to claim 1, wherein the obtaining (202) gas concentration information sensed by a gas sensor in the enclosed space comprises:obtaining a set of electrical parameter values sensed by the gas sensor at a plurality of moments.
3. The method (200) according to claim 2, wherein the obtaining a set of electrical parameter values sensed by the gas sensor at a plurality of moments comprises:obtaining a set of electrical parameter values sensed by the gas sensor at a plurality of moments and a plurality of reaction temperatures, wherein each moment corresponds to a reaction temperature, and different moments correspond to the same or different reaction temperatures.
4. The method (200) according to claim 3, wherein the obtaining (202) gas concentration information sensed by a gas sensor in the enclosed space further comprises:generating, based on the set of electrical parameter values, a curve representing the gas concentration information.
5. The method (200) according to claim 3, wherein the obtaining (202) gas concentration information sensed by a gas sensor in the enclosed space further comprises:generating, based on the set of electrical parameter values, a matrix representing the gas concentration information.
6. The method (200) according to any one of claims 2 to 5, wherein the gas sensor comprises a plurality of sensors, and the obtaining a set of electrical parameter values sensed by the gas sensor at a plurality of moments and a plurality of reaction temperatures comprises:obtaining a set of electrical parameter values sensed by each of the plurality of sensors at a plurality of moments and a plurality of reaction temperatures.
7. The method (200) according to claim 4 or 5, wherein the obtaining a set of electrical parameter values sensed by the gas sensor at a plurality of moments and a plurality of reaction temperatures comprises:obtaining a set of electrical parameter values sensed by the gas sensor in a plurality of consecutive sampling periods, and obtaining, within each sampling period, a set of electrical parameter values sensed by the gas sensor at a plurality of collection moments and a plurality of reaction temperatures, wherein each collection moment corresponds to a reaction temperature, and different collection moments within the same sampling period correspond to the same or different reaction temperatures.
8. The method (200) according to claim 5, wherein the gas sensor senses a set of electrical parameter values in a plurality of consecutive sampling periods, and generating, based on the set of electrical parameter values, a matrix representing the gas concentration information comprises:arranging the set of electrical parameter values at a plurality of collection moments within the same sampling period as different columns of the matrix based on a time sequence, and arranging the set of electrical parameter values within different sampling periods as different rows of the matrix based on a time sequence.
9. The method (200) according to claim 1, wherein the detecting (204) the open / closed state of the enclosed space by a machine learning model based on the gas concentration information comprises:determining, by the machine learning model based on the gas concentration information, the open / closed state of the enclosed space as an open state, a closed state, or an opening / closing operation state.
10. The method (200) according to claim 1, wherein the machine learning model is obtained through training by learning a relationship between the gas concentration information and the open / closed state of the enclosed space.
11. The method (200) according to claim 10, wherein the gas concentration information required for training the model is obtained by the gas sensor sensing the gas within the enclosed space at different environmental temperatures and humidities when the enclosed space is in different open / closed states.
12. The method (200) according to any one of claims 1 to 5, and 8 to 11, wherein the electrical parameter values comprise at least one of a resistance value, a voltage value, and acurrent value.
13. The method (200) according to any one of claims 1 to 5, and 8 to 11, wherein the open / closed state of the enclosed space indicates an open / closed state of a refrigerator door, and the gas sensor is a volatile organic compound sensor.
14. An apparatus (1000) for detecting an open / closed state of an enclosed space, comprising:a gas concentration information obtaining module (1002), configured to obtain gas concentration information sensed by a gas sensor in the enclosed space, wherein the gas concentration information comprises electrical parameter values representing concentrations of a plurality of gases within the enclosed space; andan open / closed state detection module (1004), configured to detect the open / closed state of the enclosed space by a machine learning model based on the gas concentration information.
15. An apparatus comprising an enclosed space, comprising:a gas sensor located in the enclosed space;a processor; anda memory, coupled to the processor and having instructions stored thereon, the instructions, when executed by the processor, causing the method according to any one of claims 1 to 13 to be performed.