Hotel Room Occupancy Calculation Method and System

By embedding a ToF sensing module at the top of the hotel room door frame, interference from the door panel is eliminated, and point cloud clustering and personnel analysis are performed. This solves the privacy and accuracy issues of headcount calculation in existing technologies, and achieves accurate headcount statistics under privacy protection.

CN122368899APending Publication Date: 2026-07-10WUHAN GROM INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610458112.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-08
Publication Date
2026-07-10

Smart Images

  • Figure CN122368899A_ABST
    Figure CN122368899A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for calculating the number of guests in a hotel room. The method is applied to a data processing unit and includes the following steps: S1: Continuously acquire point cloud data of the door frame passage area by embedding a ToF sensing module at the top of the guest room door frame; S2: If the point cloud data changes, match the acquired point cloud data with a pre-established door opening model to eliminate point cloud data generated by door movement; S3: Perform point cloud clustering based on the remaining point cloud data to distinguish different target objects; S4: Calculate the shortest straight-line distance between the target object and the ToF sensing module; S5: If the shortest straight-line distance is less than a first preset distance, determine that the target object is a person; S6: Calculate the number of guests by analyzing the movement direction of people in the door frame passage area. This invention embeds the ToF sensing module at the top of the guest room door frame, making it visible only when the door is open and invisible when the door is closed, thus enhancing privacy and security, and enabling accurate real-time calculation of the number of guests in the room.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of intelligent hotel management and Internet of Things (IoT) sensing technology, and in particular to a method and system for calculating the number of guests in hotel rooms. Background Technology

[0002] Current hotel room management often struggles to accurately verify the number of guests, leading to energy waste and safety hazards. Most existing hotel room occupancy calculation solutions use millimeter-wave radar or infrared sensors installed in the room ceiling. However, these solutions suffer from drawbacks such as complex installation, disruption of the aesthetics of the room's decor, and insensitivity to detecting stationary individuals. Camera solutions, on the other hand, pose a risk of guest privacy breaches. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to address at least one defect of the related technologies mentioned in the background: the difficulty in accurately verifying the number of people in hotel rooms, and to provide a method and system for calculating the number of people in hotel rooms.

[0004] The technical solution adopted by this invention to solve its technical problem is: to construct a method for calculating the number of guests in a hotel room, applied to a data processing unit, including the following steps: S1: Continuously acquire point cloud data of the door frame passage area by embedding a ToF sensing module at the top of the guest room door frame; S2: If the point cloud data changes, the acquired point cloud data will be matched with the pre-established door opening model to remove the point cloud data generated by the door panel movement. S3: Based on the remaining point cloud data, perform point cloud clustering to distinguish different target objects; S4: Calculate the shortest straight-line distance between the target object and the ToF sensing module; S5: If the shortest straight-line distance is less than the first preset distance, then the target object is determined to be a person; S6: Calculate the number of guests by analyzing the movement direction of the people in the door frame passage area.

[0005] In the method for calculating the number of hotel room guests, it is preferable that the change in point cloud data is the change in point cloud data when the door panel moves alone, the change in point cloud data when the person and the door panel move together, or the change in point cloud data when the person moves alone.

[0006] In the method for calculating the number of hotel room guests, the pre-establishment of the door opening model is preferred, including: Point cloud data of the door frame passage area at different opening speeds of the door panel are obtained in advance by the ToF sensing module embedded in the top of the guest room door frame; Analyze the point cloud data of the door frame passage area under different opening speeds of the door panel, and establish the door opening model. The door opening model integrates the point cloud data of the door panel under different opening speeds.

[0007] In the method for calculating the number of guests in hotel rooms, the preferred step S3 includes: The remaining point cloud data is traversed, and point clouds with a point spacing of less than a second preset distance are grouped into the same target object to distinguish different target objects.

[0008] In the method for calculating the number of hotel room guests, preferred step S6 includes: By analyzing the timing of the appearance of the person on both sides of the virtual counting surface of the ToF sensing module and the speed vector of the person's movement, it can be determined whether the person is entering or leaving the room, thereby calculating the number of people in the guest room.

