A method, device, equipment and medium for counting the number of people in smart toilets
By combining magnetic switches and sensors in smart toilets, the state panel status and personnel existence are detected, the problem of inaccurate statistics in the existing technology has been solved, and more accurate personality statistics are achieved.
Patent Information
- Application Number
- CN202411497407.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-25
AI Technical Summary
The existing smart toilet room user statistics method is inaccurate and cannot effectively distinguish the in and out of the personnel, resulting in repeated counting of the same personnel entering and out of the same personnel and repeated signal triggering.
The method of combining magnetic switches and sensors, by detecting the door of the door panel and the existence of the personnel in the toilet, the number of people counting is performed to avoid misjudgment of a single sensing device.
Improved the accuracy of the statistics, avoiding the repetitive counting of the same person in and out, and enhancing the reliability of the statistical results.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of public health and provides a method, device, equipment and medium for counting the number of people in a smart toilet. Background Art
[0002] Smart toilets are a new type of public toilet that combines Internet technology and smart devices to improve user experience and management efficiency. The visitor statistics of smart toilets can help evaluate the usage of public toilets and are of great significance for adding toilet seats, maintenance and cleaning of toilets.
[0003] There are two main methods for counting the number of people in smart toilets. The first method is to install an infrared sensor directly at the gate. Once someone passes through the gate, the infrared sensor is triggered to count once. The second method is to install an infrared sensor inside the toilet. Once someone enters the toilet, the infrared sensor is triggered to count once.
[0004] The first solution cannot distinguish between people entering and leaving. The same person entering and leaving will be counted repeatedly. The same person moving around at the door will cause the signal to be triggered repeatedly, resulting in repeated counting. In the second solution, if someone moves inside the toilet, the signal will also be triggered repeatedly, resulting in repeated counting. Therefore, the number of people counted by these two solutions is inaccurate. Summary of the invention
[0005] The present application provides a method, device, equipment and medium for counting the number of people in smart toilets, which are used to solve the problem of inaccurate occupancy statistics in existing smart toilets.
[0006] In a first aspect, a method for counting the number of people in a smart toilet is provided, which is applied to a controller of a smart toilet. The smart toilet also includes a toilet body, a door panel, a door frame, and a sensor; a magnetic switch is installed on the door frame, the magnetic switch is connected to a signal line, and a magnetic device is installed on the door panel; the magnetic switch and the magnetic device are installed on the same horizontal plane; the method includes:
[0007] If a signal sent by the signal line when the contact of the magnetic switch and the contact of the magnetic device are connected is received, it is determined that the door panel is in a closed state;
[0008] If no signal sent by the signal line is received, it is determined that the door panel is in an open state;
[0009] If it is determined that the door panel is in a closed state and a personnel signal sent by the sensor is received, the person count is controlled to be increased by 1; the personnel signal is used to indicate that there is a person in the toilet body.
[0010] Optionally, after determining that the door panel is in a closed state and receiving a personnel signal sent by the sensor, the person count is controlled to increase by 1, the method further includes:
[0011] Start the timer;
[0012] If within the preset time period, it is determined that the state of the door panel has changed, or the personnel signal is received again, the person count is controlled to remain unchanged; wherein, the change in the state of the door panel refers to the door panel changing from a closed state to an open state and / or the door panel changing from an open state to a closed state.
[0013] Optionally, after starting the timing, the method further includes:
[0014] If after the preset time period, it is determined that the state of the door panel has changed, and a personnel signal sent by the sensor is received again, the person count is controlled to be increased by 1.
[0015] Optionally, after starting the timing, the method further includes:
[0016] If after a preset time period, it is determined that the door panel has been in a closed state and a personnel signal sent by the sensor is received again, the person count is controlled to remain unchanged.
[0017] Optionally, before starting the timing, the method further includes:
[0018] According to the duration of the door panel changing from the closed state to the open state, the duration of toilet use of multiple target persons is counted;
[0019] The average toilet time of the multiple target persons is determined as the preset time.
[0020] Optionally, before counting the toilet use durations of multiple target persons according to the duration of the door panel changing from the closed state to the open state, the method further includes:
[0021] If the smart toilet is a men's toilet, it is determined that the multiple target persons are multiple boys;
[0022] If the smart toilet is a female toilet, it is determined that the multiple target persons are multiple female students;
[0023] If the smart toilet is a neutral toilet, the multiple target persons are determined to be multiple boys and multiple girls.
[0024] Optionally, the smart toilet includes a plurality of sensors of different types, and the step of receiving a personnel signal sent by the sensor includes:
[0025] Personnel signals sent by sensors exceeding a preset number are received; the preset number is half of the total number of the multiple different types of sensors.
[0026] In a second aspect, a smart toilet visitor counting device is provided, the device is arranged in a controller of the smart toilet, the smart toilet further comprises a toilet body, a door panel, a door frame, and a sensor; a magnetic switch is installed on the door frame, the magnetic switch is connected to a signal line, and a magnetic device is installed on the door panel; the magnetic switch and the magnetic device are installed on the same horizontal plane; the device comprises:
[0027] a determination module, configured to determine that the door panel is in a closed state if a signal sent by the signal line when a contact of the magnetic switch and a contact of the magnetic device are connected is received;
[0028] The determination module is further configured to determine that the door panel is in an open state if no signal sent by the signal line is received;
[0029] The control module is used to control the person count to increase by 1 if it is determined that the door panel is in a closed state and a person signal sent by the sensor is received; the person signal is used to indicate the presence of a person in the toilet body.
[0030] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the smart toilet occupancy counting method described in the first aspect.
[0031] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and a processor executes the computer program to implement the smart toilet occupancy counting method described in the first aspect.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] The present application provides a method for counting the number of people in a smart toilet, which is applied to the controller of a smart toilet. The smart toilet also includes a toilet body, a door panel, a door frame, and a sensor; a magnetic switch is installed on the door frame, the magnetic switch is connected to a signal line, and a magnetic device is installed on the door panel; the magnetic switch and the magnetic device are installed on the same horizontal plane; the method includes: if a signal is received when the contact of the magnetic switch and the contact of the magnetic device are connected, it is determined that the door panel is in a closed state; if the signal sent by the signal line is not received, it is determined that the door panel is in an open state; if it is determined that the door panel is in a closed state and a personnel signal sent by the sensor is received, the number of people is controlled to be increased by 1; the personnel signal is used to characterize the presence of personnel in the toilet body.
[0034] The present application uses two sensing devices, one is a sensor for detecting whether there is a person, and the other is a magnetic switch and a magnetic device for detecting the door closing status. When both sensing devices are triggered, that is, when the door panel is in the closed state and there is a person in the toilet body, the person count will be performed. Compared with the prior art of using a single sensing device for person counting, repeated counting of the same person entering and exiting can be avoided, thereby improving the accuracy of person counting. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0036] Figure 1 A schematic diagram of the structure of a smart toilet involved in the embodiment of the present application;
[0037] Figure 2 A schematic diagram of a flow chart of a method for counting the number of people in a smart toilet provided in an embodiment of the present application;
[0038] Figure 3 A schematic diagram of a door closing state involved in an embodiment of the present application;
[0039] Figure 4 It is a schematic diagram of the positions of the magnetic switch 6 and the magnetic device 8 when the door is closed according to the embodiment of the present application;
[0040] Figure 5 A schematic diagram of the door opening state involved in the embodiment of the present application;
[0041] Figure 6 This is a schematic diagram of the positions of the magnetic switch 6 and the magnetic device 8 when the door is open according to the embodiment of the present application;
[0042] Figure 7 A schematic diagram of the structure of a smart toilet occupancy counting device provided in an embodiment of the present application.
[0043] Figure numerals: 1-toilet body, 2-door panel, 3-door frame, 4-sensor, 5-controller, 6-magnetic switch, 7-signal line, 8-magnetic device. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other arbitrarily. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0045] In order to solve the problem of inaccurate visitor statistics in existing smart toilets, the present application embodiment provides a method for visiting smart toilets, which is applied to the controller 5 of the smart toilet. Figure 1 , which is a structural diagram of the smart toilet involved in the embodiment of the present application.
[0046] The smart toilet includes a toilet body 1, a door panel 2, a door frame 3, a sensor 4 and a controller 5. The toilet body 1 includes three walls and a floor. The three walls are sealed by wood or plastic. The door panel 2 and the door frame 3 are installed on the side of the toilet body 1 where people enter and exit. The door panel 2 and the door frame 3 are made of metal materials. The door panel 2 and the door frame 3 are connected by hydraulic hinges. The door panel 2 can rotate around the connection. When the door panel 2 rotates to the door frame 3 and closes, the toilet body 1, the door panel 2 and the door frame 3 form a closed space, and people can use the toilet in this closed space.
[0047] A magnetic switch 6 is installed on the door frame 3, and the magnetic switch 6 is connected to a signal line 7. A magnetic device 8 is installed on the door panel 2, and the signal line 7 is communicatively connected to the controller 5. The magnetic switch 6 and the magnetic device 8 are installed on the same horizontal plane, the magnetic device 8 can be installed in the middle position of the height direction of the door panel 2, and the magnetic switch 6 can be installed in the middle position of the height direction of the door frame 3.
[0048] The sensor 4 is also connected to the controller 5 by communication. There are many types of sensors 4, such as infrared sensors, sound sensors, pressure sensors, etc. If the sensor 4 is a pressure sensor, the sensor 4 can only be installed on the floor of the toilet body 1. If the sensor 4 is an infrared sensor or a sound sensor, the sensor 4 can be installed on any wall of the toilet body 1, on the floor of the toilet body 1, or on the door frame 3.
[0049] It should be noted that Figure 1In the example, the smart toilet includes only one sensor 4, but in fact, the number of sensors 4 is not limited. When the smart toilet includes multiple sensors 4, the multiple sensors 4 can be different types of sensors 4, and the multiple sensors 4 can be installed at different positions inside the toilet body 1.
[0050] As mentioned above, the structure of the smart toilet is introduced. Figure 1 The smart toilet shown below Figure 2 A method for counting the number of people in smart toilets is introduced as shown in the figure.
[0051] S201. If a signal is received from the signal line 7 when the contact of the magnetic switch 6 and the contact of the magnetic device 8 are connected, it is determined that the door panel 2 is in a closed state.
[0052] Please refer to Figure 3 , is a schematic diagram of the closed door state involved in the embodiment of the present application. Please refer to Figure 4 , is a schematic diagram of the positions of the magnetic switch 6 and the magnetic device 8 when the door is closed according to the embodiment of the present application. Figure 3 and Figure 4 It can be seen that when the door panel 2 of the smart toilet is in a closed state, the distance between the magnetic switch 6 on the door frame 3 and the magnetic device 8 on the door panel 2 is relatively close. Under the action of the magnetic force of the magnetic device 8, the two contacts of the magnetic switch 6 are in a closed state, and the signal line 7 on the two contacts is also in an on state. At this time, the signal will be input to the controller 5 through the signal line 7. When the controller 5 receives the signal sent by the signal line 7, it can determine that the door panel 2 is in a closed state.
[0053] S202: If no signal is received from the signal line 7, it is determined that the door panel 2 is in an open state.
[0054] Please refer to Figure 5 , is a schematic diagram of the door opening state involved in the embodiment of the present application. Please refer to Figure 6 , is a schematic diagram of the positions of the magnetic switch 6 and the magnetic device 8 when the door is open according to the embodiment of the present application. Figure 5 and Figure 6 It can be seen that when the door panel 2 of the smart toilet is in the open state, the distance between the magnetic switch 6 on the door frame 3 and the magnetic device 8 on the door panel 2 is relatively far, and the magnetic switch 6 is not affected by the magnetic force of the magnetic device 8, and its two contacts are in the disconnected state. At this time, the controller 5 cannot receive the signal sent by the signal line 7, and it is determined that the door panel 2 is in the open state.
[0055] S203: If it is determined that the door panel 2 is in the closed state and a personnel signal sent by the sensor 4 is received, the person count is controlled to be increased by 1.
[0056] In the specific implementation process, the sensor 4 can detect whether there is a person in the toilet body 1. After determining that there is a person in the toilet body 1, the sensor 4 sends a person signal to the controller 5. The person signal is used to indicate that there is a person in the toilet body 1. Since there are many types of sensors 4, different sensors 4 have different detection methods, which are introduced below in different situations.
[0057] In the first case, the sensor 4 is an infrared sensor.
[0058] The sensor 4 (infrared sensor) is usually composed of one or more infrared detection elements, which can sense infrared radiation of different wavelengths. When a person enters the detection area of the sensor 4 (infrared sensor), the sensor 4 (infrared sensor) receives the infrared radiation signal emitted by the human body. If the received infrared radiation signal exceeds a preset threshold, it is determined that there is a person in the toilet body 1, and a person signal is sent to the controller 5.
[0059] In the second case, the sensor 4 is a sound sensor.
[0060] The sensor 4 (sound sensor) can analyze and capture the sound signals in the environment. If the detected sound intensity exceeds a preset sound threshold, it is determined that there is a person in the toilet body 1 and a person signal is sent to the controller 5.
[0061] In the third case, the sensor 4 is a pressure sensor.
[0062] When someone enters the toilet body 1 and stands on the sensor 4 (pressure sensor), the sensor 4 (pressure sensor) detects the pressure generated by the body weight. If the pressure exceeds the preset pressure threshold, it is determined that there is a person in the toilet body 1 and a person signal is sent to the controller 5.
[0063] Furthermore, the controller 5 continuously receives the signal sent by the signal line 7, and thus determines that the door panel 2 is always in the closed state. If a personnel signal sent by the sensor 4 is received during the period when the door panel 2 is in the closed state, the control person count is increased by 1.
[0064] In a possible embodiment, the smart toilet includes a plurality of sensors 4 of different types, and the step of receiving a personnel signal sent by the sensor 4 includes:
[0065] Personnel signals sent by sensors 4 exceeding a preset number are received; the preset number is half of the total number of the multiple sensors 4 of different types.
[0066] In the embodiment of the present application, considering that a single sensor 4 may have detection errors or malfunctions, the detection results of multiple different types of sensors 4 are combined, and the complementary information of different sensors 4 can reduce false positives and false negatives, and can more accurately monitor whether there are people in the toilet body 1, thereby improving the accuracy of subsequent person-time statistics. If a sensor 4 fails, other sensors 4 can still send personnel signals to ensure the stability and reliability of the system.
[0067] In actual applications, some sensors 4 may be affected by factors such as environmental noise and physical interference, resulting in errors in the detection results. As long as more than half of the sensors 4 send personnel signals, it is determined that there is a person in the toilet body 1. Relying on the detection results of most sensors 4 can better deal with these uncertainties.
[0068] In a possible embodiment, after determining that the door panel 2 is in a closed state and receiving a personnel signal sent by the sensor 4, the person count is controlled to be increased by 1 and the timing is started; if within a preset time period, it is determined that the state of the door panel 2 has changed, or the personnel signal sent by the sensor 4 is received again, the person count is controlled to remain unchanged; wherein, the change in the state of the door panel 2 refers to the door panel 2 changing from a closed state to an open state and / or the door panel 2 changing from an open state to a closed state.
[0069] In the specific implementation process, considering that it usually takes a certain amount of time for people to go to the toilet, from entering the door to leaving the door, the controller 5 starts timing after controlling the number of people to count by 1, and continuously monitors the state of the door panel 2 and the personnel signal within the preset time. If the state of the door panel 2 changes, or the personnel signal sent by the sensor 4 is received again, it may be that the same person is doing other activities besides going to the toilet. For example, a person moves and then stays still in the toilet, causing the signal to be triggered repeatedly. Therefore, the result of the number of people output by the controller 5 remains unchanged, which can avoid repeated counting and ensure the accuracy of the number of people statistics.
[0070] In a possible embodiment, after the timing starts, if after a preset time period, it is determined that the state of the door panel 2 has changed, and a personnel signal sent by the sensor 4 is received again, the person count is controlled to be increased by 1.
[0071] In the specific implementation process, after the preset time, if the door panel 2 changes from the closed state to the open state, it means that the toilet user has opened the door and gone out. If the door panel 2 changes from the open state to the closed state and receives the personnel signal sent by the sensor 4, it means that another person has come in. At this time, the controller 5 outputs the result of the number of people plus 1.
[0072] In a possible embodiment, after the timing starts, if after a preset time period, it is determined that the door panel 2 is always in the closed state, and a personnel signal sent by the sensor 4 is received again, the person count is controlled to remain unchanged.
[0073] During the specific implementation process, after the preset time, even if a personnel signal is detected, the door panel 2 remains in the closed state, indicating that no one enters or exits the smart toilet. It may be that the same person is repeatedly detected by the sensor 4 in the toilet. Therefore, the controller 5 outputs the result of the number of people unchanged, which can avoid repeated counting and ensure the accuracy of the number of people statistics.
[0074] The above introduces the process of counting the number of people in a smart toilet, which involves a preset time. The preset time can be an empirical value, such as 30 seconds. The preset time can also be determined in the following way.
[0075] In a possible embodiment, the toilet time of multiple target persons is counted according to the duration of the door panel 2 changing from the closed state to the open state; and the average toilet time of the multiple target persons is determined as the preset time.
[0076] In the specific implementation process, the state change of the door panel 2 is continuously monitored. When the door panel 2 changes from the open state to the closed state, the timing is started and the start time of toileting is recorded. When the door panel 2 changes from the closed state to the open state, the timing is stopped and the end time of toileting is recorded. The toileting time of each person is equal to the end time of toileting minus the start time of toileting, and the average toileting time of multiple target persons is taken as the preset time.
[0077] In the embodiment of the present application, by analyzing the toilet time of multiple people, more accurate data can be obtained to formulate a reasonable preset time and avoid errors caused by single experience.
[0078] In a possible embodiment, if the smart toilet is a men's toilet, the multiple target persons are determined to be multiple boys; if the smart toilet is a women's toilet, the multiple target persons are determined to be multiple girls; if the smart toilet is a neutral toilet, the multiple target persons are determined to be multiple boys and multiple girls.
[0079] During the specific implementation process, if the smart toilet is a men's toilet for boys only, the preset time is determined based on the toilet time of multiple boys. If the smart toilet is a women's toilet for girls only, the preset time is determined based on the toilet time of multiple girls. If the smart toilet is a neutral toilet shared by boys and girls, the preset time is determined based on the toilet time of multiple boys and girls.
[0080] In the embodiment of the present application, considering that the toilet time of different genders is different, the toilet time of girls is usually longer than that of boys. According to the toilet time data of different genders, preset time lengths are set for different types of toilets respectively, and the number of people can be counted more accurately based on the preset time lengths later.
[0081] In summary, traditional person-time counting uses a single sensor device to detect the passage of people in a certain place, but cannot distinguish between people entering and leaving, resulting in repeated counting. The present application provides a method for counting people in a smart toilet, which uses two sensor devices in combination. The sensor 4 does not count when it detects a person. The person-time counting is performed only when the door panel 2 is in a closed state and there are people in the toilet body 1, thus avoiding repeated counting of the same person entering and leaving. In addition, the present application combines people's toilet habits, eliminates external environmental interference (such as vibrations, intense activities outside the door), and identifies the situation of the same person in the toilet (such as a person moving and standing still in the toilet), so as to accurately count the number of people.
[0082] Based on the same invention concept, please refer to Figure 7 The present application also provides a smart toilet visitor counting device; the device is arranged in a controller 5 of the smart toilet, and the smart toilet further comprises a toilet body 1, a door panel 2, a door frame 3, and a sensor 4; a magnetic switch 6 is installed on the door frame 3, the magnetic switch 6 is connected to a signal line 7, and a magnetic device 8 is installed on the door panel 2; the magnetic switch 6 and the magnetic device 8 are installed on the same horizontal plane; the device comprises:
[0083] A determination module, for determining that the door panel 2 is in a closed state if a signal sent by the signal line 7 when the contact of the magnetic switch 6 and the contact of the magnetic device 8 are connected is received;
[0084] The determination module is further used to determine that the door panel 2 is in an open state if no signal sent by the signal line 7 is received;
[0085] The control module is used to control the person count to increase by 1 if it is determined that the door panel 2 is in a closed state and a person signal sent by the sensor 4 is received; the person signal is used to indicate that there is a person in the toilet body 1.
[0086] Optionally, the device further includes a timing module, which is used to control the number of people to count plus 1 and start timing after determining that the door panel 2 is in a closed state and receiving a personnel signal sent by the sensor 4;
[0087] The control module is also used to control the person count to remain unchanged if it is determined that the state of the door panel 2 has changed within a preset time period, or if a personnel signal is received again; wherein the change in the state of the door panel 2 refers to the door panel 2 changing from a closed state to an open state and / or the door panel 2 changing from an open state to a closed state.
[0088] Optionally, the control module is further configured to:
[0089] After the timing starts, if after a preset time period, it is determined that the state of the door panel 2 has changed, and a personnel signal sent by the sensor 4 is received again, the person count is controlled to be increased by 1.
[0090] Optionally, the control module is further configured to:
[0091] After the timing starts, if after a preset time period, it is determined that the door panel 2 is always in the closed state, and a personnel signal sent by the sensor 4 is received again, the person count is controlled to remain unchanged.
[0092] Optionally, the determination module is further configured to:
[0093] Before starting the timing, the duration of the toilet use of multiple target persons is counted according to the duration of the door panel 2 changing from the closed state to the open state; the average duration of the toilet use of multiple target persons is determined as the preset duration.
[0094] Optionally, the determination module is further configured to:
[0095] Before counting the toilet time of multiple target persons according to the duration of the door panel 2 from the closed state to the open state, if the smart toilet is a men's toilet, it is determined that the multiple target persons are multiple boys;
[0096] If the smart toilet is a female toilet, then the multiple target persons are determined to be multiple female students;
[0097] If the smart toilet is a neutral toilet, the multiple target persons are determined to be multiple boys and multiple girls.
[0098] Optionally, the smart toilet includes multiple sensors 4 of different types, and the control module is specifically used to: receive personnel signals sent by sensors 4 exceeding a preset number; the preset number is half of the total number of multiple sensors 4 of different types.
[0099] It should be noted that each module in the smart toilet attendance counting device in this embodiment corresponds one-to-one to each step in the smart toilet attendance counting method in the aforementioned embodiment. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned smart toilet attendance counting method, which will not be repeated here.
[0100] Based on the same inventive concept, the present application also provides a computer device, which includes a processor, a memory, and a computer program stored in the memory. When the computer program is executed by the processor, the aforementioned smart toilet occupancy statistics method is implemented.
[0101] Based on the same inventive concept, the present application also provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the aforementioned smart toilet occupancy statistics method is implemented.
[0102] In some embodiments, the computer readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories. The computer may be various computing devices including intelligent terminals and servers.
[0103] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0104] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0105] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0106] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0107] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0108] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0109] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the specification and accompanying drawings of the present application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for counting the number of people in smart toilets, characterized in that: A controller (5) applied to a smart toilet, the smart toilet further comprising a toilet body (1), a door panel (2), a door frame (3), and a sensor (4); a magnetic switch (6) is mounted on the door frame (3), the magnetic switch (6) is connected to a signal line (7), and a magnetic device (8) is mounted on the door panel (2); the magnetic switch (6) and the magnetic device (8) are mounted on the same horizontal plane; the smart toilet comprises a plurality of sensors (4), the plurality of sensors (4) are sensors of different types, and the plurality of sensors (4) are respectively mounted at different positions inside the toilet body (1); the method comprises: If a signal is received which is sent by the signal line (7) when the contact of the magnetic switch (6) and the contact of the magnetic device (8) are connected, it is determined that the door panel (2) is in a closed state; If no signal sent by the signal line (7) is received, it is determined that the door panel (2) is in an open state; If it is determined that the door panel (2) is in a closed state and a personnel signal sent by the sensor (4) is received, the person count is controlled to increase by 1; the personnel signal is used to indicate the presence of a person in the toilet body (1); Start timing; if within the preset time period, it is determined that the state of the door panel (2) has changed, or the personnel signal is received again, the person count is controlled to remain unchanged; wherein the change in the state of the door panel (2) refers to the change of the door panel (2) from a closed state to an open state and / or the change of the door panel (2) from an open state to a closed state.
2. The method for counting the number of people in smart toilets according to claim 1, characterized in that: After starting the timing, the method further includes: If, after the preset time period, it is determined that the state of the door panel (2) has changed, and a personnel signal sent by the sensor (4) is received again, the person count is controlled to be increased by 1.
3. The method for counting the number of people in smart toilets according to claim 1, characterized in that: After starting the timing, the method further includes: If, after a preset time period, it is determined that the door panel (2) has been in a closed state, and a personnel signal sent by the sensor (4) is received again, the person count is controlled to remain unchanged.
4. The method for counting the number of people in smart toilets according to claim 1, characterized in that: Before starting the timing, the method further includes: According to the duration of the door panel (2) changing from a closed state to an open state, counting the duration of toilet use of multiple target persons; The average toilet time of the multiple target persons is determined as the preset time.
5. The method for counting the number of people in smart toilets as claimed in claim 4, characterized in that: Before counting the toilet use durations of multiple target persons based on the duration of the door panel (2) changing from a closed state to an open state, the method further comprises: If the smart toilet is a men's toilet, it is determined that the multiple target persons are multiple boys; If the smart toilet is a female toilet, it is determined that the multiple target persons are multiple female students; If the smart toilet is a neutral toilet, the multiple target persons are determined to be multiple boys and multiple girls.
6. The method for counting the number of people in smart toilets according to claim 1, characterized in that: The smart toilet comprises a plurality of sensors (4) of different types, and the step of receiving a personnel signal sent by the sensor (4) comprises: Personnel signals sent by more than a preset number of sensors (4) are received; the preset number is half of the total number of the multiple different types of sensors (4).
7. A smart toilet occupancy counting device, characterized in that: The device is arranged in a controller (5) of a smart toilet, and the smart toilet further comprises a toilet body (1), a door panel (2), a door frame (3), and a sensor (4); a magnetic switch (6) is installed on the door frame (3), and the magnetic switch (6) is connected to a signal line (7); a magnetic device (8) is installed on the door panel (2); the magnetic switch (6) and the magnetic device (8) are installed on the same horizontal plane; the smart toilet comprises a plurality of sensors (4), the plurality of sensors (4) are sensors of different types, and the plurality of sensors (4) are respectively installed at different positions inside the toilet body (1); the device comprises: a determination module, configured to determine that the door panel (2) is in a closed state upon receiving a signal sent by the signal line (7) when the contact of the magnetic switch (6) and the contact of the magnetic device (8) are connected; The determination module is further configured to determine that the door panel (2) is in an open state if no signal sent by the signal line (7) is received; A control module, for controlling a person count to increase by 1 if it is determined that the door panel (2) is in a closed state and a person signal sent by the sensor (4) is received; the person signal is used to indicate that a person is present in the toilet body (1); starting the timer; and controlling the person count to remain unchanged if it is determined that the state of the door panel (2) has changed within a preset time period, or if the person signal is received again; wherein the change in the state of the door panel (2) refers to the change of the door panel (2) from a closed state to an open state and / or the change of the door panel (2) from an open state to a closed state.
8. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the smart toilet occupancy counting method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the processor executes the computer program to implement the smart toilet occupancy counting method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Full-automatic asexuality public toilet based on queuing theory
CN109138515A
Intelligent shared toilet system
CN213773655U