Parking space calculation method and device

By setting up infrared detectors and pressure sensors on the bus and combining convolutional neural networks, the problem of difficulty for drivers to judge the passenger condition in the car is solved, and accurate calculation of the number of people in the car and space judgment is achieved to ensure safety and standardize passenger behavior.

CN120299290APending Publication Date: 2025-07-11姚嘉琪
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510718839.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In double-decker buses or corridor-style buses, it is difficult for drivers to accurately judge the passengers' riding conditions in the car, especially without a flight attendant, which cannot stop the dangerous behavior of passengers leaving their seats in a timely manner.

Method used

Using a combination of infrared detectors and pressure sensors, the infrared detectors are set up at different locations of the vehicle to detect the passengers getting on and off the vehicle, and the convolutional neural network is used to judge the shape of the object to distinguish between human bodies and other objects. Combined with pressure sensors, determine whether there are people on the seat, and realize accurate calculation of the number of people in the car and the judgment of vacancy.

Benefits of technology

Accurate calculation of the number of passengers in the car and space judgment, prevent passengers from not taking seats, improve drivers' understanding of the situation in the car, and ensure safety and passengers' standardized behavior.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120299290A_ABST
    Figure CN120299290A_ABST
Patent Text Reader

Abstract

The invention discloses a parking space calculation method and device, and belongs to the technical field of parking space calculation. Based on the data sent by the first infrared detector and the data sent by the second infrared detector, the number of people changing in the front door is obtained. Based on the data sent by the third infrared detector and the data sent by the fourth infrared detector, the number of people changing the back door is obtained. The current number of people in the vehicle is obtained by adding the number of people getting on the front door and the number of people getting on the rear door and subtracting the number of people getting off the front door and the number of people getting off the rear door. A plurality of seat temperature values and a plurality of seat pressure values are obtained. And if the seat temperature value and the seat pressure value are 1, adding 1 to the number of people on the seats. And subtracting the number of people on the seat from the current number of people in the vehicle to judge whether people do not sit in the seat. Whether the infrared detector detects the human body or not can be accurately judged, and the situation of inaccurate detection caused by shielding due to the fact that multiple persons are located at the same horizontal position is prevented.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of parking space calculation, and in particular to a parking space calculation method and device. Background Art

[0002] At present, for double-decker buses and corridor buses (two-section carriages), without a conductor, it is very difficult for the driver to clearly know the occupancy of passengers in the carriage and whether there are enough empty seats.

[0003] Although there are surveillance cameras in the vehicle for the driver to observe, the driver's attention is basically focused on driving the vehicle. Even if observed through the camera, the effect is not very good. At the same time, when a passenger leaves his seat during the vehicle's journey, this dangerous behavior cannot be stopped by the driver in time. Summary of the Invention

[0004] The purpose of the present invention is to provide a parking space calculation method and device to solve the problems raised in the background art.

[0005] In a first aspect, an embodiment of the present invention provides a parking space calculation method, including: obtaining the current number of people in the vehicle;

[0006] Based on the data sent by the first infrared detector and the data sent by the second infrared detector, obtaining the number of people changing at the front door; the number of people changing at the front door includes the number of people getting on at the front door and the number of people getting off at the front door;

[0007] Based on the data sent by the third infrared detector and the data sent by the fourth infrared detector, obtaining the number of people changing at the back door; the number of people changing at the back door includes the number of people getting off at the back door and the number of people getting on at the back door;

[0008] Adding the number of people getting on at the front door and the number of people getting on at the back door to the number of people in the vehicle, and subtracting the number of people getting off at the front door and the number of people getting off at the back door to obtain the current number of people in the vehicle;

[0009] Obtaining a plurality of seat temperature values and a plurality of seat pressure values;

[0010] If the seat temperature value is 1 and the seat pressure value is 1, adding 1 to the number of people on the seat;

[0011] Subtracting the number of people on the seat from the current number of people in the vehicle to determine whether there are people not sitting on the seat; when the result of subtracting the number of people on the seat from the current number of people in the vehicle is 0, it means that all people are already on the seat; if the result of subtracting the number of people on the seat from the current number of people in the vehicle is greater than 0, it means that there are people not on the seat.

[0012] Optionally, obtaining the number of people changing at the front door based on the first infrared detection value and the second infrared detection value includes:

[0013] If the first data sent by the first infrared detector is received at the first time, and the second data sent by the second infrared detector is received at the second time, it is determined that someone gets on the vehicle, and the number of people getting on through the front door is obtained; the first infrared detector is arranged outside the front door of the vehicle, the second infrared detector is arranged on the roof of the front door of the vehicle, and the first time is earlier than the second time;

[0014] If the third data sent by the second infrared detector is received at the third time, and the fourth data sent by the first infrared detector is received at the fourth time, it is determined that someone gets off the vehicle, and the number of people getting off through the front door is obtained; the third time is earlier than the fourth time.

[0015] Optionally, the step of if the first data sent by the first infrared detector is received at the first time, and the second data sent by the second infrared detector is received at the second time, it is determined that someone gets on the vehicle, and the number of people getting on through the front door is obtained includes:

