Method and system for identifying crowd flow patterns in hot spots of smart cities

By preprocessing and sliding window processing of the flow information in the hot spots of smart cities, the problems of failure of threshold settings and discontinuity of peak identification in the prior art are solved, and more accurate and effective peak identification of flow is achieved.

CN114372236BActive Publication Date: 2025-05-06SHANGHAI JIAOTONG UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111459029.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-01
Publication Date
2025-05-06
Estimated Expiration
2041-12-01

AI Technical Summary

Technical Problem

When the prior art recognizes peaks in the livelihood of smart city hotspot areas, the threshold setting is prone to failure and cannot effectively deal with frequent peak fluctuations, resulting in identification errors and discontinuous peak recognition.

Method used

By preprocessing data of people flow information in hot spots in smart cities, distinguishing forward and reverse people flow data, calculating thresholds, and performing secondary processing using sliding window-based peak flow processing method, combining continuous peaks and filtering short-term peaks.

Benefits of technology

It improves the accuracy and effectiveness of the recognition of the flow pattern, automatically obtains threshold parameters, reduces manual intervention, and the recognition results are closer to practical applications. The algorithm is relatively complex and easy to integrate into other systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114372236B_ABST
    Figure CN114372236B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for identifying crowd flow patterns in hot spots of smart cities, including: performing targeted preprocessing on crowd flow information data acquired by video surveillance in hot spots of smart cities according to data characteristics; distinguishing between positive and negative directions for adaptive threshold calculation of the preprocessed crowd flow data in hot spots of smart cities, and treating crowd flow data greater than the threshold as a crowd flow peak; performing secondary processing on the crowd flow peak data in hot spots of smart cities using a crowd flow peak processing method based on a sliding window; distinguishing between positive and negative directions, marking the crowd flow peak data, and obtaining the crowd flow pattern and pattern duration in the hot spots of smart cities; the method and system for identifying crowd flow patterns in hot spots of smart cities proposed by the present invention perform targeted processing on crowd flow data and peaks, so that the recognition result is closer to reality, and the algorithm has low complexity, which is convenient for integration into other systems for application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of artificial intelligence, and in particular to a method and system for recognizing crowd flow patterns in hot spots of smart cities. Background Art

[0002] At present, with the continuous development of smart city construction, the number of large buildings or places such as shopping malls, hospitals, parks, playgrounds, subway stations, etc. in smart cities is increasing. These buildings or places are referred to as smart city hotspots below. Especially in large smart cities with high population density, the flow of people in such smart city hotspots is also large. When the flow of people in such areas reaches a peak, the management of such areas also brings corresponding challenges. Such as security control issues in key areas, elevator loads in high-rise buildings, configuration of security personnel on duty and key security periods, smart city road traffic management, etc. If the flow pattern and duration of the corresponding pattern in such hotspots can be accurately identified based on historical flow information, the management of smart city hotspots can be more targeted.

[0003] In existing crowd flow pattern recognition methods, the threshold for the crowd flow peak is generally set manually based on experience. When the crowd flow pattern changes, it is easy to cause the threshold to be set too high or too low, resulting in errors in the recognition and judgment of the crowd flow peak, and the threshold needs to be adjusted. Moreover, when the crowd flow peak fluctuates greatly and frequently, the existing method does not perform further processing, resulting in multiple discontinuous peaks, which is not convenient for the use of crowd flow peak pattern and duration information.

[0004] A patent document with announcement number CN112766718A discloses a method, system, computer equipment and storage medium for identifying the boundaries of urban business districts. The method includes: obtaining business-related data of the target area and preprocessing it; calculating the commercial building height distribution index, store density distribution index, store rent distribution index and commercial street pedestrian density distribution index based on the preprocessed data; calculating the comprehensive commercial evaluation index of each building based on the above distribution indexes to realize the physical boundary identification of the urban business district; the business-related data also includes takeaway location data and urban road data. Based on the preprocessed data, a network data set is constructed to calculate the farthest distance that the deliveryman can reach from the takeaway location within the specified delivery time to realize the virtual boundary identification of the urban business district.

[0005] Therefore, it is necessary to propose a technical solution to improve the above technical problems. Summary of the invention

[0006] In view of the defects in the prior art, the purpose of the present invention is to provide a method and system for identifying crowd flow patterns in hot spots of a smart city.

