A method and system for predicting passenger flow for urban planning

By combining period information and trend difference correction factors in the FLUSS algorithm, a more accurate MP vector is obtained, which solves the problem of low accuracy of time segmentation points in the traditional method and improves the accuracy of human flow prediction.

CN118427502BActive Publication Date: 2024-09-10DONGGUAN URBAN PLANNING & DESIGN INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410875071.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-09-10
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

The traditional FLUSS algorithm only considers the numerical distance of time series data when obtaining MP vectors, resulting in low accuracy of time segmentation points and affecting the accuracy of human flow prediction.

Method used

By dividing the observation data of urban areas into sub-sequences, the period information and trend difference correction factors between each two sub-sequences are calculated, and these factors are combined to obtain a more accurate distance, and then a more reliable MP vector is obtained to assist the flow of people. predict.

Benefits of technology

It improves the accuracy and reliability of human flow prediction and ensures the accuracy of time segmentation points, thus improving the accuracy of prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118427502B
    Figure CN118427502B
Patent Text Reader

Abstract

The present invention relates to the field of data processing technology, and in particular to a method and system for predicting the flow of people in urban planning, the method comprising: dividing a city into at least two areas, obtaining observation data of each area in historical time and dividing the data into at least two subsequences, obtaining a periodic information component sequence and a trend component sequence corresponding to each subsequence, respectively calculating a periodic information correction factor and a trend difference correction factor between each two subsequences; obtaining the distance between corresponding subsequences based on the periodic information correction factor and the trend difference correction factor, and then obtaining an MP vector; obtaining a time segmentation point from the MP vector, and assisting in predicting the flow of people based on the time segmentation point. The present invention makes the obtained MP vector more accurate by combining periodic information and trend information, thereby ensuring the accuracy of the time segmentation point and the reliability of the result of predicting the flow of people.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for predicting the flow of people for urban planning. Background Art

[0002] Pedestrian flow prediction is of great significance to urban traffic management, urban construction planning and public safety. For the spatiotemporal big data of the city, the city can be divided into several areas; the pedestrian flow data can be acquired through sensor technology and large-scale infrastructure, and summarized into the pedestrian flow of a region; the changes in the pedestrian flow of the region are obtained through adjacent time nodes to form pedestrian flow data; in the division of the region, the data recorded in each divided area are the pedestrian flow entering the area and the pedestrian flow leaving the area. After obtaining the urban area pedestrian flow data at each time point, the pedestrian flow of the urban block can be predicted by training the ST-Resnet model.

[0003] In the process of predicting the flow of people in urban blocks by training the ST-Resnet model, it is necessary to segment the historical time series data into time axes so that the model can model the time attributes of the data differently. Generally, the time axis is divided into distant history, recent history, and recent time. In the process of time axis segmentation, the three time periods of distant history, recent history, and recent time have different meanings in time attributes, that is, the data mode formed by the time series data will change, which can be expressed as changes in numerical values, as well as periodic and trend changes.

[0004] The current method for segmenting the time axis is to use the FLUSS algorithm to calculate the MP vector, and then determine the division points of the AC curve. However, in the process of determining the division points using the traditional FLUSS algorithm, the calculation of the MP vector only takes into account the numerical distance of the time series data, and the indicators are relatively single, resulting in low accuracy of the obtained time segmentation points. It is impossible to correctly divide the time periods of distant history, recent history, and recent time required by the model, and thus cannot guarantee the accuracy of pedestrian flow prediction. Summary of the invention

[0005] In order to solve the problem that the accuracy of the existing time segmentation points obtained based on MP vectors is low, resulting in poor accuracy in pedestrian flow prediction, the purpose of the present invention is to provide a pedestrian flow prediction method and system for urban planning. The technical solutions adopted are as follows:

[0006] In a first aspect, an embodiment of the present invention provides a method for predicting pedestrian flow for urban planning, the method comprising the following steps:

[0007] Dividing the city into at least two regions, and obtaining observational data for each of the regions in historical time;

[0008] Dividing all observation data of each of the regions into at least two subsequences, obtaining a periodic information component sequence corresponding to each of the subsequences, and calculating a periodic information correction factor between every two of the subsequences based on the periodic information component sequence;

[0009] Obtaining a trend component sequence corresponding to each of the subsequences, and calculating a trend difference correction factor between every two of the subsequences based on the trend component sequence;

[0010] Based on the period information correction factor and the trend difference correction factor, the distance between the corresponding two subsequences is obtained, and the MP vector is obtained according to the distance between each subsequence and other subsequences;