[0016] If the first data sent by the first infrared detector is received at the first time, the front door previous value is set to 1; the front door previous value of 1 indicates that an object passes through the position in front of the front door; the front door previous value of 0 indicates that no object passes through the position in front of the front door;

[0017] If the front door previous value is 1, the rear door value is 0, and the second data sent by the second infrared detector is received at the second time, the rear door value is set to 1; the rear door value of 1 indicates that an object passes through the position behind the front door; the rear door value of 0 indicates that no object passes through the position behind the front door;

[0018] The second infrared detector measures the distance and detects the object shape to obtain the number of people getting on through the front door; the front door previous value is set to 0, and the rear door value is set to 0.

[0019] Optionally, the step of the second infrared detector measures the distance and detects the object shape to obtain the number of people getting on through the front door includes:

[0020] The second infrared detector measures the distance to obtain an infrared array; the elements in the infrared array represent the distance of the object from the vehicle lamp; the infrared array is a one-dimensional array;

[0021] Taking the distance from the second infrared detector to the vehicle bottom surface as the height and the number of the second infrared detectors as the width to construct an infrared two-dimensional array; the elements in the infrared two-dimensional array are 0;

[0022] Subtracting the elements in the infrared array from the distance from the second infrared detector to the vehicle bottom surface to obtain the infrared detection position;

[0023] Setting the element at the infrared detection position in the two-dimensional array to 1 to obtain a two-dimensional array for constructing the object shape; through a person number detection model, according to the two-dimensional array for constructing the object shape, detecting the shape and judging whether it is a person to obtain multiple human positions;

[0024] Traverse and detect the number of human positions to obtain the number of people getting on the bus at the front door. Optionally, the training method of the number detection model is as follows:

[0025] Obtain a training set, where the training set includes training data and annotation data. The training data includes multiple training two-dimensional arrays; the training two-dimensional arrays represent two-dimensional arrays detected by multiple infrared detectors; the annotation data includes an annotation existence value and an annotation position; when the annotation existence value is 1, it indicates that the object detected by infrared is a person, and when the annotation existence value is 0, it indicates that the object detected by infrared is not a person; the annotation position includes an annotation center point and an annotation width and height; the annotation center point and the annotation width and height represent the position of the human body in the two-dimensional array.

[0026] Input the training two-dimensional array into a convolutional neural network to obtain a detection feature map; the layers of the detection feature map represent whether a human body exists and the position of the human body.

[0027] Calculate the loss between the detection feature map and the annotation data to obtain a loss value.

[0028] Obtain the current training iteration number of the face recognition model and the maximum iteration number preset for the training of the face recognition model.

[0029] Stop training when the loss value is less than or equal to the threshold or the training iteration number reaches the maximum iteration number to obtain a trained face recognition model.

[0030] Optionally, it is characterized in that if the third data sent by the second infrared detector is received at the third time and the fourth data sent by the first infrared detector is received at the fourth time, it is determined that someone gets off the bus, and the number of people getting off the bus at the front door is obtained, including:

[0031] If the third data sent by the second infrared detector is received at the third time, set the value behind the door to 1; the value behind the door being 1 indicates that an object has passed through the position behind the door; the value behind the door being 0 indicates that no object has passed through the position behind the door.

[0032] If the value behind the door is 1, the value in front of the door is 0, and the fourth data sent by the first infrared detector is received at the fourth time, set the value in front of the door to 1; the value in front of the door being 1 indicates that an object has passed through the position in front of the door; the value in front of the door being 0 indicates that no object has passed through the position in front of the door.

[0033] The second infrared detector measures the distance and detects the shape of the object to obtain the number of people getting off the bus at the front door; set the value in front of the door to 0 and the value behind the door to 0.

[0034] Optionally, obtaining the number of people changing at the rear door based on the data sent by the third infrared detector and the data sent by the fourth infrared detector includes:

[0035] When the fifth data sent by the third infrared detector is received at the fifth time and the sixth data sent by the fourth infrared detector is received at the sixth time, it is determined that someone gets on the vehicle, and the number of people getting on the vehicle at the rear door is obtained; the third infrared detector is disposed outside the rear door of the vehicle, the fourth infrared detector is disposed on the roof of the rear door of the vehicle, and the fifth time is earlier than the sixth time;

[0036] When the seventh data sent by the fourth infrared detector is received at the seventh time and the eighth data sent by the third infrared detector is received at the eighth time, it is determined that someone gets off the vehicle, and the number of people getting off the vehicle at the rear door is obtained; the seventh time is earlier than the eighth time.

[0037] In a second aspect, an embodiment of the present invention provides a parking space calculation device, including:

[0038] A first infrared detector, a second infrared detector, a third infrared detector, a fourth infrared detector, a pressure sensor, a temperature sensor, and a processor, where the processor is connected to the first infrared detector, the second infrared detector, the third infrared detector, the fourth infrared detector, the pressure sensor, the temperature sensor, and the processor;