[0007] According to a method for identifying a crowd flow pattern in a hot spot area of ​​a smart city provided by the present invention, the method comprises the following steps:

[0008] Step S1: preprocessing the crowd flow information obtained by video surveillance in the hot spots of the smart city;

[0009] Step S2: distinguishing forward and reverse calculation thresholds for the pre-processed smart city hotspot area pedestrian flow data;

[0010] Step S3: judging whether the crowd flow data is greater than a threshold;

[0011] Step S4: If it is greater than the threshold, it is regarded as peak data, and if it is less than the threshold, it means that no peak occurs;

[0012] Step S5: Determine whether there are multiple peaks in the forward direction and the reverse direction;

[0013] Step S6: When there are multiple peaks, a sliding window-based crowd peak processing method is used to perform secondary processing on the crowd peak data of the hot spot area of ​​the smart city; if there are no multiple peaks, no crowd peak processing is performed;

[0014] Step S7: Distinguish the positive and negative directions, mark the peak flow data, and obtain the flow pattern and pattern duration of the hot spots in the smart city.

[0015] Preferably, step S1 comprises the following steps:

[0016] Step S1.1: Clean the collected crowd flow data of the hot spots in the smart city, remove the files with missing data from the original data files, and then distinguish the files of weekdays, weekends, and holidays according to the data date information; the files with missing data are specifically determined by the following formula:

[0017]

[0018] Among them, S D Indicates the size of the disk space occupied by file D. There are N original data files in total, which are the set {D1, D2, …, D N}, D i represents the data file of the i-th day, represents the size of file D on day i, It means to sum the numbers from the 1st to the Nth. Indicates the average size of N files;

[0019] Step S1.2: Aggregate the cleaned data, set the configured time interval T0, aggregate the data within the time interval, and merge the single point data in the data file according to the time interval T0 of equal length, distinguishing between forward and reverse directions, to form time series data X = {X1, X2, ..., X n}, Y={Y1,Y2,…,Y n}, where X represents the forward data sequence and Y represents the reverse data sequence, Indicates rounding up;

[0020] Step S1.3: After data aggregation, the data of multiple days are integrated, and the data of different days and the same time slice are combined, and the arithmetic mean is taken to obtain the average value of the data for one day. in

[0021] Preferably, step S2 comprises the following steps:

[0022] Step S2.1: Preprocess the data sequence Find the average value μ of the flow of people:

[0023]

[0024] Among them, the coefficient α is the ratio of the number of positive flow to the total number of flow, The coefficient β is the ratio of the number of reverse flows to the total number of flows, that is, in,

[0025] Step S2.2: Calculate the mean square error of the crowd flow data Deviation value of reaction data;

[0026] Step S2.3: The threshold t is set to: t = (μ + σ) - (μ - σ) = 2σ.

[0027] Preferably, step S6 comprises the following steps:

[0028] Step S6.1: Initialize and set the sliding window size w and sliding window threshold t ′ ;

[0029] Step S6.2: Slide the window from small to large in time to traverse the data;

[0030] Step S6.3: Determine the size of the data in the window. If the first and last data in the window are both peak flow data, go to step S6.4; otherwise, go to step S6.2.

[0031] Step S6.4: Determine whether the middle data in the window is greater than the sliding window threshold. If so, the middle data is regarded as peak data. Go to step S6.2.

[0032] Step S6.5: After the data traversal is completed, new peak data is obtained.

[0033] Preferably, the step S6.1 comprises the following steps:

[0034] Step S6.1.1: Mark the peak data. A group of peak data that is continuous in time is called a peak. The peak data is marked as {p1, p2, …, p n};

[0035] Step S6.1.2: Calculate {p1,p2,…,p n} Peak duration, get Then the sliding window size w is:

[0036]

[0037] in Indicates the pth i The duration of a peak, there are n peaks in total, δ represents the average duration of n peaks;

[0038] Sliding window threshold t ′ for:

[0039]

[0040] in represents the data average value of the i-th time slice, μ is the same as step S2.1.

[0041] Preferably, step S7 comprises the following steps:

[0042] Step S7.1: A group of peak data that is continuous in time is called a wave peak. The forward and reverse peak data are marked separately, and the wave peak data are marked as {p1, p2, ..., p n};