[0009] In the aforementioned method for calculating the number of guests in a hotel room, the preferred method involves analyzing the timing of people appearing on both sides of the virtual counting surface of the ToF sensing module and the velocity vector of their movement to determine whether they are entering or leaving the room, thereby calculating the number of guests. This includes: A three-dimensional coordinate system is established on the ToF sensing module. The XY plane is the surface where the door frame is located. The surface where the door frame is located is the virtual counting surface. The virtual counting surface is the boundary. The inside of the virtual counting surface is the room, and the outside of the virtual counting surface is the room. The direction perpendicular to the virtual counting surface is the Z-axis. Vz is the component of the velocity vector of the person's movement on the Z-axis. If the sequence of appearance of the person on both sides of the virtual counting surface is unidirectional throughout the entire process, from the outside of the virtual counting surface to the virtual counting surface and then to the inside of the virtual counting surface, and Vz is greater than 0 for multiple consecutive frames, then it is considered a valid entry, and the number of guests is increased by 1. If the time sequence of the personnel appearing on both sides of the virtual counting surface is unidirectional throughout the entire process (inside the virtual counting surface → outside the virtual counting surface), and Vz is less than 0 for multiple consecutive frames, then it is a valid exit, and the number of guests in the room is reduced by 1. Other moves are invalid moves and do not trigger the count.

[0010] In the method for calculating the number of guests in a hotel room, the preferred method further includes: S7: Determine if the number of guests is 0. If yes, proceed to S8; otherwise, proceed to S9. S8: If a person is detected in the guest room by the microwave sensor in the guest room within the first preset time, the number of people in the guest room is incremented by 1, and the process returns to execute S1. S9: Determine if the number of guests has decreased. If yes, proceed to S10; otherwise, return to S1. S10: Determine whether the microwave sensor in the guest room detects someone in the guest room within the first preset time. If yes, return to execute S1; otherwise, execute S11. S11: The number of participants is reduced to zero, and the process returns to execute S1.

[0011] In the method for calculating the number of people in a hotel room, in the preferred step S8, if a person is detected in the room by the microwave sensor in the room within a first preset time, the method further includes waiting for a second preset time. In step S10, determining whether the microwave sensor in the guest room detects someone in the guest room within the first preset time period includes, before: waiting for the second preset time period.

[0012] The present invention also constructs a hotel room occupancy calculation system, including a data processing unit and a ToF sensing module, wherein the data processing unit is used to implement the hotel room occupancy calculation method as described in any of the above claims.

[0013] The hotel room occupancy calculation system preferably also includes a microwave sensor located in the room, which is used to detect whether there is anyone in the room.

[0014] By implementing this invention, the following beneficial effects are achieved: This invention embeds a ToF (Time-of-Flight) sensor module into the top of a hotel room door frame in a close-range scenario. The module is only visible when the door is open and not when it is closed, offering greater privacy and security compared to a camera. Furthermore, this invention achieves accurate real-time calculation of the number of people in the room by eliminating door panel point cloud data, differentiating target objects, identifying people, and analyzing their movement direction. Attached Figure Description

[0015] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 The first flowchart of the hotel room occupancy calculation method of the present invention is shown; Figure 2 The second flowchart of the hotel room occupancy calculation method of the present invention is shown; Figure 3 The logical structure diagram of the hotel room occupancy calculation system of the present invention is shown. Detailed Implementation

[0016] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0017] It should be noted that the flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0018] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0019] The door consists of a door frame and a door panel. The door frame is fixed to the wall, and the door panel is a vertical plane. The door panel is connected to one side of the door frame by a hinge and can rotate around the hinge axis toward the inside or outside of the room. A handle is provided on the side of the door panel away from the hinge.

[0020] Time of Flight (ToF) technology is commonly used in fields such as fall detection in nursing homes and energy-saving control in smart homes. However, there is currently a lack of effective solutions for its application in special scenarios such as hotel room door frames, which are narrow and easily obstructed by door panels. This is because the opening and closing of the door panel can cause interference, leading to inaccurate counting. Therefore, this invention proposes a method for analyzing people entering and exiting the room and counting the number of people in the room using ToF technology, which is installed inside the door frame of a hotel room.