[0039] The processor is configured to: obtain the number of people in the vehicle; the number of people in the vehicle represents the current number of people in the vehicle; based on the data sent by the first infrared detector and the data sent by the second infrared detector, obtain the number of people changing at the front door; the number of people changing at the front door includes the number of people getting on the front door and the number of people getting off the front door; based on the data sent by the third infrared detector and the data sent by the fourth infrared detector, obtain the number of people changing at the rear door; the number of people changing at the rear door includes the number of people getting off the rear door and the number of people getting on the rear door; the number of people changing at the rear door includes the number of people getting off the rear door and the number of people getting on the rear door; add the number of people getting on the front door and the number of people getting on the rear door to the number of people in the vehicle, and subtract the number of people getting off the front door and the number of people getting off the rear door to obtain the current number of people in the vehicle; obtain a plurality of seat temperature values and a plurality of seat pressure values; if the seat temperature value is 1 and the seat pressure value is 1, increment the number of people on the seat by 1; subtract the number of people on the seat from the current number of people in the vehicle to determine whether there are people not seated; when the current number of people in the vehicle minus the number of people on the seat is equal to 0, it means that all are already on the seats; if the current number of people in the vehicle minus the number of people on the seat is greater than 0, it means that there are people not on the seats;

[0040] The first infrared detector and the second infrared detector are configured to obtain the number of people changing at the front door based on the data sent by the first infrared detector and the data sent by the second infrared detector;

[0041] The third infrared detector and the fourth infrared detector are used to obtain the number of people changing at the back door based on the data sent by the third infrared detector and the data sent by the fourth infrared detector.

[0042] The pressure sensor is used to obtain a plurality of seat pressure values; the temperature sensor is used to obtain a plurality of seat temperature values. Compared with the prior art, the technical effects and advantages of the present invention are as follows:

[0043] Therefore, by setting infrared devices at two different positions, when an object is detected in front of the car door first and then behind the car door, it means getting on the car. The front and rear detections use the values in front of and behind the car door for judgment, which can more accurately judge the getting on and off of items. Setting the infrared detector on the roof can obtain the distance of each position on the upper part of the object that is not covered according to the distance of the object from the roof. Thus, it can be converted into two-dimensional information, enabling detection according to shape alignment. Then, by comparing the differences between the human body shape and other shapes, it is determined whether the object passing through the infrared detector is a human body or other objects. Convolution is used for comparison according to the object shape, and through a convolutional neural network, it is judged whether the distance depth meets that of a human body, such as the distance position between the head and shoulders. Thus, it is detected whether it is a human body, and the number of people passing through is obtained. It can accurately judge whether the object detected by the infrared detector is a human body, and prevent the inaccurate detection caused by the occlusion of multiple people at the same horizontal position. It can record the passengers getting on and off the car, and then count the number of people in the vehicle. The pressure sensor and the temperature sensor can determine whether there is someone on the seat. The remaining empty seats in the vehicle and the positions of the empty seats are obtained, which is convenient for the driver to understand the seat situation. This seat calculation method and device can not only calculate the quantity, but also perform detection and warning. Description of the Drawings

[0044] FIG. 1 is a flowchart of a seat calculation method provided by an embodiment of the present invention.

[0045] FIG. 2 is a cross-sectional view of a seat calculation device of the present invention.

[0046] FIG. 3 is a schematic block diagram of an electronic device provided by an embodiment of the present invention.

[0047] Reference numerals in the figures: bus 500; receiver 501; processor 502; transmitter 503; memory 504; bus interface 505. Detailed Embodiments

[0048] In the following description, numerous specific details are given to provide a more thorough understanding of the present invention. However, it is obvious to those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, some well-known technical features are not described to avoid confusion with the present invention.

[0049] The connection method can adopt existing methods such as bonding, welding, bolt connection, etc., subject to actual needs. In order to count the passengers in the vehicle without the driver having to count them one by one, a parking space calculation method as shown in Figure 1 includes:

[0050] S101: Obtain the number of people in the vehicle. The number of people in the vehicle represents the current number of people in the vehicle.

[0051] S102: Based on the data sent by the first infrared detector and the data sent by the second infrared detector, obtain the number of people changing at the front door. The number of people changing at the front door includes the number of people getting on at the front door and the number of people getting off at the front door.

[0052] S103: Based on the data sent by the third infrared detector and the data sent by the fourth infrared detector, obtain the number of people changing at the back door. The number of people changing at the back door includes the number of people getting off at the back door and the number of people getting on at the back door.

[0053] Among them, the calculation methods of the third infrared detector and the fourth infrared detector for the number of people getting off and getting on at the back of the vehicle are the same as those of the first infrared detector for the number of people getting off and getting on at the front door of the vehicle.

[0054] S104: Add the number of people in the vehicle, the number of people getting on at the front door, and the number of people getting on at the back door, and subtract the number of people getting off at the front door and the number of people getting off at the back door to obtain the current number of people in the vehicle.

[0055] S105: Obtain multiple seat temperature values and multiple seat pressure values.