[0011] The time division point is obtained from the MP vector, and the crowd flow prediction is assisted based on the time division point.

[0012] Preferably, the step of calculating the periodic information correction factor between every two of the subsequences based on the periodic information component sequence comprises:

[0013] The DTW distance between the periodic information component sequences corresponding to every two of the subsequences is obtained, and the DTW distance is normalized, and the normalized result is the periodic information correction factor between the corresponding two subsequences.

[0014] Preferably, the step of calculating the trend difference correction factor between every two subsequences based on the trend component sequence comprises:

[0015] Obtaining a differential sequence of the trend component sequence corresponding to each of the subsequences, wherein the differential sequence is composed of the difference between each element in the trend component sequence and its previous element;

[0016] Calculating the range of the difference sequence corresponding to each of the subsequences; obtaining the number of positive numbers and the number of non-positive numbers in the difference sequence corresponding to each of the subsequences, and calculating the absolute value of the difference between the number of positive numbers and the number of non-positive numbers;

[0017] The product result of the range and the absolute value of the difference of the difference sequence corresponding to each of the subsequences is obtained, the absolute value of the difference between the product results corresponding to the two subsequences is calculated and normalized, and the normalized absolute value of the difference is the trend difference correction factor between the two subsequences.

[0018] Preferably, the distance between the subsequences is calculated as follows:

[0019]

[0020] in, Indicates The subsequence and The distance between subsequences; Indicates the optimization before The subsequence and The traditional distance between subsequences; Indicates The subsequence and Correction factor for trend differences between subseries; Indicates The subsequence and The period information correction factor between subsequences.

[0021] Preferably, the step of obtaining the MP vector according to the distance between each of the subsequences and other subsequences comprises:

[0022] The minimum distance between each of the subsequences and other subsequences is obtained, and the minimum distance corresponding to each of the subsequences is arranged in sequence to form the MP vector.

[0023] Preferably, the step of obtaining observation data of each of the regions in historical time includes:

[0024] Preset a fixed time interval, obtain the inflow flow rate and outflow flow rate of each area in the fixed time interval, take the average of all inflow flow rates collected in the fixed time interval as the inflow flow rate of the corresponding fixed time interval, and take the average of all outflow flow rates collected in the fixed time interval as the outflow flow rate of the corresponding fixed time interval;

[0025] The observation data of each of the areas includes the inflow and outflow of people corresponding to each fixed time interval.

[0026] Preferably, the step of dividing all observation data of each of the regions into at least two subsequences comprises:

[0027] A time series is constructed based on the inflow flow of people in each area at each fixed time interval in the historical time, and a time series is constructed based on the outflow flow of people in each area at each fixed time interval in the historical time;

[0028] Each of the time series is divided according to a preset time period to obtain at least two subsequences corresponding to each of the time series.

[0029] Preferably, the step of obtaining a time segmentation point from the MP vector and assisting in crowd flow prediction based on the time segmentation point includes:

[0030] An AC curve is formed according to the MP vector, and a minimum value point in the AC curve is obtained as a modal change point, each of which corresponds to a subsequence;

[0031] Obtaining a left adjacent subsequence and a right adjacent subsequence of the subsequence corresponding to the mode change point on the corresponding time series, and normalizing the distance between the left adjacent subsequence and the right adjacent subsequence as the mode change degree of the mode change point;

[0032] The two modal change points with the largest modal change degree in the AC curve are time segmentation points. The time series is divided into three time periods by the time segmentation points. The segmentation results are passed into the ST-Resent model for model training, and the trained ST-Resent model is used to predict the flow of people.

[0033] Preferably, the periodic information component sequence and the trend component sequence are obtained by decomposing the time series using an STL decomposition algorithm.

[0034] In the second aspect, another embodiment of the present invention provides a pedestrian flow prediction system for urban planning, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the processor implements the steps of any one of the above-mentioned pedestrian flow prediction methods for urban planning.

