A campus navigation method and device based on people flow analysis, equipment and medium
By creating an electronic grid map on campus and dynamically adjusting the route planning algorithm based on pedestrian flow data, the problem of low traffic efficiency and poor user experience caused by changes in pedestrian flow in campus navigation has been solved, achieving efficient and real-time navigation route optimization.
Patent Information
- Application Number
- CN202610354957.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-23
- Publication Date
- 2026-06-23
AI Technical Summary
Existing campus navigation technology relies on static geographic information, which cannot effectively cope with the periodic and sudden changes in pedestrian traffic, resulting in unreasonable navigation routes and affecting traffic efficiency and user experience.
By creating an electronic grid map of the campus and combining historical and real-time pedestrian traffic data, the path planning algorithm is dynamically adjusted to predict pedestrian traffic distribution and optimize navigation paths.
It enables real-time alignment of campus navigation routes with pedestrian flow distribution, effectively avoiding densely populated areas, improving traffic efficiency and user experience, and reducing hardware deployment costs.
Smart Images

Figure CN122258903A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent navigation technology, and in particular to a campus navigation method, device, equipment and medium based on pedestrian flow analysis. Background Technology
[0002] Current campus navigation technologies are mostly based on general map adaptations or simple self-developed technologies, relying heavily on static geographic information, which has significant limitations. General map-based navigation only provides navigation functions. However, due to the population distribution on university campuses and the flow of people in key areas such as teaching buildings, canteens, and main roads, the traffic is significantly affected by fixed activities such as class schedules, peak meal times, and exercise check-ins. In addition, large-scale events such as university anniversaries and job fairs can also affect the traffic conditions of surrounding areas based on their scale. Periodic and sudden surges in people may affect the efficiency of users' travel, posing a risk of congestion and delays. Furthermore, the route planning of general map-based navigation uses distance as the sole criterion, which can result in short navigation routes but long travel times, leading to a poor user experience.
[0003] In conclusion, optimizing campus navigation methods to improve user navigation efficiency and user experience is a pressing issue that needs to be addressed. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a campus navigation method, device, equipment, and medium based on pedestrian flow analysis, which can optimize campus navigation methods to improve user navigation efficiency and user experience. The specific solution is as follows: Firstly, this application provides a campus navigation method based on pedestrian flow analysis, including: Create an electronic grid map of the target campus; wherein the electronic grid map is divided into several map grids; Based on the campus electronic grid map and historical campus pedestrian traffic data, pedestrian traffic prediction processing is performed to obtain pedestrian traffic prediction data for each of the map grids in the campus electronic grid map; The system continuously collects real-time pedestrian traffic data in the target campus using pre-deployed data collection devices, and projects this data onto the corresponding map grids in the campus electronic grid map to obtain real-time pedestrian traffic data on the corresponding map grids. The data collection devices are deployed at key target locations within the target campus. Based on the predicted pedestrian flow data and the real-time pedestrian flow data, the target pedestrian flow data for each grid in the campus electronic grid map is determined; Using the target pedestrian flow data and the campus electronic grid map, the actual cost function of the preset path planning algorithm is adjusted to obtain the adjusted path planning algorithm, and navigation services are provided to user terminals in the target campus based on the adjusted path planning algorithm.
[0005] Optionally, the historical campus pedestrian traffic data includes first historical campus pedestrian traffic data; the first historical campus pedestrian traffic data is historical campus pedestrian traffic data collected by the collection device on the map grid corresponding to the target fixed location according to different teaching arrangement cycles; the pedestrian traffic prediction data includes first pedestrian traffic prediction data, which is pedestrian traffic prediction data on the map grid corresponding to each of the target fixed locations under different teaching arrangement cycles; Accordingly, the process of determining the first pedestrian flow prediction data includes: Based on the first historical campus pedestrian traffic data, determine the first peak pedestrian traffic period of the target fixed location, and determine the number of first grid circles that need to be expanded; The first location grid of the target fixed location is determined by the campus electronic grid map; Centered on the first location grid, and based on the number of the first grid circles, the campus electronic grid map is expanded outward using a breadth-first search algorithm to determine the number of the first grids affected by the expansion. The first predicted pedestrian flow data is determined based on the first number of grids, the first peak period of pedestrian flow, the first historical campus pedestrian flow data, and the first number of grid circles.
[0006] Optionally, the historical campus pedestrian traffic data further includes second and third historical campus pedestrian traffic data; the second historical campus pedestrian traffic data is anonymized target historical campus pedestrian traffic data collected through a target location positioning system, and the target historical campus pedestrian traffic data is historical pedestrian traffic data on the map grid corresponding to the target route; the third historical campus pedestrian traffic data is historical pedestrian traffic data on the map grid corresponding to several historical activity sites; the pedestrian traffic prediction data further includes second and third pedestrian traffic prediction data; Accordingly, the process of performing pedestrian flow prediction based on the campus electronic grid map and historical campus pedestrian flow data to obtain pedestrian flow prediction data for each grid in the campus electronic grid map includes: Determine the timetable data for the current semester, and determine the second peak period of pedestrian traffic based on the timetable data, so as to construct the route selection probability of the target passage route during the second peak period of pedestrian traffic based on the second historical campus pedestrian traffic data; Using the route selection probability, the second historical campus pedestrian flow data, and the campus electronic grid map, the second pedestrian flow prediction data is determined by a preset route pedestrian flow calculation algorithm. Based on the target historical pedestrian flow data and the campus electronic grid map, the third pedestrian flow prediction data is determined by a preset location pedestrian flow calculation algorithm; the target historical pedestrian flow data includes the second historical campus pedestrian flow data and the third historical campus pedestrian flow data.
[0007] Optionally, the step of determining the second pedestrian flow prediction data using the route selection probability, the second historical campus pedestrian flow data, and the campus electronic grid map through a preset route pedestrian flow calculation algorithm includes: The map grid sequence involved in the target travel route is determined based on the campus electronic grid map; The estimated number of grids traversed within a first preset time range is determined by a preset walking speed; Based on the estimated number of grids, the route selection probability, the map grid sequence, and the second historical campus pedestrian traffic data, the second pedestrian traffic prediction data for each grid of the target route during the second peak pedestrian traffic period is determined.
[0008] Optionally, the step of determining the third pedestrian flow prediction data based on the target historical pedestrian flow data and the campus electronic grid map, using a preset location pedestrian flow calculation algorithm, includes: Determine the third peak period of pedestrian traffic at the current location, and determine the second location grid of the current location through the campus electronic grid map; Based on the target historical pedestrian flow data and the third peak pedestrian flow period, the predicted pedestrian flow of the current location within the second preset time range is determined, and the real-time pedestrian flow of the current location within the second preset time range is obtained in real time through the acquisition device; The target real-time diffusion adjustment coefficient is determined based on the predicted pedestrian flow and the real-time pedestrian flow of the location, and the number of second grid rings to be expanded is determined by the target historical pedestrian flow data and the target real-time diffusion adjustment coefficient. Centered on the second location grid, and based on the number of the second grid circles, the campus electronic grid map is expanded outward using a breadth-first search algorithm to determine the number of second grids affected by the expansion. The third pedestrian flow prediction data is determined based on the number of the second grid, the third peak period of pedestrian flow, the target historical pedestrian flow data, and the number of the second grid circles. Wherein, if the target historical pedestrian flow data is the second historical campus pedestrian flow data, then the current location is the target teaching building in the target campus, and the third peak pedestrian flow period is determined based on the timetable data; if the target historical pedestrian flow data is the third historical campus pedestrian flow data, then the current location is the target activity location where the activity is currently being carried out, and the third peak pedestrian flow period is determined based on the start and end times of the target activity location.
[0009] Optionally, projecting the real-time campus pedestrian flow data onto the corresponding map grid in the campus electronic grid map to obtain real-time pedestrian flow data on the corresponding map grid includes: Based on the distribution of the target key locations, the target grid where the acquisition device is located is converged to determine the key blocks composed of the target grid; Based on the real-time campus pedestrian traffic data, the average pedestrian traffic per minute in the key area is determined, and the number of third grid rings that need to be expanded is determined by the average pedestrian traffic per block. Centered on the key block, based on the number of third grid circles and using a breadth-first search algorithm, the campus electronic grid map is expanded outward to determine the number of third grids affected by the expansion; Based on the number of the third grid and the average pedestrian flow in the block, the real-time pedestrian flow data on the corresponding map grid is determined.
[0010] Optionally, the step of using the target pedestrian flow data and combining it with the campus electronic grid map to adjust the actual cost function of the preset path planning algorithm to obtain an adjusted path planning algorithm, and providing navigation services to user terminals in the target campus based on the adjusted path planning algorithm, includes: Determine the preset access weight for each of the map grids; Based on the preset traffic weight and the target pedestrian flow data, a pedestrian flow congestion index matrix is generated using a preset mapping function; the preset mapping function is used to map the input values to a congestion index. By using a preset mapping relationship and combining the pedestrian flow congestion index matrix and the preset passage weight, the actual cost function of the preset path planning algorithm is adjusted to obtain the adjusted path planning algorithm; the preset mapping relationship is used to characterize the mapping relationship between the congestion index and the walking passage cost coefficient. The adjusted path planning algorithm is used to provide navigation services for user terminals within the target campus. Correspondingly, it also includes: The pedestrian flow density of each map grid is determined by the pedestrian flow prediction data, and the corresponding grid early warning status is determined based on the pedestrian flow density. Using a breadth-first search algorithm, the warning block identifiers for each map grid are set based on the grid warning status, and the warning blocks are merged according to the grid distance to generate corresponding densely populated area data; the warning blocks are composed of map grids with the same warning block identifier; The start and end times of the warnings for each warning block are determined based on the data of densely populated areas, and the target warning areas in each warning block are determined based on the start and end times of the warnings and the data of densely populated areas. Based on the target warning area and the warning start and end times, a dense crowd warning is generated and fed back to the user terminal.
[0011] Secondly, this application provides a campus navigation device based on pedestrian flow analysis, comprising: The map creation module is used to create an electronic grid map of the target campus; wherein the electronic grid map is divided into several map grids; The pedestrian flow prediction module is used to perform pedestrian flow prediction processing based on the campus electronic grid map and historical campus pedestrian flow data to obtain pedestrian flow prediction data for each of the map grids in the campus electronic grid map; The data projection module is used to continuously collect real-time campus pedestrian traffic data in the target campus through pre-deployed acquisition devices, and project the real-time campus pedestrian traffic data onto the corresponding map grid in the campus electronic grid map to obtain real-time pedestrian traffic data on the corresponding map grid; the acquisition devices are deployed in the target key locations of the target campus; The data determination module is used to determine the target pedestrian flow data on each of the map grids in the campus electronic grid map based on the pedestrian flow prediction data and the real-time pedestrian flow data. The function adjustment module is used to adjust the actual cost function of the preset path planning algorithm by using the target pedestrian flow data and combining it with the campus electronic grid map, so as to obtain the adjusted path planning algorithm, and provide navigation services to user terminals in the target campus based on the adjusted path planning algorithm.
[0012] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is used to execute the computer program to implement the aforementioned campus navigation method based on people flow analysis.
[0013] Fourthly, this application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned campus navigation method based on people flow analysis.
[0014] In this application, an electronic grid map of the target campus is created; wherein the electronic grid map is divided into several map grids; based on the electronic grid map and historical campus pedestrian traffic data, pedestrian traffic prediction processing is performed to obtain pedestrian traffic prediction data for each map grid in the electronic grid map; real-time pedestrian traffic data of the target campus is continuously collected through pre-deployed acquisition devices, and the real-time pedestrian traffic data is projected onto the corresponding map grid in the electronic grid map to obtain real-time pedestrian traffic data for the corresponding map grid; the acquisition devices are deployed in key target locations of the target campus; based on the pedestrian traffic prediction data and the real-time pedestrian traffic data, target pedestrian traffic data for each map grid in the electronic grid map is determined; using the target pedestrian traffic data and in combination with the electronic grid map, the actual cost function of a preset path planning algorithm is adjusted to obtain an adjusted path planning algorithm, and navigation services are provided to user terminals in the target campus based on the adjusted path planning algorithm. As can be seen from the above, this application first creates an electronic grid map of the target campus, which is divided into several map grids. Then, it performs pedestrian flow prediction processing by combining the electronic grid map with historical campus pedestrian flow data to obtain pedestrian flow prediction data for each map grid in the electronic grid map. Simultaneously, it continuously collects real-time pedestrian flow data of the target campus using data collection devices deployed at key locations on the campus. This data is projected onto the corresponding map grid in the electronic grid map to obtain real-time pedestrian flow data for that map grid. Combining this data with the pedestrian flow prediction data, it determines the target pedestrian flow data for each map grid. Then, using the target pedestrian flow data and relying on the electronic grid map, it adjusts the actual cost function of a preset path planning algorithm. Finally, based on the adjusted preset path planning algorithm, it provides navigation services for user terminals within the target campus. In this way, through the process described in this application, campus traffic prediction data is obtained by mining the periodic patterns of campus traffic through historical campus traffic data. Only a small number of data collection devices need to be deployed at key nodes to obtain real-time traffic data, which is then dynamically calibrated. Relying on grid maps, the traffic data is refined and quantified, ensuring data accuracy. By dynamically adjusting the actual cost matrix of path planning, the campus navigation path can be adapted to the actual distribution of pedestrian traffic on campus in real time, effectively avoiding densely populated areas and improving the scientific, real-time, and rational nature of campus navigation. This provides accurate path guidance for the efficient passage of people on campus. Only data collection devices need to be deployed at key target locations on campus, without the need for large-scale deployment of full-scene data collection devices to achieve accurate pedestrian traffic prediction and congestion avoidance navigation, reducing hardware deployment and maintenance costs. This optimizes the campus navigation method to improve user navigation efficiency and user experience. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0016] Figure 1 This application discloses a flowchart of a campus navigation method based on pedestrian flow analysis. Figure 2 This is a schematic diagram of the overall process of a campus navigation method based on pedestrian flow analysis disclosed in this application; Figure 3 This is a schematic diagram of a campus navigation device based on pedestrian flow analysis disclosed in this application; Figure 4 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Current campus navigation technologies are mostly based on general map adaptations or simple self-developed technologies, relying heavily on static geographic information, which has significant limitations. General map-based navigation only provides navigation functions. However, due to the population distribution on university campuses and the flow of people in key areas such as teaching buildings, canteens, and main roads, the traffic is significantly affected by fixed activities such as class schedules, peak meal times, and exercise check-ins. In addition, large-scale events such as university anniversaries and job fairs can also affect the traffic conditions of surrounding areas based on their scale. Periodic and sudden surges in people may affect the efficiency of users' travel, posing a risk of congestion and delays. Furthermore, the route planning of general map-based navigation uses distance as the sole criterion, which can result in short navigation routes but long travel times, leading to a poor user experience.
[0019] To overcome the aforementioned technical problems, this application provides a campus navigation method based on pedestrian flow analysis, which can optimize the campus navigation method to improve user navigation efficiency and user experience.
[0020] See Figure 1 As shown in the figure, an embodiment of the present invention discloses a campus navigation method based on pedestrian flow analysis, including: Step S11: Create an electronic grid map of the target campus; wherein the electronic grid map is divided into several map grids.
[0021] In this embodiment, an electronic grid map of the target campus is created, which is divided into several map grids.
[0022] It should be noted that the campus electronic grid map is a self-drawn grid map for the target campus. Specifically, the campus map of the target campus can be decomposed into a 5m×5m grid and represented by a two-dimensional matrix map. Buildings, obstacles, and entrances / exits are marked on the grid. Each map grid has a unique independent number (x,y), where x represents the row of the map grid and y represents the column of the map grid. The origin (0,0) is taken as the lower left corner of the grid map, with the x-axis along the horizontal direction (east) and the y-axis along the vertical direction (north). map[x][y] represents the grid in the x-th row and y-th column on the map, mainly including grid type: gridtype (buildings, obstacles, entrances / exits, roads, etc.); and passage weight: if passage is not possible, the passage weight is infinite; the passage weight of main roads is 1; the passage weight of secondary roads is between 1.5 and 2; and the passage weight of turnstiles, narrow passages, etc., which can only allow one person to pass at a time, is set to 3. The weight values can be adjusted according to the actual situation of the school. It should be further noted that the unit of measurement for pedestrian flow in this embodiment is person / minute, that is, the number of people passing through this grid within 1 minute. xyt This represents the pedestrian flow in the (x,y) grid at minute t of a day (t is calculated from 00:01 every day, i.e., t=1 represents 00:01, 1<=t<=1440). The default pedestrian speed during peak hours is 1.1 m / s.
[0023] It should be further pointed out that, such as Figure 2The diagram illustrates the overall process of a campus navigation method based on pedestrian flow analysis provided in this application. It primarily relies on multi-source heterogeneous data from the campus environment to predict historical and recent pedestrian flow distribution, and uses this prediction for navigation and congestion warnings. This multi-source heterogeneous data includes campus electronic grid map data, periodic dynamic data, class schedule data, large-scale event schedule data, and real-time pedestrian flow monitoring data. By deeply integrating class schedules, event registration, historical data, and real-time pedestrian flow monitoring information, it can accurately predict pedestrian flow trends in various areas within the next 15-30 minutes. Using analytical models, it identifies potential congestion points, upgrading navigation logic from "passively responding to congestion" to "actively avoiding peak hours." Simultaneously, it establishes a closed-loop mechanism encompassing "pedestrian flow monitoring - risk warning - route recalculation - terminal push," incorporating time costs, spatial distance, and congestion risk into a comprehensive evaluation system. This allows users to plan optimal congestion avoidance routes in advance and customize exclusive navigation strategies, effectively addressing the core pain point of conventional navigation's inability to avoid congestion in advance, significantly improving campus traffic efficiency and intelligent management. In addition, this embodiment can be extended to other common campus scenarios such as food delivery route planning. Compared with existing single-function systems, it has a longer lifespan and a wider range of applications. In this way, this embodiment achieves refined and standardized digital modeling of the campus geospatial space through a grid-based spatial division method. This allows the geographical information of the campus space to be presented and managed in a standardized manner on a grid basis, providing a geospatial foundation for subsequent digital applications such as campus pedestrian flow measurement and route planning, and improving the convenience and accuracy of digital applications in campus space.
[0024] Step S12: Based on the campus electronic grid map and historical campus pedestrian traffic data, perform pedestrian traffic prediction processing to obtain pedestrian traffic prediction data for each map grid in the campus electronic grid map.
[0025] In this embodiment, the campus electronic grid map and historical campus pedestrian traffic data are combined to perform pedestrian traffic prediction processing, and determine the pedestrian traffic prediction data corresponding to each map grid in the map.
[0026] It should be noted that the historical campus pedestrian traffic data includes first historical campus pedestrian traffic data; the first historical campus pedestrian traffic data is historical campus pedestrian traffic data collected by the collection device on the map grid corresponding to the target fixed location according to different teaching arrangement cycles; the pedestrian traffic prediction data includes first pedestrian traffic prediction data, which is pedestrian traffic prediction data on the map grid corresponding to each of the target fixed locations under different teaching arrangement cycles; correspondingly, the process of determining the first pedestrian traffic prediction data is as follows: based on the first historical campus pedestrian traffic data, determine the first peak pedestrian traffic period of the target fixed location, and determine the number of first grid circles to be expanded; determine the first location grid of the target fixed location through the campus electronic grid map; with the first location grid as the center, based on the first grid circle number and through a breadth-first search algorithm, expand outward on the campus electronic grid map to determine the number of first grids affected by the expansion; determine the first pedestrian traffic prediction data based on the number of first grids, the first peak pedestrian traffic period, the first historical campus pedestrian traffic data, and the first grid circle number. In other words, the historical campus pedestrian traffic data includes first historical campus pedestrian traffic data collected by pre-deployed collection devices on map grids corresponding to target fixed locations under different teaching schedule cycles. The pedestrian traffic prediction data includes first pedestrian traffic prediction data for each target fixed location on map grids under different teaching schedule cycles. The target fixed locations include, but are not limited to, dormitories, canteens, libraries (including study spaces), sports venues (including playgrounds, basketball courts, etc.), and other places with strong periodic pedestrian traffic. The first historical campus pedestrian traffic data is periodic dynamic data. The teaching schedule cycles include spring and autumn semesters and winter and summer vacations. Considering the cycles of different stages of the campus, pedestrian traffic data is collected using cameras that support pedestrian traffic calculation, according to the cycle dimension shown in Table 1 below. Winter and summer vacations do not distinguish between weekdays and weekends. Data for three complete teaching weeks is collected for each spring and autumn semester and each winter and summer vacation.
[0027] Table 1. Schematic diagram of the periodic dimensions of pedestrian flow data collection.
[0028] The first pedestrian flow prediction data is based on historical data collection and modeling for the target fixed location. It extracts data from 1-2 cameras supporting pedestrian flow statistics deployed at key nodes such as entrances and exits of each location, collecting data on peak-hour pedestrian flow patterns. Specifically, based on the first historical campus pedestrian flow data, the first peak pedestrian flow period and the number of the first grid circles to be expanded for the target fixed location are determined. The peak pedestrian flow time for different locations is determined by historical data statistics, with ts as the start time and te as the end time. The average value is taken from the collected data. Then, the first location grid for the target fixed location is defined using the campus electronic grid map. Using this grid as the center, combined with the first grid circle number m... i Using a breadth-first search algorithm, the campus electronic grid map is expanded outward by m... i The grid is drawn to determine the number of grids affected by the expansion. Finally, based on the number of grids, the peak period of the first pedestrian flow, the first historical campus pedestrian flow data, and the number of grid circles, the first pedestrian flow prediction data is determined. Let S be the number of grid circles. ij Let d be the number of grids affected by the j-th cycle of the i-th location, i.e., the number of the first grids. ijk Let d be the grid cell that is affected in the j-th ring of the i-th location. ijkt It is d ijk The formula for calculating the pedestrian flow at minute t in the grid is as follows: ; Where tss=ts-10 and tee=te+10 represent the 10 minutes before the start of the peak period and the 10 minutes after the end of the peak period, respectively, serving as the pre-peak and post-peak impact times; cnt t Let be the number of people entering and exiting the current location at minute t. All d ijk Each has a unique corresponding (x, y) coordinate, D t [x][y] represents all d values corresponding to the (x,y) grid at minute t. ijkt The distribution of pedestrian flow in this part is relatively fixed. Six periodic pedestrian flow matrices, D1~D6, are generated according to the aforementioned cycle as the basic prediction data, i.e., the first pedestrian flow prediction data. Each matrix retains the dynamic data of pedestrian flow during its respective peak period. Subsequent dynamic optimization can be achieved through real-time data calibration, eliminating the need for repeated full data collection.
[0029] It should be further noted that the historical campus pedestrian traffic data also includes second and third historical campus pedestrian traffic data; the second historical campus pedestrian traffic data is the anonymized target historical campus pedestrian traffic data collected through the target location positioning system, and the target historical campus pedestrian traffic data is the historical pedestrian traffic data on the map grid corresponding to the target route; the third historical campus pedestrian traffic data is the historical pedestrian traffic data on the map grid corresponding to several historical activity sites; the pedestrian traffic prediction data also includes second and third pedestrian traffic prediction data; accordingly, the processing flow for pedestrian traffic prediction is as follows: determine the current semester's The system uses timetable data to determine the second peak period of pedestrian traffic. Based on the second historical campus pedestrian traffic data, it constructs the route selection probability of the target route during the second peak period. Using the route selection probability, the second historical campus pedestrian traffic data, and the campus electronic grid map, it determines the second pedestrian traffic prediction data through a preset route pedestrian traffic calculation algorithm. Based on the target historical pedestrian traffic data and the campus electronic grid map, it determines the third pedestrian traffic prediction data through a preset location pedestrian traffic calculation algorithm. The target historical pedestrian traffic data includes the second historical campus pedestrian traffic data and the third historical campus pedestrian traffic data. That is, the historical campus pedestrian traffic data also includes the second and third historical campus pedestrian traffic data, where the second historical campus pedestrian traffic data is anonymized historical pedestrian traffic data collected by the target location positioning system and corresponding to the map grid of the target route; the third historical campus pedestrian traffic data is related data of several historical activity locations corresponding to map grids; and the pedestrian traffic prediction data correspondingly includes the second and third pedestrian traffic prediction data.
[0030] Understandably, the corresponding pedestrian flow prediction process is as follows: Completed at the end of the previous semester, and after the course schedule and selection for the next semester, the system automatically connects to the academic affairs system to determine the current semester's timetable data and identify the second peak pedestrian flow period. After user authorization, it connects to the target location positioning system, such as the campus WIFI (mobile hotspot) system, to collect anonymized student movement location points and timestamps during peak hours to obtain historical travel path data, i.e., the second historical campus pedestrian flow data. Based on this, it constructs the route selection probability of the target travel route during this period. Specifically, it connects the discrete points in the second historical campus pedestrian flow data into a complete trajectory; clusters the trajectories; classifies the trajectories according to their starting and ending points during peak hours, and statistically analyzes the routes between different main locations with the same starting and ending points, calculating the probability of each route being selected. Routes with a selection probability of less than 5% are not calculated, thus constructing a route selection probability matrix between main locations such as dormitories, canteens, and teaching buildings during peak hours. Combining the route selection probability, the second historical campus pedestrian flow data, and the campus electronic grid map, the second pedestrian flow prediction data is determined using a preset route pedestrian flow calculation algorithm. Simultaneously, based on the target historical pedestrian flow data containing the second and third historical campus pedestrian flow data, and combined with the campus electronic grid map, the third pedestrian flow prediction data is determined using a preset location pedestrian flow calculation algorithm.
[0031] It should be noted that the processing flow for determining the second pedestrian flow prediction data using the preset route pedestrian flow calculation algorithm is as follows: The map grid sequence involved in the target route is determined based on the campus electronic grid map; the estimated number of grids traversed within a first preset time range is determined using a preset walking speed; based on the estimated number of grids, the route selection probability, the map grid sequence, and the second historical campus pedestrian flow data, the second pedestrian flow prediction data for each grid of the target route during the second peak pedestrian flow period is determined. That is, the preset route pedestrian flow calculation algorithm is used to calculate the pedestrian flow distribution of each grid on each time route as students move along the route. First, the map grid sequence G corresponding to the n grids of the target route i is determined based on the campus electronic grid map. i = [g i1 , g i2 , ...,g in ], g ijThe j-th grid on the i-th route is represented. Then, using a preset walking speed (1.1 m / s during peak student hours), the estimated number of grids that can be traversed within a first preset time range is determined, i.e., 13 grids can be traversed within one minute. Subsequently, combining the estimated number of grids, the route selection probability, the map grid sequence, and the second historical campus pedestrian flow data, the second pedestrian flow prediction data corresponding to each grid of the target route during the second peak period is calculated. Let pi be the probability of selecting route i, and for the i-th route, let ts be the start time of the peak period, te be the end time, and cnt be the estimated total number of pedestrians. Let g... ijk It is the t minute g ij People flow in the grid, grid g in minute t ij There is g ijt Individual pass. Starting from ts, after k minutes, g ijt The specific formula for determining it is as follows: ; It is understandable that if a certain route is blocked due to temporary traffic control or other reasons, then the probability p of route i being passable will be reduced. i The traffic flow is allocated according to the probability ratio of other routes. The passage weight of the relevant grid affected by the control is temporarily set to impassable until the control is lifted. It should be noted that the school course schedule is set as follows: the first 4 periods in the morning, the 5th to 8th periods at noon, and the 9th to 12th periods in the evening. This embodiment can predict the traffic flow at different times according to different algorithms based on the school course schedule and traffic flow patterns. Therefore, the second historical campus traffic flow data includes historical campus traffic flow data for the first period in the morning, afternoon, and evening, as well as the last period after the last period; the second traffic flow prediction data includes traffic flow prediction data for the corresponding time period. Among them, the traffic flow prediction rule for the first period in the morning is as follows: According to historical data statistics, among students with classes in the first period in the morning, more than 90% of students go to the cafeteria to eat breakfast first, and then go to class from the cafeteria. The remaining students choose to bring their own breakfast, buy breakfast at the convenience store, or not eat breakfast. With the students' authorization, a list of students who need to eat breakfast in the morning was determined based on the class schedule. Based on the students' breakfast consumption records during their first class in the morning, the probability of students from different dormitories eating breakfast at different cafeterias was estimated, with 10 minutes before the start of the first class in the morning as the baseline time t. 早 The peak period is from 15 minutes before the base time to the base time itself. During this peak period, 90% of students depart for the cafeteria for breakfast. Using the preset route traffic prediction algorithm (calculated by multiplying the number of students with classes in the first period by 0.9), and based on the probability distribution of students from different dormitories going to different cafeterias, the number of students going to each cafeteria is calculated, with the base time t as the reference time. 早Peak hours are defined as 5 minutes before and after each class. The pedestrian flow distribution along each route is calculated. For the 10% of students who don't eat breakfast in the cafeteria, pedestrian flow distribution is calculated based on the pedestrian flow prediction rules for the first afternoon and evening classes. The pedestrian flow prediction rules for the first afternoon and evening classes are as follows: Based on the established timetable, a matrix of students going to the classroom from different dormitories is determined. The walking time from different dormitories to the classroom building is estimated at 1.1 m / s. Using the class start time minus the dormitory walking time as the baseline time, the peak period is 3-15 minutes before the baseline time. Assuming 80% of students choose to go to class from their dormitories, and 90% of students travel during the peak period, the pedestrian flow in each grid along the peak route is estimated. The pedestrian flow prediction rules for the last morning and afternoon classes are as follows: Based on historical trajectory data, over 85% of students choose to go to the cafeteria for lunch and after class in the afternoon, approximately 10% choose to return directly to their dormitories, and the remaining students make other choices. The impact of students making other choices on pedestrian flow distribution is negligible. With student authorization, the student lists for the 4th and 8th periods are confirmed based on the class schedule. Based on students' lunch and dinner consumption records at different canteens during their 4th and 8th periods, the probability of students eating lunch and dinner at different canteens is calculated. Then, a probability matrix for students going to different canteens from different teaching buildings is established. Based on the number of students leaving classes in different teaching buildings, a matrix of the number of students going to different canteens from different teaching buildings is generated to estimate the pedestrian flow in each grid on the peak-hour route. The pedestrian flow prediction rule for the last class in the evening is as follows: Based on historical trajectory data statistics, approximately 85% of students go directly back to their dormitories after class in the evening. Taking the time t for the 12th period to end... 晚 The baseline time is used as the reference time, and the peak period is defined as the baseline time and 10 minutes after the baseline time. Based on the number of students attending evening classes multiplied by 0.85, the pedestrian flow in each grid along the route during peak hours is estimated.
[0032] It should be noted that the processing flow for determining the third-order pedestrian flow prediction data through the preset location pedestrian flow calculation algorithm is as follows: The peak pedestrian flow period for the current location is determined, and the second location grid for the current location is determined using the campus electronic grid map; Based on the target historical pedestrian flow data and the peak pedestrian flow period, the predicted pedestrian flow for the current location within a second preset time range is determined, and the real-time pedestrian flow for the current location within the second preset time range is acquired in real time using the acquisition device; Based on the predicted pedestrian flow and the real-time pedestrian flow, a target real-time diffusion adjustment coefficient is determined, and the number of second grid circles to be expanded is determined using the target historical pedestrian flow data and the target real-time diffusion adjustment coefficient; Taking the second location grid as the center... The algorithm expands outwards from the campus electronic grid map based on the second grid circle number and using a breadth-first search algorithm to determine the number of second grids affected by the expansion. It then determines the third predicted pedestrian flow data based on the second grid circle number, the third peak pedestrian flow period, the target historical pedestrian flow data, and the second grid circle number. If the target historical pedestrian flow data is the second historical campus pedestrian flow data, the current location is the target teaching building within the target campus, and the third peak pedestrian flow period is determined based on the class schedule data. If the target historical pedestrian flow data is the third historical campus pedestrian flow data, the current location is the target activity location for the current activity, and the third peak pedestrian flow period is determined based on the start and end times of the target activity location. In other words, the preset location pedestrian flow calculation algorithm is used when a location experiences a large influx / dispersion of pedestrian flow at certain times, but no suitable route is available for calculation. First, determine the current location, i.e., the third peak period of pedestrian traffic for the i-th location, which is the start time ts and end time te of the peak period of convergence / diffusion at this location. Based on historical trajectory statistics, assume that 85% of people converge / spread during the peak period and 15% of people diffuse within the influence time, and calculate the estimated total number of diffused people cnt. Then, use the campus electronic grid map to determine the second location grid corresponding to the current location. To ensure the accuracy of the preset location pedestrian traffic calculation algorithm, it is calibrated using the target real-time diffusion adjustment coefficient Cpm, which defaults to 1. Based on the target historical pedestrian traffic data and the third peak period of pedestrian traffic, determine the predicted pedestrian traffic of the current location within the second preset time range, for example, the predicted pedestrian traffic Py within 1 minute of the peak period, and its specific calculation formula is as follows: Py = cnt × 0.85 ÷ (te - ts + 1); Simultaneously, the real-time pedestrian flow of the venue during this period is acquired through the data collection device, that is, the actual pedestrian flow Pz at the entrance and exit during the peak period is collected for 1 minute. The target real-time diffusion adjustment coefficient Cpm is determined by combining the predicted pedestrian flow of the venue with the real-time pedestrian flow of the venue. The specific formula for determining it is as follows: ; The site consists of a series of continuous grids, with these grids serving as the central grid and surrounding grids of m. i The grid of the circle is affected, and based on the target historical traffic flow data and adjustment coefficient, the number of second grid circles (m) that need to be expanded is determined. i The specific formula for determining it is as follows: ; Here, `round()` is the rounding function. Then, using the second location grid as the center and combining the number of circles of the second grid, a breadth-first search algorithm is used to expand outwards by `m` on the campus electronic grid map. i The grid is drawn to determine the number of second grids for the extended impact. Finally, based on the number of second grids, the third peak traffic period, the target historical traffic data, and the number of second grid circles, the predicted third traffic data is determined. Let S... ij Let q be the number of grids affected by the j-th cycle of the i-th location. ijk For the i-th location, the j-th circle, and the k-th grid, then q ijkt For q ijk The formula for calculating the convergence / diffusion of pedestrian flow at minute t is as follows: ; Where tss = ts - (te - ts + 1) × 0.3 and tee = te + (te - ts + 1) × 0.3, these represent the pre-boundary and post-boundary times of the impact of pedestrian flow, respectively, i.e., the start of the impact period before the peak begins and the end of the impact period after the peak ends. The time between tss and ts-1, and between te+1 and tee, constitutes the impact time. All q ijk Each has a unique corresponding (x, y) coordinate, Q t [x][y] represents all q values corresponding to the grid (x,y) at minute t. ijkt The sum of.
[0033] It is understandable that the calculation logic of the preset location pedestrian flow calculation algorithm will adapt to different scenarios based on the type of target historical pedestrian flow data: if it is the second historical campus pedestrian flow data, the current location is the target teaching building of the target campus, and the third peak pedestrian flow period is determined based on the class schedule data; if it is the third historical campus pedestrian flow data, the current location is the target activity location where the activity is currently being carried out, and the third peak pedestrian flow period is determined based on the start and end times of the activity. The second historical campus pedestrian flow data refers to historical campus pedestrian flow data during other get out of class times, excluding the first historical campus pedestrian flow data. Because pedestrian traffic is relatively dispersed at this time, no predictions are made about people along the routes. Instead, the pedestrian traffic changes in the teaching building during peak hours are predicted based solely on the class schedule. Specifically, the target teaching building is the center, with a three-ring radius around it. The number of students leaving get out of class plus the number of students entering class is calculated based on the schedule. The peak period is 2-8 minutes after class ends, and the peak period is 10 minutes before class begins (peak hours may overlap or separate; for example, the 10-minute break between the first and second periods overlaps, while the 20-minute break between the second and third periods does not). Based on the get out of class times and the number of students leaving and entering the teaching building, the surrounding pedestrian traffic is calculated using a pre-defined algorithm. In addition, the third set of historical campus pedestrian traffic data refers to historical pedestrian traffic data for similar events. The number of participants for these events is automatically obtained from the school's venue reservation management system. Events with 500 or more participants are classified as large-scale events. Using the grid area where the event is scheduled as the center, and combining historical foot traffic data from similar events, for events with 500-1000 participants, peak foot traffic is predicted 10 minutes before the event start time, with 5 minutes as the baseline. For events with 1000 or more participants, peak foot traffic is predicted 15 minutes before the event start time, with 5 minutes as the baseline. Specifically, foot traffic in the surrounding area is calculated based on the event's start and end times using a pre-defined algorithm for calculating foot traffic at the venue.In this way, this embodiment achieves refined and regional prediction of pedestrian flow by relying on the grid-based division of campus space. This allows the pedestrian flow trends in various areas of the campus to be accurately presented in grid units, providing refined grid-level pedestrian flow data support for subsequent applications such as real-time campus pedestrian flow monitoring, dense area early warning, and intelligent path planning. Combining the pedestrian flow patterns of the teaching schedule cycle, the breadth-first search algorithm is used to accurately delineate the grid expansion with fixed locations as the core. At the same time, multi-dimensional historical pedestrian flow and grid spatial data are integrated to carry out predictions, making the pedestrian flow prediction of the grid around the fixed locations more in line with the actual pedestrian flow diffusion patterns of the campus teaching scenario, effectively improving the accuracy and relevance of the first pedestrian flow prediction data. Differentiated calculation logic is designed for two different scenarios: campus routes and activity venues. Combining timetable data with the pedestrian flow patterns of the campus teaching scenario, route selection probability is introduced for routes to improve the calculation fit. Relying on the grid-based map, accurate matching and calculation of pedestrian flow data in different scenarios are achieved, effectively improving the accuracy and scenario adaptability of the overall pedestrian flow prediction data.
[0034] Step S13: Continuously collect real-time campus pedestrian traffic data in the target campus using pre-deployed collection devices, and project the real-time campus pedestrian traffic data onto the corresponding map grid in the campus electronic grid map to obtain real-time pedestrian traffic data on the corresponding map grid; the collection devices are deployed in the target key locations of the target campus.
[0035] In this embodiment, data collection devices pre-deployed at key locations within the target campus continuously collect real-time pedestrian traffic data and project this data onto corresponding map grids of the campus electronic grid map to obtain real-time pedestrian traffic data for each grid. These key locations include core nodes such as intersections of main campus roads, entrances and exits of teaching buildings, canteens, dormitories, and large event venues. The total number of deployed devices is controlled to 20-30, less than 10% of the total number deployed in the entire scenario, significantly reducing deployment costs. The data collection devices include cameras supporting pedestrian traffic calculation and pedestrian turnstiles at key entrances and exits, calculating pedestrian traffic every 5 minutes to assess the distribution of pedestrian traffic within the surrounding affected area.
[0036] It should be noted that the processing flow for obtaining real-time pedestrian flow data on the corresponding map grid is as follows: Based on the distribution of the target key locations, the target grid where the data collection device is located is aggregated to determine the key blocks formed by the target grid; based on the real-time campus pedestrian flow data, the average pedestrian flow per minute of the key blocks is determined, and the number of third grid rings to be expanded is determined based on the average pedestrian flow per block; with the key blocks as the center, based on the number of third grid rings and using a breadth-first search algorithm, the campus electronic grid map is expanded outward to determine the number of third grids affected by the expansion; based on the number of third grids and the average pedestrian flow per block, the real-time pedestrian flow data on the corresponding map grid is determined. That is, based on the distribution of the target key locations, the target grid where the data collection device is located is aggregated to determine the key blocks formed by the target grid, that is, adjacent grids where devices are located are aggregated into continuous grids, for example, the grids where the same gate at the school gate is located are merged into a continuous grid. Based on the real-time campus pedestrian flow data, the average pedestrian flow per minute kcnt of the i-th key block is calculated. i Based on this, the number of third grid layers m to be expanded is determined. i The specific formula for determining it is as follows: ; Subsequently, using the key block as the center and combining the third grid circle number, a breadth-first search algorithm is used to expand outwards m from the campus electronic grid map. i The grid is defined, and the number of third grids affected by the expansion is determined. Finally, based on the number of third grids and the average pedestrian flow in the block, the real-time pedestrian flow data of the corresponding map grid in the campus electronic grid map is determined. Let S be the number of third grids. ij Let key be the number of grids affected by the i-th key block in the j-th round. ijk The real-time pedestrian flow in the k-th grid of the j-th ring of the i-th key block is calculated using the following formula: ; All keys ijk Each grid cell has a unique corresponding (x, y) coordinate, and K[x][y] is the key corresponding to all (x, y) grid cells. ijkIn this way, this embodiment relies on data collection equipment at key locations to achieve real-time monitoring of pedestrian flow across the entire campus. Through grid projection, it achieves precise matching of real-time pedestrian flow data with the campus space, allowing the real-time status of pedestrian flow on campus to be clearly presented in grid units. This realizes grid-based, real-time, and precise perception of pedestrian flow on campus. By aggregating key grids to form key blocks, it achieves intensive statistical analysis of pedestrian flow data. Combined with the average pedestrian flow of each block, it dynamically determines the grid expansion range, achieving real-time coverage of pedestrian flow data across the entire campus electronic grid map, thus improving the comprehensiveness and accuracy of real-time monitoring of pedestrian flow on campus.
[0037] Step S14: Based on the predicted pedestrian flow data and the real-time pedestrian flow data, determine the target pedestrian flow data for each map grid in the campus electronic grid map.
[0038] In this embodiment, the predicted pedestrian flow data and the real-time pedestrian flow data are combined for fusion calculation to determine the corresponding target pedestrian flow data for each map grid in the campus electronic grid map. It is understood that the predicted pedestrian flow data includes a predicted pedestrian flow grid matrix for each minute. For data with fixed patterns, the impact is d. ijk g on the grid and the route ij q around the grid and the venue ijk Each grid has its own grid number (x, y) on the map, M t [][] is the grid matrix for predicting pedestrian flow at minute t, and its corresponding formula is as follows: ; Among them, D t [][] represents the value of the corresponding minute t in the matrix between D1 and D6 according to the spring and autumn semesters, winter and summer vacations, weekdays and weekends. If there is no corresponding matrix for minute t, then 0 is taken.
[0039] It should be noted that the real-time pedestrian flow data is not used to directly generate full-area pedestrian flow data, but only as calibration data to correct the basic prediction model built from periodic dynamic data, timetable data, and large-scale event data, thus addressing the problem of distortion in predictions based solely on historical data. Specifically, when real-time pedestrian flow data exists in the grid (x,y) covered by real-time data for key locations, the real-time data replaces M. t [x][y] correspond to the predicted data. For uncovered grids, the calibrated predicted data is used to calculate the accuracy of the population density data for the entire area. The corresponding calibration rules are as follows: First, calculate the radiation correction coefficient Cf[][] for all grids with real-time population data. The specific calculation formula is as follows: ; Wherein, the (x,y) grid represents the key grid coordinates containing real-time pedestrian flow data; K[][] represents the real-time pedestrian flow data. For all grids containing real-time pedestrian flow data, the pedestrian flow correction coefficient Cj[][] is calculated, and its calculation formula is as follows: ; in, These are the key grid coordinates that radiate to the (x,y) grid; It represents the number of critical grids radiating to the (x,y) grid; ∑ represents the summation. The specific formula for determining the target pedestrian flow data RT[][] is as follows: ; In this way, this embodiment integrates predicted data based on historical patterns with real-time data from the actual site, effectively making up for the shortcomings of single predicted data and single real-time data. This allows the target pedestrian flow data of each grid to not only conform to the overall development trend of campus pedestrian flow, but also accurately reflect the current actual pedestrian flow situation. This achieves the integration of grid-level pedestrian flow data and provides core data support for subsequent campus applications such as dense pedestrian flow early warning and intelligent path planning.
[0040] Step S15: Using the target pedestrian flow data and the campus electronic grid map, adjust the actual cost function of the preset path planning algorithm to obtain the adjusted path planning algorithm, and provide navigation services to the user terminal in the target campus based on the adjusted path planning algorithm.
[0041] In this embodiment, by combining the target pedestrian flow data with the actual cost function of the preset path planning algorithm adjusted by the campus electronic grid map, an adjusted path planning algorithm adapted to the current pedestrian flow situation on campus is obtained, and navigation services are provided to user terminals within the target campus based on this algorithm.
[0042] Specifically, a preset traffic weight is determined for each of the map grids; based on the preset traffic weight and the target pedestrian flow data, a pedestrian flow congestion index matrix is generated using a preset mapping function; the preset mapping function is used to map input values to a congestion index; through the preset mapping relationship and combined with the pedestrian flow congestion index matrix and the preset traffic weight, the actual cost function of the preset path planning algorithm is adjusted to obtain the adjusted path planning algorithm; the preset mapping relationship is used to characterize the mapping relationship between the congestion index and the walking cost coefficient; the adjusted path planning algorithm is used to provide navigation services for user terminals in the target campus. The preset path planning algorithm can be A... Algorithm (a pathfinding and graph traversal algorithm). Specifically, first determine the preset traffic weight (weight) of each map grid matrix (map[][]), then combine the preset traffic weight with the target pedestrian flow data (RT[][]) of each grid, and generate a pedestrian flow congestion index matrix using a preset mapping function that maps input values to a congestion index. The specific generation formula is as follows: ; Wherein, B[][] represents the pedestrian congestion index matrix; CalB function is the preset mapping function. Based on the preset mapping relationship representing the mapping relationship between the congestion index and the walking cost coefficient, the pedestrian congestion index matrix and the preset passage weight are integrated, and the actual cost function g(n) of the preset path planning algorithm is adjusted to obtain the adjusted path planning algorithm. Specifically, when calculating the passage cost of the (x,y) grid, the walking passage cost coefficient is multiplied on the original distance. Finally, this algorithm is used to provide navigation services for user terminals in the target campus. During the navigation process, the pedestrian congestion index matrix B[][] is updated every 5 minutes, and the navigation route is recalculated. If it is found that the recommended route has a passage cost that is more than 10% lower than the current route, the optimal navigation route is recommended and the user is reminded that a better route can be selected. It can be understood that the preset mapping relationship is set based on the characteristics of campus walking. Table 2 below is a preset mapping relationship table provided by this application.
[0043] Table 2 Preset Mapping Relationship Table
[0044] It should be noted that this embodiment can also generate daily crowd density warnings for the next day based on data. The processing flow is as follows: The crowd density of each map grid is determined using the predicted crowd flow data, and the corresponding grid warning status is determined based on the crowd flow density; using a breadth-first search algorithm, warning block identifiers are set for each map grid based on the grid warning status, and each warning block is merged according to the grid distance to generate corresponding crowd density block data; each warning block consists of map grids with the same warning block identifier; the start and end times of the warnings for each warning block are determined based on the crowd density block data, and the target warning area in each warning block is determined based on the warning start and end times and the crowd density block data; crowd density warning information is generated based on the target warning area and the warning start and end times, and fed back to the user terminal. That is, between 7:00 AM and 10:00 PM the next day, one grid map is generated every minute. t [][] (420<=t<=1320), for each traffic flow prediction matrix M t[][], that is, the predicted pedestrian flow data, to calculate the pedestrian flow density prediction matrix A. t [][]. A t The [x][y] array stores the pedestrian density, alarm status (alarmStatus), and associated alarm block ID for each (x,y) grid. An alarm block consists of a contiguous set of alarm grids, with the initial default alarm block ID being 0. Specifically, the pedestrian density of each map grid is first determined based on the predicted pedestrian flow data, using the following formula: density=M t [x][y]÷25; The corresponding grid early warning status is determined based on the grid pedestrian density. Specifically, if density >= 2 people / m 2 If the alarm status is 1, then alarmStatus = 1; otherwise, it is 0. Then, using a breadth-first search algorithm combined with the grid warning status, a warning block identifier is set for each grid. The warning block IDs of adjacent warning grids are set to the same value. Simultaneously, warning blocks are merged based on grid distance. Specifically, all two warning blocks with a shortest distance of no more than one grid are merged into one, with the same warning block ID. When merging two blocks, grids with a 1-grid interval between them are also included in the warning block, generating dense pedestrian traffic block data. The warning blocks are composed of map grids with the same warning block identifier. Then, starting at 7:30 AM, based on the dense pedestrian traffic block data, the start and end times of the warnings for each warning block are determined. Combining this time with the dense pedestrian traffic block data, the target warning area in each warning block is delineated: Let the dense pedestrian traffic matrix at minute t be A. t Then the crowd density matrix for the next minute is A. t+1 Comparison matrix A t and A t+1 A t+1 A certain warning block in the A t The number of overlapping grids in the warning blocks exceeds A t If 50% of the grid cells in a given warning block are selected, that block is considered to have consecutive warnings at minutes t and t+1. The crowd density matrix is iterated through for each minute, and the start and end times of all warning blocks are output. For confirmed consecutive warning blocks, let ats be the warning start time and ate be the warning end time, and calculate the weighted crowd density index region_weights for minutes t between ats <= t <= ate. t The corresponding calculation formula is as follows: ; Where (x, y) represents the grid within the warning block at time t. For the same continuous warning block, the range of the warning block with the largest region_weightst is taken as the target warning area for the entire continuous warning block. Finally, based on the target warning area and the warning start and end times, dense crowd warning information is generated and fed back to the user terminal. In this way, this embodiment deeply integrates grid-level precise pedestrian flow data with path planning. By dynamically adjusting the cost function, the path planning can adapt to the actual pedestrian flow distribution in each grid of the campus in real time, effectively avoiding densely populated grid areas. This improves the scientific and practical nature of campus navigation, providing teachers and students with more efficient and smoother route guidance. At the same time, intelligent navigation enables the dispersion and guidance of pedestrian flow on campus, contributing to the refined and intelligent management of campus pedestrian flow. The early warning information generation method relies on the grid pedestrian flow density to accurately determine the early warning status. Through breadth-first search and block merging, it achieves accurate delineation and integration of dense areas. At the same time, it combines pedestrian flow patterns to determine the early warning time and identify the core early warning area. It can push information on densely populated areas and time periods on campus to user terminals in advance, providing accurate references for teachers and students to plan their routes and effectively assisting in the early guidance and management of campus pedestrian flow.
[0045] As can be seen from the above, this embodiment first creates an electronic grid map of the target campus, which is divided into several map grids. Then, it performs pedestrian flow prediction processing by combining the electronic grid map with historical campus pedestrian flow data to obtain pedestrian flow prediction data for each map grid in the electronic grid map. Simultaneously, it continuously collects real-time pedestrian flow data of the target campus using data collection devices deployed at key locations on the campus. This data is projected onto the corresponding map grid in the electronic grid map to obtain real-time pedestrian flow data for the corresponding map grid. Combining this data with the pedestrian flow prediction data, it determines the target pedestrian flow data for each map grid. Then, using the target pedestrian flow data and relying on the electronic grid map, it adjusts the actual cost function of a preset path planning algorithm. Finally, based on the adjusted preset path planning algorithm, it provides navigation services to user terminals within the target campus. In this way, through the above-described process of this application embodiment, by mining the periodic patterns of campus pedestrian flow from historical campus pedestrian flow data to obtain pedestrian flow prediction data, only a small number of collection devices need to be deployed at key nodes to obtain real-time pedestrian flow data for dynamic calibration of pedestrian flow prediction data. Relying on grid maps, the pedestrian flow data is refined and quantified, ensuring data accuracy. By dynamically adjusting the actual cost matrix of path planning, the campus navigation path can be made to match the actual pedestrian flow distribution on campus in real time, effectively avoiding densely populated areas and improving the scientific, real-time, and rational nature of campus navigation, providing accurate path guidance for the efficient passage of people on campus. Only collection devices need to be deployed at key target locations on campus, without the need for large-scale deployment of full-scene collection devices to achieve accurate pedestrian flow prediction and congestion avoidance navigation, reducing hardware deployment and maintenance costs, thereby optimizing the campus navigation method to improve user navigation efficiency and user experience.
[0046] Accordingly, see Figure 3 As shown in the figure, this application embodiment also provides a campus navigation device based on pedestrian flow analysis, including: Map creation module 11 is used to create an electronic grid map of the target campus; wherein the electronic grid map of the campus is divided into several map grids; The pedestrian flow prediction module 12 is used to perform pedestrian flow prediction processing based on the campus electronic grid map and historical campus pedestrian flow data to obtain pedestrian flow prediction data for each of the map grids in the campus electronic grid map; The data projection module 13 is used to continuously collect real-time campus pedestrian traffic data in the target campus through pre-deployed acquisition devices, and project the real-time campus pedestrian traffic data onto the corresponding map grid in the campus electronic grid map to obtain real-time pedestrian traffic data on the corresponding map grid; the acquisition devices are deployed in the target key locations of the target campus; Data determination module 14 is used to determine the target pedestrian flow data on each of the map grids in the campus electronic grid map based on the pedestrian flow prediction data and the pedestrian flow real-time data; The function adjustment module 15 is used to adjust the actual cost function of the preset path planning algorithm by using the target pedestrian flow data and combining it with the campus electronic grid map, so as to obtain the adjusted path planning algorithm, and to provide navigation services to the user terminal in the target campus based on the adjusted path planning algorithm.
[0047] In some specific embodiments, the historical campus traffic data includes first historical campus traffic data; the first historical campus traffic data is historical campus traffic data collected by the collection device on the map grid corresponding to the target fixed location according to different teaching arrangement cycles; the traffic prediction data includes first traffic prediction data, which is traffic prediction data on the map grid corresponding to each of the target fixed locations under different teaching arrangement cycles. Accordingly, the campus navigation device based on pedestrian flow analysis may specifically include: The first lap number determination unit is used to determine the first peak period of pedestrian traffic at the target fixed location based on the first historical campus pedestrian traffic data, and to determine the first number of grid laps that need to be expanded. The first grid determination unit is used to determine the first location grid of the target fixed location through the campus electronic grid map; The first outward expansion unit is used to expand outward from the campus electronic grid map with the first location grid as the center, based on the number of the first grid circles and through a breadth-first search algorithm, so as to determine the number of the first grids affected by the expansion. The first data determination unit is used to determine the first predicted pedestrian flow data based on the first number of grids, the first peak period of pedestrian flow, the first historical campus pedestrian flow data, and the first number of grid circles.
[0048] In some specific implementations, the historical campus pedestrian traffic data further includes second and third historical campus pedestrian traffic data; the second historical campus pedestrian traffic data is anonymized target historical campus pedestrian traffic data collected through a target location positioning system, and the target historical campus pedestrian traffic data is historical pedestrian traffic data on the map grid corresponding to the target route; the third historical campus pedestrian traffic data is historical pedestrian traffic data on the map grid corresponding to several historical activity sites; the pedestrian traffic prediction data further includes second and third pedestrian traffic prediction data; Accordingly, the pedestrian flow prediction module 12 may specifically include: The time period determination unit is used to determine the timetable data for the current semester and determine the second peak period of traffic flow based on the timetable data, so as to construct the route selection probability of the target passage route under the second peak period of traffic flow based on the second historical campus traffic flow data. The first data determination submodule is used to determine the second pedestrian flow prediction data by using the route selection probability, the second historical campus pedestrian flow data, and the campus electronic grid map, through a preset route pedestrian flow calculation algorithm. The second data determination submodule is used to determine the third predicted pedestrian flow data based on the target historical pedestrian flow data and the campus electronic grid map, using a preset location pedestrian flow calculation algorithm; the target historical pedestrian flow data includes the second historical campus pedestrian flow data and the third historical campus pedestrian flow data.
[0049] In some specific implementations, the first data determining submodule may specifically include: A sequence determination unit is used to determine the map grid sequence involved in the target travel route based on the campus electronic grid map; The quantity determination unit is used to determine the estimated number of grids traversed by walking within a first preset time range based on a preset walking speed; The second data determination unit is used to determine the second predicted pedestrian flow data for each grid of the target route during the second peak pedestrian flow period, based on the estimated number of grids, the route selection probability, the map grid sequence, and the second historical campus pedestrian flow data.
[0050] In some specific implementations, the second data determining submodule may specifically include: The second grid determination unit is used to determine the third peak period of pedestrian traffic in the current location, and to determine the second location grid of the current location through the campus electronic grid map; The pedestrian flow acquisition unit is used to determine the predicted pedestrian flow of the current location within a second preset time range based on the target historical pedestrian flow data and the third peak pedestrian flow period, and to acquire the real-time pedestrian flow of the current location within the second preset time range through the acquisition device. The second ring number determination unit is used to determine the target real-time diffusion adjustment coefficient based on the predicted pedestrian flow and the real-time pedestrian flow of the location, and to determine the number of second grid rings to be expanded through the target historical pedestrian flow data and the target real-time diffusion adjustment coefficient; The second outward expansion unit is used to expand outward from the campus electronic grid map with the second location grid as the center, based on the number of the second grid circles and through a breadth-first search algorithm, in order to determine the number of second grids affected by the expansion. The third data determination unit is used to determine the third traffic prediction data based on the number of the second grid, the third peak period of traffic flow, the target historical traffic flow data, and the number of the second grid circles. Wherein, if the target historical pedestrian flow data is the second historical campus pedestrian flow data, then the current location is the target teaching building in the target campus, and the third peak pedestrian flow period is determined based on the timetable data; if the target historical pedestrian flow data is the third historical campus pedestrian flow data, then the current location is the target activity location where the activity is currently being carried out, and the third peak pedestrian flow period is determined based on the start and end times of the target activity location.
[0051] In some specific embodiments, the data projection module 13 may specifically include: The grid aggregation unit is used to aggregate the target grid where the acquisition device is located based on the distribution of the target key locations, so as to determine the key blocks composed of the target grid; The third ring number determination unit is used to determine the average number of people per minute in the key area based on the real-time campus traffic data, and to determine the number of third grid rings to be expanded based on the average number of people per minute in the key area. The third outward expansion unit is used to expand outward from the campus electronic grid map with the key block as the center, based on the number of third grid circles and through a breadth-first search algorithm, so as to determine the number of third grids affected by the expansion. The fourth data determination unit is used to determine the real-time pedestrian flow data on the corresponding map grid based on the number of the third grid and the average pedestrian flow of the block.
[0052] In some specific embodiments, the function adjustment module 15 may specifically include: The weight determination unit is used to determine the preset passage weight of each of the map grids; A matrix generation unit is used to generate a pedestrian congestion index matrix based on the preset traffic weights and the target pedestrian flow data, and using a preset mapping function; the preset mapping function is used to map the input values into a congestion index. The function adjustment unit is used to adjust the actual cost function of the preset path planning algorithm by using a preset mapping relationship and combining the pedestrian flow congestion index matrix and the preset passage weight, so as to obtain the adjusted path planning algorithm; the preset mapping relationship is used to characterize the mapping relationship between the congestion index and the walking passage cost coefficient. A service providing unit is used to provide navigation services to user terminals in the target campus using the adjusted path planning algorithm; Accordingly, the campus navigation device based on pedestrian flow analysis may further include: The status determination unit is used to determine the grid pedestrian density of each map grid through the pedestrian flow prediction data, and to determine the corresponding grid early warning status based on the grid pedestrian density; The block merging unit is used to set the warning block identifier for each map grid based on the grid warning status using a breadth-first search algorithm, and merge the warning blocks according to the grid distance to generate corresponding densely populated block data; the warning block is composed of map grids with the same warning block identifier; The area determination unit is used to determine the start and end times of the warnings corresponding to each warning block based on the densely populated area block data, and to determine the target warning area in each warning block based on the warning start and end times and the densely populated area block data. The information feedback unit is used to generate a dense crowd warning information based on the target warning area and the warning start and end time, and to feed it back to the user terminal.
[0053] Furthermore, embodiments of this application also disclose an electronic device, Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the campus navigation method based on pedestrian flow analysis disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be a computer.
[0054] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0055] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0056] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the campus navigation method based on pedestrian flow analysis executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0057] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned campus navigation method based on pedestrian flow analysis. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0058] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0059] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0060] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0061] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0062] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A campus navigation method based on pedestrian flow analysis, characterized in that, include: Create an electronic grid map of the target campus; wherein the electronic grid map is divided into several map grids; Based on the campus electronic grid map and historical campus pedestrian traffic data, pedestrian traffic prediction processing is performed to obtain pedestrian traffic prediction data for each of the map grids in the campus electronic grid map; The system continuously collects real-time pedestrian traffic data in the target campus using pre-deployed data collection devices, and projects this data onto the corresponding map grids in the campus electronic grid map to obtain real-time pedestrian traffic data on the corresponding map grids. The data collection devices are deployed at key target locations within the target campus. Based on the predicted pedestrian flow data and the real-time pedestrian flow data, the target pedestrian flow data for each grid in the campus electronic grid map is determined; Using the target pedestrian flow data and the campus electronic grid map, the actual cost function of the preset path planning algorithm is adjusted to obtain the adjusted path planning algorithm, and navigation services are provided to user terminals in the target campus based on the adjusted path planning algorithm.
2. The campus navigation method based on pedestrian flow analysis according to claim 1, characterized in that, The historical campus pedestrian traffic data includes first historical campus pedestrian traffic data; the first historical campus pedestrian traffic data is historical campus pedestrian traffic data collected by the collection device on the map grid corresponding to the target fixed location according to different teaching arrangement cycles; the pedestrian traffic prediction data includes first pedestrian traffic prediction data, which is pedestrian traffic prediction data on the map grid corresponding to each of the target fixed locations under different teaching arrangement cycles. Accordingly, the process of determining the first pedestrian flow prediction data includes: Based on the first historical campus pedestrian traffic data, determine the first peak pedestrian traffic period of the target fixed location, and determine the number of first grid circles that need to be expanded; The first location grid of the target fixed location is determined by the campus electronic grid map; Centered on the first location grid, and based on the number of the first grid circles, the campus electronic grid map is expanded outward using a breadth-first search algorithm to determine the number of the first grids affected by the expansion. The first predicted pedestrian flow data is determined based on the first number of grids, the first peak period of pedestrian flow, the first historical campus pedestrian flow data, and the first number of grid circles.
3. The campus navigation method based on pedestrian flow analysis according to claim 1, characterized in that, The historical campus pedestrian traffic data also includes second and third historical campus pedestrian traffic data; the second historical campus pedestrian traffic data is anonymized target historical campus pedestrian traffic data collected through a target location positioning system, and the target historical campus pedestrian traffic data is historical pedestrian traffic data on the map grid corresponding to the target travel route; the third historical campus pedestrian traffic data is historical pedestrian traffic data on the map grid corresponding to several historical activity sites; the pedestrian traffic prediction data also includes second and third pedestrian traffic prediction data; Accordingly, the process of performing pedestrian flow prediction based on the campus electronic grid map and historical campus pedestrian flow data to obtain pedestrian flow prediction data for each grid in the campus electronic grid map includes: Determine the timetable data for the current semester, and determine the second peak period of pedestrian traffic based on the timetable data, so as to construct the route selection probability of the target passage route during the second peak period of pedestrian traffic based on the second historical campus pedestrian traffic data; Using the route selection probability, the second historical campus pedestrian flow data, and the campus electronic grid map, the second pedestrian flow prediction data is determined by a preset route pedestrian flow calculation algorithm. Based on the target historical pedestrian flow data and the campus electronic grid map, the third pedestrian flow prediction data is determined by a preset location pedestrian flow calculation algorithm; the target historical pedestrian flow data includes the second historical campus pedestrian flow data and the third historical campus pedestrian flow data.
4. The campus navigation method based on pedestrian flow analysis according to claim 3, characterized in that, The step of determining the second predicted pedestrian flow data by utilizing the route selection probability, the second historical campus pedestrian flow data, and the campus electronic grid map through a preset route pedestrian flow calculation algorithm includes: The map grid sequence involved in the target travel route is determined based on the campus electronic grid map; The estimated number of grids traversed within a first preset time range is determined by a preset walking speed; Based on the estimated number of grids, the route selection probability, the map grid sequence, and the second historical campus pedestrian traffic data, the second pedestrian traffic prediction data for each grid of the target route during the second peak pedestrian traffic period is determined.
5. The campus navigation method based on pedestrian flow analysis according to claim 4, characterized in that, The process of determining the third-party predicted pedestrian flow data based on historical pedestrian flow data and the campus electronic grid map, using a preset location pedestrian flow calculation algorithm, includes: Determine the third peak period of pedestrian traffic at the current location, and determine the second location grid of the current location through the campus electronic grid map; Based on the target historical pedestrian flow data and the third peak pedestrian flow period, the predicted pedestrian flow of the current location within the second preset time range is determined, and the real-time pedestrian flow of the current location within the second preset time range is obtained in real time through the acquisition device; The target real-time diffusion adjustment coefficient is determined based on the predicted pedestrian flow and the real-time pedestrian flow of the location, and the number of second grid rings to be expanded is determined by the target historical pedestrian flow data and the target real-time diffusion adjustment coefficient. Centered on the second location grid, and based on the number of the second grid circles, the campus electronic grid map is expanded outward using a breadth-first search algorithm to determine the number of second grids affected by the expansion. The third pedestrian flow prediction data is determined based on the number of the second grid, the third peak period of pedestrian flow, the target historical pedestrian flow data, and the number of the second grid circles. Wherein, if the target historical pedestrian flow data is the second historical campus pedestrian flow data, then the current location is the target teaching building in the target campus, and the third peak pedestrian flow period is determined based on the timetable data; if the target historical pedestrian flow data is the third historical campus pedestrian flow data, then the current location is the target activity location where the activity is currently being carried out, and the third peak pedestrian flow period is determined based on the start and end times of the target activity location.
6. The campus navigation method based on pedestrian flow analysis according to claim 1, characterized in that, The step of projecting the real-time campus pedestrian flow data onto the corresponding map grid in the campus electronic grid map to obtain the real-time pedestrian flow data on the corresponding map grid includes: Based on the distribution of the target key locations, the target grid where the acquisition device is located is converged to determine the key blocks composed of the target grid; Based on the real-time campus pedestrian traffic data, the average pedestrian traffic per minute in the key area is determined, and the number of third grid rings that need to be expanded is determined by the average pedestrian traffic per block. Centered on the key block, based on the number of third grid circles and using a breadth-first search algorithm, the campus electronic grid map is expanded outward to determine the number of third grids affected by the expansion; Based on the number of the third grid and the average pedestrian flow in the block, the real-time pedestrian flow data on the corresponding map grid is determined.
7. The campus navigation method based on pedestrian flow analysis according to any one of claims 1 to 6, characterized in that, The process of using the target pedestrian flow data and combining it with the campus electronic grid map to adjust the actual cost function of the preset path planning algorithm to obtain the adjusted path planning algorithm, and providing navigation services to user terminals in the target campus based on the adjusted path planning algorithm, includes: Determine the preset access weight for each of the map grids; Based on the preset traffic weight and the target pedestrian flow data, a pedestrian flow congestion index matrix is generated using a preset mapping function; the preset mapping function is used to map the input values to a congestion index. By using a preset mapping relationship and combining the pedestrian flow congestion index matrix and the preset passage weight, the actual cost function of the preset path planning algorithm is adjusted to obtain the adjusted path planning algorithm; the preset mapping relationship is used to characterize the mapping relationship between the congestion index and the walking passage cost coefficient. The adjusted path planning algorithm is used to provide navigation services for user terminals within the target campus. Correspondingly, it also includes: The pedestrian flow density of each map grid is determined by the pedestrian flow prediction data, and the corresponding grid early warning status is determined based on the pedestrian flow density. Using a breadth-first search algorithm, the warning block identifiers for each map grid are set based on the grid warning status, and the warning blocks are merged according to the grid distance to generate corresponding densely populated area data; the warning blocks are composed of map grids with the same warning block identifier; The start and end times of the warnings for each warning block are determined based on the data of densely populated areas, and the target warning areas in each warning block are determined based on the start and end times of the warnings and the data of densely populated areas. Based on the target warning area and the warning start and end times, a dense crowd warning information is generated and fed back to the user terminal.
8. A campus navigation device based on pedestrian flow analysis, characterized in that, include: The map creation module is used to create an electronic grid map of the target campus; wherein the electronic grid map is divided into several map grids; The pedestrian flow prediction module is used to perform pedestrian flow prediction processing based on the campus electronic grid map and historical campus pedestrian flow data to obtain pedestrian flow prediction data for each of the map grids in the campus electronic grid map; The data projection module is used to continuously collect real-time campus pedestrian traffic data in the target campus through pre-deployed acquisition devices, and project the real-time campus pedestrian traffic data onto the corresponding map grid in the campus electronic grid map to obtain real-time pedestrian traffic data on the corresponding map grid; the acquisition devices are deployed in the target key locations of the target campus; The data determination module is used to determine the target pedestrian flow data on each of the map grids in the campus electronic grid map based on the pedestrian flow prediction data and the real-time pedestrian flow data. The function adjustment module is used to adjust the actual cost function of the preset path planning algorithm by using the target pedestrian flow data and combining it with the campus electronic grid map, so as to obtain the adjusted path planning algorithm, and provide navigation services to user terminals in the target campus based on the adjusted path planning algorithm.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the campus navigation method based on people flow analysis as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the campus navigation method based on people flow analysis as described in any one of claims 1 to 7.