[0056] S106: If the seat temperature value is 1 and the seat pressure value is 1, add 1 to the number of people on the seat. S107: Subtract the number of people on the seat from the current number of people in the vehicle to determine whether there are people not seated. When the current number of people in the vehicle minus the number of people on the seat is equal to 0, it means that all are already on the seat. If the current number of people in the vehicle minus the number of people on the seat is greater than 0, it means that there are people not on the seat.

[0057] Optionally, obtaining the number of people changing at the front door based on the first infrared detection value and the second infrared detection value includes:

[0058] If the first data sent by the first infrared detector is received at the first time and the second data sent by the second infrared detector is received at the second time, it is determined that someone is getting on the vehicle, and the number of people getting on at the front door is obtained. The first infrared detector is set outside the front door of the vehicle, and the second infrared detector is set on the top of the front door of the vehicle. The first time is earlier than the second time.

[0059] Among them, the first data indicates that the first infrared detector detects an object, and the second data indicates that the second infrared detector detects an object.

[0060] If the third data sent by the second infrared detector is received at the third time and the fourth data sent by the first infrared detector is received at the fourth time, it is determined that someone gets off the vehicle, and the number of people getting off at the front door is obtained; the third time is earlier than the fourth time.

[0061] Wherein, the third data indicates that an object is detected by the third infrared detector, and the fourth data indicates that an object is detected by the fourth infrared detector.

[0062] Through the above method, due to the characteristics of infrared rays, an infrared detector can only detect that an object passes by and cannot detect getting on or off the vehicle. Therefore, infrared devices are set at two different positions, and the time when an object is detected is different to determine getting on or off the vehicle. When an object is detected in front of the vehicle door first and then behind the vehicle door, it indicates getting on the vehicle. When an object is detected behind the vehicle door first and then in front of the vehicle door, it indicates getting on the vehicle.

[0063] Optionally, the step of determining that someone gets on the vehicle and obtaining the number of people getting on at the front door if the first data sent by the first infrared detector is received at the first time and the second data sent by the second infrared detector is received at the second time includes:

[0064] If the first data sent by the first infrared detector is received at the first time, the value in front of the vehicle door is set to 1. The value of 1 in front of the vehicle door indicates that an object passes through the position in front of the vehicle door. The value of 0 in front of the vehicle door indicates that no object passes through the position in front of the vehicle door.

[0065] If the value in front of the vehicle door is 1, the value behind the vehicle door is 0, and the second data sent by the second infrared detector is received at the second time, the value behind the vehicle door is set to 1. The value of 1 behind the vehicle door indicates that an object passes through the position behind the vehicle door. The value of 0 behind the vehicle door indicates that no object passes through the position behind the vehicle door.

[0066] Wherein, when the value in front of the vehicle door is 1 and the value behind the vehicle door is 0, it indicates that the object is in the process of getting on the vehicle.

[0067] The second infrared detector measures the distance and detects the shape of the object to obtain the number of people getting on at the front door. The value in front of the vehicle door is set to 0, and the value behind the vehicle door is set to 0.

[0068] Through the above method, the front and rear detections are judged by using the values in front of and behind the vehicle door assigned in the computer, which can more accurately judge the getting on and off of items. And the shape of the object is detected to judge whether a person gets on the vehicle and record the number of people getting on.

[0069] Optionally, the step of the second infrared detector measuring the distance and detecting the shape of the object to obtain the number of people getting on at the front door includes:

[0070] The second infrared detector performs distance measurement to obtain an infrared array; the elements in the infrared array represent the distance between the object and the headlight; the infrared array is a one-dimensional array;

[0071] An infrared two-dimensional array is constructed with the distance from the second infrared detector to the bottom surface of the vehicle as the height and the number of the second infrared detectors as the width; the elements in the infrared two-dimensional array are 0;

[0072] Subtract the element in the infrared array from the distance from the second infrared detector to the bottom surface of the vehicle to obtain the infrared detection position;

[0073] The elements of the infrared detection positions in the two-dimensional array are set to 1 to obtain a two-dimensional array of the constructed object shape; through the vehicle number detection model, the depth is determined according to the object data, the object shape is detected, and it is determined whether it is a person, and multiple human body positions are obtained.

[0074] Traverse the number of detected human positions and get the number of people getting on the bus at the front door.

[0075] Through the above method, due to the characteristics of the infrared detector, only the reflection of infrared light on the object can be used to detect the object. It is impossible to obtain information such as the texture and color of the object for detection. It can only detect through the distance between the objects. Therefore, the infrared detector is set on the roof, and the distance of each position of the upper half of the object that is not covered can be obtained according to the distance of the object from the roof. It can be converted into two-dimensional information, so that it can be detected according to shape alignment. After that, by comparing the difference between the human body shape and other shapes, it is determined whether it is a human body or other objects that pass through the infrared detector, and the number of people who pass through is obtained.

[0076] Optionally, the training method of the face recognition model is:

[0077] A training set is obtained, wherein the training set includes training data and annotated data, wherein the training data includes a plurality of training two-dimensional arrays; the training two-dimensional array represents a two-dimensional array detected by a plurality of infrared detectors; the annotated data includes an annotated existence value and an annotated position; when the annotated existence value is 1, it indicates that the object detected by infrared is a person, and when the annotated existence value is 0, it indicates that the object detected by infrared is not a person; the annotated position includes an annotated center point and an annotated width and height; the annotated center point and the annotated width and height represent the position of a human body in the two-dimensional array.

[0078] The training two-dimensional array is input into a convolutional neural network to obtain a detection feature map. The layers of the detection feature map indicate whether a human body exists and the position of the human body.

[0079] The convolutional network used for detection in this embodiment is a YOLOV5 network, and a training set and annotated data are used during training to detect whether a human body exists and the position of the human body.

[0080] Calculate the loss between the detection feature map and the annotation data to obtain the loss value.

[0081] Among them, the cross-entropy loss function is used to calculate the loss between the value indicating whether a person exists in the detection feature map and the annotation existence value to obtain the existence loss value. The regression loss function is used to calculate the loss between the value indicating whether a person exists in the detection feature map and the annotation position. The regression loss function used in this embodiment is the GIOU loss function.

[0082] Obtain the current training iteration number of the face recognition model and the maximum iteration number preset for the training of the face recognition model.

[0083] Among them, the maximum iteration number preset for the training of the face recognition model in this embodiment is 12,000 times.

[0084] When the loss value is less than or equal to the threshold or the training iteration number reaches the maximum iteration number, stop the training to obtain the trained face recognition model.

[0085] Through the above method, compare the object with the annotation according to the object shape to obtain the number. Convolution can be used for comparison. According to the object shape, through the convolutional neural network, judge whether the distance depth meets the human body, such as the distance position between the head and the shoulder. Thus, detect whether it is a human body.

[0086] Optionally, if the third data sent by the second infrared detector is received indirectly at the third time, and the fourth data sent by the first infrared detector is received at the fourth time, it is determined that someone gets off the vehicle, and the number of people getting off at the front door is obtained, including:

[0087] If the third data sent by the second infrared detector is received at the third time, set the value behind the door to 1. The value behind the door being 1 indicates that an object passes through the position behind the door. The value behind the door being 0 indicates that no object passes through the position behind the door.

[0088] If the value behind the door is 1, the value in front of the door is 0, and the fourth data sent by the first infrared detector is received at the fourth time, set the value in front of the door to 1. The value in front of the door being 1 indicates that an object passes through the position in front of the door. The value in front of the door being 0 indicates that no object passes through the position in front of the door.

[0089] The second infrared detector performs ranging and detects the object shape to obtain the number of people getting off at the front door.

[0090] Among them, the method by which the second infrared detector measures distance, detects the shape of an object, and obtains the number of people getting off the vehicle is similar to the method by which the second infrared detector measures distance, detects the shape of an object, and obtains the number of people getting on the vehicle through the front door, which is as follows: The second infrared detector measures distance to obtain an infrared array. The elements in the infrared array represent the distance of the object from the vehicle lamp; the infrared array is a one-dimensional array. An infrared two-dimensional array is constructed with the distance from the second infrared detector to the vehicle bottom surface as the height and the number of second infrared detectors as the width. The elements in the infrared two-dimensional array are 0. Subtract the elements in the infrared array from the distance from the second infrared detector to the vehicle bottom surface to obtain the infrared detection position. Set the elements at the infrared detection position in the two-dimensional array to 1 to obtain a two-dimensional array for constructing the object shape. Through a person number detection model, based on the two-dimensional array for constructing the object shape, detect the shape and determine whether it is a person to obtain multiple human positions. Traverse the number of detected human positions to obtain the number of people getting off through the front door.

[0091] Set the value in front of the vehicle door to 0 and the value behind the vehicle door to 0.

[0092] Through the above method, infrared devices are set at two different positions. When an object is detected behind the vehicle door first and then an object is detected in front of the vehicle door, it indicates getting off. The front and rear detections use the values in front of the vehicle door and behind the vehicle door for judgment, and can more accurately judge whether an item gets on or off the vehicle.

[0093] Optionally, obtaining the number of people changing at the rear door based on the data sent by the third infrared detector and the data sent by the fourth infrared detector includes:

[0094] When the fifth data sent by the third infrared detector is received at the fifth time and the sixth data sent by the fourth infrared detector is received at the sixth time, it is determined that someone gets on the vehicle, and the number of people getting on through the rear door is obtained; the third infrared detector is set outside the rear door of the vehicle, and the fourth infrared detector is set on the roof of the rear door of the vehicle. The fifth time is earlier than the sixth time.

[0095] Among them, the method for obtaining the number of people getting on through the rear door is the same as the method for obtaining the number of people getting on through the front door. When the seventh data sent by the fourth infrared detector is received at the seventh time and the eighth data sent by the third infrared detector is received at the eighth time, it is determined that someone gets off the vehicle, and the number of people getting off through the rear door is obtained. The seventh time is earlier than the eighth time.