[0035] The present invention has the following beneficial effects: in order to solve the problem of inaccurate MP vector acquisition in the traditional FLUSS algorithm, which leads to poor accuracy in pedestrian flow prediction, in the process of acquiring MP vector, the distance between subsequences is optimized in this embodiment, and the periodic information and trend information between subsequences are combined and analyzed to make the distance acquisition between subsequences more reliable and accurate, thereby making the MP vector acquired based on the distance more reliable, so as to improve the accuracy of pedestrian flow prediction; specifically, firstly, the multiple areas into which the city is divided are analyzed, and multiple subsequences are obtained through the observation data of each area in the historical time period, and the subsequences obtained here are used as the basis for subsequent analysis; each subsequence is used to The periodic information correction factor between every two subsequences is obtained according to the periodic information component sequence corresponding to each subsequence; then, the trend difference correction factor between every two subsequences is obtained according to the trend component sequence corresponding to each subsequence, and the distance between the subsequences is obtained based on the periodic information correction factor and the trend difference correction factor. Compared with the traditional distance calculation method, the distance calculation in this embodiment is more in line with the actual situation, and the distance obtained by combining the actual periodic information and trend information is more accurate and reliable. Therefore, the MP vector is obtained based on the more accurate distance, and the time segmentation point with the best effect is obtained according to the more accurate MP vector. The subsequent passenger flow prediction is based on the time segmentation point, and the prediction result is also more accurate and reliable. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 A flow chart of a method for predicting pedestrian flow in urban planning provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0038] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a method and system for predicting the flow of people in urban planning proposed by the present invention, its specific implementation method, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0039] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0040] The following is a detailed description of a specific scheme of a pedestrian flow warning method and system for urban planning provided by the present invention in conjunction with the accompanying drawings.

[0041] See also Figure 1 , which shows a flow chart of a method for predicting pedestrian flow for urban planning provided by an embodiment of the present invention, the method comprising the following steps:

[0042] Step S100, dividing the city into at least two areas, and obtaining observation data of each area in historical time.

[0043] At present, in the pedestrian flow prediction method for urban planning, it is necessary to segment the time axis, that is, to segment the changes in pedestrian flow in the city in time series, and divide them into distant history, recent history and recent time. The commonly used method is the FLUSS algorithm based on Matrix Profile, which finds the corresponding segmentation points and divides them into three time periods. However, when using the FLUSS algorithm, the existing method only considers the numerical differences between subsequences when obtaining the MP vector, which has low accuracy, resulting in poor accuracy in predicting pedestrian flow in the city.

[0044] A fixed time interval is preset, and the inflow and outflow of people in each area in the fixed time interval are obtained. The average of all inflows collected in the fixed time interval is used as the inflow of the corresponding fixed time interval, and the average of all outflows collected in the fixed time interval is used as the outflow of the corresponding fixed time interval; the observation data of each area includes the inflow and outflow corresponding to each fixed time interval.

[0045] Specifically, in the process of predicting the flow of people in a city, the city is first divided into multiple areas for analysis. In the embodiment of the present invention, the city area is divided into multiple areas of size The specific size of the area can be set by the implementer according to the actual situation of the city; for each area, the pedestrian flow data of the area is obtained through the base station data, traffic data and road monitoring data of the area, and the pedestrian flow data is collected once every certain period of time; since the pedestrian flow between different areas in the city is interconnected, for example, flowing from the current area to other areas through subways or buses, each area needs to obtain the outflow of people and the inflow of people in the area within a time interval, that is, each area corresponds to two data in each time interval, namely the outflow of people and the inflow of people, and the outflow of people and the inflow of people in each area in each time interval are collectively referred to as the observation data of the area in the current time interval; in the embodiment of the present invention, it is recommended to fix the time interval as 30s, and the average of all the inflows collected within 30s is used as the inflow of people in the area in this 30s interval, thereby obtaining the outflow of people and the inflow of people in each area within every 30s, that is, obtaining the observation data corresponding to each area in each time interval, and performing subsequent analysis based on the observation data corresponding to each area in each time interval in the historical time period.

[0046] Step S200: Divide all observation data of each region into at least two subsequences, obtain a periodic information component sequence corresponding to each subsequence, and calculate a periodic information correction factor between every two subsequences based on the periodic information component sequence.

[0047] After obtaining the observation data of each area in the historical time period, all the observation data of each area in the historical time period are regarded as a time series. It should be noted that the time series corresponding to the observation data here analyzes the incoming flow of people and the outgoing flow of people separately, that is, each area corresponds to two time series. For the convenience of subsequent description and understanding, one of the time series is taken as an example for analysis in this embodiment. The analyzed time series can be the time series of the incoming flow of people or the time series of the outgoing flow of people; the time series corresponding to each area is divided into subsequences to facilitate the subsequent acquisition of the subsequence nearest neighbor relationship that can describe the modal change of the data in the time series; first, the length of the subsequence is obtained. According to the data scenario, the urban flow of people generally has similar periodic changes according to the week. Therefore, in the embodiment of the present invention, 7 days is set as a time period, that is, the observation data of each area within 7 days is used as a subsequence, then the time series of each area is divided into multiple subsequences, and the subsequence corresponding to each area is subsequently analyzed.