[0021] The ToF sensing module of this invention is embedded in the top of a door frame, and the top of the door frame has a corresponding hole for the ToF sensing module. The ToF sensing module is a ToF array sensor, and its transmission and reception range covers the door frame passage area, which includes the area where the door frame is located and the area where the door moves. The ToF sensing module can emit invisible infrared pulses and complete real-time ranging of the door frame passage area for multiple frames per second, for example, 30 frames per second. One frame equals a set of point cloud data composed of three-dimensional coordinate points, and then the straight-line distance between each point and the ToF sensing module is measured.

[0022] like Figure 1 As shown, some embodiments of the present invention disclose a method for calculating the number of guests in a hotel room, applied to a data processing unit, including the following steps: S1: Continuously acquire point cloud data of the door frame passage area by embedding a ToF sensing module at the top of the guest room door frame; S2: If the point cloud data changes, the acquired point cloud data will be matched with the pre-established door opening model to remove the point cloud data generated by the door panel movement. S3: Based on the remaining point cloud data, perform point cloud clustering to distinguish different target objects; S4: Calculate the shortest straight-line distance between the target object and the ToF sensing module; S5: If the shortest straight-line distance is less than the first preset distance, then the target object is determined to be a person; S6: Calculate the number of guests by analyzing the movement direction of people in the door frame passage area.

[0023] This invention embeds a ToF (Time-of-Flight) sensor module into the top of a hotel room door frame in a close-range scenario. The module is only visible when the door is open and not when it is closed, offering greater privacy and security compared to a camera. Furthermore, this invention achieves accurate real-time calculation of the number of people in the room by eliminating door panel point cloud data, differentiating target objects, identifying people, and analyzing their movement direction.

[0024] In some embodiments, the change in point cloud data refers to the change in point cloud data when the door panel moves alone, the change in point cloud data when the person and the door panel move together, or the change in point cloud data when the person moves alone. The movement of the person and the door panel refers to the process of the person pushing open or closing the door.

[0025] In some embodiments, the pre-establishment of the door opening model includes: Point cloud data of the door frame passage area at different door opening speeds is obtained in advance by using a ToF sensing module embedded in the top of the guest room door frame; Analyze the point cloud data of the door frame passage area under different door opening speeds, and establish a door opening model. The door opening model integrates the point cloud data of the door panel under different door opening speeds, and removes other point cloud data, including the point cloud data of the ground in the door frame passage area.

[0026] The acquired point cloud data will then be matched with the pre-established door opening model, and the matched point cloud data will be removed to eliminate the point cloud data generated by the movement of the door panel.

[0027] Specifically, when the door is closed, the top of the door panel faces the ToF sensing module, the point cloud on the top of the door panel is a flat plane, and the distance and height between the top of the door panel and the ToF sensing module on the top of the door frame are uniform.

[0028] As the door panel begins to move and gradually opens, the top of the door panel is no longer directly opposite the ToF sensing module. The distance between the top of the hinge side of the door panel and the ToF sensing module at the top of the door frame changes very little. The distance between the top of the handle side of the door panel and the ToF sensing module at the top of the door frame will become farther and farther away, and the point cloud will change from a flat plane to a tilted plane.

[0029] To more easily distinguish which point clouds belong to the door panel and which do not, the different opening speeds of the door panel are not the result of manual opening. Instead, they can be achieved through mechanical automatic control. If the door is opened manually, the calculated distances are the distances between the top of the door panel and the top of the door frame's ToF sensor module, and the distance between the person's head and the top of the door frame's ToF sensor module. These two distances are not significantly different because the height difference between the door panel and the person is not substantial, making it difficult to identify which point clouds belong to the door panel. However, if the door panel is opened through mechanical automatic control, the calculated distances are the distances between the top of the door panel and the top of the door frame's ToF sensor module, and the distance between the floor of the door frame passage and the top of the door frame's ToF sensor module. These two distances are significantly different, allowing for a clearer distinction of which point clouds belong to the door panel when building the door opening model. This facilitates better integration of point cloud data belonging to the door panel, resulting in better subsequent matching and the removal of noise caused by door panel movement.

