Nothing Special   »   [go: up one dir, main page]

CN117332033A - Space-time track generation method and device, computer equipment and storage medium - Google Patents

Space-time track generation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN117332033A
CN117332033A CN202311289086.XA CN202311289086A CN117332033A CN 117332033 A CN117332033 A CN 117332033A CN 202311289086 A CN202311289086 A CN 202311289086A CN 117332033 A CN117332033 A CN 117332033A
Authority
CN
China
Prior art keywords
space
time
track data
data
generation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311289086.XA
Other languages
Chinese (zh)
Other versions
CN117332033B (en
Inventor
刘康
曹中才
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Institute of Advanced Technology of CAS
Original Assignee
Shenzhen Institute of Advanced Technology of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Institute of Advanced Technology of CAS filed Critical Shenzhen Institute of Advanced Technology of CAS
Priority to CN202311289086.XA priority Critical patent/CN117332033B/en
Publication of CN117332033A publication Critical patent/CN117332033A/en
Application granted granted Critical
Publication of CN117332033B publication Critical patent/CN117332033B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/2433Single-class perspective, e.g. one-against-all classification; Novelty detection; Outlier detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • G06N3/0455Auto-encoder networks; Encoder-decoder networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0475Generative networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/094Adversarial learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Remote Sensing (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Train Traffic Observation, Control, And Security (AREA)

Abstract

The application relates to a space-time trajectory generation method, a space-time trajectory generation device, computer equipment and a storage medium. The method comprises the following steps: acquiring real urban track data in a research area, and performing multi-space scale division and preprocessing on the urban track data to generate a travel track sequence; carrying out embedded representation and position coding on the travel track sequence, and extracting space-time information of the travel track sequence by adopting a transducer model; inputting the space-time information of the travel track sequence into a generation countermeasure network, and generating multi-scale space-time track data through the generation countermeasure network; the multi-scale space-time track data comprises space-time track data at a street level and space-time track data at a community level. The method and the device can capture individual travel characteristics, enable the generated space-time track data to be more in line with daily travel modes of human beings, and enable the generated space-time track data to be more continuous.

Description

Space-time track generation method and device, computer equipment and storage medium
Technical Field
The application belongs to the technical field of geographic information systems, and particularly relates to a space-time track generation method, a space-time track generation device, computer equipment and a storage medium.
Background
The travel track of human daily activities can be defined as a time sequence t= [ x ] 1 ,x 2 ,...,x n ]Wherein x is i Is defined as a space-time point tuple (t i ,l i ),t i Represented at x i Timestamp of where, l i A real travel track may reflect the behavior characteristics and travel patterns of a person, representing the longitude and latitude coordinates (lat, lon) or the regional grid ID of the i-th location.
An individual trajectory generation problem can be defined as t= [ x ] given a real world trajectory dataset 1 ,x 2 ,...,x n ]Generating a synthetic track conforming to human mobility through a generating model GThe process of trajectory generation may be considered a markov decision process. The state being defined by the location x which has been reached currently 1:i The action is the position of the next track point generated, the agent is the generated model G, and the modeling can be performed through the following formula:
where θ is a parameter of the generated model G.
The current track generation problem research mainly comprises two schemes. The first scheme is a mechanism model for modeling according to human mobility rules such as space continuity, time periodicity and the like, and the model discovers implicit statistical rules by quantitatively counting a large number of human space-time behavior events, and further proposes a mechanism assumption for modeling an individual movement process. However, the mode of considering spatial heterogeneity and spatial correlation by the spatial selection behavior mechanism in the current mechanism model is limited to population distribution and distance attenuation, is too abstract and simple, does not better describe the influence of a complex geographic environment on the individual moving process and man-ground interaction relationship, and cannot better capture the complex nonlinear relationship in the track data. In order to solve the deficiency of the first scheme, with the rising of the machine learning field in recent years, a second modeling scheme is derived, namely, capturing the law which is difficult to observe and search in the human mobility by using the deep neural network. In current research, most schemes solve such problems by generating a countermeasure network (Generative Adversarial Network, GAN) or a variational self-encoder (Variational Autoencoders, VAE), and generating synthetic trajectory data with the same distribution as the real data on a statistical level by learning the distribution in the real data using a deep neural network. However, this approach does not learn a priori knowledge in the mobility of the human population, resulting in a low quality of the generated trajectories. Although studies have been made to inject a priori knowledge into models, sampling by neural networks learning the distribution of real data, the trajectories generated in this way are difficult to conform to the human daily travel patterns.
Disclosure of Invention
The present application provides a space-time trajectory generation method, apparatus, computer device and storage medium, which aim to solve at least one of the above technical problems in the prior art to a certain extent.
In order to solve the above problems, the present application provides the following technical solutions:
a method of spatio-temporal trajectory generation, comprising:
obtaining real urban track data in a research area, and carrying out multi-space scale division and preprocessing on the urban track data to generate a travel track sequence containing street IDs, community IDs and individual activity types;
carrying out embedded representation and position coding on the travel track sequence, and extracting space-time information of the travel track sequence by adopting a transducer model;
inputting the space-time information of the travel track sequence into a generation countermeasure network, and generating multi-scale space-time track data through the generation countermeasure network; the multi-scale space-time track data comprises space-time track data at a street level and space-time track data at a community level.
The technical scheme adopted by the embodiment of the application further comprises: the urban track data format is [ longitude, latitude and timestamp t ], the real urban track data in the research area is obtained, and the urban track data is subjected to multi-space scale division and preprocessing specifically comprises the following steps:
spatially dividing the research area into space units with two granularities, namely a street level and a community level;
and marking the individual activity sites according to a set time period for each piece of urban track data, classifying the individual activity types according to a marking result, generating an individual activity type sequence corresponding to each piece of urban track data, and representing each piece of urban track data as a travel track sequence which has a set time interval and comprises a street ID, a community ID and the individual activity types.
The technical scheme adopted by the embodiment of the application further comprises: the individual activity types are classified according to the marking result, and the individual activity type sequence corresponding to each piece of urban track data is specifically generated by:
based on daily activity rules, the activity sites of the individuals in different time periods are respectively marked as residence sites, work sites or other sites, the individual activity types corresponding to the residence sites are marked as 'home (H)', and the individual activity types corresponding to the work sites are marked as 'work (W)'; if the work site and the living site are located in the same space unit, the individual activity type sequence is "home", individual activity types other than "home (H)" and "work (W)" are marked as "other", and "other" activity types of the same individual at different sites are marked as "other 1", "other 2", according to the activity occurrence time.
The technical scheme adopted by the embodiment of the application further comprises: the travel track sequence is subjected to embedded representation and position coding, and a transducer model is adopted to extract the space-time information of the travel track sequence, which is specifically as follows:
the method comprises the steps of taking four data of a time stamp t, an individual activity type, a street ID and a community ID as input data of an encoder, respectively extracting space-time information of the four input data through four different embedding layers to obtain four embedded vectors, combining the four embedded vectors to obtain dense vector representation e of the space-time information i As input data for the transducer model:
wherein j represents four kinds of input data in turn, e i Representing a vector representation generated at an ith point;
vector representation e using sine and cosine functions i Performing position coding, wherein the embedded vector after the position coding is expressed asThe embedded vector after the position coding is input into a transducer model for space-time information extraction, and the space-time information extraction process is expressed as follows:
in the above formula, W T Is a parameter matrix which can be learned in a transducer model, and T (·) is an Encoder function representation of the transducer model.
The technical scheme adopted by the embodiment of the application further comprises: the method for generating the multi-scale space-time track data comprises the steps of inputting the space-time information of the travel track sequence into a generation countermeasure network, and before generating the multi-scale space-time track data through the generation countermeasure network, further comprises the following steps:
inputting the space-time information of the travel track sequence to generate an countermeasure network for pre-training; wherein the generating an countermeasure network comprises a generator and a arbiter, and the generating a pre-training of the countermeasure network comprises a generator pre-training and a arbiter pre-training;
the generator pre-training process includes: the method comprises the steps that a task of next track point prediction is used, consistency of space-time track data generated by a generator and real urban track data is compared to pretrain the generator, in the pretraining process, the generator performs space-time track data generation in a multitask training mode, firstly generates individual activity types, then performs space-time track data generation on a street level and space-time track data generation on a community level respectively through the individual activity types, simultaneously trains three generation tasks of the individual activity types, the space-time track data on the street level and the space-time track data on the community level through NLL loss functions, performs gradient updating on the three training tasks respectively, and strengthens space-time constraint of the data generation process;
the discriminant pre-training process includes: designing a classification task pre-training discriminator, respectively marking true and false labels on the real urban track data and the space-time track data generated by the generator, taking the marked data as the input of the discriminator, taking the true and false labels as the output of the discriminator to pre-train the discriminator, and optimizing the discriminator through an NLL loss function.
The technical scheme adopted by the embodiment of the application further comprises: after the time-space information of the travel track sequence is input to generate the countermeasure network for pre-training, the method further comprises the following steps:
and inputting the space-time information of the travel track sequence into the pre-trained generated countermeasure network to perform countermeasure training, and optimizing the generated countermeasure network by using a space consistency loss function to obtain the trained generated countermeasure network.
The technical scheme adopted by the embodiment of the application further comprises: the countermeasure training of the generated countermeasure network includes a generator countermeasure training and a discriminator countermeasure training, the generator countermeasure training process includes: the space-time track data generation process of the generator is regarded as a Markov decision process, the generator is regarded as an agent, and the generator is updated by utilizing a strategy gradient according to a REINFORCE algorithm in the antagonism training process:
wherein x is state, that is, space-time trajectory data generated by the current generator, R (x) is a loss function of the countermeasure training stage, θ is a parameter of the generator G, and the parameter is a gradient according to a strategyBy->The parameters θ of the generator are updated, where η is the learning rate.
The embodiment of the application adopts another technical scheme that: a space-time trajectory generation device, comprising:
and a data acquisition module: the method comprises the steps of obtaining real urban track data in a research area, performing multi-space scale division and preprocessing on the urban track data, and generating a travel track sequence containing street IDs, community IDs and individual activity types;
and the information extraction module is used for: the method comprises the steps of carrying out embedded representation and position coding on the travel track sequence, and extracting space-time information of the travel track sequence by adopting a transducer model;
the track generation module: the method comprises the steps of inputting space-time information of the travel track sequence into a generation countermeasure network, and generating multi-scale space-time track data through the generation countermeasure network; the multi-scale space-time track data comprises space-time track data at a street level and space-time track data at a community level.
The embodiment of the application adopts the following technical scheme: a computer device comprising a processor, a memory coupled to the processor, wherein,
the memory stores program instructions for implementing the spatiotemporal track generation method;
the processor is configured to execute the program instructions stored by the memory to control a spatiotemporal trajectory generation method.
The embodiment of the application adopts the following technical scheme: a storage medium storing program instructions executable by a processor for performing the spatiotemporal trajectory generation method.
Compared with the prior art, the beneficial effect that this application embodiment produced lies in: according to the space-time track generation method, the space-time track generation device, the computer equipment and the storage medium, the individual activity types are classified, and then the space-time track data are generated according to the individual activity types, so that the individual travel characteristics can be captured, and the generated space-time track data are more in line with the daily travel mode of human beings. In the space-time track data generation process, space-time track data are generated on a larger street level by utilizing a multi-space scale generation mode, and then the space-time track data are generated on a smaller community level according to the space-time track data on the street level, so that the generated space-time track data have continuity. In the space-time track data generation process, space constraint is enhanced through a space consistency loss function, so that the space consistency in the space-time track data generation process is ensured, and the generated space-time track data is more real.
Drawings
FIG. 1 is a flow chart of a spatiotemporal trajectory generation method of a first embodiment of the present application;
FIG. 2 is a flow chart of a spatiotemporal trajectory generation method of a second embodiment of the present application;
FIG. 3 is a graph of a street-level and community-level demographics divided by multiple spatial scales, where (a) is a street-level demographics and (b) is a community-level demographics, in an embodiment of the present application;
FIG. 4 is a schematic diagram of a transducer model structure according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a space-time trajectory generation device according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a computer device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a storage medium according to an embodiment of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The terms "first," "second," "third," and the like in this application are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first", "a second", and "a third" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise. All directional indications (such as up, down, left, right, front, back … …) in the embodiments of the present application are merely used to explain the relative positional relationship, movement, etc. between the components in a particular gesture (as shown in the drawings), and if the particular gesture changes, the directional indication changes accordingly. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or computer apparatus that comprises a list of steps or elements is not limited to the list of steps or elements but may, in the alternative, include steps or elements not expressly listed or inherent to such process, method, article, or computer apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
Referring to fig. 1, a flowchart of a space-time trajectory generation method according to a first embodiment of the present application is shown. The space-time trajectory generation method of the first embodiment of the present application includes the following steps:
s100: obtaining real urban track data in a research area, and carrying out multi-space scale division and preprocessing on the urban track data to generate a travel track sequence containing street IDs, community IDs and individual activity types;
s110: carrying out embedded representation and position coding on the travel track sequence, and extracting space-time information of the travel track sequence by adopting a transducer model;
s120: inputting the space-time information of the travel track sequence into a generation countermeasure network, and generating multi-scale space-time track data through the generation countermeasure network; the multi-scale space-time track data comprises space-time track data at a street level and space-time track data at a community level.
Referring to fig. 2, a flowchart of a space-time trajectory generation method according to a second embodiment of the present application is shown. The space-time trajectory generation method of the second embodiment of the present application includes the steps of:
s200: obtaining real urban track data in a research area, and carrying out multi-space scale division and preprocessing on the urban track data to generate a travel track sequence containing street IDs, community IDs and individual activity types;
in this step, the acquired urban track data format is [ longitude, latitude, timestamp t ], and the multi-space scale division and preprocessing process for the urban track data comprises:
s201: spatially dividing a research area into space units with two granularities, namely a street level and a community level; specifically, as shown in fig. 3, the population distribution diagrams at the street level and the community level after the multi-space scale division in the embodiment of the present application are shown, where (a) is the population distribution at the street level, and (b) is the population distribution at the community level.
S202: for each piece of urban track data, marking an individual Activity place according to a set Time period, classifying individual Activity types according to a marking result, generating an individual Activity Type sequence of each piece of urban track data, and representing each piece of urban track data as a travel track sequence which has a set Time interval (Time Slot) and comprises streets ID (Township ID), communities ID (Community ID) and individual Activity types (Activity types) as shown in the following table 1; the individual activity type classification mode is as follows: based on the daily activity law, the activity sites of the individuals in different time periods are respectively marked as residence sites, work sites or entertainment and the like, the individual activity types corresponding to the residence sites are marked as 'home (H)', the individual activity types corresponding to the work sites are marked as 'work (W)', and if the work sites and the residence sites are located in the same space unit, the individual activity type sequence is identified as 'home' type. For example, an activity location where an individual has a longest stay during a set period of time 21:00 to 6:00 the next day is marked as a residential location, and the corresponding individual activity type is marked as "home (H)"; the unoccupied location where the individual has the longest residence time during the set period of time 9:00 to 18:00 is marked as the work location, and the corresponding individual activity type is marked as "work (W)". Because other activity types such as shopping and entertainment are difficult to accurately identify from urban track data, for convenience of distinction, the embodiment of the application marks the activity types of individuals except for 'home (H)' and 'work (W)' as 'other', and marks 'other' activity types of the same individual at different places as 'other 1 (O1)', 'other 2 (O2)' and the like according to the activity occurrence time.
TABLE 1 travel track sequence example
The Time interval (Time Slot) is set to 1 hour in the embodiment of the present application, and may be specifically set according to an actual application scenario.
S210: carrying out embedded representation and position coding on the travel track sequence, and extracting space-time information of the travel track sequence by adopting a transducer model;
in this step, the present application is performed in order to capture the complex transformation law in human mobilityFor example, an Encoder in a transducer model is used to extract the temporal and spatial information in the travel track sequence. Specifically, fig. 4 is a schematic structural diagram of a transducer model according to an embodiment of the present application. The embedded representation based on the transducer model is specifically: firstly, taking four data of a time stamp t, an individual activity type a, a street ID s and a community IDc as input data, and respectively extracting space-time information of the four data through four different embedding layers to obtain four embedding vectors; then, combining the four embedded vectors to obtain a dense vector representation e of the space-time information i As input data for Transformer Encoder:
wherein j represents four kinds of input data in turn, e i Representing the vector representation generated at the i-th point.
Because there is no recursive operation in the transducer model, the spatiotemporal information in the travel track sequence cannot be identified. Thus, as shown in FIG. 4, the vector is represented as e i Before inputting Transformer Encoder, the vector needs to be represented e i And performing position coding. The embodiment of the application adopts a sine and cosine function to represent the vector e i Position-coding the embedded vectorAnd (3) representing. Finally, the embedded vector after the position coding is input into Transformer Encoder for space-time information extraction, and the space-time information extraction process can be expressed as follows:
in the formula (3), W T For a matrix of parameters that can be learned in a transducer model, T (-) is the representation of the Encoder function of the transducer model, and features can be extracted from the embedded vectors of the historical track data.
S220: inputting the space-time information of the travel track sequence into a generated countermeasure network for pre-training, and generating space-time track data through the generated countermeasure network;
in this step, as shown in fig. 4, the generating countermeasure network includes two parts, namely a Generator (Generator) and a Discriminator (Discriminator), and in this embodiment of the present application, the Generator and the Discriminator are respectively pre-trained to ensure that they have basic generating and discriminating capabilities. Specifically, in the embodiment of the present application, the Encoder of the transducer model is used as a generator, and the pre-training process of the generator includes: the next task of track point prediction is used to pretrain the generator by comparing the consistency of the generated spatio-temporal track data and the real urban track data. In the pre-training process, the generator adopts a multi-task training mode to generate space-time track data, firstly generates an individual Activity Type (Activity Type), and then respectively generates space-time track data at a street level (Townshift) and space-time track data at a Community level (Community) through the individual Activity Type. And training three generation tasks of space-time track data of an individual Activity Type (Activity Type), a street level (Townshift) and space-time track data of a Community level (Community) through NLL (Negative Log Likelihood Loss) loss function, and respectively carrying out gradient update on the three training tasks to strengthen space-time constraint of a data generation process.
As shown in fig. 4, in the embodiment of the present application, a convolutional neural network (Convolutional Neural Network, abbreviated as CNN) is used as a discriminator for discriminating the authenticity of data. Specifically, the discriminant pre-training process includes: designing a two-classification task pre-training discriminator, respectively marking real urban locus data and space-time locus data generated by a generator with true and false labels, wherein the real urban locus data is marked as 1, the space-time locus data generated by the generator is marked as 0, the marked data is used as the input of the discriminator, the true and false labels are used as the output of the discriminator to pre-train the discriminator, namely, the discriminator is true and false, namely, the discriminator is output as 0, and the discriminator is optimized through an NLL loss function.
S230: inputting the space-time information of the travel track sequence into the pre-trained generated countermeasure network to perform countermeasure training, generating space-time track data through the generated countermeasure network, and optimizing the generated countermeasure network by utilizing a space consistency loss function to obtain a trained generated countermeasure network;
in this step, the countermeasure training for generating the countermeasure network includes two parts of a generator countermeasure training and a discriminator countermeasure training, wherein the generator countermeasure training process includes: the space-time trajectory data generation process of the generator is regarded as a markov decision process (Markov Decision Process, abbreviated as MDP), and the generator is regarded as an agent. During countermeasure training, the generator is updated with a policy gradient following the REINFORCE algorithm:
where x is the state, that is, the spatiotemporal trajectory data generated by the current generator, R (x) is the loss function of the countermeasure training phase, θ is the parameter of generator G. According to the policy gradientBy->The parameters θ of the generator are updated, where η is the learning rate.
In the generator countermeasure training stage, the embodiment of the application creatively designs a space consistency Loss function (Spatial Consistency Loss) to constrain a multi-scale generation process besides using a sequence Loss function (Sequential Loss) for evaluating generated space-time track data by a discriminator so as to ensure the authenticity of multi-space scale generation. Specifically, a street contains a plurality of communities, and a corresponding community also corresponds to a street, and based on this rule, the embodiment of the present application establishes { community id: street id dictionary by which community-to-street mappings are queried. In the multitasking process, the generator can generate space-time track data of street levelAnd space-time trajectory data at community level +.>Reverse query of street level locus s 'in a real map corresponding to space-time locus data of a community level through a dictionary' 1:n By comparison of s' 1:n And->Obtaining inconsistent quantity of the two, taking the inconsistent quantity as a space consistency loss function, wherein the purpose is to ensure that communities are contained in correct streets in the real world, thereby ensuring space consistency in the multi-space-scale generation process, and the method is expressed as follows:
wherein n is the length of the spatiotemporal trace data generated by the generator, C m (. Cndot.) is used to determine whether the street mapping by the dictionary is consistent with the generated street label.
The discriminant countermeasure training method is identical to the discriminant pre-training method in S220, and is not described here again to avoid redundancy.
S240: performing quality evaluation on space-time track data generated by the generated countermeasure network;
in this step, the generated countermeasure network in the embodiment of the present application is compared with four models of DITRAS, LSTM, seqGAN and Movesim, so as to perform quality evaluation on the spatiotemporal trajectory data generated by the generated countermeasure network. Among them, DITRAS is a computational model for analyzing human mobility and behavior, designed to extract and identify individual trajectories and movement behavior patterns from large-scale location data, and reveal human mobility characteristics. LSTM is a special recurrent neural network (Recurrent Neural Network, RNN for short) for processing and predicting time series data. SeqGAN provides an innovative framework for sequence data generation by combining generation of a antagonism network (GAN) with reinforcement learning (Reinforcement Learning, RL for short) to enable discrete data generation by the GAN. Movesim is a combination of a priori knowledge of demographics and human mobility rules with SeqGAN.
Specifically, when the quality evaluation of the space-time track data is performed, whether the whole distribution of the space-time track data generated by the model and the real urban track data is consistent is mainly compared. In the embodiment of the application, five indexes capable of reflecting the human mobility pattern, namely the waiting time, the radius of gyration, the moving step length, the I-rank and the G-rank, are adopted to carry out quality evaluation on the generated space-time track data, and specifically:
waiting time: since both the training data and the generated data are equally spaced, the waiting time Δt is not intuitively a time interval before two consecutive points, but is equivalent to a time consumption at the same location.
Radius of gyration: used to describe the range of movement or radius of action of an individual in a daily activity, indicates how often an individual is doing an activity, travel, or social interaction.
Moving step length: expressed as the distance or spatial extent covered by two consecutive points of the individual during movement.
I-rank: the position of the individual in the whole population is measured based on the characteristics and behaviors of the living place, the trip distance, the moving frequency and the like of the individual, and the individual is ranked or graded according to the position or the moving behavior of the individual in the space.
G-rank: is an indicator of ranking or ranking different populations according to their distribution or fluidity in space. It focuses on collective behavior and characteristics of the entire population, such as population density in different areas, size and direction of crowd flow, etc.
The similarity between the test set and the generated space-time track data set is measured by calculating the KL divergence of the five indexes, so that the quantized result can be intuitively seen. The KL divergence calculation formula is as follows:
where P (x) represents the distribution of test set data, Q (x) represents the distribution of the generated spatiotemporal trajectory data set, the KL divergence is typically non-negative, and the closer the KL divergence value is to 0, the closer Q (x) is to P (x).
As shown in table 2 below, for comparing the performance of the generated challenge network with the four models described above, the smaller the index value, the better, the bolded indicates the best performance among the five models, and the underlined indicates the suboptimal performance among the five models:
TABLE 2 comparison of the performance of the examples of the present application with four models
As can be seen from Table 2, the generation countermeasure network of the embodiment of the present application is superior to the other four models in terms of four indexes of waiting time, turning radius, moving step length and I-rank, and G-rank is inferior to LSTM, and the effect is suboptimal.
Based on the above, the space-time track generation method in the embodiment of the application classifies the individual activity types, and then generates space-time track data according to the individual activity types, which is helpful for capturing individual travel characteristics, so that the generated space-time track data more accords with the daily travel mode of human beings. In the space-time track data generation process, space-time track data are generated on a larger street level by utilizing a multi-space scale generation mode, and then the space-time track data are generated on a smaller community level according to the space-time track data on the street level, so that the generated space-time track data have continuity. In the space-time track data generation process, space constraint is enhanced through a space consistency loss function, so that the space consistency in the space-time track data generation process is ensured, and the generated space-time track data is more real.
Fig. 5 is a schematic structural diagram of a space-time trajectory generation device according to an embodiment of the present application. The spatiotemporal trajectory generation device 40 of the embodiment of the present application includes:
data acquisition module 41: the method comprises the steps of obtaining real urban track data in a research area, performing multi-space scale division and preprocessing on the urban track data, and generating a travel track sequence containing street IDs, community IDs and individual activity types;
information extraction module 42: the method comprises the steps of carrying out embedded representation and position coding on the travel track sequence, and extracting space-time information of the travel track sequence by adopting a transducer model;
the trajectory generation module 43: the method comprises the steps of inputting space-time information of the travel track sequence into a generation countermeasure network, and generating multi-scale space-time track data through the generation countermeasure network; the multi-scale space-time track data comprises space-time track data at a street level and space-time track data at a community level.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein again.
The device provided in the embodiment of the present application may be applied to the foregoing method embodiment, and details refer to descriptions of the foregoing method embodiment, which are not repeated herein.
Fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer device 50 includes:
a memory 51 storing executable program instructions;
a processor 52 connected to the memory 51;
the processor 52 is configured to call the executable program instructions stored in the memory 51 and perform the steps of: obtaining real urban track data in a research area, and carrying out multi-space scale division and preprocessing on the urban track data to generate a travel track sequence containing street IDs, community IDs and individual activity types; carrying out embedded representation and position coding on the travel track sequence, and extracting space-time information of the travel track sequence by adopting a transducer model; inputting the space-time information of the travel track sequence to generate an countermeasure network, and generating multi-scale space-time track data through the countermeasure network; the multi-scale space-time track data comprises space-time track data at a street level and space-time track data at a community level.
The processor 52 may also be referred to as a CPU (Central Processing Unit ). The processor 52 may be an integrated circuit chip having signal processing capabilities. Processor 52 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Fig. 7 is a schematic structural diagram of a storage medium according to an embodiment of the present application. The storage medium of the embodiment of the present application stores program instructions 61 capable of implementing the steps of: obtaining real urban track data in a research area, and carrying out multi-space scale division and preprocessing on the urban track data to generate a travel track sequence containing street IDs, community IDs and individual activity types; carrying out embedded representation and position coding on the travel track sequence, and extracting space-time information of the travel track sequence by adopting a transducer model; inputting the space-time information of the travel track sequence to generate an countermeasure network, and generating multi-scale space-time track data through the countermeasure network; the multi-scale space-time track data comprises space-time track data at a street level and space-time track data at a community level. The program instructions 61 may be stored in the storage media mentioned above in the form of a software product, and include several instructions for making a computer device (which may be a personal computer, a server, or a network computer device, etc.) or a processor (processor) execute all or part of the steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, an optical disk, or other various media capable of storing program instructions, or a terminal computer device such as a computer, a server, a mobile phone, a tablet, or the like. The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the system embodiments described above are merely illustrative, e.g., the partitioning of elements is merely a logical functional partitioning, and there may be additional partitioning in actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not implemented. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units. The foregoing is only the embodiments of the present application, and not the patent scope of the present application is limited by the foregoing description, but all equivalent structures or equivalent processes using the contents of the present application and the accompanying drawings, or directly or indirectly applied to other related technical fields, which are included in the patent protection scope of the present application.

Claims (10)

1. A method of generating a spatio-temporal trajectory, comprising:
obtaining real urban track data in a research area, and carrying out multi-space scale division and preprocessing on the urban track data to generate a travel track sequence containing street IDs, community IDs and individual activity types;
carrying out embedded representation and position coding on the travel track sequence, and extracting space-time information of the travel track sequence by adopting a transducer model;
inputting the space-time information of the travel track sequence into a generation countermeasure network, and generating multi-scale space-time track data through the generation countermeasure network; the multi-scale space-time track data comprises space-time track data at a street level and space-time track data at a community level.
2. The space-time trajectory generation method according to claim 1, wherein the urban trajectory data format is [ longitude, latitude, time stamp t ], the acquiring real urban trajectory data in the research area, and the performing multi-spatial scale division and preprocessing on the urban trajectory data specifically comprises:
spatially dividing the research area into space units with two granularities, namely a street level and a community level;
and marking the individual activity sites according to a set time period for each piece of urban track data, classifying the individual activity types according to a marking result, generating an individual activity type sequence corresponding to each piece of urban track data, and representing each piece of urban track data as a travel track sequence which has a set time interval and comprises a street ID, a community ID and the individual activity types.
3. The space-time trajectory generation method according to claim 2, wherein the classifying the individual activity types according to the marking result, and generating the individual activity type sequence corresponding to each piece of urban trajectory data specifically comprises:
based on daily activity rules, the activity sites of the individuals in different time periods are respectively marked as residence sites, work sites or other sites, the individual activity types corresponding to the residence sites are marked as 'home (H)', and the individual activity types corresponding to the work sites are marked as 'work (W)'; if the work site and the living site are located in the same space unit, the individual activity type sequence is "home", individual activity types other than "home (H)" and "work (W)" are marked as "other", and "other" activity types of the same individual at different sites are marked as "other 1", "other 2", according to the activity occurrence time.
4. The space-time trajectory generation method according to claim 2, wherein the embedding representation and the position coding are performed on the travel trajectory sequence, and the space-time information of the travel trajectory sequence is extracted by using a transducer model specifically comprises:
the method comprises the steps of taking four data of a time stamp t, an individual activity type, a street ID and a community ID as input data of an encoder, respectively extracting space-time information of the four input data through four different embedding layers to obtain four embedded vectors, combining the four embedded vectors to obtain dense vector representation e of the space-time information i As input data for the transducer model:
wherein j represents four kinds of input data in turn, e i Representing a vector representation generated at an ith point;
vector representation e using sine and cosine functions i Performing position coding, wherein the embedded vector after the position coding is expressed asThe embedded vector after the position coding is input into a transducer model for space-time information extraction, and the space-time information extraction process is expressed as follows:
in the above formula, W T Is a parameter matrix which can be learned in a transducer model, and T (·) is the Encode of the transducer modelThe r function.
5. The method according to any one of claims 1 to 4, wherein the inputting the spatiotemporal information of the travel track sequence into the generation countermeasure network, before generating the multi-scale spatiotemporal track data by the generation countermeasure network, further comprises:
inputting the space-time information of the travel track sequence to generate an countermeasure network for pre-training; wherein the generating an countermeasure network comprises a generator and a arbiter, and the generating a pre-training of the countermeasure network comprises a generator pre-training and a arbiter pre-training;
the generator pre-training process includes: the method comprises the steps that a task of next track point prediction is used, consistency of space-time track data generated by a generator and real urban track data is compared to pretrain the generator, in the pretraining process, the generator performs space-time track data generation in a multitask training mode, firstly generates individual activity types, then performs space-time track data generation on a street level and space-time track data generation on a community level respectively through the individual activity types, simultaneously trains three generation tasks of the individual activity types, the space-time track data on the street level and the space-time track data on the community level through NLL loss functions, performs gradient updating on the three training tasks respectively, and strengthens space-time constraint of the data generation process;
the discriminant pre-training process includes: designing a classification task pre-training discriminator, respectively marking true and false labels on the real urban track data and the space-time track data generated by the generator, taking the marked data as the input of the discriminator, taking the true and false labels as the output of the discriminator to pre-train the discriminator, and optimizing the discriminator through an NLL loss function.
6. The method for generating a space-time trajectory according to claim 5, wherein after the step of pre-training the space-time information input generation countermeasure network of the travel trajectory sequence, the method further comprises:
and inputting the space-time information of the travel track sequence into the pre-trained generated countermeasure network to perform countermeasure training, and optimizing the generated countermeasure network by using a space consistency loss function to obtain the trained generated countermeasure network.
7. The method of space-time trajectory generation of claim 6, wherein said generating countermeasure training for the countermeasure network includes generating countermeasure training and discriminant countermeasure training, said generating countermeasure training process including: the space-time track data generation process of the generator is regarded as a Markov decision process, the generator is regarded as an agent, and the generator is updated by utilizing a strategy gradient according to a REINFORCE algorithm in the antagonism training process:
wherein x is state, that is, space-time trajectory data generated by the current generator, R (x) is a loss function of the countermeasure training stage, θ is a parameter of the generator G, and the parameter is a gradient according to a strategyBy-> The parameters θ of the generator are updated, where η is the learning rate.
8. A space-time trajectory generation device, comprising:
and a data acquisition module: the method comprises the steps of obtaining real urban track data in a research area, performing multi-space scale division and preprocessing on the urban track data, and generating a travel track sequence containing street IDs, community IDs and individual activity types;
and the information extraction module is used for: the method comprises the steps of carrying out embedded representation and position coding on the travel track sequence, and extracting space-time information of the travel track sequence by adopting a transducer model;
the track generation module: the method comprises the steps of inputting space-time information of the travel track sequence into a generation countermeasure network, and generating multi-scale space-time track data through the generation countermeasure network; the multi-scale space-time track data comprises space-time track data at a street level and space-time track data at a community level.
9. A computer device comprising a processor, a memory coupled to the processor, wherein,
the memory stores program instructions for implementing the spatiotemporal trajectory generation method of any one of claims 1-7;
the processor is configured to execute the program instructions stored by the memory to control a spatiotemporal trajectory generation method.
10. A storage medium storing program instructions executable by a processor for performing the spatiotemporal trajectory generation method of any one of claims 1 to 7.
CN202311289086.XA 2023-09-27 2023-09-27 Space-time track generation method and device, computer equipment and storage medium Active CN117332033B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311289086.XA CN117332033B (en) 2023-09-27 2023-09-27 Space-time track generation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311289086.XA CN117332033B (en) 2023-09-27 2023-09-27 Space-time track generation method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117332033A true CN117332033A (en) 2024-01-02
CN117332033B CN117332033B (en) 2024-08-16

Family

ID=89275027

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311289086.XA Active CN117332033B (en) 2023-09-27 2023-09-27 Space-time track generation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117332033B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210042808A1 (en) * 2012-01-26 2021-02-11 Heritage Distilling Company, Inc. System and method for automated distillery management
CN114495170A (en) * 2022-01-27 2022-05-13 重庆大学 Pedestrian re-identification method and system based on local self-attention inhibition
CN114638408A (en) * 2022-03-03 2022-06-17 南京航空航天大学 Pedestrian trajectory prediction method based on spatiotemporal information
CN114898550A (en) * 2022-03-16 2022-08-12 清华大学 Pedestrian trajectory prediction method and system
CN115482446A (en) * 2022-08-30 2022-12-16 电子科技大学 Track anomaly detection method for generating countermeasure network based on deep convolution
WO2023123625A1 (en) * 2021-12-31 2023-07-06 中国科学院深圳先进技术研究院 Urban epidemic space-time prediction method and system, terminal and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210042808A1 (en) * 2012-01-26 2021-02-11 Heritage Distilling Company, Inc. System and method for automated distillery management
WO2023123625A1 (en) * 2021-12-31 2023-07-06 中国科学院深圳先进技术研究院 Urban epidemic space-time prediction method and system, terminal and storage medium
CN114495170A (en) * 2022-01-27 2022-05-13 重庆大学 Pedestrian re-identification method and system based on local self-attention inhibition
CN114638408A (en) * 2022-03-03 2022-06-17 南京航空航天大学 Pedestrian trajectory prediction method based on spatiotemporal information
CN114898550A (en) * 2022-03-16 2022-08-12 清华大学 Pedestrian trajectory prediction method and system
CN115482446A (en) * 2022-08-30 2022-12-16 电子科技大学 Track anomaly detection method for generating countermeasure network based on deep convolution

Also Published As

Publication number Publication date
CN117332033B (en) 2024-08-16

Similar Documents

Publication Publication Date Title
James Travel mode identification with GPS trajectories using wavelet transform and deep learning
CN107678845B (en) Application program control method and device, storage medium and electronic equipment
CN113157800B (en) Identification method for discovering dynamic target in air in real time
CN110414732A (en) A kind of trip Future Trajectory Prediction method, apparatus, storage medium and electronic equipment
CN111695019B (en) Method and device for identifying associated account
CN110147878A (en) Data processing method, device and equipment
CN112465231B (en) Method, apparatus and readable storage medium for predicting regional population health status
CN115688952A (en) Big data-based campus congestion area prediction method
Moon et al. A Large-Scale Study in Predictability of Daily Activities and Places.
Huang et al. Towards an efficient real-time kernel function stream clustering method via shared nearest-neighbor density for the IIoT
CN114418189A (en) Water quality grade prediction method, system, terminal device and storage medium
Wang et al. Trajectory forecasting with neural networks: An empirical evaluation and a new hybrid model
Fong et al. Gesture recognition from data streams of human motion sensor using accelerated PSO swarm search feature selection algorithm
CN115545103A (en) Abnormal data identification method, label identification method and abnormal data identification device
Gammelli et al. Recurrent flow networks: A recurrent latent variable model for density estimation of urban mobility
Blanco-Justicia et al. Generation of synthetic trajectory microdata from language models
Wang et al. A Deep Spatiotemporal Trajectory Representation Learning Framework for Clustering
CN106355537A (en) Smart analysis method and system for interrelated cases
Hamidzadeh et al. Clustering data stream with uncertainty using belief function theory and fading function
CN117332033B (en) Space-time track generation method and device, computer equipment and storage medium
Morris et al. Self-supervised deep learning framework for anomaly detection in traffic data
CN114611841A (en) Scenic spot tourist flow prediction method and device
Wu et al. Application of improved DBN and GRU based on intelligent optimization algorithm in power load identification and prediction
Jin et al. S2N2: An interpretive semantic structure attention neural network for trajectory classification
Xu et al. Understanding human mobility: A multi-modal and intelligent moving objects database

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant