Method and device for generating movement track of crowd in disaster, and medium
By using pre-trained trajectory generation models in disaster management technology, combining geographical entities and disaster information, accurate crowd movement trajectories are generated, which solves the problem of crowd flow prediction in disaster scenarios and improves the quality and efficiency of emergency responses.
Patent Information
- Application Number
- CN202411830803.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-12-12
AI Technical Summary
In disaster scenarios, it is difficult for the existing technology to accurately predict the flow trajectory of the population, resulting in limited quality and efficiency of emergency response in the disaster.
By obtaining the set of geographical entities in the area, the current disaster point information, the current shelter information and the current location information of residents, and entering this information into the pre-trained trajectory generation model, generating the residents' travel log, mapping it to the set of geographical entities, filtering the set of travel target locations, and finally drawing the movement trajectory of residents during the disaster.
Accurate prediction of population flow in disaster scenarios has been achieved, and the quality and efficiency of emergency response in disasters has been improved.
Smart Images

Figure CN119940367A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to, but are not limited to, the field of disaster management technology, and in particular to a method, device, and medium for generating movement trajectories of people during disasters. Background Art
[0002] In the field of disaster management, Large Language Models (LLMs) can be used to accurately predict and simulate the flow trajectories of people when disasters occur. However, directly applying LLMs to the generation of crowd flow trajectories in disaster scenarios still faces challenges. On the one hand, LLMs may have relatively limited understanding of geographical knowledge, which may lead to unreasonable geographical logic in the generated trajectories. On the other hand, the flow of people in disaster scenarios is often affected by a variety of complex factors, such as the specific location of the disaster site, the distribution of shelters, and the current traffic conditions, all of which need to be fully considered in the trajectory generation process.
[0003] Therefore, achieving accurate prediction of crowd flow in disaster scenarios and improving the quality of emergency response during disasters is a technical problem that needs to be solved urgently. Summary of the invention
[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0005] The embodiment of the present application provides a method for generating crowd movement trajectories during disasters, which can achieve accurate prediction of crowd flow in disaster scenarios, thereby improving the quality and efficiency of emergency response during disasters.
[0006] In a first aspect, an embodiment of the present application provides a method for generating a movement trajectory of a crowd during a disaster, comprising: obtaining a set of geographic entities, current disaster-affected point information, current shelter information, and current location information of residents in an area, and inputting the current disaster-affected point information, the current shelter information, the current location information, and the set of geographic entities into a pre-trained trajectory generation model; generating a travel log of the resident according to the identity type of the resident; mapping the travel log to the set of geographic entities to obtain an initial target location set; screening the initial target location set to obtain a travel target location set; obtaining the movement trajectory of residents during a disaster according to the current disaster-affected point information, the current shelter information, the current location information, and the set of travel target locations.
[0007] In combination with the first aspect, in an embodiment of the present application, the training step of the pre-trained trajectory generation model includes: obtaining a travel log data set, and screening and processing the travel log data set to obtain a standard log data set; constructing an initial trajectory generation model, inputting the standard log data set into the initial trajectory generation model for iterative training, adjusting the first parameter of the initial trajectory generation model, and obtaining an intermediate trajectory generation model; obtaining historical disaster-stricken point information and historical shelter information in the area; training the intermediate trajectory generation model according to the historical disaster-stricken point information and the historical shelter information, adjusting the second parameter of the intermediate trajectory generation model, and obtaining a pre-trained trajectory generation model.
[0008] In combination with the first aspect, in an embodiment of the present application, generating the travel log of the resident based on the identity type of the resident includes: constructing the resident identity type according to the travel pattern of the residents in the area; generating the travel intention of the resident based on the identity type, the travel intention including travel time, current location, target location and purpose; serializing the travel intention to obtain the travel log of the resident.
[0009] In combination with the first aspect, in an embodiment of the present application, mapping the travel log to the geographic entity set to obtain an initial target location set includes: extracting the target location of the trip from the travel log; determining the location type corresponding to the target location; and obtaining the initial target location set based on the location type and the geographic entity set.
[0010] In combination with the first aspect, in an embodiment of the present application, the geographic entity set includes multiple location information; the initial target location set is screened to obtain a travel target location set, including: vectorizing the travel intention to obtain an intention embedding vector; vectorizing the location information to obtain a location embedding vector; calculating the cosine similarity between the intention embedding vector and the location embedding vector to obtain a similarity result; based on the similarity result, selecting a candidate target location set from the initial target location set; based on the current position and a preset balance factor, screening the candidate target location set to obtain a travel target location set.
[0011] In combination with the first aspect, in an embodiment of the present application, the set of candidate target locations includes multiple target travel locations; the screening of the set of candidate target locations based on the current position and a preset balance factor to obtain the set of travel target locations includes: calculating the spatial distance between the current position and the multiple target travel locations; scoring the multiple target travel locations based on the preset balance factor and the spatial distance to obtain a travel score sequence; screening the set of candidate target locations based on the travel score sequence to obtain a set of travel target locations.
[0012] In combination with the first aspect, in one embodiment of the present application, the movement trajectory of residents during a disaster is obtained based on the current disaster-stricken point information, the current shelter information, the current location information and the travel target location set, including: determining a target location from the travel target location set based on the current disaster-stricken point information, the current shelter information and the current location information; and obtaining the movement trajectory of residents during a disaster based on the target location and the current location information.
[0013] In combination with the first aspect, in one embodiment of the present application, the movement trajectory of residents during a disaster is obtained based on the target location and the current location information, including: calculating a path set of the target location and the current location information based on a path planning algorithm; and selecting a target path from the path set as the movement trajectory of residents during a disaster.
[0014] In a second aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor; at least one memory for storing at least one program; when at least one of the programs is executed by at least one of the processors, the method for generating movement trajectories of people during disasters as described above is implemented.
[0015] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program executable by a processor. When the computer program executable by the processor is executed by the processor, it is used to implement the method for generating the movement trajectory of people in disaster situations as described above.
[0016] The embodiment of the present application provides a method for generating a movement trajectory of a crowd during a disaster. First, a geographical entity set, current disaster-affected point information, current shelter information, and current location information of residents in the region are comprehensively collected, and this information is input into a pre-trained trajectory generation model together with the geographical entity set. Subsequently, the model will perform the following process: the model can generate a travel log of residents according to the identity type of the residents (including different identity attributes). This step fully considers the possible action paths of various types of residents in disaster situations. Then, the model can accurately match this travel log with the geographical entity to generate an initial target location set, and these destinations are set based on the possible travel needs and geographical reality of the residents. On this basis, the model will carefully screen the preliminary set, eliminate those destinations that are inconsistent with the actual situation or logically unreasonable, so as to determine a more accurate travel target location set. Finally, the model can comprehensively combine the current disaster-affected point information, shelter information, the current location of the residents, and the screened travel destinations (i.e., the travel target location set) to draw the movement trajectory of the residents during the disaster. The embodiment of the present application can achieve accurate prediction of the flow of people in disaster scenarios, thereby improving the quality and efficiency of emergency response during disasters. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a flow chart of a method for generating movement trajectories of people in times of disaster provided by an embodiment of the present application;
[0018] Figure 2 Schematic diagram of the training steps of the trajectory generation model provided in the embodiment of the present application;
[0019] Figure 3 The embodiment of this application provides Figure 1 Specific flow chart of step 140;
[0020] Figure 4 The embodiment of this application provides Figure 3 Specific flow chart of step 350;
[0021] Figure 5 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0023] It should be noted that, although the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a different order from that in the flowchart. The terms "first", "second", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions that can be implemented in this application, so they have no technical substantive significance. Any modification of the structure, change of the proportional relationship or adjustment of the size, without affecting the effects that can be produced by this application and the purposes that can be achieved, should still fall within the scope of the technical content disclosed in this application. At the same time, the terms such as "upper", "lower", "left", "right", "middle" and "one" quoted in this specification are only for the convenience of narration, and are not used to limit the scope of implementation of this application. The change or adjustment of the relative relationship should also be regarded as the scope of implementation of this application without substantial change of the technical content.
[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0025] In the relevant technical field, the simulation and prediction of crowd movement behavior during disasters generally have the problem of insufficient adaptability to disaster-specific situations. Specifically, these technologies often find it difficult to accurately predict the dynamic changes of crowds under extreme weather or emergencies. Especially when a disaster actually occurs, the behavior patterns of crowds will be profoundly affected by multiple complex factors such as flooding conditions, shelters provided by buildings, and group psychological effects (such as herd behavior). The current technical framework is still insufficient in comprehensively considering these key factors. In other words, existing technical means cannot fully simulate the complex decision-making process and its dynamic changes faced by individuals in a disaster environment.
[0026] In modern urban environments, the mobility patterns of people play a vital role in urban planning, traffic management, and emergency response due to the dense population. Especially in the case of frequent extreme weather events (such as heavy rain, snow, and typhoons), a deep understanding of the complex mobility patterns of people in cities during these disaster events and the ability to accurately predict these patterns will greatly improve the efficiency of emergency response, thereby effectively reducing casualties and property losses.
[0027] In the field of disaster management, accurately predicting and simulating the flow trajectory of people when disasters occur is crucial for formulating effective emergency response strategies. However, traditional trajectory prediction methods often rely on a large amount of historical trajectory data, which is not always feasible in many practical scenarios, especially in disaster-prone areas where the acquisition of historical data may be limited by various factors, such as incomplete data records and the rarity of disaster events. It is worth noting that in recent years, with the rapid development of artificial intelligence technology, especially the rise of LLMs, new ideas have been provided to solve this problem. LLMs have shown strong capabilities in contextual learning and few-shot learning, which means that even without a large amount of training data, the model is able to generate reasonable outputs based on limited input information. This feature makes LLMs a powerful tool in trajectory generation tasks, especially in disaster scenarios when the available historical trajectory data is very limited. However, despite the above advantages of LLMs, it is still challenging to directly apply them to the generation of crowd flow trajectories in disaster scenarios. On the one hand, LLMs may have a relatively limited understanding of geographical knowledge, which may lead to unreasonableness in the generated trajectories in terms of geographical logic. On the other hand, crowd flow in disaster scenarios is often affected by a variety of complex factors, such as the specific location of the disaster site, the distribution of shelters, and current traffic conditions, all of which need to be fully considered in the trajectory generation process. Therefore, achieving accurate prediction of crowd flow in disaster scenarios and improving the quality of emergency response is a technical problem that needs to be solved urgently.
[0028] In view of this, the embodiment of the present application provides a method for generating a movement trajectory of a group of people during a disaster, an electronic device, and a computer-readable storage medium. First, a geographical entity set, current disaster-affected point information, current shelter information, and current location information of residents in the region are comprehensively collected, and this information is input into a pre-trained trajectory generation model together with the geographical entity set. Subsequently, the model will perform the following process: the model can generate a travel log of residents according to the identity type of the residents (including different identity attributes). This step fully considers the possible action paths of various types of residents in the disaster situation. Then, the model can accurately match this travel log with the geographical entity to generate an initial target location set, which are all set based on the possible travel needs of the residents and the actual geography. On this basis, the model will carefully screen the preliminary set, eliminate those destinations that are inconsistent with the actual situation or logically unreasonable, so as to determine a more accurate travel target location set. Finally, the model can combine the current disaster-affected point information, shelter information, the current location of the residents, and the screened travel destinations (i.e., the travel target location set) to draw the movement trajectory of the residents during the disaster. The embodiments of the present application can achieve accurate prediction of crowd flow in disaster scenarios, thereby improving the quality and efficiency of emergency response during disasters.
[0029] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0030] Reference Figure 1 , Figure 1 1 is a flow chart of a method for generating movement trajectories of people in disaster situations provided by an embodiment of the present application. The method includes but is not limited to steps 110 to 150.
[0031] Step 110: Obtain a set of geographic entities, current disaster-affected point information, current shelter information, and current location information of residents in the area, and input the current disaster-affected point information, current shelter information, current location information, and the set of geographic entities into a pre-trained trajectory generation model;
[0032] Step 120: Generate a travel log of the resident according to the identity type of the resident;
[0033] Step 130: Map the travel log to a set of geographic entities to obtain an initial set of target locations;
[0034] Step 140: Screening the initial target location set to obtain a travel target location set;
[0035] Step 150: Obtain the movement trajectory of residents during the disaster based on the current disaster site information, current shelter information, current location information, and a set of travel destination locations.
[0036] Steps 110 to 150 are described in detail below.
[0037] In a feasible embodiment, the geographic entity set usually includes all points of interest (POI) in the area. Each POI data record carries rich information, including at least a unique identifier (ID) to clearly distinguish each POI; its type information, such as library, Internet company, restaurant, etc., to indicate the basic attributes of the POI; and the name of the POI, which is convenient for users to identify and find. In addition, each POI data also records its precise geographic coordinates, including longitude and latitude, providing the accurate location of the POI on the earth's surface. In addition, the data can also include an introduction to the functional attributes of the POI, such as business hours, facility details, etc. It is worth noting that a user trajectory can usually be represented as a stay at a set of POIs (i.e., a set of places of specific interest). In particular, for an individual identity P and a geographic factor κ, the user's one-day trajectory is represented as χ(P,κ), where κ includes geographic influences such as weather, holidays, and disasters. χ(P,κ)={x 1 ,x 2 ...,x n}, where each x represents a user's stay x i= <l i ,t i ,e i >, where l, t, and e represent a specific POI, the time of movement, and the purpose of travel, respectively. <l 1 ,t 1 ,e 1 >, <l 2 ,t 2 ,e 2 >,..., <l N ,t N ,e N >}.
[0038] In a feasible embodiment, for the selection of disaster-aware points of interest (POI), that is, the selection of places of particular importance when disasters occur or in disaster risk management, a series of key information can be collected to accurately grasp the disaster situation and provide strong support for crowd flow prediction. Specifically, this information mainly covers two aspects: disaster-affected point information and shelter information. The disaster-affected point information needs to record the specific geographical location of the disaster in detail, including precise coordinates such as longitude and latitude, as well as the scope of the disaster, which helps to clarify the affected area and severity of the disaster. At the same time, for different types of disasters (such as earthquakes, floods, fires, etc.), their scope and characteristics may be different. Therefore, relevant information such as the type and level of the disaster can also be collected to more accurately assess its impact on crowd flow. The shelter information mainly includes the geographical coordinates and name of the shelter, which is crucial for determining the safe gathering place of the crowd after the disaster. In addition, the capacity, facility conditions and surrounding traffic conditions of the shelter are also factors that cannot be ignored, which can directly affect the efficiency and safety of crowd flow.
[0039] In a feasible embodiment, based on the information of disaster-affected sites and shelters, the city's population distribution data can be further combined for comprehensive analysis. It can be understood that the population distribution data reveals the population density and distribution of different areas in the city, which is an important basis for inferring the dynamic travel patterns of people in the context of disasters. By integrating these data with the information of disaster-affected sites and shelters, the flow trend of people after a disaster can be more accurately predicted.
[0040] In a feasible embodiment, the set of geographic entities can be obtained from sources such as geographic information system (GIS) data and Open Street Map (OSM). The current disaster-affected point information may include the specific location of the disaster, the scope of impact, the type of disaster, etc. These data may come from disaster monitoring agencies, emergency management departments, or field reports, and these data can be obtained from sources such as disaster monitoring agencies, emergency management departments, and field reports. Current shelter information may include the geographical location, capacity, and facility conditions of the shelter. This information can usually be provided by the emergency management department or relevant agencies. Residents' current location information can be obtained through mobile phone positioning data, social media check-in data, or public transportation card usage records.
[0041] In a feasible embodiment, after obtaining the set of geographical entities in the region, the current disaster-affected point information, the current shelter information and the current location information of the residents, and completing the data sorting and cleaning, the text vector calculation task can be started, and the POI data can be stored in a database suitable for storing vector data (such as Chroma vector database) for subsequent use. Among them, data sorting and cleaning can at least include data deduplication, data format unification, data integrity and accuracy verification, and data missing processing. Text vector calculation can at least include steps such as text preprocessing, vectorization and dimensionality reduction. Specifically, text preprocessing refers to converting information such as the name and type of the POI into a format suitable for vector calculation. This may include steps such as word segmentation, removal of stop words, and stem extraction. Vectorization refers to the use of word embedding technology (such as Word2Vec, BERT, etc.) to convert text data into vector representation. These vectors can capture the semantic relationship between texts. As for dimensionality reduction, if the vector dimension is too high, dimensionality reduction technology (such as PCA, t-SNE, etc.) can be considered to reduce computational complexity and storage space. After these POI data are stored in the Chroma vector database, they can be used for various subsequent operations, such as: Similarity search: Based on the input query vector (such as the current location vector of the resident), similar POI vectors are searched in the database to quickly locate nearby disaster sites, shelters, etc. Spatial analysis: Use the distance relationship between vectors to perform spatial analysis, such as evaluating the distribution of disaster sites, the coverage of shelters, etc. Emergency response decision-making: Combined with other relevant information (such as population distribution, traffic conditions, etc.), provide decision support for emergency response and rescue operations.
[0042] In a possible embodiment, if Figure 2 As shown, the training step of the pre-trained trajectory generation model may include at least steps 210 to 240.
[0043] Step 210: Acquire a travel log data set, and filter the travel log data set to obtain a standard log data set;
[0044] Step 220: construct an initial trajectory generation model, input the standard log data set into the initial trajectory generation model for iterative training, adjust the first parameter of the initial trajectory generation model, and obtain an intermediate trajectory generation model;
[0045] Step 230: Obtain historical disaster-affected site information and historical refuge information in the area;
[0046] Step 240: training the intermediate trajectory generation model according to the historical disaster-affected point information and the historical shelter information, adjusting the second parameter of the intermediate trajectory generation model, and obtaining a pre-trained trajectory generation model.
[0047] In a feasible embodiment, the travel log data set can be used to describe the movement and activity patterns of residents in the city. These data sets can usually contain key information such as the starting point, end point, travel time, and transportation mode of the residents, which can fully reflect the daily travel behavior of the residents. Specifically, by analyzing the starting point and end point information in the travel log data set, the popular travel areas in the city, such as commercial centers, transportation hubs, residential areas, etc., can be determined. For example, if the number of travel starting points and end points in a certain area is high, it means that the area is an important node for residents' daily travel, which may be a commercial center or transportation hub. Combined with the starting point, end point and transportation mode information, the travel path of the residents can be analyzed to understand the main transportation modes and routes chosen by residents in different time periods. For example, during the morning and evening peak hours on weekdays, residents may be more inclined to choose public transportation such as subways or buses, while during non-peak hours, they may choose self-driving or cycling. By analyzing the time information in the travel log data set, the travel frequency and distribution characteristics of residents in different time periods can be understood. For example, in the morning and evening of weekdays, the travel frequency of residents is high, forming obvious morning and evening peaks; while on weekends or holidays, the travel time of residents may be more dispersed. By combining the time, transportation mode and location information in the travel log data set, the types of residents' activities can be identified, such as commuting, shopping, entertainment, etc. For example, if a resident chooses to drive to a shopping mall on a weekend afternoon and stays for a long time, it can be inferred that he is doing shopping activities. By analyzing the time interval and stay time information in the travel log data set, the frequency and duration of residents' different activities can be understood. For example, if a resident chooses to go to the gym to exercise on weekday evenings every week and stays for about 1 hour, it can be inferred that he performs fitness activities once a week, and each time lasts for 1 hour.
[0048] In a feasible embodiment, the method for obtaining a travel log data set may at least include: Public data sets: finding and downloading public data sets related to travel. User-generated data: collecting user-generated travel log data through social media, mobile applications, or online surveys. Synthetic data: using data generation tools (such as GPT-4) or simulation models to generate travel log data.
[0049] In a feasible embodiment, after obtaining the travel log data set, the data can be further filtered, such as removing duplicate, erroneous or incomplete data to ensure data diversity and structure. The filtered data is called the standard log data set, which will be used for subsequent model training.
[0050] In a feasible embodiment, in step 220, a pre-trained large model (such as a Qwen large model with a 7B parameter level) can be used as the initial trajectory generation model. The standard log data set is input into the model for iterative training, and the model is able to learn the characteristics and rules of the travel log data by continuously adjusting the parameters of the model (i.e., the first parameter). After multiple iterative trainings, an intermediate trajectory generation model can be obtained, which has a certain trajectory generation capability.
[0051] In a feasible embodiment, in step 230, historical disaster-affected point information and historical shelter information in the region are crucial for the model to understand travel patterns under disaster scenarios. The disaster-affected point information may include the time, location, type, etc. of the disaster; the shelter information may include the location, capacity, etc. of the shelter.
[0052] In a feasible embodiment, in step 240, the historical disaster site information and historical shelter information are input into the intermediate trajectory generation model as additional context information, and the model parameters (i.e., the second parameters) are adjusted to enable the model to better understand the travel impact under disaster scenarios and stably infer the possible travel patterns of individuals under unconventional situations. After this step of training, a pre-trained trajectory generation model can be obtained, which can not only generate reasonable trajectories under conventional circumstances, but also provide reliable trajectory generation services when dealing with complex disaster scenarios.
[0053] In a feasible embodiment, the pre-trained trajectory generation model can use the POI data in the Chroma vector database. For example, model training: The trajectory generation model usually requires a large amount of historical trajectory data for training. These historical trajectory data may contain POI information visited by users at different time points. During the training process, the model can learn the correlation between POIs and the user's movement pattern. Query POI data: When a new trajectory needs to be generated, the trajectory generation model can query the POI data in the Chroma vector database. Through similarity search or other query methods, the model can find POIs related to given conditions (such as user location, time, interests, etc.). Based on the queried POI data and other relevant information (such as road networks, traffic conditions, etc.), the trajectory generation model can generate a trajectory that meets user needs and movement patterns.
[0054] In a feasible embodiment, the core goal of generating travel logs is to use the pre-trained trajectory generation model to accurately simulate and record the daily activity logs of urban residents, especially their movement paths and activity patterns in the urban space. In the process of generating residents' travel logs according to their identity types, the identity types of residents can be constructed first according to the travel patterns of residents in the area; then the travel intentions of residents are generated based on the identity types, and the travel intentions include travel time, current location, target location and purpose; then the travel intentions are serialized to obtain the travel logs of residents.
[0055] In a feasible embodiment, in the trajectory generation model, given an input x (such as time, weather, etc.), the model can generate a corresponding output y, i.e., a simulated trajectory or activity log, according to its internal algorithm and training data. In this process, the probability p1 of output y (e.g. ) reflects the probability of the model generating y without additional information or conditional constraints. However, in order to more accurately simulate the behavior of urban residents, resident identity types (personas) can be introduced as additional input information. These personas represent different types of residents, such as students, office workers, IT workers, etc., and they have their own unique travel patterns. By introducing differentiated persona distributions, the distribution of the model-generated result y can be affected. At this time, the probability of outputting y can be expressed as P2, where Thereby optimizing the diversity of trajectory patterns. Specifically, when the model receives a specific persona input, it can adjust its generation strategy according to the characteristics of that type of residents. For example, for students, the model may increase the round-trip trajectory between school and home; while for office workers, it may increase the commuting trajectory between residence and office location. This adjustment not only improves the realism of the simulation, but also makes the generated trajectory more in line with the behavioral characteristics of specific user types. In addition, differentiated persona distribution also helps the model generate more diverse trajectory patterns. Even for the same type of resident identity, due to individual differences (such as nature of work, living habits, etc.), the model can generate differentiated trajectories.
[0056] In a feasible embodiment, based on the resident identity type, the trajectory generation model can further generate the resident's travel intention. This travel intention not only includes basic information such as travel time, current location, and planned location, but also clearly points out the purpose of the trip. This process is the result of the model's inference based on multiple factors, including time factors, user types (i.e., resident identity types), and typical activity patterns. Specifically, the model can preset some typical activity patterns based on the resident's identity type (such as students, office workers, IT workers, etc.). For example, students usually go to school in the morning, may stay in school or go home for lunch at noon, and continue to study or participate in extracurricular activities in the afternoon; while office workers usually go from home to the company in the morning, may go out for lunch or stay at the company for lunch at noon, continue to work in the afternoon, and return home in the evening. When generating travel intentions, the model can first narrow down the range of possible travel purposes based on the current time period. For example, around 8 o'clock in the morning, a reasonable travel intention for an office worker may be "8:00-home-company-go to work". The model will infer this intention based on this time point and user type. Similarly, around 12 noon, for the same user type, the model may infer the travel intention of "12:00-company-nearby restaurant-eat at a restaurant near the company".
[0057] It should be noted that the trajectory generation model may face the problem of limited knowledge of specific city geography when generating travel logs. In order to solve this problem and maintain the general adaptability of the model, fuzzy POI (point of interest) can be used. Fuzzy POI refers to those place descriptions that do not point to specific names or locations, but use more abstract and general terms to describe a place or activity area. For example, use "the library in the city center" instead of the specific library name, or use "the nearby cafe" instead of a specific cafe. This description method helps the model to maintain consistency when processing geographical data in different cities and avoid generation bias caused by regional specificity. The benefit of using fuzzy POI is that it allows the model to be more flexible and general when generating travel logs. The model does not need to have an in-depth understanding of every specific place in every city, but can generate reasonable travel logs based on the travel intentions and activity patterns of residents. For example, if the model knows that a resident is a law student and he often goes to the library to read law books during a certain time period, then the model can generate a travel intention such as "go to the library in the city center to read law books" without knowing which specific library it is.
[0058] In a feasible embodiment, a resident's movement and activity patterns throughout the day can be serialized into a series of travel intentions, which together constitute a complete travel log. These logs can record the user's activities at different time nodes in a structured manner, providing a powerful framework support for subsequent POI (point of interest) mapping and trajectory generation. A travel intention can be expressed as (t i ,pos i ,e i ), that is, travel time-destination POI type-travel purpose. A resident's travel log can be an ordered pair consisting of several travel intentions. For example, a resident's travel log can be expressed as <(t1,pos1,e1),(t2,pos2,e2),...,(t n ,pos n ,e n )>.
[0059] In a feasible embodiment, the process of mapping the travel log to the geographic entity set is essentially to convert the travel intention in the travel log into a specific geographic location, thereby obtaining an initial target location set. This process can be refined into the following steps: First, extract the target location of the trip from the travel log. The travel log usually contains at least one travel intention, and each travel intention lists the travel time, current location, planned location (i.e., target location) and travel purpose in detail. With this information, at least one clear target location can be determined. Secondly, determine the location type corresponding to the target location. Each target location has its specific location type, i.e., POI type, such as library, Internet company, restaurant, etc. By carefully analyzing the target location, its corresponding location type can be accurately identified. Finally, according to the location type and the geographic entity set, the initial target location set is obtained. The geographic entity set is a database or set containing various geographic entities (such as POI), which are associated with specific location types. After determining the location type of the target location, the corresponding location can be found in the geographic entity set, and the initial target location set is formed based on these locations.
[0060] In a possible embodiment, if Figure 3 As shown, the specific process of screening the initial target location set to obtain the travel target location set may at least include but is not limited to steps 310 to 350.
[0061] Step 310: vectorize the travel intention to obtain an intention embedding vector;
[0062] Step 320: vectorize the location information to obtain a location embedding vector;
[0063] Step 330: Calculate the cosine similarity between the intent embedding vector and the location embedding vector to obtain a similarity result;
[0064] Step 340: selecting a candidate target location set from the initial target location set according to the similarity result;
[0065] Step 350: According to the current location and the preset balance factor, the candidate target location set is screened to obtain the travel target location set.
[0066] In a feasible embodiment, generally, each element of the travel intention (travel time, current location, planned location, purpose) can be converted into a vector through natural language processing (NLP) technology, such as word embedding, sentence embedding or more complex deep learning models. Correspondingly, location information can also be converted into a structured vector for comparison and analysis with the intention embedding vector.
[0067] In a feasible embodiment, by calculating the cosine similarity between the intention embedding vector and the location embedding vector (e.g., the embedding vector of each POI in the city POI dataset), the matching degree between the travel intention and each location (i.e., the similarity result) can be quantified. Based on these similarity results, a set of candidate target locations can be selected from the initial set of target locations. Specifically, the top k POIs with the highest similarity to the travel intention embedding vector can be selected as the candidate set, where k is a positive integer. The calculation of cosine similarity is shown in formula (1), which can help to quickly and effectively measure the similarity between two vectors:
[0068]
[0069] Among them, v1 represents the intent embedding vector, and v2 represents the location embedding vector. This method can quickly narrow the search scope and ensure that the selected POIs are not only geographically suitable for the needs, but also highly consistent with the travel intention at the semantic level.
[0070] In a possible embodiment, if Figure 4 As shown, the specific process of step 350 may at least include but is not limited to steps 410 and 430.
[0071] Step 410: Calculate the spatial distance between the current location and multiple target travel locations;
[0072] Step 420: scoring multiple target travel locations according to a preset balance factor and spatial distance to obtain a travel score sequence;
[0073] Step 430: Screen the candidate target location set according to the travel score sequence to obtain a travel target location set.
[0074] In a feasible embodiment, step 410 is intended to quantify the actual physical distance between the current position and each potential travel location. Typically, a map API or GPS data can be used to accurately calculate the straight-line distance or driving distance from the current position to each target travel location.
[0075] In a feasible embodiment, after calculating the spatial distances between the current location and multiple target travel locations, these spatial distances can be screened. During the screening process, a reasonable distance threshold can be set according to actual needs. Only those target travel locations whose distances from the current location are within the threshold range will be included in the subsequent consideration range. Those target travel locations that are too remote or inconvenient to reach are effectively excluded, thereby improving the practicality and accuracy of the screening results.
[0076] In a feasible embodiment, after obtaining the spatial distance information, a comprehensive scoring mechanism can be used to evaluate the suitability of each travel location (POI). Specifically, a preset balance factor can be introduced, which can be used to balance the semantic match and the spatial distance. By combining the spatial distance with the balance factor, a comprehensive travel score can be calculated for each target travel location. In this way, a sequence sorted by travel score can be obtained, which provides a basis for subsequent screening steps. As shown in formula (2), the formula can be used to calculate the total score (Total Score) of a point of interest (POI), which comprehensively considers the semantic score (semant icscore) and the distance (di stance) from the current location.
[0077]
[0078] Among them, β is a balancing factor used to balance the contribution of semantic score and distance score. The value range of β is usually between 0 and 1. If β is close to 1, it means that the semantic score contributes more to the total score; if β is close to 0, it means that the distance score contributes more to the total score. semanticscore is the semantic score of the point of interest, which is usually calculated by a semantic analysis algorithm based on the text information such as the name and category of the point of interest. (1-β) is the balancing factor of the distance score, which complements β to ensure that the total weight of the two factors is 1. 1 / division(current_location,POI_location): is the calculation method of the distance score. Here, the reciprocal of the distance is used to represent the score, which means that the closer the distance, the higher the score. distance(current_location,POI_location) represents the actual distance between the current location (current_location) and the location of the point of interest (POI_location).
[0079] In a feasible embodiment, after calculating the travel score of each target travel location and obtaining a travel score sequence, a score threshold can be set to include the locations above the threshold into the final set of travel target locations. In addition, if the number of travel targets is limited, several locations with high scores can also be selected as the final travel targets.
[0080] In a feasible embodiment, based on the details of the current disaster site, the information of the existing shelters, the current location of the residents, and the pre-screened travel target location set, the movement trajectory of the residents during the disaster can be determined. This process can include the following two key steps: Step 1: Combine the severity of the current disaster site, the capacity and location distribution of the shelter, and the current location information of the residents, and select the most suitable shelter or safe place from the travel target location set as the target location. Step 2: Once the target location is determined, the current location information and the location of the target location can be further used to plan one or more feasible disaster resident movement paths, which are designed to ensure that residents can reach the target location safely and efficiently.
[0081] In a feasible embodiment, when obtaining the movement trajectory of residents during a disaster based on the target location and current location information, first, an advanced path planning algorithm is used to combine the geographic information of the target location and the current location of the residents to calculate a series of possible movement paths to form a path set. These path planning algorithms can comprehensively consider road conditions, obstacle distribution, traffic rules, and the possible impact of disasters to ensure the feasibility and safety of the selected path. Then, the path that best suits the current disaster situation and residents' needs is selected from the calculated path set as the target path. Ultimately, the determined target path will be regarded as the movement trajectory of residents during a disaster, providing residents with clear evacuation or refuge guidance to help them reach the designated target location safely and quickly.
[0082] Reference Figure 5 The embodiment of the present application also discloses an electronic device, which includes: at least one processor 510; at least one memory 520, used to store at least one program; when the at least one program is executed by the at least one processor 510, the method for generating the movement trajectory of the crowd during a disaster as described above can be implemented.
[0083] The embodiment of the present application also discloses a computer-readable storage medium, which stores a computer program executable by a processor. When the computer program executable by the processor is executed by the processor, the method for generating movement trajectories of people in disaster situations as described above can be implemented.
[0084] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating movement trajectories of people during disasters, characterized in that: include: Obtaining a set of geographical entities, current disaster-affected point information, current shelter information, and current location information of residents in the area, and inputting the current disaster-affected point information, the current shelter information, the current location information, and the set of geographical entities into a pre-trained trajectory generation model; Generating a travel log of the resident according to the identity type of the resident; Mapping the travel log to the set of geographic entities to obtain an initial target location set; Screening the initial target location set to obtain a travel target location set; The movement trajectory of residents during the disaster is obtained according to the current disaster-affected point information, the current shelter information, the current location information and the travel target location set.
2. The method for generating movement trajectories of people in disaster situations according to claim 1, characterized in that: The training steps of the pre-trained trajectory generation model include: Acquire a travel log data set, and filter the travel log data set to obtain a standard log data set; constructing an initial trajectory generation model, inputting the standard log data set into the initial trajectory generation model for iterative training, adjusting a first parameter of the initial trajectory generation model, and obtaining an intermediate trajectory generation model; Obtaining historical disaster site information and historical refuge information within the area; The intermediate trajectory generation model is trained according to the historical disaster-affected point information and the historical refuge information, and the second parameter of the intermediate trajectory generation model is adjusted to obtain a pre-trained trajectory generation model.
3. The method for generating movement trajectories of people in disaster situations according to claim 1, characterized in that: The step of generating a travel log of the resident according to the identity type of the resident includes: constructing resident identity types based on the travel patterns of residents within the area; generating the travel intention of the resident based on the identity type, the travel intention including travel time, current location, target location and purpose; The travel intention is serialized to obtain the travel log of the resident.
4. The method for generating movement trajectories of people in disaster situations according to claim 1, characterized in that: Mapping the travel log to the geographic entity set to obtain an initial target location set includes: Extracting a destination location of a trip from the trip log; Determining a location type corresponding to the target location; An initial target location set is obtained according to the location type and the geographic entity set.
5. The method for generating movement trajectories of people in disaster situations according to claim 3, characterized in that: The geographic entity set includes a plurality of location information; the initial target location set is screened to obtain a travel target location set, including: Vectorizing the travel intention to obtain an intention embedding vector; Vectorizing the location information to obtain a location embedding vector; Calculating the cosine similarity between the intention embedding vector and the location embedding vector to obtain a similarity result; According to the similarity result, selecting a candidate target location set from the initial target location set; The candidate target location set is screened according to the current location and a preset balance factor to obtain a travel target location set.
6. The method for generating movement trajectories of people in disaster situations according to claim 5, characterized in that: The candidate target location set includes a plurality of target travel locations; The step of screening the candidate target location set according to the current location and the preset balance factor to obtain a travel target location set includes: Calculating the spatial distance between the current location and a plurality of the target travel locations; Scoring the plurality of target travel locations according to the preset balance factor and the spatial distance to obtain a travel score sequence; The candidate target location set is screened according to the travel score sequence to obtain a travel target location set.
7. The method for generating movement trajectories of people in disaster situations according to claim 1, characterized in that: The step of obtaining the movement trajectory of residents during a disaster according to the current disaster-affected point information, the current shelter information, the current location information and the set of travel destination locations includes: Determining a target location from the set of travel target locations according to the current disaster-affected point information, the current shelter information, and the current location information; The movement trajectory of residents during a disaster is obtained based on the target location and the current location information.
8. The method for generating movement trajectories of people in disaster situations according to claim 7, characterized in that: The step of obtaining the movement trajectory of residents during a disaster according to the target location and the current location information includes: Calculate a path set of the target location and the current location information according to a path planning algorithm; A target path is selected from the path set as the movement trajectory of residents during disasters.
9. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the method for generating movement trajectories of people in disaster situations as described in any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium, characterized in that: A computer program executable by a processor is stored therein, and when the computer program executable by the processor is executed by the processor, it is used to implement the method for generating the movement trajectory of people in disaster situations as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Rapid calculation method for crowd distribution and evacuation route planning
CN114330855A
Spatial layout optimization method and system for aging community shelter
CN117333344A
Cited By
Flood disaster population exposure calculation method and system based on spatial constraint
CN121882484A