[0048] The main process of the FLUSS algorithm is to calculate the MP vector of the time series, that is, to find the nearest neighbor subsequence of each subsequence. In this process, the traditional distance between subsequences in the traditional FLUSS algorithm is obtained by calculating the numerical difference between subsequences, but in actual scenarios, the numerical difference between subsequences only represents the difference in numerical values. When the subsequences undergo periodic changes or trend changes, the numerical difference is small, but the morphological difference between the subsequences is actually large, that is, the subsequences may be similar in value, but one subsequence may be in an upward trend and the other may be in a downward trend. At this time, the sequence states described by the two subsequences are different. If one of them is regarded as the nearest neighbor subsequence of the other, then in the process of forming the AC curve, it will lead to deviations in determining the segmentation point based on the overall number of arcs. Therefore, it is necessary to optimize the method of obtaining the nearest neighbor subsequence for each subsequence.

[0049] Specifically, for the inflow and outflow of people in an area of ​​the city, similar periodic situations will appear in the long history due to the nature of the area. For example, the office area in the city will have more changes in the flow of people on weekdays, while the flow of people in the commercial area will have more changes in the flow of people on weekends. In the continuous development of the city, the region may have modal changes in time series data. For example, with the development of the city, a certain area changes from a residential area to an office area, and other regional attribute changes. The change in the flow of people data with changed attributes has no reference significance in the actual prediction process, so the data information corresponding to the attribute change needs to be used as the distant history information. When the regional attributes change, the most obvious thing is the periodic change in the flow of people in the area. For example, the most obvious change in the flow of people in the office area is inflow in the morning and outflow in the evening; the change in the flow of people in the residential area is generally outflow in the morning and inflow in the evening, so the attributes of the corresponding area can be reflected in the periodic information of the flow of people. Therefore, in order to avoid the situation where the subsequence values ​​are similar but the period information is contradictory, when the nearest neighbor subsequence of the subsequence is subsequently calculated, the period information of the subsequence is added for correction, and the distance between the subsequences is widened by the difference in period information. In the embodiment of the present invention, a period information correction factor is calculated between every two subsequences, and the distance between subsequent subsequences is corrected by the period information correction factor.

[0050] Among them, the method for obtaining the period information correction factor between every two subsequences is: perform STL decomposition on the time series corresponding to the current area to extract the period data and trend data therein. The STL decomposition algorithm is an existing well-known technology and will not be described in detail in this embodiment; after obtaining the period data of the time series, the period data corresponding to each subsequence in the time series can be obtained, and the corresponding period information component sequence is constructed based on the period data corresponding to the subsequence; the DTW distance between the period information component sequences corresponding to every two subsequences is obtained, and the DTW distance is normalized. The normalized result is the period information correction factor between the corresponding two subsequences; the specific calculation formula of the period information correction factor between the two subsequences is:

[0051]

[0052] in, Indicates The subsequence and Periodic information correction factor between subsequences; Indicates The periodic information component sequence corresponding to the subsequences; Indicates The periodic information component sequence corresponding to the subsequences; Indicates The periodic information component sequence corresponding to the subsequence is The DTW distance between the periodic information component sequences corresponding to the subsequences; Represents the normalization function.

[0053] It should be noted that The subsequence and The subsequences are different subsequences in the time series of the same region. The periodic information component sequence corresponding to the subsequence is The larger the DTW distance between the periodic information component sequences corresponding to the subsequences, the The subsequence and The greater the difference in periodic information between the subsequences, the greater the periodic information correction factor between the two subsequences. The periodic information difference can be regarded as the morphological difference between the periodic information component sequences corresponding to the two subsequences. In the process of obtaining the nearest neighbor subsequence, by adding the periodic information correction factor, the distance between the two subsequences is increased by the periodic information difference in the process of determining the MP vector, thereby avoiding subsequences with large periodic information differences from being identified as similar subsequences, and improving the accuracy of subsequent nearest neighbor subsequence identification.

[0054] Step S300: Obtain a trend component sequence corresponding to each subsequence, and calculate a trend difference correction factor between every two subsequences based on the trend component sequence.