[0030] During the automatic opening of the door panel, the ToF sensing module continuously collects point cloud data of the door frame passage area at different times. This data covers the point cloud changes at different opening speeds throughout the dynamic process of the door panel from closing to fully opening and back to closing. For each specific opening speed, the data processing unit records the point cloud characteristics of the door panel at various positions, such as the plane tilt angle of the point cloud, the density distribution of the point cloud, and the coordinate range of the point cloud in space. By conducting in-depth analysis of this data, such as using clustering algorithms to classify point clouds with similar characteristics, the system can accurately extract the point cloud data set that belongs only to the door panel at that opening speed. At the same time, point cloud data that clearly belong to the ground or other fixed structures of the door frame will be marked and excluded from the door panel point cloud. In this way, a corresponding sub-model is constructed for each door panel opening speed, and these sub-models together constitute a complete door opening model. In practical applications, after the ToF sensing module acquires point cloud data in real time, it matches the real-time point cloud data with the door panel point cloud data in the model one by one. For example, it checks whether the tilt angle of the point cloud matches and whether the coordinate range is consistent. This allows for the accurate identification and elimination of point cloud data generated by the movement of the door panel, laying the foundation for the subsequent accurate identification of human target point clouds.

[0031] It should be noted that the door panel, door frame, and ToF sensor module used to build the door opening model may be different from the door panel, door frame, and ToF sensor module of the guest room where the user is staying, because it involves mechanical automatic control, while the guest room where the user is actually staying can be opened manually.

[0032] In some embodiments, step S3 (clustering the point cloud based on the remaining point cloud data to distinguish different target objects) specifically includes: Traverse the remaining point cloud data and group point clouds with a point spacing less than the second preset distance into the same target object to distinguish different target objects.

[0033] For example, when two people are standing in a doorway, the point clouds above their heads and shoulders will form relatively independent dense clusters. The distance between point clouds within each cluster is small, all less than a second preset distance, and therefore they will be identified as two different target objects. However, for a single person, the point clouds above their head and shoulders will cluster together, forming a complete target object point cloud cluster. This point-distance-based clustering method effectively distinguishes the point clouds of different people, laying the foundation for accurate headcount counting. The value of the second preset distance needs to be reasonably set based on the possible standing distances of people in the actual application scenario. It can generally be calibrated through a large amount of experimental data to ensure accurate differentiation of different people without missegmenting the point clouds of different parts of the same person.

[0034] In some embodiments, step S6 (calculating the number of guests by analyzing the movement direction of people in the door frame passage area) specifically includes: By analyzing the timing of people appearing on both sides of the virtual counting surface of the ToF sensing module and the speed vector of people's movement, it is possible to determine whether people are entering or leaving the room, thereby calculating the number of people in the guest room.

[0035] In some embodiments, the timing of people appearing on both sides of the virtual counting surface of the ToF sensing module and the velocity vector of their movement are analyzed to determine whether people are entering or leaving the room, thereby calculating the number of guests. Specifically, this includes: A three-dimensional coordinate system is established on the ToF sensing module. The XY plane is the surface where the door frame is located, and the surface where the door frame is located is the virtual counting surface. With the virtual counting surface as the boundary, the inside of the virtual counting surface is the room, and the outside of the virtual counting surface is the room. The direction perpendicular to the virtual counting surface is the Z-axis, and Vz is the component of the velocity vector of the person's movement on the Z-axis. If the timing of personnel appearing on both sides of the virtual counting surface is unidirectional throughout the entire process (outside the virtual counting surface → virtual counting surface → inside the virtual counting surface), and Vz is greater than 0 for multiple consecutive frames, then it is considered a valid entry, and the number of guests is increased by 1. If the timing of personnel appearing on both sides of the virtual counting plane is unidirectional throughout the entire process (inside the virtual counting plane → virtual counting plane → outside the virtual counting plane), and Vz is less than 0 for multiple consecutive frames, then it is considered a valid exit, and the number of guests in the room is reduced by 1. Other moves are invalid moves and do not trigger the count.

[0036] Specifically, the ToF sensing module is a ToF array sensor. A three-dimensional coordinate system is established with the center of the ToF array sensor as the origin. The XY plane represents the surface of the door frame, which is also the virtual counting surface. The X-axis represents the width, and the Y-axis represents the height. The virtual counting surface serves as the boundary, with the interior of the room defined as the inner side and the exterior as the outer side. The direction perpendicular to the virtual counting surface is the Z-axis. By analyzing the changes in the centroid position of the person in continuous frame point cloud data, the velocity vector of the person's movement is calculated. This velocity vector is decomposed into three components: (Vx, Vy, Vz), where Vz is the component of the velocity vector along the Z-axis.

