Person detection method and apparatus, electronic device, storage medium, and program product
By performing gridding and feature extraction on historical monitoring data detected by radar, a personnel detection model is constructed, which solves the problem of inaccurate radar detection in blind spots or when obscured by obstacles, and achieves accurate prediction when millimeter-wave radar cannot detect personnel.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MIDEA GROUP CO LTD
- Filing Date
- 2022-12-26
- Publication Date
- 2026-07-21
AI Technical Summary
Existing millimeter-wave radars are unable to accurately detect the presence of people in space under certain circumstances, especially when people are in blind spots or obscured by obstacles, resulting in inaccurate detection results.
By processing historical monitoring data detected by radar into a grid, a grid of historical monitoring data slices is constructed in the gridded detection space. Feature vectors are extracted using artificial intelligence technology to build a personnel detection model. Detection is then performed by combining direct analysis of radar data with the artificial intelligence model.
When radar cannot detect personnel, historical data analysis can accurately predict whether personnel are in the current detection space, thus improving the accuracy and adaptability of detection.
Smart Images

Figure CN115859119B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to methods, devices, electronic equipment, storage media, and program products for personnel detection. Background Technology
[0002] Millimeter-wave radar is an electronic device that uses electromagnetic waves to detect targets. It obtains information such as the distance from the target to the electromagnetic wave emission point, the rate of change of distance (radial velocity), azimuth, and altitude by emitting electromagnetic waves to illuminate the target and receiving its echo.
[0003] However, radar cannot detect a person's presence in certain situations. For example, when a person is in a radar blind spot, the radar cannot detect their presence in the current detection space. Or, even if a person is within the radar's detection range, if they are obscured by obstacles, such as being covered by a blanket or lying face down (and motionless), the radar cannot accurately detect their presence in the current detection space.
[0004] In view of this, there is an urgent need to provide a new detection method to overcome the limitations of simply using radar to detect the presence of people in space, so as to improve the universality and accuracy of the detection. Summary of the Invention
[0005] This invention aims to at least solve one of the technical problems existing in related technologies. To this end, this invention proposes a personnel detection method that accurately determines whether personnel are present in the current detection space, adapting to the detection needs of different scenarios.
[0006] The present invention also proposes a personnel detection device.
[0007] A personnel detection method according to a first aspect of the present invention includes:
[0008] Acquire historical monitoring data of the target personnel within each grid of the gridded detection space within the first preset total time period before the current moment;
[0009] Using a preset sampling duration as a sliding window, the historical monitoring data of each grid is converted into multiple monitoring data slices;
[0010] Based on monitoring data slices from all grids within a preset number of sampling durations prior to the current time, construct a target feature vector;
[0011] The target feature vector is input into the personnel detection model to obtain the personnel presence detection result of the detection space at the current time, output by the personnel detection model.
[0012] The personnel detection model is trained based on feature vector samples and the personnel presence detection result labels corresponding to the feature vector samples.
[0013] According to the personnel detection method provided in the embodiments of the present invention, based on artificial intelligence technology, in scenarios where the current radar cannot detect personnel, feature extraction is performed on the historical monitoring data of personnel detected by the radar to accurately predict whether personnel are in the current detection space based on the movement patterns of personnel. This method can be used to meet the control needs of personnel in specific scenarios.
[0014] According to one embodiment of the present invention, the above-mentioned construction of the target feature vector based on monitoring data slices within a preset number of sampling durations of all grids before the current time includes:
[0015] Obtain all monitoring data slices for each grid;
[0016] A feature vector is constructed by slicing the monitoring data of each grid within any sliding window;
[0017] Each feature vector corresponding to a sliding window is treated as a separate row, and a historical trajectory behavior matrix is constructed according to the time order of the sliding windows.
[0018] The feature vector corresponding to the last row of the historical trajectory behavior matrix is used as the target feature vector.
[0019] According to the personnel detection method provided in this embodiment of the invention, a method for feature extraction from historical monitoring data is creatively provided. First, the detection space is gridded, and then the historical monitoring data is sampled through a preset sliding window to construct a historical trajectory behavior matrix from all the sampled monitoring data slices. Each row of the historical trajectory behavior matrix corresponds to the entire historical monitoring result of each grid after gridding. This facilitates the use of artificial intelligence technology to extract features from a feature vector in each row of the historical trajectory behavior matrix, providing the possibility of exploring the movement patterns of people at home through artificial intelligence models to predict their current behavior status.
[0020] According to one embodiment of the present invention, the above-mentioned personnel detection model is specifically trained based on the following steps:
[0021] Obtain historical monitoring data of the target person in each grid within the gridded detection space within a first preset total time period before any historical moment;
[0022] Obtain monitoring data slices within a preset number of sampling durations prior to any historical moment, construct a feature vector sample, and use the personnel presence detection result of the detection space at any historical moment as the personnel presence detection result label;
[0023] The first training sample set is constructed by taking any of the feature vector samples and their corresponding personnel presence detection result labels as a set of training samples.
[0024] Using the first training sample set, the pre-built network model is trained to obtain the personnel detection model.
[0025] According to the personnel detection method provided in the embodiments of the present invention, historical monitoring data of the target personnel in each grid corresponding to the gridded detection space are collected and sampled using the same sliding window to construct a first training sample set, so as to realize the pre-training of the personnel detection model and effectively improve the detection accuracy of the model.
[0026] According to an embodiment of the present invention, after training the pre-built network model using the training sample set to obtain the person detection model, the method further includes:
[0027] The feature vector corresponding to any row in the historical trajectory behavior matrix other than the last row is taken as the feature vector sample, and the personnel presence detection result corresponding to the feature vector sample is taken as the personnel presence detection result label.
[0028] A second training sample set is constructed by using the feature vector samples and the personnel presence detection result labels to form a set of training samples.
[0029] The personnel detection model is retrained using the second training sample set.
[0030] According to the personnel detection method provided in this embodiment of the invention, the historical trajectory behavior matrix constructed from the historical monitoring data collected on the target personnel before the current moment is fully utilized. By constructing the feature vector corresponding to any row in the historical trajectory behavior matrix except the last row and its corresponding personnel presence detection result label, a second training sample set is constructed to retrain the personnel detection model. At this time, the scene and time of the target personnel are closer to the actual situation at the current moment. The second training sample set determined in this way is more effective for training the personnel detection model, thereby further improving the robustness and recognition accuracy of the model.
[0031] According to one embodiment of the present invention, the acquisition of historical monitoring data of the target person within each grid corresponding to the gridded detection space within a first preset total time period before the current moment includes:
[0032] Based on radar monitoring data within a second preset total time period prior to the current moment, at least one target person is identified, and the target person appears within the detection space at least within the second preset total time period;
[0033] Obtain complete radar monitoring data within a first preset total time period before the current moment, and filter out radar monitoring data related to the target personnel from the complete radar monitoring data;
[0034] Based on the radar monitoring data related to the target personnel, determine the historical monitoring data of the target personnel in each grid within the gridded detection space.
[0035] According to the personnel detection method provided in the embodiments of the present invention, a method is provided that uses radar monitoring data containing all detected personnel to filter out radar monitoring data related to a specific target personnel. In this way, the personnel detection model is used to predict whether there are people in the detection space one by one and one by one, which can improve the detection accuracy.
[0036] According to one embodiment of the present invention, the second preset total duration is greater than or equal to the first preset total duration.
[0037] According to one embodiment of the present invention, the above-described personnel detection method further includes:
[0038] Based on the radar monitoring data of the detection space at the current moment, a preliminary detection result is determined on the presence of personnel in the detection space at the current moment;
[0039] If the preliminary detection result indicates that there are personnel in the detection space, then the preliminary detection result is taken as the final detection result.
[0040] If the preliminary detection result of the personnel presence indicates that there are no personnel in the detection space, then the step of performing gridding processing on the detection space is executed. The next step is to input the target feature vector into the personnel detection model to obtain the personnel presence detection result of the detection space at the current time output by the personnel detection model, and to use the personnel presence detection result of the detection space at the current time output by the personnel detection model as the final personnel presence detection result.
[0041] According to the personnel detection method provided in the embodiments of the present invention, when it is possible to directly analyze whether a person exists in the detection space using radar detection data, the method of direct analysis of radar data is preferred. If it is determined from direct analysis of radar data that the target person is not in the current space, then the method provided in the above embodiments is used to analyze the historical detection data of the target person using an artificial intelligence model to predict whether the target person is still in the current detection space. The combination of these two detection methods improves detection efficiency while ensuring the accuracy of the detection results.
[0042] According to one embodiment of the present invention, the above-mentioned retraining of the personnel detection model using the second training sample set includes:
[0043] The personnel detection model is retrained using a predetermined number of training samples from the second training sample set;
[0044] The retrained personnel detection model is validated using training samples other than the preset number of training samples in the second training sample set;
[0045] After confirming that the verification results have converged, the retrained personnel detection model will be used as the new personnel detection model.
[0046] According to the personnel detection method provided in the embodiments of the present invention, after the personnel detection model is pre-trained or retrained, a portion of the sample data in the second training sample set constructed from the historical detection data of the target personnel is used to verify the trained personnel detection model, so as to ensure that the convergence, robustness, accuracy and other aspects of the training results meet the standards, and to ensure the accuracy of the final detection results.
[0047] A personnel detection device according to a second aspect of the present invention includes:
[0048] The data acquisition unit is used to acquire historical monitoring data of the target personnel in each grid within the gridded detection space within the first preset total time period before the current moment;
[0049] The data processing unit is used to convert the historical monitoring data of each grid into multiple monitoring data slices using a preset sampling duration as a sliding window.
[0050] The vector construction unit is used to construct a target feature vector based on monitoring data slices within a preset number of sampling durations of all grids before the current time.
[0051] The model detection unit is used to input the target feature vector into the personnel detection model to obtain the personnel presence detection result of the detection space at the current time, output by the personnel detection model.
[0052] The personnel detection model is trained based on feature vector samples and the personnel presence detection result labels corresponding to the feature vector samples.
[0053] According to an embodiment of the present invention, the personnel detection device, based on artificial intelligence technology, can accurately predict whether a person is in the current detection space by extracting features from historical monitoring data of personnel detected by radar in scenarios where the radar cannot detect personnel. This can be used to meet the control needs of personnel in specific scenarios.
[0054] An electronic device according to a third aspect of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the personnel detection method as described in any embodiment of the first aspect.
[0055] According to a fourth aspect of the present invention, a non-transitory computer-readable storage medium is provided thereon storing a computer program that, when executed by a processor, implements a personnel detection method as described in any embodiment of the first aspect.
[0056] A computer program product according to a fifth aspect of the present invention includes a computer program that, when executed by a processor, implements the personnel detection method as described in any embodiment of the first aspect.
[0057] The above-described one or more technical solutions in the embodiments of the present invention have at least the following technical effects:
[0058] Based on artificial intelligence technology, in scenarios where radar cannot detect people, feature extraction can be performed on historical monitoring data of people detected by radar to accurately predict whether people are in the current detection space according to their movement patterns. This can be used to meet the control needs of people in specific scenarios.
[0059] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1 This is one of the flowcharts of the personnel detection method provided by the present invention;
[0062] Figure 2 This is a schematic diagram of the trajectory of the target person within the detection space provided by the present invention;
[0063] Figure 3 This is a schematic diagram of a grid for gridding the detection space provided by the present invention;
[0064] Figure 4 This is an overall schematic diagram of the detection space after being gridded, as provided by the present invention;
[0065] Figure 5This is the second flowchart of the personnel detection method provided by the present invention;
[0066] Figure 6 This is a schematic diagram of the personnel detection device provided by the present invention;
[0067] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0068] The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and should not be construed as limiting the scope of the invention.
[0069] In the description of the embodiments of the present invention, it should be noted that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of the present invention. In addition, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0070] In embodiments of the present invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "on top of," and "over" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0071] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0072] Any detection device used to determine the presence of personnel within a detection space will be limited to varying degrees by its detection principle, resulting in certain detection blind spots or a certain probability of failing to accurately determine the presence of personnel in areas outside the detection blind spots. This leads to unreliable detection results and fails to meet the needs of specific scenarios.
[0073] Figure 1 This is one of the flowcharts of the personnel detection method provided by the present invention, such as... Figure 1 As shown, one embodiment of the present invention provides a personnel detection method, which mainly includes the following steps:
[0074] Step 101: Obtain historical monitoring data of the target personnel in each grid within the gridded detection space within the first preset total time period before the current moment.
[0075] Here, "current moment" refers to the real-time sampling moment of personnel detection; "detection space" refers to the overall area where the target personnel are located; and "historical monitoring data" refers to the monitoring data collected on the activities of the target personnel within the detection space. The aforementioned historical monitoring data is mainly detected using detection devices installed within the detection space.
[0076] Optionally, the detection device set in the detection space can be a camera, radar, or infrared detector, etc. By analyzing the data detected in real time by the detection device, corresponding monitoring data can be obtained, including whether the target person exists in the detection space and the specific location of the person in the detection space.
[0077] Taking radar as an example, by analyzing the historical behavioral data it collects, relevant historical monitoring data on the activities of target personnel within the detection space can be determined.
[0078] It should be noted that since there may be more than one person in the same detection space, and these individuals have different physical characteristics such as height and build, their historical behavioral data can be distinguished by combining the behavioral data characteristics exhibited by different individuals. Each person can be pre-assigned an identity ID. After acquiring the historical behavioral data collected by the radar, the characteristics of the behavioral data exhibited by different individuals can be used to categorize all historical behavioral data as belonging to the person with each identity ID.
[0079] For example, if there are two people in the detection space, with IDs A and B respectively, where ID A is an adult and ID B is a child, after acquiring the historical behavior data collected by the radar, the historical behavior data can be divided into historical behavior data related to ID A and historical behavior data related to ID B based on the obvious height difference between the two.
[0080] Accordingly, assuming the target person is A, the corresponding historical monitoring data can be obtained by analyzing the historical behavior data related to the person with ID A, that is, whether A exists in the detection space at any historical moment, and the specific location of A in the detection space.
[0081] The aforementioned first preset total duration can often be manually set based on factors such as the detection cycle and data storage capacity of the detection device. For example, the first preset total duration can be set to 24 hours, 48 hours, 36 hours, 72 hours, or one week, one month, etc.
[0082] Figure 2 This is a schematic diagram of the trajectory of the target person within the detection space provided by the present invention, such as... Figure 2 As shown, the detection space is a room equipped with a fan, television, air conditioner, coffee table, sofa, and other facilities. A radar is also installed in the room to continuously collect relevant behavioral data on the activities of people in the room.
[0083] When people are in a room, their historical behavioral data can generally be used to analyze their relatively obvious path and trajectory trends.
[0084] For example, for any particular person, according to their custom from Figure 2 Points 1 to 4 in the diagram generally follow a trajectory A, i.e., point 1-point 2-point 3-point 4, or trajectory B, i.e., point 1-point 5-point 6-point 7-point 4.
[0085] according to Figure 2 As shown in the radar installation location diagram, point 4 is designated as a blind spot for radar monitoring. This means that once a person reaches point 4 at the current moment, the radar will be unable to detect that the person is inside the room. At this point, by analyzing the historical monitoring data of the person collected by the radar over a first preset total time period prior to the current moment, if the historical monitoring data determines that the person's continuous movement trajectory is point 1-point 2-point 3, or point 1-point 5-point 6-point 7, then it is possible to predict whether the person is currently at point 4.
[0086] There is another situation, with Figure 2For example, suppose a person lies down to rest on a sofa at point 6, covered by a blanket or in a position where they are asleep and still. Radar data would not detect that the person is in the room. In this case, the method provided in the above embodiment can be used to determine the person's continuous movement trajectory through historical monitoring data, thereby inferring whether the person is currently at point 6.
[0087] This invention provides an embodiment for analyzing data collected by detection devices such as radar to determine whether there is a person in the detection space. For ease of description, the following embodiments will be described using radar as the detection device and a first preset total duration T1 of 24 hours as an example.
[0088] In step 101, data collected by the radar within the previous 24 hours is used. To facilitate accurate analysis of this data, the detection space is gridded, and the 0 and 1 values assigned to each grid cell can effectively indicate whether a person is at the location corresponding to that grid cell.
[0089] Figure 3 This is a schematic diagram of a grid for gridding the detection space provided by the present invention, as shown below. Figure 3 As shown, from a top-down perspective, the current detection space can be simplified into a rectangular planar space. After gridding this rectangular planar space, each grid can be encoded into G using a preset encoding method. i .
[0090] From Figure 3 Taking the bottom left corner as an example of row-by-row encoding, assuming the entire rectangular planar space arch is divided into 12 rows and 20 columns, then all the grids in the first row are encoded sequentially as G1 to G... 20 (One row contains 20 grids), all grids in the second row are encoded sequentially from G21 to G. 40 ...until all grids are encoded, sequentially from G1 to G... N , where N = 240.
[0091] Will Figure 3 The grid diagram shown illustrates how the detection space can be gridded. Overlaying this grid onto the detection space allows for the acquisition of data such as... Figure 4 The diagram shows the overall layout of the detection space after it has been gridded.
[0092] In this way, using Let represent the monitoring data corresponding to grid i in time period t. Assuming time period t = 10 minutes, when there is movement of people in grid i within 10 minutes, then... If no one moves within grid i within 10 minutes, then
[0093] Furthermore, G can be used t G represents the monitoring data within the entire detection space during time period t. If the monitoring data corresponding to all grids within the entire detection space during time period t is equal to 0, then G... t =0; if at least one of the monitoring data corresponding to all grids in the entire detection space within time period t is not equal to 0, then G t =1.
[0094] In step 102, a preset sampling duration is used as a sliding window to convert the historical monitoring data of each grid into multiple monitoring data slices.
[0095] If the preset sampling duration is T2, by using T2 as a sliding window, the historical monitoring data of each grid within the first preset total duration T1 can be sampled, and the historical monitoring data of each grid within the first preset total duration T1 can be cut into T monitoring data slices in chronological order.
[0096] Assuming T1 is 24 hours and the sampling duration T2 is 10 minutes, then the historical monitoring data of each grid within 24 hours can be divided into 144 monitoring data slices, that is, T is 144.
[0097] It should be noted that if the quotient between T1 and T2 is not a positive integer, the value of T can be obtained by taking the integer part of the quotient between T1 and T2 and then adding 1.
[0098] In step 103, a target feature vector is constructed based on monitoring data slices of all grids within a preset number of sampling durations before the current time.
[0099] Step 102 allows us to obtain monitoring data slices for each grid within each sampling duration T2. Assuming the preset quantity is 1 and the sampling duration T2 is set to 10 minutes, when using historical monitoring data to determine whether a target person is active in the detection space at the current moment, we can take the monitoring data slices from each grid 10 minutes ago, and vectorize the 0 or 1 values corresponding to all monitoring data slices to construct the target feature vector.
[0100] Optionally, if the preset quantity is other values, such as 6, and the sampling duration T2 is set to 10 minutes, then it is equivalent to statistically analyzing the monitoring data slices corresponding to whether there is human activity in each grid within 60 minutes, and then vectorizing the 0 or 1 values corresponding to the monitoring data slices of all grids to construct the target feature vector.
[0101] For example, when the number of grids N = 240, the obtained target feature vector is a feature vector composed of 240 0s and / or 1s.
[0102] In step 104, the obtained target feature vector is input into the personnel detection model to obtain the personnel presence detection result in the detection space at the current time, output by the personnel detection model.
[0103] The personnel detection model can be trained based on feature vector samples and the personnel presence detection result labels corresponding to each feature vector sample.
[0104] Optionally, the aforementioned personnel detection model can be an unsupervised network model such as a Gradient Boosting Decision Tree (GBDT) model, or a supervised network model such as a Convolutional Neural Network (CNN) model; this invention does not specifically limit the type of model. The detection result for the presence of personnel at the current moment mainly falls into two categories: personnel are present or personnel are not present.
[0105] The personnel detection method provided in this invention is based on artificial intelligence technology. In scenarios where radar cannot detect personnel, it extracts features from historical monitoring data of personnel detected by radar to accurately predict whether personnel are in the current detection space based on their movement patterns. This method can be used to meet the control needs of personnel in specific scenarios.
[0106] Based on the above embodiments, as an optional embodiment, the construction of the target feature vector based on the monitoring data slices of all grids within a preset number of sampling durations before the current time, as described in step 103, can be implemented in the following way, mainly including: obtaining all monitoring data slices of each grid; constructing a feature vector from the monitoring data slices of each grid within any sliding window; constructing a historical trajectory behavior matrix by treating the feature vectors corresponding to each sliding window as a row according to the time order of the sliding windows; and using the feature vector corresponding to the last row of the historical trajectory behavior matrix as the target feature vector.
[0107] In this embodiment, a preset quantity of 1 and a sampling duration of 10 minutes (T2) are used as examples. Using the sampling duration T2 as a sliding window, historical monitoring data for each grid within a duration of T1 is sampled, obtaining T monitoring data slices corresponding to each grid. Then, all monitoring data slices corresponding to all grids within a sampling duration (denoted as time period t-1) before the current time t are used to construct a feature vector. This process is repeated for each sampling duration before the current time t, and each slice is used to construct a feature vector. Finally, by using the feature vectors corresponding to all grids within each sampling duration as a row of a matrix, the following historical trajectory behavior matrix can be constructed:
[0108]
[0109] in, This represents the monitoring data slice of the first grid in time period t-1 (i.e., whether there is human activity in the area corresponding to the first grid); G t This indicates the presence of personnel in the detection space within time period t. In the historical trajectory behavior matrix above, N represents the total number of grids, and T represents the number of monitoring data slices corresponding to each grid.
[0110] This reflects the trajectory of the target person's movements within the entire detection space during time period t. When the target person is in a blind zone, the similarity of their behavioral trajectory is higher than that of their historical trajectory when someone is present, but lower than that of their actual departure trajectory. Therefore, using this vector as a feature vector can serve as a criterion for determining G. t The eigenvectors that take values.
[0111] After constructing the aforementioned historical trajectory behavior matrix, the feature vector related to any time t can be determined using historical monitoring data. This feature vector can then be analyzed using a personnel detection model to obtain the detection results of personnel presence in the detection space at time t.
[0112] For example, by analyzing historical monitoring data collected before the current moment, feature vectors can be obtained. This allows us to deduce the detection results of personnel presence in the detection space at the current moment.
[0113] The personnel detection method provided in this invention provides a creative method for feature extraction from historical monitoring data. First, the detection space is gridded, and then historical monitoring data is sampled through a preset sliding window to construct a historical trajectory behavior matrix from all sampled monitoring data slices. Each row of the historical trajectory behavior matrix corresponds to the entire historical monitoring result of each grid after gridding. This facilitates the use of artificial intelligence technology to extract features from a feature vector in each row of the historical trajectory behavior matrix, providing the possibility of using artificial intelligence models to explore the movement patterns of people at home and predict their current behavior.
[0114] Based on the above embodiments, as an optional embodiment, the personnel detection model can be trained using the following steps:
[0115] Step 1: Obtain historical monitoring data of the target person in each grid within the gridded detection space within the first preset total time T1 before any historical moment;
[0116] Step 2: Obtain monitoring data slices within a preset number of sampling periods before any of the above historical moments, construct a feature vector sample, and use the personnel presence detection results in the detection space at any of the above historical moments as the personnel presence detection result label;
[0117] Step 3: Take any feature vector sample and its corresponding personnel presence detection result label as a set of training samples to construct the first training sample set;
[0118] Step 4: Use the first training sample set to train the pre-built network model to obtain the personnel detection model.
[0119] As an optional embodiment, the radar set up in the current detection space will upload the detection data to the cloud server in real time for storage and processing.
[0120] Specifically, in step 1, after the radar has collected data for a period of time, the method provided in the above embodiment can be used to process the detection data previously collected by the radar stored in the cloud server. The purpose is to obtain historical monitoring data about the same target person within T1 before any historical moment, and to map these monitoring data to each grid related to the gridded detection space.
[0121] Wherein, any historical moment refers to any moment before the current moment, such as any moment a week ago, any moment a day ago, or any moment an hour ago. This embodiment of the invention does not specifically limit this.
[0122] In step 2, based on the method provided in the above embodiments, the same sampling duration is used as the sampling window to sample the historical monitoring data of each grid within T1, and k monitoring data slices can be obtained respectively. Then, a feature vector sample can be constructed from these k monitoring data slices.
[0123] Based on whether the target person was active in the detection space at any given historical moment, a person presence detection result label is assigned to each feature vector sample.
[0124] In step 3, each feature vector sample and its corresponding personnel existence detection result label are combined to form a set of training samples. Finally, multiple sets of training samples can be obtained to construct a training sample set, which is called the first training sample set.
[0125] In step 4, the pre-built network model is iteratively trained using each set of training samples in the first training sample set until the training results converge and the detection accuracy of the trained network model meets the preset standard. Then, the trained network model can be used as a person detection model.
[0126] It should be noted that the above model pre-training process can be carried out on a cloud server. After obtaining the trained personnel detection model, the cloud server distributes it to various device terminals, such as to the terminal server used to implement the personnel detection method provided in this embodiment.
[0127] The personnel detection method provided in this embodiment of the invention collects historical monitoring data of the target personnel in each grid of the gridded detection space, and uses the same sliding window for sampling to construct a first training sample set, thereby pre-training the personnel detection model and effectively improving the detection accuracy of the model.
[0128] Based on the above embodiments, as an optional embodiment, after training the pre-built network model using the constructed training sample set in step 4 to obtain the personnel detection model, the following steps may also be included:
[0129] Step 4.1: Take the feature vector corresponding to any row in the historical trajectory behavior matrix except the last row as the feature vector sample, and take the personnel presence detection result corresponding to the feature vector sample as the personnel presence detection result label.
[0130] Step 4.2: Use each feature vector sample and its corresponding personnel presence detection result label to form a set of training samples to construct the second training sample set;
[0131] Step 4.3: Retrain the personnel detection model using the second training sample set.
[0132] The personnel detection method provided in this embodiment of the invention aims to further improve the recognition accuracy of the personnel detection model by retraining it.
[0133] In step 4.1, a historical trajectory behavior matrix is constructed based on the method described in the above embodiments. Since the feature vector in the last row of the historical trajectory behavior matrix can be used to determine the detection result of the presence of people in the detection space at the current moment, the feature vectors in the other rows of the historical trajectory behavior matrix excluding the last row are used to characterize the historical trajectory of the people present in the detection space at the corresponding historical moment.
[0134] In step 4.2, by using the feature vectors from any row excluding the last row as feature vector samples, and the corresponding historical moment's detection of whether a person exists in the space as the corresponding person presence detection result label, each feature vector sample and its corresponding person presence detection result label can be used as a set of training samples, constructing at most T-1 sets of training samples. All of the above training samples can then construct a new training sample set, which is called the second training sample set.
[0135] In step 4.3, before using the personnel detection model for real-time detection, the personnel detection model is retrained using each set of training samples in the second training sample set, which can further improve its recognition accuracy and robustness.
[0136] According to the personnel detection method provided in this embodiment of the invention, the historical trajectory behavior matrix constructed from the historical monitoring data collected on the target personnel before the current moment is fully utilized. By constructing the feature vector corresponding to any row in the historical trajectory behavior matrix except the last row and its corresponding personnel presence detection result label, a second training sample set is constructed to retrain the personnel detection model. At this time, the scene and time of the target personnel are closer to the actual situation at the current moment. The second training sample set determined in this way is more effective for training the personnel detection model, thereby further improving the robustness and recognition accuracy of the model.
[0137] Based on the above embodiments, as an optional embodiment, historical monitoring data of the target person within each grid of the gridded detection space within a first preset total time period before the current moment is obtained, including:
[0138] Based on radar monitoring data within a second preset total time period prior to the current moment, at least one target person is identified, and the target person appears within the detection space at least within the second preset total time period;
[0139] Obtain complete radar monitoring data within a first preset total time period before the current moment, and filter out radar monitoring data related to the target personnel from the complete radar monitoring data;
[0140] Based on the radar monitoring data related to the target personnel, determine the historical monitoring data of the target personnel in each grid within the gridded detection space.
[0141] It should be noted that since there may be more than one person in the detection space, but since different people have different physical characteristics such as height and body shape, the historical behavioral data of different people can be distinguished by combining the characteristics of the behavioral data shown by the different physical characteristics of different people.
[0142] Assuming a first preset total duration of 12 hours, to obtain historical monitoring data for the target person (let's say person A) within each grid of the gridded detection space, we can first obtain radar monitoring data within a second preset total duration. This radar monitoring data includes relevant monitoring data for person A within the detection space over the past 12 hours, and may also include relevant monitoring data for other persons besides person A (let's assume person B is also present in the detection space) within the past 12 hours.
[0143] The personnel detection method provided in this invention is based on artificial intelligence. By analyzing historical monitoring data of the same person within the same monitoring space and extracting their historical activity trajectory within that space, it can predict whether the person is currently in a radar detection blind zone. Therefore, it is necessary to analyze the historical monitoring data of the same person.
[0144] In view of this, the present invention filters out radar monitoring data containing only person A within a first preset total time period from radar monitoring data containing both person A and person B within a second preset time period, in order to analyze whether person A is in the detection area at the current moment.
[0145] Therefore, in this embodiment of the invention, the second preset total duration is generally greater than or equal to the first preset total duration, so that radar monitoring data of the detection area within 12 hours or more before the current time can be obtained.
[0146] Furthermore, since the people active within the detection area are generally relatively fixed, such as family members, each person's physical characteristics vary to some extent. By analyzing the differences in physical characteristics exhibited by different individuals, all radar monitoring data can be categorized to obtain radar monitoring data associated with each individual's identity ID.
[0147] After obtaining the radar monitoring data of person A using the above method, and combining it with the results of the detection area gridding provided in the above embodiment, the historical monitoring data of person A in each grid corresponding to the gridded detection space can be determined, including whether person A is in the detection space at any given time, and the location corresponding to which grid he / she is in.
[0148] The personnel detection method provided in this embodiment of the invention provides a method that uses radar monitoring data containing all detected personnel to filter out radar monitoring data related to a specific target personnel. By using a personnel detection model to predict whether there are people in the detection space one by one and one by one, the detection accuracy can be improved.
[0149] Based on the above embodiments, as an optional embodiment, the personnel detection method provided by the present invention may further include:
[0150] Based on the radar monitoring data of the detection space at the current moment, a preliminary detection result is determined to indicate the presence of personnel in the detection space at the current moment;
[0151] If the preliminary detection result indicates that there are people in the detection space, then the preliminary detection result of the presence of people shall be taken as the final detection result of the presence of people.
[0152] If the initial detection result indicates that no personnel exist in the detection space, then the next step is to perform gridding processing on the detection space. The next step is to input the target feature vector into the personnel detection model to obtain the personnel presence detection result of the detection space at the current moment, which is then used as the final personnel presence detection result.
[0153] In this embodiment, the system will determine whether to call the trained personnel detection model to identify the presence of personnel based on whether the radar monitoring data can determine whether there are personnel in the detection space at the current moment.
[0154] Specifically, if the radar monitoring data of the detection space at the current moment clearly indicates that the target personnel are in the detection space, then the detection result is directly determined as: there is personnel activity.
[0155] Conversely, if the radar monitoring data of the detection space at the current moment cannot determine whether the target person is in the detection space, for example, if the target person is in the radar detection blind zone, or if the target person has indeed left, then it is necessary to process the historical monitoring data of the target person in each grid within the first preset total time before the current moment according to the method provided in the above embodiment, input the processed target feature vector into the trained personnel detection model, obtain the personnel presence detection result of the detection space at the current moment output by the personnel detection model, and use it as the final personnel presence detection result.
[0156] That is, if the radar monitoring data at the current moment determines that the target person is not in the detection space, but the historical monitoring data in each grid within the first preset total time before the current moment indicates that the target person is located at a position corresponding to a certain grid in the detection space, but the position corresponding to that grid is in the radar detection blind zone (or the radar has not effectively identified the existence of the target person), then the final detection result of the person's presence can be determined as: there is personnel activity.
[0157] Correspondingly, if the radar monitoring data at the current moment determines that the target personnel are not in the detection space, and the personnel detection model outputs the personnel presence detection result based on the historical monitoring data in each grid within the first preset total time before the current moment, the target personnel are also not in the detection space, then the final personnel presence detection result can be determined as: no personnel activity.
[0158] The personnel detection method provided in this embodiment of the invention prioritizes direct analysis of radar data when it is possible to directly analyze whether a person exists in the detection space using radar detection data. If direct analysis of radar data indicates that the target person is not in the current space, then the method provided in the above embodiment utilizes an artificial intelligence model to analyze the historical detection data of the target person to predict whether the target person is still in the current detection space. The combination of these two detection methods improves detection efficiency while ensuring the accuracy of the detection results.
[0159] Based on the above embodiments, as an optional embodiment, the retraining of the personnel detection model using the second training sample set specifically includes:
[0160] The personnel detection model is retrained using a predetermined number of training samples from the second training sample set;
[0161] The retrained personnel detection model was validated using training samples from the second training sample set, excluding the preset number of training samples.
[0162] After confirming that the verification results have converged, the retrained personnel detection model will be used as the new personnel detection model.
[0163] Figure 5 This is the second flowchart of the personnel detection method provided by the present invention, as shown below. Figure 5 As shown, in this embodiment of the invention, after rasterizing the detection area based on step 51, and uploading the radar-detected data to the cloud server (hereinafter referred to as the cloud server) in step 52, and constructing a historical trajectory behavior matrix on the cloud server based on the method of the above embodiment in step 53, step 54 is then executed, including:
[0164] A predetermined number (e.g., 70%) of the feature vector samples corresponding to any row in the historical trajectory behavior matrix (excluding the last row) are extracted, and a set of training samples is formed by combining the detection result label corresponding to each feature vector sample. These training samples are then used to iteratively train the personnel detection model. After each training iteration, the effectiveness of the personnel detection model can be checked using a test set, and pre-training is stopped when the effectiveness meets the expected requirements.
[0165] After pre-training is completed, step 55 is executed to send the trained personnel detection model to the device terminal. In this embodiment, the device terminal can be a server used to implement the personnel detection method.
[0166] Finally, in step 56, the device terminal uses the trained personnel detection model to perform feature recognition and classification on the input target feature vector, and outputs the blind spot detection result, that is, the detection result of the presence of personnel in the detection space at the current moment.
[0167] Optionally, the test set can be constructed by taking approximately 30% of the feature vector samples remaining in the historical trajectory behavior matrix and combining them with the detection result label corresponding to each feature vector sample to form a set of training samples. All of these training samples constitute the test set.
[0168] As an optional embodiment, in the above embodiments, when constructing the target feature vector from monitoring data slices within a preset number of sampling durations before the current time, the preset number is always set to 1. Assuming a sampling duration of 10 minutes, the method in the market embodiment can only determine whether there is a person in the detection space within a time period t, i.e., within 10 minutes. If the target person is in the radar detection blind zone for more than 10 minutes, their status after 10 minutes cannot be accurately determined.
[0169] To avoid this problem, the value of the preset number can be adjusted appropriately according to the needs of the actual scenario, thereby adjusting the duration corresponding to each target feature vector. For example, if the preset number is set to 6, the monitoring data of all grids within 1 hour will be sliced to form the target feature vector, which will be input into the trained personnel detection model. The personnel presence detection result output by the personnel detection model will represent the personnel presence detection result within the previous 1 hour.
[0170] Figure 6 This is a schematic diagram of the personnel detection device provided by the present invention, as shown below. Figure 6 As shown, the present invention also provides a personnel detection device, which mainly includes, but is not limited to:
[0171] The data acquisition unit 61 is used to acquire historical monitoring data of the target personnel in each grid within the gridded detection space within the first preset total time period before the current moment.
[0172] The data processing unit 62 is used to convert the historical monitoring data of each grid into multiple monitoring data slices using a preset sampling duration as a sliding window.
[0173] Vector construction unit 63 is used to construct a target feature vector based on monitoring data slices of all grids within a preset number of sampling durations before the current time.
[0174] The model detection unit 64 is used to input the target feature vector into the personnel detection model to obtain the personnel presence detection result of the detection space output by the personnel detection model at the current time.
[0175] The personnel detection model is trained based on feature vector samples and the corresponding personnel presence detection result labels.
[0176] Specifically, the personnel detection device provided in this embodiment of the invention can detect the status of people in blind spots based on supervised learning-assisted radar. Its advantage is that it can automatically generate target feature vectors without requiring manual annotation of data. After the detection space monitored by the radar is gridded, the value of grid 0 and 1 can effectively express the trajectory of people. Through this device, the status of people in blind spots within a certain time range can be effectively determined.
[0177] It should be noted that the personnel detection device provided in the embodiments of the present invention can run the personnel detection method provided in any of the above embodiments in actual use, and will not be described in detail here.
[0178] The personnel detection device provided in this embodiment of the invention is based on artificial intelligence technology. In scenarios where the radar cannot detect personnel, it extracts features from the historical monitoring data of personnel detected by the radar to accurately predict whether a person is in the current detection space based on the movement pattern of the personnel. This device can be used to meet the control needs of personnel in specific scenarios.
[0179] Figure 7 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 7 As shown, the electronic device may include a processor 710, a communication interface 720, a memory 730, and a communication bus 740. The processor 710, communication interface 720, and memory 730 communicate with each other via the communication bus 740. The processor 710 can call logical instructions in the memory 730 to execute the following methods: acquiring historical monitoring data of the target person in each grid within the gridded detection space within a first preset total time period before the current moment; converting the historical monitoring data of each grid into multiple monitoring data slices using a preset sampling time period as a sliding window; constructing a target feature vector based on the monitoring data slices of all grids within a preset number of sampling times before the current moment; and inputting the target feature vector into a personnel detection model to obtain the personnel presence detection result of the detection space at the current moment, output by the personnel detection model. The personnel detection model is trained based on feature vector samples and the corresponding personnel presence detection result labels.
[0180] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to related technologies, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0181] On the other hand, this invention discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when these instructions are executed by a computer, the computer can perform the methods provided in the above-described method embodiments. For example, the methods include: acquiring historical monitoring data of the target person within each grid of the gridded detection space within a first preset total time period before the current moment; converting the historical monitoring data of each grid into multiple monitoring data slices using a preset sampling time period as a sliding window; constructing a target feature vector based on the monitoring data slices of all grids within a preset number of sampling times before the current moment; and inputting the target feature vector into a personnel detection model to obtain the personnel presence detection result of the detection space at the current moment, output by the personnel detection model. The personnel detection model is trained based on feature vector samples and the corresponding personnel presence detection result labels.
[0182] In another aspect, embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the transmission methods provided in the above embodiments, including, for example,: acquiring historical monitoring data of the target personnel in each grid within the gridded detection space within a first preset total time period before the current moment; converting the historical monitoring data of each grid into multiple monitoring data slices using a preset sampling time period as a sliding window; constructing a target feature vector based on the monitoring data slices of all grids within a preset number of sampling time periods before the current moment; and inputting the target feature vector into a personnel detection model to obtain the personnel presence detection result of the detection space at the current moment output by the personnel detection model. The personnel detection model is trained based on feature vector samples and the personnel presence detection result labels corresponding to the feature vector samples.
[0183] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0184] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of software products. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0185] Finally, it should be noted that the above embodiments are only for illustrating the present invention and not for limiting the present invention. Although the present invention has been described in detail with reference to the embodiments, those skilled in the art should understand that various combinations, modifications, or equivalent substitutions of the technical solutions of the present invention do not depart from the spirit and scope of the technical solutions of the present invention and should be covered within the scope of the claims of the present invention.
Claims
1. A method for personnel detection, characterized in that, include: Obtain historical monitoring data of the target personnel within each grid of the gridded detection space within a first preset total time period prior to the current moment; the current moment refers to the moment of real-time sampling for personnel detection; Using a preset sampling duration as a sliding window, the historical monitoring data of each grid is converted into multiple monitoring data slices; Based on monitoring data slices from all grids within a preset number of sampling durations prior to the current time, construct a target feature vector; The target feature vector is input into the personnel detection model to obtain the personnel presence detection result of the detection space at the current time, output by the personnel detection model. The personnel detection model is trained based on feature vector samples and the personnel presence detection result labels corresponding to the feature vector samples; The step of constructing a target feature vector based on monitoring data slices from all grids within a preset number of sampling durations prior to the current time includes: Obtain all monitoring data slices for each grid; A feature vector is constructed by slicing the monitoring data of each grid within any sliding window; Each feature vector corresponding to a sliding window is treated as a separate row, and a historical trajectory behavior matrix is constructed according to the time order of the sliding windows. The feature vector corresponding to the last row of the historical trajectory behavior matrix is used as the target feature vector.
2. The personnel detection method according to claim 1, characterized in that, The personnel detection model is specifically trained based on the following steps: Obtain historical monitoring data of the target person in each grid within the gridded detection space within a first preset total time period before any historical moment; Obtain monitoring data slices within a preset number of sampling durations prior to any historical moment, construct a feature vector sample, and use the personnel presence detection result of the detection space at any historical moment as the personnel presence detection result label; The first training sample set is constructed by taking any of the feature vector samples and their corresponding personnel presence detection result labels as a set of training samples. Using the first training sample set, the pre-built network model is trained to obtain the personnel detection model.
3. The personnel detection method according to claim 2, characterized in that, After training the pre-built network model using the training sample set to obtain the personnel detection model, the method further includes: The feature vector corresponding to any row in the historical trajectory behavior matrix other than the last row is taken as the feature vector sample, and the personnel presence detection result corresponding to the feature vector sample is taken as the personnel presence detection result label. A second training sample set is constructed by using the feature vector samples and the personnel presence detection result labels to form a set of training samples. The personnel detection model is retrained using the second training sample set.
4. The personnel detection method according to claim 1, characterized in that, The acquisition of historical monitoring data of the target personnel within each grid of the gridded detection space within a first preset total time period prior to the current moment includes: Based on radar monitoring data within a second preset total time period prior to the current moment, at least one target person is identified, and the target person appears within the detection space at least within the second preset total time period; Obtain complete radar monitoring data within a first preset total time period before the current moment, and filter out radar monitoring data related to the target personnel from the complete radar monitoring data; Based on the radar monitoring data related to the target personnel, determine the historical monitoring data of the target personnel in each grid within the gridded detection space.
5. The personnel detection method according to claim 4, characterized in that, The second preset total duration is greater than or equal to the first preset total duration.
6. The personnel detection method according to any one of claims 1-5, characterized in that, Also includes: Based on the radar monitoring data of the detection space at the current moment, a preliminary detection result is determined on the presence of personnel in the detection space at the current moment; If the preliminary detection result indicates that there are personnel in the detection space, then the preliminary detection result is taken as the final detection result. If the preliminary detection result of the personnel presence indicates that there are no personnel in the detection space, then the step of performing gridding processing on the detection space is executed. The next step is to input the target feature vector into the personnel detection model to obtain the personnel presence detection result of the detection space at the current time output by the personnel detection model, and to use the personnel presence detection result of the detection space at the current time output by the personnel detection model as the final personnel presence detection result.
7. The personnel detection method according to claim 3, characterized in that, The step of retraining the personnel detection model using the second training sample set includes: The personnel detection model is retrained using a predetermined number of training samples from the second training sample set; The retrained personnel detection model is validated using training samples other than the preset number of training samples in the second training sample set; After confirming that the verification results have converged, the retrained personnel detection model will be used as the new personnel detection model.
8. A personnel detection device, characterized in that, include: The data acquisition unit is used to acquire historical monitoring data of the target personnel in each grid of the gridded detection space within a first preset total time period before the current moment; the current moment refers to the moment of real-time sampling for personnel detection; The data processing unit is used to convert the historical monitoring data of each grid into multiple monitoring data slices using a preset sampling duration as a sliding window. The vector construction unit is used to construct a target feature vector based on monitoring data slices within a preset number of sampling durations of all grids before the current time. The model detection unit is used to input the target feature vector into the personnel detection model to obtain the personnel presence detection result of the detection space at the current time, output by the personnel detection model. The personnel detection model is trained based on feature vector samples and the personnel presence detection result labels corresponding to the feature vector samples; The step of constructing a target feature vector based on monitoring data slices from all grids within a preset number of sampling durations prior to the current time includes: Obtain all monitoring data slices for each grid; A feature vector is constructed by slicing the monitoring data of each grid within any sliding window; Each feature vector corresponding to a sliding window is treated as a separate row, and a historical trajectory behavior matrix is constructed according to the time order of the sliding windows. The feature vector corresponding to the last row of the historical trajectory behavior matrix is used as the target feature vector.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the personnel detection method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the personnel detection method as described in any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the personnel detection method as described in any one of claims 1 to 7.