[0055] In the above step S200, the periodic information correction factor between every two subsequences is obtained by analyzing the periodic information difference between the subsequences. However, the change in the nature of the region in the city is a long-term process. The main purpose of the periodic information correction factor is to distinguish the segmentation point between the distant history and the recent history. In the process of dividing the time period, the division of the recent history and the recent time needs to be divided by the difference between the recent history data and the recent time data. The embodiment of the present invention assists in dividing the recent history data and the recent time data through the trend change in the time series. Therefore, the distance between every two subsequences needs to be optimized by the trend information correction factor on the basis of the optimization of the periodic information correction factor.

[0056] When the time series is subjected to STL decomposition in step S200, the corresponding periodic data and trend data are obtained. Accordingly, a trend component sequence corresponding to each subsequence is obtained based on all trend data. The trend component sequence characterizes the overall trend direction of the subsequence, and subsequent analysis is performed based on the trend component sequence corresponding to each subsequence; a differential sequence of the trend component sequence corresponding to each subsequence is obtained, and the differential sequence is composed of the difference between each element in the trend component sequence and its previous element; the difference between the maximum value and the minimum value in the differential sequence corresponding to each subsequence is calculated, that is, the range corresponding to the differential sequence; the number of positive numbers and the number of non-positive numbers in the differential sequence corresponding to each subsequence are obtained, and the absolute value of the difference between the number of positive numbers and the number of non-positive numbers is calculated; the product result of the range and the absolute value of the difference of the differential sequence corresponding to each subsequence is obtained, the absolute value of the difference between the product results corresponding to the two subsequences is calculated and normalized, and the normalized difference is the trend difference correction factor between the two subsequences.

[0057] The specific calculation method of the trend difference correction factor between each two subsequences is:

[0058]

[0059] in, Indicates The subsequence and Correction factor for trend differences between subseries; Indicates The difference sequence of the trend component sequence corresponding to the subsequence is composed of the difference between each two adjacent elements in the trend component sequence. The difference between two adjacent elements refers to the difference between the second element and the first element in the trend component sequence, or the difference between the third element and the second element. The difference sequence is composed of the differences between all adjacent elements in the trend component sequence arranged in sequence; Indicates The absolute value of the difference between the number of positive numbers and the number of non-positive numbers in the difference sequence corresponding to the subsequence, that is, The absolute value of the difference between the number of data greater than zero and the number of data not greater than zero in a subsequence; Indicates The range of the trend component sequence corresponding to the subsequence is the difference between the maximum element value and the minimum element value in the trend component sequence; similarly, Indicates The difference sequence of the trend component sequence corresponding to the subsequences; Indicates The absolute value of the difference between the positive and non-positive numbers of the difference sequence corresponding to the subsequences; Indicates The range of the trend classification sequence corresponding to the subsequences; represents the normalization function; Indicates absolute value calculation.

[0060] The trend component sequence of each subsequence reflects the trend information of the subsequence. Then, the trend component sequence of each subsequence is processed to obtain its corresponding difference sequence, which reflects the changes between adjacent elements in the trend component sequence. If the elements in the trend component sequence are increasing, all elements in the difference sequence are positive numbers. If the elements in the trend component sequence are decreasing, all elements in the difference sequence are negative numbers. In these two cases, the absolute value of the difference between the number of positive numbers and the number of non-positive numbers corresponding to the difference sequence is The values ​​of are all large, that is, when the change trend of the elements in the trend component sequence is relatively single, the corresponding The larger the value is; when the size of the elements in the trend component sequence is more volatile, the values ​​of positive and non-positive numbers in the difference sequence are more, then the obtained The value is small; in order to more clearly describe the fluctuation of the elements in the trend component sequence, this embodiment also obtains the range of the trend component sequence corresponding to the subsequence , through the extreme difference , the absolute value of the difference between the number of positive numbers and the number of non-positive numbers Combined with the trend information of the subsequence analysis, that is, Description The subsequence corresponds to the trend change and fluctuation information of the elements in the trend component sequence; similarly, the The trend change and fluctuation information of the elements in the corresponding trend component sequence in the subsequence , by the trend difference between the two subseries Obtain the trend difference correction factor between the two subsequences. The purpose of the normalization function is to ensure that the value of the trend difference correction factor is between 0 and 1, which is convenient for subsequent analysis and calculation.

[0061] Step S400: obtaining the distance between two corresponding subsequences based on the period information correction factor and the trend difference correction factor, and obtaining the MP vector according to the distance between each subsequence and other subsequences.