[0096] Among them, the method for obtaining the number of people getting on through the rear door is the same as the method for obtaining the number of people getting on through the front door.

[0097] Embodiment 2

[0098] A parking space calculation device includes a first infrared detector, a second infrared detector, a third infrared detector, a fourth infrared detector, a pressure sensor, a temperature sensor, and a processor. The processor is connected to the first infrared detector, the second infrared detector, the third infrared detector, the fourth infrared detector, the pressure sensor, the temperature sensor, and the processor.

[0099] Among them, the parking space calculation device is shown in Figure 2.

[0100] The processor is configured to: obtain the number of people in the vehicle; the number of people in the vehicle represents the current number of people in the vehicle; based on the data sent by the first infrared detector and the data sent by the second infrared detector, obtain the number of people changing at the front door; the number of people changing at the front door includes the number of people getting on at the front door and the number of people getting off at the front door; based on the data sent by the third infrared detector and the data sent by the fourth infrared detector, obtain the number of people changing at the back door; the number of people changing at the back door includes the number of people getting off at the back door and the number of people getting on at the back door; the number of people changing at the back door includes the number of people getting off at the back door and the number of people getting on at the back door; add the number of people in the vehicle to the number of people getting on at the front door and the number of people getting on at the back door, and subtract the number of people getting off at the front door and the number of people getting off at the back door to obtain the current number of people in the vehicle; obtain multiple seat temperature values and multiple seat pressure values; if the seat temperature value is 1 and the seat pressure value is 1, increment the seat number by 1; subtract the seat number from the current number of people in the vehicle to determine whether there are people not seated; when the current number of people in the vehicle minus the seat number equals 0, it means that all are already seated; if the current number of people in the vehicle minus the seat number is greater than 0, it means that there are people not seated.

[0101] The first infrared detector and the second infrared detector are configured to obtain the number of people changing at the front door based on the data sent by the first infrared detector and the data sent by the second infrared detector.

[0102] The third infrared detector and the fourth infrared detector are configured to obtain the number of people changing at the back door based on the data sent by the third infrared detector and the data sent by the fourth infrared detector.

[0103] The pressure sensor is configured to obtain multiple seat pressure values; the temperature sensor is configured to obtain multiple seat temperature values.

[0104] In order to count the passengers getting on and off, the detection combination includes a first infrared detector, a second infrared detector, a third infrared detector, and a fourth infrared detector. The infrared detectors can also be set as other instruments, ensuring that detection and counting can be performed.

[0105] In order to determine whether there is someone sitting on the seat, the seat combination includes a pressure sensor, a temperature sensor installed on the seat, and a judgment unit. The judgment unit is connected to the pressure sensor and the temperature sensor and is used to receive the data transmitted by the pressure sensor and the temperature sensor to judge whether there is someone sitting on the seat. The threshold value of the pressure sensor is set to twenty kilograms. When there are empty seats, children can sit. When the parking spaces are in short supply, parents need to pick up the children to vacate the empty seats.

[0106] Optionally, the device further includes:

[0107] In order to monitor and record the internal situation of the vehicle and ensure that there is recorded data in case of emergencies, the camera combination includes multiple cameras installed on the inner roof of the vehicle, which are used to monitor the internal situation of the vehicle. The orientations and installation methods of the multiple cameras are different to achieve a full-range detection of the vehicle interior.

[0108] In order to transmit data, the transmission combination is set to wireless WIFI for data transmission.

[0109] In order to conveniently display the parking spaces and broadcast special situations, the parking space calculation APP includes a display unit, a judgment unit, and a broadcast warning unit. The judgment unit calculates the results determined by the detection combination and the seat combination. The display unit is used to display the number of people result and the seat result calculated by the judgment unit on the display screen. The broadcast warning unit is used to judge the behavior of passengers leaving their seats when the vehicle is moving. If the time exceeds ten seconds, it will broadcast that passengers should not leave their seats while the vehicle is moving.

[0110] It should be noted that in this article, relational terms such as "one" and "two" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.

[0111] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

[0112] An embodiment of the present invention also provides an electronic device. As shown in Figure 3, it includes a memory 504, a processor 502, and a computer program stored on the memory 504 and executable on the processor 502. When the processor 502 executes the program, it implements the steps of any one of the parking space calculation methods described above.

[0113] Among them, in FIG. 3, a bus architecture (represented by bus 500), the bus 500 may include any number of interconnected buses and bridges. The bus 500 links together various circuits including one or more processors represented by processor 502 and a memory represented by memory 504. The bus 500 may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, etc., which are well known in the art, and thus will not be further described herein. The bus interface 505 provides an interface between the bus 500 and the receiver 501 and the transmitter 503. The receiver 501 and the transmitter 503 may be the same element, i.e., a transceiver, providing a unit for communicating with various other devices over a transmission medium. The processor 502 is responsible for managing the bus 500 and general processing, while the memory 504 may be used to store data used by the processor 502 when performing operations.