[0043] Step S7.2: Calculate {p1,p2,…,p n} Peak duration, get

[0044] Step S7.3: Delete the short-time peak data and judge the short-time peak according to the formula:

[0045]

[0046] in Indicates the pth iThe duration of a peak, there are n peaks in total, δ represents the average duration of n peaks;

[0047] Step S7.4: The remaining positive peaks are positive peak flow patterns, and the reverse peaks are reverse peak flow patterns. The pattern duration is the corresponding peak The flow of people at other times is regarded as non-peak flow mode or leisure time flow mode.

[0048] The present invention also provides a smart city hot spot area crowd flow pattern recognition system, the system includes the following modules:

[0049] Module M1: Data preprocessing of crowd flow information obtained by video surveillance in hot spots of smart cities;

[0050] Module M2: Distinguish forward and reverse calculation thresholds for the pre-processed smart city hotspot area pedestrian flow data;

[0051] Module M3: judge whether the flow of people data is greater than the threshold;

[0052] Module M4: If it is greater than the threshold, it is regarded as peak data, and if it is less than the threshold, it means that no peak occurs;

[0053] Module M5: Determine whether there are multiple peaks in the forward and reverse directions;

[0054] Module M6: When there are multiple peaks, the passenger flow peak processing system based on sliding windows is used to perform secondary processing on the passenger flow peak data in the hot spots of the smart city. If there are no multiple peaks, no passenger flow peak processing is performed.

[0055] Module M7: Distinguish the positive and negative directions, mark the peak flow data, and obtain the flow pattern and pattern duration in the hot spots of the smart city.

[0056] Preferably, the module M1 includes the following modules:

[0057] Module M1.1: Clean the collected traffic data of smart city hot spots, remove the files with missing data from the original data files, and then distinguish the files of weekdays, weekends and holidays according to the data date information; the files with missing data are specifically determined by the following formula:

[0058]

[0059] Among them, S D Indicates the size of the disk space occupied by file D. There are N original data files in total, which are the set {D1, D2, …, D N}, D i represents the data file of the i-th day, represents the size of file D on day i, It means to sum the numbers from the 1st to the Nth. Indicates the average size of N files;

[0060] Module M1.2: Aggregate the cleaned data, set the configured time interval T0, aggregate the data within the time interval, and merge the single point data in the data file according to the time interval T0 of equal length, distinguishing between forward and reverse directions, to form time series data X = {X1, X2, ..., X n}, Y={Y1,Y2,…,Y n}, where X represents the forward data sequence and Y represents the reverse data sequence, Indicates rounding up;

[0061] Module M1.3: After data aggregation, the data of multiple days are integrated, the data of different days and the same time slice are merged, and the arithmetic mean is taken to obtain the average data value of one day. in

[0062] Module M2.1: Data sequence after data preprocessing Find the average value μ of the flow of people:

[0063]

[0064] Among them, the coefficient α is the ratio of the number of positive flow to the total number of flow, The coefficient β is the ratio of the number of reverse flows to the total number of flows, that is, in,

[0065] Module M2.2: Find the mean square error of the crowd flow data Deviation value of reaction data;

[0066] Module M2.3: The threshold t is set to: t = (μ + σ) - (μ - σ) = 2σ.

[0067] Preferably, the module M6 includes the following modules:

[0068] Module M6.1: Initialize the sliding window size w and sliding window threshold t ′ ;

[0069] Module M6.2: Slide the window from small to large in time and traverse the data;

[0070] Module M6.3: Determine the size of the data in the window. If the first and last data in the window are both peak flow data, transfer to module M6.4; otherwise, transfer to module M6.2.

[0071] Module M6.4: Determine the size of the middle data in the window and the sliding window threshold. If it is greater, the middle data is regarded as peak data; transfer to module M6.2;

[0072] Module M6.5: Get new peak data after data traversal is completed;

[0073] Module M6.1.1: Mark the peak data. A group of peak data that is continuous in time is called a peak. The peak data is marked as {p1, p2, …, p n};

[0074] Module M6.1.2: Calculate {p1,p2,…,p n} Peak duration, get Then the sliding window size w is:

[0075]

[0076] in Indicates the pth i The duration of a peak, there are n peaks in total, δ represents the average duration of n peaks;

[0077] Sliding window threshold t ′ for:

[0078]