[0062] The period information correction factor and the trend difference correction factor between each two subsequences are obtained in step S200 and step S300, respectively. The distance between subsequent subsequences is optimized based on the period information correction factor and the trend difference correction factor. When the MP vector is originally obtained, the distance between each two subsequences needs to be obtained, which is only obtained by the numerical difference between the subsequences. The traditional distance obtained by the traditional algorithm is recorded as , based on the period information correction factor and trend difference correction factor between the sequences, the traditional distance is optimized. The optimized distance is calculated as:

[0063]

[0064] in, After optimization, The subsequence and The distance between subsequences; Indicates the optimization before The subsequence and The traditional distance between subsequences; Indicates The subsequence and Correction factor for trend differences between subseries; Indicates The subsequence and The period information correction factor between subsequences.

[0065] When calculating the distance between two optimized subsequences, the period information correction factor is first used. The distance before the traditional optimization is stretched. Since the period information alone can only distinguish the distant history from the recent history, after stretching Add trend difference correction factor again on the basis of , the acquisition of traditional distance is further optimized; the greater the difference in periodic information, the more different the periodic information of the flow of people in the area is in the two subsequences, and the distance between the two subsequences is correspondingly increased to improve the accuracy of segmentation point determination. At the same time, the stretching of trend information is added, and the original similarity is retained on the basis of periodic stretching, which can also improve the accuracy of segmentation point acquisition between recent history and recent time.

[0066] Based on obtaining The subsequence and The distances between all subsequences corresponding to a region are obtained by the same method as the distances after optimization between subsequences. The distance here is the distance optimized by period information and trend information. For the convenience of description, the optimized distances will be collectively referred to as distances in the following text. After obtaining the distance between each subsequence and other subsequences, other subsequences corresponding to the smallest distance are selected as the nearest neighbor subsequences of the current subsequence. Each subsequence can correspond to a nearest neighbor sequence, as well as the distance between the subsequence and its nearest neighbor sequence. The corresponding MP vector is constructed by the distances between all subsequences corresponding to the region and their nearest neighbor sequences, that is, each element in the MP vector is the distance between the corresponding subsequence and its nearest neighbor subsequence. At this time, in addition to considering the differences in the data itself, the construction of the MP vector also combines the differences in period information and trend information between subsequences, thereby improving the accuracy of MP vector acquisition.

[0067] Step S500, obtaining the time segmentation point from the MP vector, and assisting in crowd flow prediction based on the time segmentation point.

[0068] An MP vector corresponding to a region is obtained by step S400, and an AC curve is constructed according to the MP vector. The minimum point in the AC curve is obtained as a modal change point, and each modal change point corresponds to a subsequence; the left adjacent subsequence and the right adjacent subsequence of the subsequence corresponding to the modal change point on the corresponding time series are calculated, and the distance between the left adjacent subsequence and the right adjacent subsequence is normalized as the modal change degree of the modal change point; the two modal change points with the largest modal change degree in the AC curve are time division points, and the time series is divided into three time periods by the time division points, and the segmentation results are passed into the ST-Resent model for model training, and the trained ST-Resent model is used to predict the flow of people.

[0069] Specifically, in the original time series, each subsequence is connected to its corresponding nearest neighbor subsequence with an arc, and each subsequence is taken as a node. For example, the nearest neighbor subsequence corresponding to the first subsequence is the third subsequence. When drawing the AC curve, the first subsequence should be connected to the third subsequence with an arc, and so on. The arcs between all subsequences in the original time series are drawn based on the nearest neighbor subsequences corresponding to all subsequences.

[0070] After obtaining the arcs between all subsequences, count the number of arcs above each subsequence and the number of arcs connected to the subsequence, and record the sum of the number of arcs above each subsequence and the number of arcs connected to the subsequence as the first number. The number of arcs above each subsequence refers to the number of arcs passing through the subsequence. As an example, assuming that there is an arc between the 1st subsequence and the 3rd subsequence, an arc between the 1st subsequence and the 5th subsequence, and an arc between the 1st subsequence and the 17th subsequence, then for the second subsequence, the number of arcs above it is 3; count the number of arcs connected to the second subsequence again, and the number of arcs actually represents the modal related information. Assuming that the number of arcs connected to the second subsequence is 5 at this time, the first number corresponding to the second subsequence is 3+5=8; and so on, obtain the first number corresponding to each subsequence in the time series corresponding to the region.

[0071] An AC curve corresponding to the region is drawn according to the first quantity corresponding to each subsequence, where the horizontal coordinate of the AC curve is different subsequences, and the vertical coordinate is the first quantity corresponding to each subsequence. For the position where the modal change occurs, a trough will appear in the AC curve because the arc between the nearest neighbor sequences does not pass through this subsequence. Therefore, the trough position in the AC curve is used as the reference position of the time axis segmentation point.