[0114] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the steps of any of the methods of the parking space calculation method described above and the data involved above.

[0115] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems may also be used in conjunction with the teachings provided herein. The structure required to construct such a system will be apparent from the above description. In addition, the present invention is not directed to any particular programming language. It should be understood that the content of the present invention described herein can be implemented using various programming languages, and the description of a specific language above is for disclosing the best mode of the present invention.

[0116] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and technologies have not been shown in detail so as not to obscure the understanding of this specification.

[0117] Similarly, it should be understood that, in order to streamline the present disclosure and assist in understanding one or more of the various inventive aspects, in the foregoing description of the exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, the inventive aspects lie in less than all of the features of the single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate embodiment of the present invention.

[0118] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and disposed in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all the features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all the processes or units of any method or device so disclosed. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) can be replaced by an alternative feature that provides the same, equivalent, or similar purpose.

[0119] In addition, those skilled in the art will be able to understand that although some of the embodiments herein include certain features included in other embodiments rather than other features, the combination of the features of different embodiments means that it is within the scope of the present invention and forms different embodiments. For example, in the following claims, any one of the claimed embodiments can be used in any combination.

[0120] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the device according to the embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (for example, a computer program and a computer program product) for executing part or all of the methods described herein. Such a program for implementing the present invention can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0121] It should be noted that the above embodiments are illustrative of the present invention rather than restrictive of the present invention, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim listing several devices, several of these devices can be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words can be interpreted as names.

Claims

1. A parking space calculation method, characterized in that: Including the following steps: Obtain the current number of people in the vehicle; Based on the data sent by the first infrared detector and the data sent by the second infrared detector, obtain the number of people changing at the front door; the number of people changing at the front door includes the number of people getting on at the front door and the number of people getting off at the front door; Based on the data sent by the third infrared detector and the data sent by the fourth infrared detector, obtain the number of people changing at the back door; the number of people changing at the back door includes the number of people getting off at the back door and the number of people getting on at the back door; Add the number of people getting on at the front door and the number of people getting on at the back door to the number of people in the vehicle, and subtract the number of people getting off at the front door and the number of people getting off at the back door to obtain the current number of people in the vehicle; Obtain multiple seat temperature values and multiple seat pressure values; If the seat temperature value is 1 and the seat pressure value is 1, increment the number of people on the seat by 1; Subtract the number of people on the seat from the current number of people in the vehicle to determine if there are people not seated: when the current number of people in the vehicle minus the number of people on the seat equals 0, it means all are already on the seats; if the current number of people in the vehicle minus the number of people on the seat is greater than 0, it means there are people not on the seats.

2. The parking space calculation method according to claim 1, characterized in that, The obtaining of the number of people changing at the front door based on the first infrared detection value and the second infrared detection value includes: If the first data sent by the first infrared detector is received at the first time, and the second data sent by the second infrared detector is received at the second time, determine that someone is getting on, and obtain the number of people getting on at the front door; the first infrared detector is set outside the front door of the vehicle, the second infrared detector is set on the top of the front door of the vehicle, and the first time is earlier than the second time; If the third data sent by the second infrared detector is received at the third time, and the fourth data sent by the first infrared detector is received at the fourth time, determine that someone is getting off, and obtain the number of people getting off at the front door; the third time is earlier than the fourth time.

3. The method for calculating a parking space according to claim 2, wherein The if the first data sent by the first infrared detector is received at the first time, and the second data sent by the second infrared detector is received at the second time, determine that someone is getting on, and obtain the number of people getting on at the front door includes: If the first data sent by the first infrared detector is received at the first time, set the value in front of the door to 1; the value in front of the door being 1 indicates that an object has passed the position in front of the door; the value in front of the door being 0 indicates that no object has passed the position in front of the door; If the value in front of the door is 1 and the value behind the door is 0 and the second data sent by the second infrared detector is received at the second time, set the value behind the door to 1; the value behind the door being 1 indicates that an object has passed the position behind the door; the value behind the door being 0 indicates that no object has passed the position behind the door; The second infrared detector measures the distance and detects the shape of the object to obtain the number of people getting on at the front door; set the value in front of the door to 0 and the value behind the door to 0.

4. A method for calculating a parking space according to claim 3, characterized in that, The second infrared detector measuring the distance and detecting the shape of the object to obtain the number of people getting on at the front door includes: The second infrared detector measures the distance to obtain an infrared array; the elements in the infrared array represent the distance of the object from the vehicle lamp; the infrared array is a one-dimensional array; Construct an infrared two-dimensional array with the distance from the second infrared detector to the vehicle bottom surface as the height and the number of second infrared detectors as the width; the elements in the infrared two-dimensional array are 0; Subtract the distance from the second infrared detector to the bottom of the vehicle from the elements in the infrared array to obtain the infrared detection position; Set the elements at the infrared detection positions in the two-dimensional array to 1 to obtain a two-dimensional array representing the shape of the constructed object; through the number of people detection model, according to the two-dimensional array representing the shape of the constructed object, detect the shape and determine whether it is a person to obtain multiple human positions; Traverse the number of detected human positions to obtain the number of people getting on the vehicle at the front door.

5. The method for calculating a parking space according to claim 4, wherein, The training method of the number of people detection model: Obtain a training set, where the training set includes training data and annotation data. The training data includes multiple training two-dimensional arrays; the training two-dimensional arrays represent two-dimensional arrays detected by multiple infrared detectors; the annotation data includes an annotation existence value and an annotation position; When the annotation existence value is 1, it indicates that the object detected by infrared is a person, and when the annotation existence value is 0, it indicates that the object detected by infrared is not a person; the annotation position includes an annotation center point and an annotation width and height; the annotation center point and the annotation width and height represent the position of the human body in the two-dimensional array; Input the training two-dimensional array into a convolutional neural network to obtain a detection feature map; the layers of the detection feature map represent the existence of the human body and the human position; Calculate the loss between the detection feature map and the annotation data to obtain a loss value; Obtain the current training iteration number of the face recognition model and the maximum iteration number preset for the training of the face recognition model; Stop training when the loss value is less than or equal to the threshold or the training iteration number reaches the maximum iteration number to obtain a trained face recognition model.

6. A parking space calculation method according to claim 2, characterized in that, The method of determining that someone gets off the vehicle and obtaining the number of people getting off at the front door when receiving the third data sent by the second infrared detector at the third time and receiving the fourth data sent by the first infrared detector at the fourth time includes: If the third data sent by the second infrared detector is received at the third time, set the value behind the door to 1; the value behind the door being 1 indicates that there is an object passing through the position behind the door; the value behind the door being 0 indicates that there is no object passing through the position behind the door; If the value behind the door is 1, the value in front of the door is 0, and the fourth data sent by the first infrared detector is received at the fourth time, set the value in front of the door to 1; the value in front of the door being 1 indicates that there is an object passing through the position in front of the door; the value in front of the door being 0 indicates that there is no object passing through the position in front of the door; The second infrared detector measures the distance, detects the shape of the object, and obtains the number of people getting off at the front door; set the value in front of the door to 0 and the value behind the door to 0.

7. A parking space calculation method according to claim 1, characterized in that, The method of obtaining the number of people changing at the rear door based on the data sent by the third infrared detector and the fourth infrared detector includes: When receiving the fifth data sent by the third infrared detector at the fifth time and receiving the sixth data sent by the fourth infrared detector at the sixth time, determine that someone gets on the vehicle and obtain the number of people getting on at the rear door; the third infrared detector is set outside the rear door of the vehicle, the fourth infrared detector is set on the roof of the rear door of the vehicle, and the fifth time is earlier than the sixth time; When the seventh data sent by the fourth infrared detector is received at the seventh time and the eighth data sent by the third infrared detector is received at the eighth time, it is determined that someone gets off the vehicle, and the number of people getting off from the rear door is obtained; the seventh time is earlier than the eighth time.

8. A parking space calculation device, characterized in that, Including: The first infrared detector, the second infrared detector, the third infrared detector, the fourth infrared detector, the pressure sensor, the temperature sensor and the processor, and the processor is connected to the first infrared detector, the second infrared detector, the third infrared detector, the fourth infrared detector, the pressure sensor, the temperature sensor and the processor; The processor is configured to: obtain the number of people in the vehicle; the number of people in the vehicle represents the current number of people in the vehicle; based on the data sent by the first infrared detector and the data sent by the second infrared detector, obtain the number of people changing at the front door; the number of people changing at the front door includes the number of people getting on at the front door and the number of people getting off at the front door; based on the data sent by the third infrared detector and the data sent by the fourth infrared detector, obtain the number of people changing at the rear door; the number of people changing at the rear door includes the number of people getting off at the rear door and the number of people getting on at the rear door; the number of people changing at the rear door includes the number of people getting off at the rear door and the number of people getting on at the rear door; add the number of people getting on at the front door and the number of people getting on at the rear door to the number of people in the vehicle, and subtract the number of people getting off at the front door and the number of people getting off at the rear door to obtain the current number of people in the vehicle; Obtain a plurality of seat temperature values and a plurality of seat pressure values; if the seat temperature value is 1 and the seat pressure value is 1, increment the number of people on the seat by 1; subtract the number of people on the seat from the current number of people in the vehicle to determine whether there is someone not seated; when the current number of people in the vehicle minus the number of people on the seat is equal to 0, it means that all are already on the seats; if the current number of people in the vehicle minus the number of people on the seat is greater than 0, it means that there are people not on the seats; The first infrared detector and the second infrared detector are configured to obtain the number of people changing at the front door based on the data sent by the first infrared detector and the data sent by the second infrared detector; The third infrared detector and the fourth infrared detector are configured to obtain the number of people changing at the rear door based on the data sent by the third infrared detector and the data sent by the fourth infrared detector; The pressure sensor is configured to obtain a plurality of seat pressure values; the temperature sensor is configured to obtain a plurality of seat temperature values.