[0079] in Represents the average value of the data in the i-th time slice, μ is the same as module M2.1.

[0080] Preferably, the module M7 includes the following modules:

[0081] Module M7.1: A set of continuous peak data is called a wave peak. The positive and reverse peak data are marked separately, and the wave peak data are marked as {p1, p2, …, p n};

[0082] Module M7.2: Calculate {p1,p2,…,p n} Peak duration, get

[0083] Module M7.3: Delete short-time peak data and judge short-time peak according to the formula:

[0084]

[0085] in Indicates the pth i The duration of a peak, there are n peaks in total, δ represents the average duration of n peaks;

[0086] Module M7.4: The remaining positive peaks are positive peak flow patterns, and the reverse peaks are reverse peak flow patterns. The pattern duration is the corresponding The flow of people at other times is regarded as non-peak flow mode or leisure time flow mode.

[0087] Compared with the prior art, the present invention has the following beneficial effects:

[0088] 1. The targeted preprocessing of raw data by the present invention can effectively eliminate defective data and abnormal data, and improve the effectiveness of the recognition method;

[0089] 2. The threshold parameters of the present invention are automatically obtained without the need for manual setting by professionals;

[0090] 3. The present invention performs secondary processing on the peak data, merges continuous peaks, and filters short-term peaks, so that the recognition results are closer to practical applications;

[0091] 4. The algorithm of the present invention is deterministic, does not require neural networks or other iterative algorithms, has a small amount of calculation, and is easy to be integrated into other systems for practical application. BRIEF DESCRIPTION OF THE DRAWINGS

[0092] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0093] Figure 1 Flow chart of a method for identifying a crowd flow pattern in a hot spot area of ​​a smart city according to an embodiment of the present invention;

[0094] Figure 2 It is a schematic diagram of processing the peak flow data of a crowd flow by using the crowd flow peak processing method based on a sliding window in an embodiment of the present invention;

[0095] Figure 3 Schematic diagram of a smart city hotspot area pedestrian pattern recognition system in an embodiment of the present invention. DETAILED DESCRIPTION

[0096] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0097] The technical problem to be solved by the present invention is to provide a method for identifying crowd flow patterns in hot spots of smart cities, so as to maximize the accuracy of crowd flow pattern recognition as much as possible, the setting of recognition parameters is adaptive, the algorithm complexity is low, and it is easier to apply in practice.

[0098] The crowd flow pattern recognition of the present invention is based on the analysis of crowd flow information data. The crowd flow information data is mainly obtained by processing and analyzing the image information obtained by video surveillance of the hot spots in the smart city. The main information recorded includes: date and time, crowd flow direction, and the number of people in the corresponding direction. The crowd flow direction is divided into forward and reverse. For high-rise buildings, the forward direction refers to the upward direction from low to high, and the reverse direction refers to the downward direction from high to low; for building gates or area entrances, the forward direction refers to the entry direction, and the reverse direction refers to the outflow direction.

[0099] like Figure 1 As shown, the method for identifying the flow pattern of people in hot spots of smart cities of the present invention comprises the following steps: Step 1: preprocessing the flow information of people in hot spots of smart cities obtained by video surveillance; Step 1.1: cleaning the collected flow data of people in hot spots of smart cities, removing the files with missing data from the original data files, and distinguishing the files of working days, weekends and holidays according to the data date information; wherein the files with missing data are specifically determined by the following formula:

[0100]

[0101] Among them, S D Indicates the size of the disk space occupied by file D. There are N original data files in total, which are the set {D1, D2, …, D N}, D i represents the data file for the i-th day, represents the size of file D on day i, It means to sum the numbers from the 1st to the Nth. Indicates the average size of N files.

[0102] Step 1.2: Aggregate the cleaned data, set a configurable time interval T0, and aggregate the data within the time interval, that is, merge the single point data in the data file according to the time interval T0 of equal length, distinguish between forward and reverse, and form time series data X = {X1, X2, ..., X n}, Y={Y1,Y2,…,Y n}, where X represents the forward data sequence and Y represents the reverse data sequence, Indicates rounding up.

[0103] Step 1.3: After data aggregation, integrate the data of multiple days (N days), merge the data of different days and the same time slice, and then take the arithmetic mean to get the average data of one day. in