[0037] If the person is outside the virtual counting surface, then Z < 0; if the person moves across the virtual counting surface, then Z is approximately equal to 0; if the person is inside the virtual counting surface, then Z > 0.

[0038] If people move into the room, then Vz > 0; if people move out of the room, then Vz < 0; if people do not move in or out, then Vz is approximately equal to 0.

[0039] Record the Z value of the person in each frame to form a time-series trajectory, but relying solely on the time-series trajectory will result in a large number of false counts, and the role of the velocity vector is to filter out all those "false passes".

[0040] Scenario 1: People enter the room normally, for example, people walk normally from the outside corridor to the inside of the room without stopping or turning back, and pass through the door frame to enter the room completely.

[0041] The timing sequence is as follows: outside the room (Z < 0) → virtual counting surface (Z approximately equal to 0) → inside the room (Z > 0), with no reversal throughout the entire process.

[0042] Velocity vector: Vz > 0 for multiple consecutive frames, with no positive or negative jumps.

[0043] Final judgment: The timing and velocity vectors match perfectly, confirming a valid entry, and the number of guests is increased by 1.

[0044] Scenario 2: People leave the house normally, for example, people walk from inside the house to outside the house, and leave the room completely through the door frame.

[0045] The time sequence is as follows: inside the room (Z > 0) → virtual counting surface (Z approximately equal to 0) → outside the room (Z < 0), with no reversal throughout the entire process.

[0046] Velocity vector: Vz < 0 for multiple consecutive frames, with no positive or negative jumps.

[0047] Final judgment: The timing and velocity vectors match perfectly, confirming a valid exit, and the number of guests is reduced by 1.

[0048] Scenario 3: People move back and forth at the doorway. For example, when a person stands at the doorway and talks to someone inside, their body may lean back and forth slightly, or sway left and right. Their head, shoulders, or arms may accidentally cross the virtual counting surface slightly, but the person themselves does not move.

[0049] The sequence is: outside the room → virtual counting surface → inside the room → virtual counting surface → outside the room → virtual counting surface → inside the room, repeatedly crossing the virtual counting surface, which looks like multiple entries and exits.

[0050] In this situation, if you only look at the timing, you might mistakenly think that "it went in once, went out once, and went in again," causing the count to jump wildly and count three times in a short period of time.

[0051] Velocity vector: The Vz value alternates between positive and negative, jumping back and forth, and does not maintain the same direction for multiple consecutive frames.

[0052] Final judgment: Invalid shaking, no count is triggered.

[0053] Scenario 4: People turn back halfway. For example, someone has already reached the door and stepped into the room, but suddenly remembers that they forgot their phone / keys, so they immediately turn around and go back outside without actually entering the room.

[0054] The sequence is: outside the room → virtual counting surface → inside the room → virtual counting surface → outside the room, which looks like two complete actions: "entering the door + leaving the door".

[0055] In this situation, if you only look at the time sequence, you might mistakenly think that "it entered once and then exited once," so the entry count is increased by 1 and the exit count is increased by 1, resulting in 2 invalid counts out of nowhere.

[0056] Velocity vector: The Vz value is positive at first (moving into the room), and then immediately reverses to negative (moving out of the room), with the direction reversed by 180°. There is no unidirectional motion in multiple consecutive frames.

[0057] Final judgment: This is a reversal action, and no count is triggered.

[0058] Scenario 5: People walk horizontally across the door frame. For example, people walk horizontally in the corridor, from the left side of the door to the right side, staying outside the room the whole time, just passing by the door without any intention of going in or out.

[0059] The time sequence is from left outside the room to right outside the room, and the Z value remains unchanged throughout the process.

[0060] Velocity vector: The Vz value is always approximately equal to 0. There is no movement in the Z-axis direction throughout the entire process, only the velocity in the X direction (left and right).

[0061] Final judgment: This is a passing action and does not trigger any count.