[0072] Acquire all the minimum points in the AC curve corresponding to the region. The method for acquiring the minimum points is a well-known method and will not be described in detail in this embodiment. Since there will be multiple minimum points in the AC curve, each minimum point in the AC curve is analyzed as a modal change point, and the optimal segmentation point among all modal change points is selected. Since the ST-Resent model needs to divide the complete time axis into three segments, the optimal segmentation point should be the point with the most drastic change. Therefore, it is necessary to measure the modal change degree of each modal change point. Take any modal change point as an example, assuming that the subsequence corresponding to the modal change point is subsequence, get the The left adjacent subsequence and right adjacent subsequence corresponding to the subsequence, that is, the subsequence and subsequences; according to subsequence and Get the subsequence The modal change degree of the modal change point corresponding to the subsequence is calculated as follows:

[0073]

[0074] in, Indicates The modal change degree of the modal change points corresponding to the subsequences; Indicates subsequence, that is, The left adjacent subsequence of a subsequence; Indicates subsequence, that is, The right adjacent subsequence of a subsequence; Indicates The subsequence and The distance between subsequences, where the distance is the distance optimized based on period information and trend information; Represents the normalization function.

[0075] The modal change degree of the modal change point is measured by the distance between the adjacent subsequences on both sides of the subsequence corresponding to the modal change point. The larger the distance, the more drastic the change at the modal change point and the greater the modal change degree of the modal change point. The distance is normalized so that the value of the modal change degree is between 0 and 1 to facilitate subsequent analysis.

[0076] Based on obtaining The modal change degree of the modal change points of the subsequences is the same, the modal change degree of each other modal change point in the AC curve is obtained, and the two modal change points with the largest modal change degree are selected as the optimal time segmentation points. The two time segmentation points thus obtained divide the time axis corresponding to the original time series into three segments, namely the distant history D, the recent history N, and the most recent time R. It should be noted that since the modal change point is actually a subsequence, when the time series is segmented based on the modal change point, due to the large amount of data in the time series, the numerical elements of the subsequence itself can be ignored, and the entire subsequence can be abstracted as a point in the time series for segmentation.

[0077] Furthermore, after dividing the time axis into three time periods of distant history D, recent history N and recent time R, the segmentation results are passed into the ST-Resent model, and modeling is performed through the three time attributes of the three time periods: time proximity, cycle and trend. Through the corresponding difference training of different time periods, the weight result of time proximity is obtained in the recent time R, the weight result of trend information is obtained in the recent time R and recent history N, and the weight result of cycle information is obtained in the overall time axis. The weighted results are used to further extract the pedestrian flow information of each area in the city to complete the training of the ST-Resent model. The subsequent prediction of pedestrian flow can be completed based on the trained ST-Resent model.

[0078] In summary, in the embodiment of the present invention, the city is divided into at least two areas, and the observation data of each area in the historical time is obtained; all the observation data of each area are divided into at least two subsequences, and the periodic information component sequence corresponding to each subsequence is obtained, and the periodic information correction factor between each two subsequences is calculated based on the periodic information component sequence; the trend component sequence corresponding to each subsequence is obtained, and the trend difference correction factor between each two subsequences is calculated based on the trend component sequence; the distance between the corresponding subsequences is obtained based on the periodic information correction factor and the trend difference correction factor, and the MP vector is obtained according to the distance between each subsequence and other subsequences; the time segmentation point is obtained from the MP vector, and the flow of people is predicted. The present invention combines the periodic information and the trend information, so that the obtained MP vector is more accurate, thereby ensuring the accuracy of the time segmentation point acquisition, and predicting the flow of people based on the more accurate time segmentation point, thereby improving the reliability of the flow of people prediction results.

[0079] Based on the same inventive concept as the above method embodiment, the embodiment of the present invention also provides a pedestrian flow prediction system for urban planning, the system comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above method embodiment for predicting pedestrian flow in urban planning are implemented, for example Figure 1 The method for predicting the flow of people in urban planning has been described in detail in the above embodiments and will not be described in detail again.

[0080] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0081] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0082] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for predicting pedestrian flow for urban planning, characterized in that: The method comprises the following steps: Dividing the city into at least two regions, and obtaining observational data for each of the regions in historical time; Dividing all observation data of each of the regions into at least two subsequences, obtaining a periodic information component sequence corresponding to each of the subsequences, and calculating a periodic information correction factor between every two of the subsequences based on the periodic information component sequence; Obtaining a trend component sequence corresponding to each of the subsequences, and calculating a trend difference correction factor between every two of the subsequences based on the trend component sequence; Based on the period information correction factor and the trend difference correction factor, the distance between the corresponding two subsequences is obtained, and the MP vector is obtained according to the distance between each subsequence and other subsequences; Obtaining a time segmentation point from the MP vector, and assisting in crowd flow prediction based on the time segmentation point; The step of obtaining the observation data of each of the areas in the historical time includes: presetting a fixed time interval, obtaining the inflow flow and outflow flow of each of the areas in the fixed time interval, taking the average of all inflow flows collected in the fixed time interval as the inflow flow of the corresponding fixed time interval, and taking the average of all outflow flows collected in the fixed time interval as the outflow flow of the corresponding fixed time interval; the observation data of each area includes the inflow flow and outflow flow corresponding to each fixed time interval; The step of dividing all the observation data of each area into at least two subsequences includes: forming a time series according to the inflow of people in each area at each fixed time interval in the historical time, and forming a time series according to the outflow of people in each area at each fixed time interval in the historical time; dividing each time series according to a preset time period to obtain at least two subsequences corresponding to each time series; The distance between the subsequences is calculated as follows: in, Indicates The subsequence and The distance between subsequences; Indicates the optimization before The subsequence and The traditional distance between subsequences; Indicates The subsequence and Correction factor for trend differences between subseries; Indicates The subsequence and Periodic information correction factor between subsequences; Among them, the traditional distance is obtained by calculating the numerical difference between subsequences; The method for obtaining the periodic information component sequence and the trend component sequence is as follows: perform STL decomposition on the time series corresponding to the current region, extract the periodic data and trend data therein, obtain the periodic data and trend data corresponding to each subsequence in the time series, construct the corresponding periodic information component sequence based on the periodic data corresponding to the subsequence; construct the corresponding trend component sequence based on the trend data corresponding to the subsequence; Among them, the step of obtaining a time segmentation point from the MP vector and assisting in pedestrian flow prediction based on the time segmentation point includes: constructing an AC curve according to the MP vector, obtaining the minimum point in the AC curve as a modal change point, each of the modal change points corresponds to a subsequence; obtaining the left adjacent subsequence and the right adjacent subsequence of the subsequence corresponding to the modal change point on the corresponding time series, and normalizing the distance between the left adjacent subsequence and the right adjacent subsequence as the modal change degree of the modal change point; the two modal change points with the largest modal change degree in the AC curve are time segmentation points, and the time series is divided into three time periods by the time segmentation points, and the segmentation results are passed into the ST-Resent model for model training, and the trained ST-Resent model is used to predict pedestrian flow.

2. A method for predicting the flow of people in urban planning according to claim 1, characterized in that: The step of calculating the periodic information correction factor between every two of the subsequences based on the periodic information component sequence comprises: The DTW distance between the periodic information component sequences corresponding to every two of the subsequences is obtained, and the DTW distance is normalized, and the normalized result is the periodic information correction factor between the corresponding two subsequences.

3. The method for predicting the flow of people in urban planning according to claim 1, characterized in that: The step of calculating the trend difference correction factor between every two subsequences based on the trend component sequence comprises: Obtaining a differential sequence of the trend component sequence corresponding to each of the subsequences, wherein the differential sequence is composed of the difference between each element in the trend component sequence and its previous element; Calculating the range of the difference sequence corresponding to each of the subsequences; obtaining the number of positive numbers and the number of non-positive numbers in the difference sequence corresponding to each of the subsequences, and calculating the absolute value of the difference between the number of positive numbers and the number of non-positive numbers; The product result of the range and the absolute value of the difference of the difference sequence corresponding to each of the subsequences is obtained, the absolute value of the difference between the product results corresponding to the two subsequences is calculated and normalized, and the normalized absolute value of the difference is the trend difference correction factor between the two subsequences.

4. The method for predicting the flow of people in urban planning according to claim 1, characterized in that: The step of obtaining the MP vector according to the distance between each subsequence and other subsequences comprises: The minimum distance between each of the subsequences and other subsequences is obtained, and the minimum distance corresponding to each of the subsequences is arranged in sequence to form the MP vector.

5. A pedestrian flow prediction system for urban planning, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When executing the computer program, the processor implements the steps of the method described in any one of claims 1 to 4.