[0104] Step 2: Distinguish the forward and reverse calculation thresholds for the preprocessed smart city hotspot area pedestrian flow data; Step 2.1: First find the average value μ of the flow of people:

[0105]

[0106] Among them, the coefficient α is the ratio of the number of positive flow to the total number of flow, The coefficient β is the ratio of the number of reverse flows to the total number of flows, that is, in,

[0107] Step 2.2: Find the mean square error of the crowd flow data Deviation value of reaction data;

[0108] Step 2.3: The threshold t is set to: t = (μ + σ) - (μ - σ) = 2σ.

[0109] Step 3: Determine whether it is greater than the threshold; Step 4: If it is greater than the threshold, it is regarded as peak data, and if it is less than the threshold, it means that no peak appears; Step 5: Determine whether there are multiple peaks in the forward and reverse directions.

[0110] Step 6: Figure 2 As described above, when there are multiple peaks, the peak flow processing method based on sliding window is used to perform secondary processing on the peak flow data of the hot spot area of ​​the smart city. If there are no multiple peaks, the peak flow processing is not performed; Step 6.1: Initialization: Set the sliding window size w and the sliding window threshold t ′ ; First, mark the peak data: a group of peak data that is continuous in time is called a peak, and these peak data are marked as {p1, p2, ..., p n}; Secondly, calculate {p1,p2,…,p n} Peak duration, get Then the sliding window size w is:

[0111]

[0112] in Indicates the pth i There are n peaks in total, and δ represents the average duration of the n peaks.

[0113] Sliding window threshold t ′ for:

[0114]

[0115] in represents the average value of the data in the i-th time slice, μ is the same as step 2.1.

[0116] Step 6.2: Slide the window from small to large in time to traverse the data; Step 6.3: Determine the size of the data in the window. When the first and last data in the window belong to the peak data, go to step 6.4; otherwise, go to step 6.2; Step 6.4: Determine the size of the middle data in the window and the sliding window threshold. If it is greater, the middle data is regarded as peak data; go to step 6.2; Step 6.5: After the data traversal is completed, obtain new peak data.

[0117] Step 7: Distinguish the positive and negative directions, mark the peak data of the flow, and obtain the flow pattern and duration of the pattern in the hot spots of the smart city; Step 7.1: A group of peak data that is continuous in time is called a peak. Mark the peak data in the positive and reverse directions respectively. Taking the positive direction as an example, mark these peak data as {p1, p2, …, p n}; Step 7.2: Calculate {p1,p2,…,p n} Peak duration, get Step 7.3: Delete the short-time peak data and judge the short-time peak according to the formula:

[0118]

[0119] in Indicates the pth i There are n peaks in total, and δ represents the average duration of the n peaks.

[0120] Step 7.4: The remaining positive peak is the positive peak flow pattern, the reverse peak is the reverse peak flow pattern, and the pattern duration is the t corresponding to the peak. pi , the flow of people at other times is regarded as non-peak flow mode or idle flow mode.

[0121] like Figure 2 As shown, the shaded data are peak data, with a total of 2 groups {p1, p2}, and the duration The sliding window size w is calculated as 11.4 by the formula, and the window size is rounded up to 15 based on the time interval T0. The sliding window threshold t ′ The formula calculated the value to be 4.7.

[0122] The present invention also provides a smart city hot spot area crowd flow pattern recognition system, the system comprises the following modules: Module M1: data preprocessing of crowd flow information acquired by video surveillance in the smart city hot spot area; Module M1.1: cleaning the collected crowd flow data in the smart city hot spot area, removing files with missing data from the original data files, and then distinguishing between working day and weekend, holiday files according to data date information; wherein, the files with missing data are specifically determined by the following formula:

[0123]

[0124] Among them, S D Indicates the size of the disk space occupied by file D. There are N original data files in total, which are the set {D1, D2, …, D N}, D i represents the data file of the i-th day, represents the size of file D on day i, It means to sum the numbers from the 1st to the Nth. Indicates the average size of N files.

[0125] Module M1.2: Aggregate the cleaned data, set the configured time interval T0, aggregate the data within the time interval, and merge the single point data in the data file according to the time interval T0 of equal length, distinguishing between forward and reverse directions, to form time series data X = {X1, X2, ..., X n}, Y={Y1,Y2,…,Y n}, where X represents the forward data sequence and Y represents the reverse data sequence, Indicates rounding up.