[0062] In some embodiments, such as Figure 2As shown, the method also includes: S7: Determine if the number of guests is 0. If yes, proceed to S8; otherwise, proceed to S9. S8: If a person is detected in the guest room by the microwave sensor in the guest room within the first preset time, the number of people in the guest room is incremented by 1, and the process returns to execute S1. S9: Determine if the number of guests has decreased. If yes, proceed to S10; otherwise, return to S1. S10: Determine whether the microwave sensor in the guest room detects someone in the guest room within the first preset time. If yes, return to execute S1; otherwise, execute S11. S11: The number of participants is reduced to zero, and the process returns to execute S1.

[0063] Specifically, this embodiment aims to perform secondary verification and correction on the number of people in the guest rooms by combining the detection results of microwave sensors in the guest rooms, so as to avoid the deviation in the number of people count caused by sensor misjudgment or special scenarios. In step S8, when the number of people in the guest rooms is initially determined to be 0, if the microwave sensors in the guest rooms detect human activity signals within a first preset time (e.g., 5 minutes), it indicates that people have actually entered the guest rooms but have not been accurately captured by the ToF sensor module. At this time, the number of people in the guest rooms is incremented by 1, and the process returns to step S1 to conduct a new round of entry and exit status monitoring to ensure that the number of people count remains accurate from the initial stage. Step S9, if the number of people in the guest rooms is not 0, further determines whether the number of people is showing a decreasing trend. This is usually related to the exit actions detected by the ToF sensor module, i.e., the result calculated in step S6. If the number of people has not decreased, it means that the current status of people in the guest rooms is stable, and the process returns directly to S1 to continue monitoring; if the number of people is determined to have decreased, the process proceeds to step S10. Step S10 also verifies the presence of guests using microwave sensors in the guest rooms. If the sensors detect someone within the first preset time, it indicates that someone is still in the room, and the process returns to S1. If the sensors do not detect anyone within the first preset time, step S11 is executed to reset the guest room occupancy to zero, assuming all guests have left, and the monitoring process restarts. This closed-loop judgment and feedback mechanism effectively improves the real-time performance and accuracy of guest room occupancy statistics, providing reliable data support for hotel room management, resource allocation, and security.

[0064] In some embodiments, such as Figure 2 As shown, in step S8, if the microwave sensor in the room detects that someone is in the room within the first preset time, the process also includes waiting for a second preset time, such as 3 minutes. In step S10, it is determined whether the microwave sensor in the room detects someone in the room within a first preset time. Before this, it also includes waiting for a second preset time.

[0065] Once the ToF sensor module detects people entering and exiting and calculates the change in the number of people, immediately initiating microwave sensor verification might yield inaccurate results. Waiting for a second preset time provides a buffer period, allowing people's activity to stabilize and reducing the impact of short-term dynamic changes on the detection results. This further improves the reliability and accuracy of room occupancy statistics, ensuring that subsequent microwave sensor-based verification steps more accurately reflect the actual number of people in the rooms.

[0066] like Figure 3 As shown, some embodiments of the present invention disclose a hotel room occupancy calculation system, including a data processing unit and a ToF sensing module. The data processing unit is used to implement the hotel room occupancy calculation method described in any of the above embodiments, which will not be repeated here.

[0067] In some embodiments, the hotel room occupancy calculation system also includes a microwave sensor located in the room, which is used to detect whether there is someone in the room.

[0068] It is understood that the above embodiments only illustrate some implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can freely combine the above embodiments or technical features without departing from the concept of the present invention, and can also make several modifications and improvements, all of which fall within the protection scope of the present invention. That is, the embodiments described in "some embodiments" can be freely combined with any of the embodiments above and below. Therefore, all equivalent transformations and modifications made within the scope of the claims of the present invention should be covered by the claims of the present invention.

Claims

1. A method for calculating the number of guests in a hotel room, characterized in that, Applied to a data processing unit, it includes the following steps: S1: Continuously acquire point cloud data of the door frame passage area by embedding a ToF sensing module at the top of the guest room door frame; S2: If the point cloud data changes, the acquired point cloud data will be matched with the pre-established door opening model to remove the point cloud data generated by the door panel movement. S3: Based on the remaining point cloud data, perform point cloud clustering to distinguish different target objects; S4: Calculate the shortest straight-line distance between the target object and the ToF sensing module; S5: If the shortest straight-line distance is less than the first preset distance, then the target object is determined to be a person; S6: Calculate the number of guests by analyzing the movement direction of the people in the door frame passage area.