[0126] Module M1.3: After data aggregation, the data of multiple days are integrated, the data of different days and the same time slice are merged, and the arithmetic mean is taken to obtain the average data value of one day. in

[0127] Module M2: Distinguish the forward and reverse calculation thresholds for the pre-processed smart city hotspot area pedestrian flow data; Module M2.1: Distinguish the forward and reverse calculation thresholds for the pre-processed data sequence Find the average value μ of the flow of people:

[0128]

[0129] Among them, the coefficient α is the ratio of the number of positive flow to the total number of flow, The coefficient β is the ratio of the number of reverse flows to the total number of flows, that is, in,

[0130] Module M2.2: Find the mean square error of the crowd flow data The deviation value of the reaction data; Module M2.3: The threshold t is set to: t = (μ + σ) - (μ - σ) = 2σ.

[0131] Module M3: Determine whether the flow data is greater than the threshold; Module M4: If it is greater than the threshold, it is regarded as peak data, and if it is less than the threshold, it means that no peak occurs; Module M5: Determine whether there are multiple peaks in the forward and reverse directions.

[0132] Module M6: When there are multiple peaks, the peak flow processing system based on sliding windows is used to perform secondary processing on the peak flow data in the hot spots of smart cities. If there are no multiple peaks, peak flow processing is not performed; Module M6.1: Initialize the sliding window size w and the sliding window threshold t ′ Module M6.1.1: Mark the peak data. A group of peak data that is continuous in time is called a peak. The peak data is marked as {p1, p2, ..., p n}; Module M6.1.2: Calculate {p1,p2,…,p n} Peak duration, get Then the sliding window size w is:

[0133]

[0134] in Indicates the pth i The duration of a peak, there are n peaks in total, δ represents the average duration of n peaks;

[0135] Sliding window threshold t ′ for:

[0136]

[0137] in Represents the average value of the data in the i-th time slice, μ is the same as module M2.1.

[0138] Module M6.2: Slide the window from small to large in time to traverse the data; Module M6.3: Determine the size of the data in the window. When the first and last data in the window belong to peak traffic data, transfer to module M6.4; otherwise, transfer to module M6.2; Module M6.4: Determine the size of the middle data in the window and the sliding window threshold. If it is greater, the middle data is regarded as peak data; transfer to module M6.2; Module M6.5: Obtain new peak data after the data traversal is completed.

[0139] Module M7: Distinguish the positive and negative directions, mark the peak data of the flow of people, and obtain the flow pattern and duration of the pattern in the hot spots of the smart city; Module M7.1: A group of peak data that is continuous in time is called a peak. Mark the peak data in the positive and reverse directions respectively, and mark the peak data as {p1, p2, …, p n}; Module M7.2: Calculate {p1,p2,…,p n} Peak duration, get Module M7.3: Delete short-time peak data and judge short-time peak according to the formula:

[0140]

[0141] in Indicates the pth i There are n peaks in total, and δ represents the average duration of the n peaks.

[0142] Module M7.4: The remaining positive peaks are positive peak flow patterns, and the reverse peaks are reverse peak flow patterns. The pattern duration is the corresponding The flow of people at other times is regarded as non-peak flow mode or leisure time flow mode.

[0143] The targeted preprocessing of raw data in the present invention can effectively exclude missing data and abnormal data, and improve the effectiveness of the recognition method; the threshold parameters are automatically acquired without the need for manual setting by professionals; the peak data is secondary processed to merge continuous peaks and filter short-term peaks, so that the recognition results are closer to practical applications; the algorithm is deterministic, does not require neural networks or other iterative algorithms, has a small amount of calculation, and is easy to be integrated into other systems for practical applications.

[0144] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.

[0145] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A method for identifying crowd flow patterns in hot spots of smart cities, characterized in that: The method comprises the following steps: Step S1: preprocessing the crowd flow information obtained by video surveillance in the hot spots of the smart city; Step S2: distinguishing forward and reverse calculation thresholds for the pre-processed smart city hotspot area pedestrian flow data; Step S3: judging whether the crowd flow data is greater than a threshold; Step S4: If it is greater than the threshold, it is regarded as peak data, and if it is less than the threshold, it means that no peak occurs; Step S5: Determine whether there are multiple peaks in the forward direction and the reverse direction; Step S6: When there are multiple peaks, a sliding window-based crowd peak processing method is used to perform secondary processing on the crowd peak data of the hot spot area of ​​the smart city; if there are no multiple peaks, no crowd peak processing is performed; Step S7: Distinguish the positive and negative directions, mark the peak flow data, and obtain the flow pattern and duration of the pattern in the hot spots of the smart city; The step S7 comprises the following steps: Step S7.1: A group of peak data that is continuous in time is called a wave peak. The forward and reverse peak data are marked separately, and the wave peak data are marked as {p1, p2, ..., p n }; Step S7.2: Calculate {S1,p2,…,p n } Peak duration, get Step S7.3: Delete the short-time peak data and judge the short-time peak according to the formula: in Indicates the pth i The duration of a peak, there are n peaks in total, δ represents the average duration of n peaks; Step S7.4: The remaining positive peaks are positive peak flow patterns, and the reverse peaks are reverse peak flow patterns. The pattern duration is the time duration corresponding to the peaks. The flow of people at other times is regarded as non-peak flow mode or leisure time flow mode.

2. The method for identifying the flow of people in hot spots of smart cities according to claim 1 is characterized in that: The step S1 comprises the following steps: Step S1.1: Clean the collected crowd flow data of the hot spots in the smart city, remove the files with missing data from the original data files, and then distinguish the files of weekdays, weekends, and holidays according to the data date information; the files with missing data are specifically determined by the following formula: Among them, S D Indicates the size of the disk space occupied by file D. There are N original data files in total, which are the set {D1, D2, …, D N }, D i represents the data file of the i-th day, represents the size of file D on day i, It means to sum the numbers from the 1st to the Nth. Indicates the average size of N files; Step S1.2: Aggregate the cleaned data, set the configured time interval T0, aggregate the data within the time interval, and merge the single point data in the data file according to the time interval T0 of equal length, distinguishing between forward and reverse directions, to form time series data X = {X1, X2, ..., X n }, Y={Y1,Y2,…,Y n }, where X represents the forward data sequence and Y represents the reverse data sequence, Indicates rounding up; Step S1.3: After data aggregation, the data of multiple days are integrated, and the data of different days and the same time slice are combined, and the arithmetic mean is taken to obtain the average value of the data for one day. in 3. The method for identifying the flow of people in hot spots of smart cities according to claim 1 is characterized in that: The step S2 comprises the following steps: Step S2.1: Preprocess the data sequence Find the average value μ of the flow of people: Among them, the coefficient α is the ratio of the number of positive flow to the total number of flow, The coefficient β is the ratio of the number of reverse flows to the total number of flows, that is, in, Step S2.2: Calculate the mean square error of the crowd flow data Deviation value of reaction data; Step S2.3: The threshold t is set to: t = (μ + σ) - (μ - σ) = 2σ.

4. The method for identifying the flow of people in hot spots of smart cities according to claim 1 is characterized in that: The step S6 comprises the following steps: Step S6.1: Initialize and set the sliding window size w and sliding window threshold t ′ ; Step S6.2: Slide the window from small to large in time to traverse the data; Step S6.3: Determine the size of the data in the window. If the first and last data in the window are both peak flow data, go to step S6.4; otherwise, go to step S6.

2. Step S6.4: Determine whether the middle data in the window is greater than the sliding window threshold. If so, the middle data is regarded as peak data. Go to step S6.

2. Step S6.5: After the data traversal is completed, new peak data is obtained.

5. The method for identifying the flow of people in hot spots of smart cities according to claim 4 is characterized in that: The step S6.1 comprises the following steps: Step S6.1.1: Mark the peak data. A group of peak data that is continuous in time is called a peak. The peak data is marked as {p1, p2, …, p n }; Step S6.1.2: Calculate {p1,p2,…,p n } Peak duration, get Then the sliding window size w is: in Indicates the pth i The duration of a peak, there are n peaks in total, δ represents the average duration of n peaks; Sliding window threshold t ′ for: in represents the data average value of the i-th time slice, μ is the same as step S2.

1.

6. A smart city hotspot area crowd flow pattern recognition system, characterized by: The system includes the following modules: Module M1: Data preprocessing of crowd flow information obtained by video surveillance in hot spots of smart cities; Module M2: Distinguish forward and reverse calculation thresholds for the pre-processed smart city hotspot area pedestrian flow data; Module M3: judge whether the flow of people data is greater than the threshold; Module M4: If it is greater than the threshold, it is regarded as peak data, and if it is less than the threshold, it means that no peak occurs; Module M5: Determine whether there are multiple peaks in the forward and reverse directions; Module M6: When there are multiple peaks, the passenger flow peak processing system based on sliding windows is used to perform secondary processing on the passenger flow peak data in the hot spots of the smart city. If there are no multiple peaks, no passenger flow peak processing is performed. Module M7: Distinguish the positive and negative directions, mark the peak flow data, and obtain the flow pattern and duration of the hot spots in the smart city; The module M7 includes the following modules: Module M7.1: A set of continuous peak data is called a wave peak. The positive and reverse peak data are marked separately, and the wave peak data are marked as {p1, p2, …, p n }; Module M7.2: Calculate {p1,p2,…,p n } Peak duration, get Module M7.3: Delete short-time peak data and judge short-time peak according to the formula: in Indicates the pth i The duration of a peak, there are n peaks in total, S represents the average duration of n peaks; Module M7.4: The remaining positive peaks are positive peak flow patterns, and the reverse peaks are reverse peak flow patterns. The pattern duration is the corresponding The flow of people at other times is regarded as non-peak flow mode or leisure time flow mode.

7. The smart city hotspot area crowd flow pattern recognition system according to claim 6 is characterized in that: The module M1 includes the following modules: Module M1.1: Clean the collected traffic data of smart city hot spots, remove the files with missing data from the original data files, and then distinguish the files of weekdays, weekends and holidays according to the data date information; the files with missing data are specifically determined by the following formula: Among them, S D Indicates the size of the disk space occupied by file D. There are N original data files in total, which are the set {D1, D2, …, D N }, D i represents the data file of the i-th day, represents the size of file D on day i, It means to sum the numbers from the 1st to the Nth. Indicates the average size of N files; Module M1.2: Aggregate the cleaned data, set the configured time interval T0, aggregate the data within the time interval, and merge the single point data in the data file according to the time interval T0 of equal length, distinguishing between forward and reverse directions, to form time series data X = {X1, X2, ..., X n }, Y={Y1,Y2,…,Y n }, where X represents the forward data sequence and Y represents the reverse data sequence, Indicates rounding up; Module M1.3: After data aggregation, the data of multiple days are integrated, the data of different days and the same time slice are merged, and the arithmetic mean is taken to obtain the average data value of one day. in Module M2.1: Data sequence after data preprocessing Find the average value μ of the flow of people: Among them, the coefficient α is the ratio of the number of positive flow to the total number of flow, The coefficient β is the ratio of the number of reverse flows to the total number of flows, that is, in, Module M2.2: Find the mean square error of the crowd flow data Deviation value of reaction data; Module M2.3: The threshold t is set to: t = (μ + σ) - (μ - σ) = 2σ.

8. The smart city hotspot area crowd flow pattern recognition system according to claim 6 is characterized in that: The module M6 includes the following modules: Module M6.1: Initialize the sliding window size w and sliding window threshold t ′ ; Module M6.2: Slide the window from small to large in time and traverse the data; Module M6.3: Determine the size of the data in the window. When the first and last data in the window are both peak traffic data, transfer to module M6.

4. Otherwise, switch to module M6.2; Module M6.4: Determine the size of the middle data in the window and the sliding window threshold. If it is greater, the middle data is regarded as peak data; transfer to module M6.2; Module M6.5: Get new peak data after data traversal is completed; Module M6.1.1: Mark the peak data. A group of peak data that is continuous in time is called a peak. The peak data is marked as {p1, p2, …, p n }; Module M6.1.2: Calculate {p1,p2,…,p n } Peak duration, get Then the sliding window size w is: in Indicates the pth i The duration of a peak, there are n peaks in total, δ represents the average duration of n peaks; Sliding window threshold t ′ for: in Represents the average value of the data in the i-th time slice, μ is the same as module M2.1.

Citation Information

Patent Citations

  • Urban business district boundary identification method and system, computer equipment and storage medium

    CN112766718A

  • Human movement-based urban area interaction abnormal relationship identification method and equipment

    CN111310340A

  • Traffic optimization scheduling system and method based on smart city

    CN112580962A