2. The method for calculating the number of guests in a hotel room according to claim 1, characterized in that, The changes in point cloud data can be defined as changes in point cloud data when the door panel moves alone, changes in point cloud data when the person and the door panel move together, or changes in point cloud data when the person moves alone.

3. The method for calculating the number of guests in a hotel room according to claim 1, characterized in that, The pre-establishment of the door opening model includes: Point cloud data of the door frame passage area at different opening speeds of the door panel are obtained in advance by the ToF sensing module embedded in the top of the guest room door frame; Analyze the point cloud data of the door frame passage area under different opening speeds of the door panel, and establish the door opening model. The door opening model integrates the point cloud data of the door panel under different opening speeds.

4. The method for calculating the number of guests in a hotel room according to claim 1, characterized in that, Step S3 includes: The remaining point cloud data is traversed, and point clouds with a point spacing of less than a second preset distance are grouped into the same target object to distinguish different target objects.

5. The method for calculating the number of guests in a hotel room according to claim 1, characterized in that, Step S6 includes: By analyzing the timing of the appearance of the person on both sides of the virtual counting surface of the ToF sensing module and the speed vector of the person's movement, it can be determined whether the person is entering or leaving the room, thereby calculating the number of people in the guest room.

6. The method for calculating the number of guests in a hotel room according to claim 1, characterized in that, The method of determining whether a person is entering or leaving a room by analyzing the timing of their appearance on both sides of the virtual counting surface of the ToF sensing module and the velocity vector of their movement, thereby calculating the number of guests, includes: A three-dimensional coordinate system is established on the ToF sensing module. The XY plane is the surface where the door frame is located. The surface where the door frame is located is the virtual counting surface. The virtual counting surface is the boundary. The inside of the virtual counting surface is the room, and the outside of the virtual counting surface is the room. The direction perpendicular to the virtual counting surface is the Z-axis. Vz is the component of the velocity vector of the person's movement on the Z-axis. If the sequence of appearance of the person on both sides of the virtual counting surface is unidirectional throughout the entire process, from the outside of the virtual counting surface to the virtual counting surface and then to the inside of the virtual counting surface, and Vz is greater than 0 for multiple consecutive frames, then it is considered a valid entry, and the number of guests is increased by 1. If the time sequence of the personnel appearing on both sides of the virtual counting surface is unidirectional throughout the entire process (inside the virtual counting surface → outside the virtual counting surface), and Vz is less than 0 for multiple consecutive frames, then it is a valid exit, and the number of guests in the room is reduced by 1. Other moves are invalid moves and do not trigger the count.

7. The method for calculating the number of guests in a hotel room according to claim 1, characterized in that, The method for calculating the number of hotel room guests also includes: S7: Determine if the number of guests is 0. If yes, proceed to S8; otherwise, proceed to S9. S8: If a person is detected in the guest room by the microwave sensor in the guest room within the first preset time, the number of people in the guest room is incremented by 1, and the process returns to execute S1. S9: Determine if the number of guests has decreased. If yes, proceed to S10; otherwise, return to S1. S10: Determine whether the microwave sensor in the guest room detects someone in the guest room within the first preset time. If yes, return to execute S1; otherwise, execute S11. S11: The number of participants is reduced to zero, and the process returns to execute S1.

8. The method for calculating the number of guests in a hotel room according to claim 7, characterized in that, In step S8, if a person is detected in the guest room by the microwave sensor in the guest room within the first preset time, the process also includes waiting for a second preset time. In step S10, determining whether the microwave sensor in the guest room detects someone in the guest room within the first preset time period includes, before: waiting for the second preset time period.

9. A hotel room occupancy calculation system, characterized in that, It includes a data processing unit and a ToF sensing module, wherein the data processing unit is used to implement the hotel room occupancy calculation method as described in any one of claims 1-8.

10. The hotel room occupancy calculation system according to claim 9, characterized in that, It also includes microwave sensors located in the guest rooms, which are used to detect whether there is anyone in the guest room.