Multimodal spatiotemporal trajectory data processing method, device, equipment, medium and product
By generating a spatio-temporal trajectory map and training the GPT model, the problem of multi-task spatio-temporal trajectory data processing without labeling is solved, the processing efficiency and accuracy are improved, the cost is reduced, and it is suitable for urban security systems.
Patent Information
- Application Number
- CN202410851720.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-06-28
AI Technical Summary
The existing technology requires a large amount of annotated data when designing a general model to process spatiotemporal trajectory data, especially in multi-task scenarios, resulting in high research and development costs, large accuracy deviations, and difficulty in obtaining annotated data, making it difficult to apply it to security systems in different cities.
By acquiring spatio-temporal trajectory data of different modes, generating spatio-temporal trajectory graphs, and generating training samples based on a variety of trajectory processing tasks, the initial GPT model is trained, and the trained GPT model is obtained, and the model is used to process the spatio-temporal trajectory data to be processed. Multi-tasking processing such as trajectory prediction, completion, denoising and similarity correlation.
Without labeling, the processing efficiency and accuracy of the model are improved, labor costs are reduced, it is suitable for multi-task processing of urban security systems, and provides assistance to social security.
Smart Images

Figure CN118410303B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of space-time trajectory application technology, and in particular, to a multimodal space-time trajectory data processing method, device, equipment, medium and product. Background Art
[0002] In the image-code joint investigation system, the data source refers to the collection of image data such as facial images, license plate images, and data from smart terminal perception sources such as mobile phone IMSI and IMEI. After analysis by the background big data and artificial intelligence system, the spatiotemporal trajectory is completed and denoised, and the correlation between different modal data captured by different perception devices is established. The above processing can provide clues for investigation and case work, and provide early warning for prevention and control work, so the image-code joint investigation system has a wide range of applications.
[0003] The spatiotemporal trajectory data obtained from the acquisition device only contains the time and space information of the trajectory points, while in actual applications, various downstream algorithm topics and tasks may be involved, thereby providing practical help for various application scenarios. In the prior art, it is usually necessary to design corresponding algorithm models for different spatiotemporal trajectory application tasks. Model design for specific tasks will result in too many models in actual applications, resulting in excessive R&D costs, isolation between tasks, bloated actual application systems, difficult debugging, and poor user experience. Further research and development has some supervised general models, that is, general model design for multiple tasks, but supervised general models rely on a large amount of labeled data. In the case of a wide variety of tasks, a large amount of labeled data is too ideal and extremely difficult to use in actual applications. For example, in different urban applications, it is necessary to repeatedly obtain massive annotations in different cities, which often requires a lot of time and manpower to obtain labeled data. The accuracy deviation between the R&D process and the actual application is large, making it difficult to apply. Summary of the invention
[0004] Embodiments of the present invention provide a multimodal spatiotemporal trajectory data processing method, apparatus, device, medium and product to solve the multi-task problem of designing a general model to process spatiotemporal trajectories without annotation.
[0005] In a first aspect, an embodiment of the present invention provides a method for processing multimodal spatiotemporal trajectory data, the method comprising:
[0006] Obtain multiple spatiotemporal trajectory data of different modalities;
[0007] Generate a spatiotemporal trajectory graph of each mode according to the spatiotemporal trajectory data;
[0008] According to the spatiotemporal trajectory graph, training samples are generated based on a variety of trajectory processing tasks, and an initial GPT model is trained according to the training samples to obtain a trained GPT model;
[0009] Acquire the space-time trajectory data to be processed, and generate the space-time trajectory graph to be processed according to the space-time trajectory data to be processed;
[0010] The space-time trajectory graph to be processed is input into the trained GPT model to obtain an inference result.
[0011] Optionally, the trajectory processing task includes a trajectory completion task and / or a trajectory prediction task;
[0012] Generating training samples based on the spatiotemporal trajectory graph and multiple trajectory processing tasks includes:
[0013] The trajectory points in the first selected spatiotemporal trajectory map are randomly deleted to generate a first control trajectory map, and the first control trajectory map and the first selected spatiotemporal trajectory map form a sample pair as a positive sample.
[0014] Optionally, the trajectory processing task includes a trajectory noise removal task;
[0015] Generating training samples based on the spatiotemporal trajectory graph and multiple trajectory processing tasks includes:
[0016] An interference trajectory point is added to the second selected spatiotemporal trajectory map to generate a second control trajectory map, and the second control trajectory map and the second selected spatiotemporal trajectory map form a sample pair as a positive sample.
[0017] Optionally, the trajectory processing task includes a trajectory similarity association task;
[0018] Generating training samples based on the spatiotemporal trajectory graph and multiple trajectory processing tasks includes:
[0019] The trajectory points in the third selected spatiotemporal trajectory map are spatiotemporally mapped according to the acquisition range of the acquisition device of other modalities to generate a third comparison trajectory map, and the third comparison trajectory map and the third selected spatiotemporal trajectory map form a sample pair as a positive sample.
[0020] Optionally, generating the space-time trajectory graphs of each modality according to the space-time trajectory data includes:
[0021] Constructing a time word for each trajectory point according to the time parameter in the spatiotemporal trajectory data, and constructing a time sentence for each trajectory according to the time word in a time sequence to generate a time corpus;
[0022] Training the time pre-training model according to the time corpus, and obtaining a time vector representation of the trajectory point through the trained time pre-training model;
[0023] Constructing a spatial word for each trajectory point according to the spatial parameters in the spatiotemporal trajectory data, and constructing a spatial sentence for each trajectory according to the spatial words in a time sequence to generate a spatial corpus;
[0024] Training the spatial pre-training model according to the spatial corpus, and obtaining a spatial vector representation of the trajectory point through the trained spatial pre-training model;
[0025] Each trajectory is spliced according to the time vector representation and the space vector representation to obtain the space-time trajectory graph.
[0026] Optionally, before inputting the to-be-processed spatiotemporal trajectory graph into the trained GPT model to obtain an inference result, the method further includes:
[0027] The trained GPT model is used as a teacher model, and a student model is constructed according to the teacher model by maintaining a consistent structure and reducing parameters;
[0028] Obtain local spatiotemporal trajectory data of the target area;
[0029] Based on the training mechanism of the teacher model, the student model is trained according to the local spatiotemporal trajectory data to obtain a localized trained GPT model. During the training process, the student model calculates the loss according to the probability distribution generated by the teacher model for the same input.
[0030] In a second aspect, an embodiment of the present invention further provides a multimodal spatiotemporal trajectory data processing device, the device comprising:
[0031] The trajectory data acquisition module is used to obtain various spatiotemporal trajectory data of different modalities;
[0032] A trajectory diagram generating module, used to generate a spatiotemporal trajectory diagram of each mode according to the spatiotemporal trajectory data;
[0033] A model training module, used to generate training samples based on the spatiotemporal trajectory graph and a variety of trajectory processing tasks, and train the initial GPT model based on the training samples to obtain a trained GPT model;
[0034] A to-be-processed data acquisition module, used to acquire to-be-processed spatiotemporal trajectory data and generate a to-be-processed spatiotemporal trajectory graph according to the to-be-processed spatiotemporal trajectory data;
[0035] The model reasoning module is used to input the space-time trajectory graph to be processed into the trained GPT model to obtain a reasoning result.
[0036] In a third aspect, an embodiment of the present invention further provides a computer device, the computer device comprising:
[0037] one or more processors;
[0038] A memory for storing one or more programs;
[0039] When the one or more programs are executed by the one or more processors, the one or more processors implement the multimodal spatiotemporal trajectory data processing method provided by any embodiment of the present invention.
[0040] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the multimodal spatiotemporal trajectory data processing method provided by any embodiment of the present invention.
[0041] In a fifth aspect, an embodiment of the present invention further provides a computer program product, which includes a computer program, and when the program is executed by a processor, it implements the multimodal spatiotemporal trajectory data processing method provided by any embodiment of the present invention.
[0042] The embodiment of the present invention provides a multimodal spatiotemporal trajectory data processing method, firstly obtains a plurality of spatiotemporal trajectory data of different modes, and generates a spatiotemporal trajectory graph of each mode according to the obtained spatiotemporal trajectory data, then generates training samples based on a plurality of trajectory processing tasks according to the generated spatiotemporal trajectory graph, and trains the initial GPT model according to the training samples to obtain a trained GPT model, then obtains the spatiotemporal trajectory data to be processed, and generates a spatiotemporal trajectory graph to be processed according to the spatiotemporal trajectory data to be processed, and finally inputs the spatiotemporal trajectory graph to be processed into the trained GPT model to obtain the required reasoning result. The multimodal spatiotemporal trajectory data processing method provided by the embodiment of the present invention can realize the training of the model using unlabeled trajectory data by using the GPT model, and then trains the GPT model by generating training samples based on a plurality of trajectory processing tasks, so that the trained model can solve multi-task problems such as trajectory prediction, trajectory completion, trajectory denoising, trajectory similarity association, etc., thereby improving the processing efficiency and reducing the labor cost on the basis of ensuring the accuracy of the task processing results. It can be used to improve the urban security system to provide assistance for social security. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flowchart of a multimodal spatiotemporal trajectory data processing method provided in Embodiment 1 of the present invention;
[0044] Figure 2 A schematic diagram of the structure of a multimodal spatiotemporal trajectory data processing device provided in Embodiment 2 of the present invention;
[0045] Figure 3 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0046] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0047] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0048] Embodiment 1
[0049] Figure 1 This is a flowchart of a multimodal spatiotemporal trajectory data processing method provided in Embodiment 1 of the present invention. This embodiment can be applied to the case where multi-task processing of collected unlabeled spatiotemporal trajectory data is performed as required. The method can be executed by a multimodal spatiotemporal trajectory data processing device provided in an embodiment of the present invention, which can be implemented in hardware and / or software and can generally be integrated into a computer device. Figure 1 As shown, the specific steps include:
[0050] S11. Acquire multiple spatiotemporal trajectory data of different modalities.
[0051] Among them, taking the image and code joint detection system as an example, the spatiotemporal trajectory data of different modes can include face trajectory data, vehicle trajectory data, and IMSI trajectory data, etc. Face trajectory data can be collected and uploaded through the front-end face camera device, vehicle trajectory data can be collected and uploaded through the front-end license plate camera device, and IMSI trajectory data can be collected and uploaded through the code detection device. The code detection device can collect IMSI signals within a certain range and record IMSI codes, collection time, geographic location and other information. According to the type of equipment and parameter settings, the effective collection range is 200-1500 meters. IMSI is the International Mobile Subscriber Identity. Each SIM card has a unique IMSI code. When a user of a mobile network needs to communicate with other mobile networks, the IMSI code is required. Due to the different types of collection equipment and different collection methods, the same entity (face, license plate, IMSI, etc.) and different entities have differences in structure, attributes, accuracy, granularity, etc., that is, the acquired spatiotemporal trajectory data may be heterogeneous. Correspondingly, in the urban space-time trajectory scenario, faces, license plates, IMSI, etc. can be used as basic data, with the goal of completing, fusing, and measuring similarity of the space-time trajectory. A GPT-based urban heterogeneous space-time trajectory large model system is designed for the heterogeneity, temporal sequence, and spatiality of the urban space-time trajectory, so as to apply the multimodal space-time trajectory data processing method provided in this embodiment.
[0052] S12, generating a spatiotemporal trajectory graph of each mode according to the spatiotemporal trajectory data.
[0053] Specifically, after obtaining a variety of spatiotemporal trajectory data of different modalities, each modality can be clustered to obtain the corresponding trajectory. Before clustering, the abnormal data in the spatiotemporal trajectory data can be filtered. Exemplarily, for face trajectory data, the face image in the photo can be recognized by the street photo OCR system, and then the abnormal face image data is filtered to eliminate non-face images, abnormal longitude and latitude, no equipment location or face images with missing key fields such as collection time, and then the face trajectory data of the same person are fused together through clustering, and the face trajectory points such as (x, y, t, d) are clustered to form face trajectories such as {(x1, y1, t1, d1), (x2, y2, t2, d2),…, (x N ,y N ,t N ,d N)}, where x and y represent longitude and latitude, t represents the collection time, d represents the collection device identifier, N represents the number of elements in the trajectory, the trajectory point represents the physical position at a specific time on the trajectory, and the trajectory represents the position sequence that changes over time within a certain time and space range. For vehicle trajectory data, the license plate number in the photo can be identified by the license plate photo OCR system, and then the license plate abnormal data is filtered to remove the license plate number length, abnormal longitude and latitude, no equipment location or missing key fields such as collection time, and then the vehicle trajectory data of the same license plate number are fused together through clustering, and the vehicle trajectory points are clustered to form vehicle trajectories. For IMSI trajectory data, the IMSI abnormal data can be directly filtered to remove the IMSI data with abnormal longitude and latitude, distance or direction and other key fields missing, and then the IMSI trajectory data of the same IMSI are fused together through clustering, and the IMSI trajectory points are clustered to form IMSI trajectories. After obtaining the corresponding trajectories, each trajectory can be spatiotemporally modeled to construct a corresponding spatiotemporal trajectory graph. For different modalities, for example, a face spatiotemporal trajectory graph, a vehicle spatiotemporal trajectory graph, an IMSI spatiotemporal trajectory graph, and the like can be generated.
[0054] Optionally, generating a space-time trajectory graph of each modality according to the space-time trajectory data includes: constructing a time word for each trajectory point according to the time parameters in the space-time trajectory data, and constructing a time sentence for each trajectory according to the time words in a time series to generate a time corpus; training a time pre-training model according to the time corpus, and obtaining a time vector representation of the trajectory point through the trained time pre-training model; constructing a space word for each trajectory point according to the space parameters in the space-time trajectory data, and constructing a space sentence for each trajectory according to a time series according to the space words to generate a space corpus; training a space pre-training model according to the space corpus, and obtaining a space vector representation of the trajectory point through the trained space pre-training model; splicing each trajectory according to the time vector representation and the space vector representation to obtain the space-time trajectory graph.
[0055] Specifically, the time series is dynamically changing, and the time parameters can be dynamically configured, and parameters such as year, month, week, day of the month, and / or hour of the day can be extracted from the time series as time parameters. Then, for each trajectory, the time parameters of the trajectory points can be combined into time words. For example, the time words are year-month-day of the week-day-hour. Then, the time words of each trajectory point are constructed according to the time series to obtain the time sentence corresponding to the trajectory, and the time sentences of each trajectory can be composed of a time corpus. To build a time pre-training model, the Word2Vec model (a type of language model that can learn semantic knowledge from a large amount of text corpus in an unsupervised manner) can be used, and the generated time corpus can be used to train the time pre-training model. The time vector representation of each trajectory point in each trajectory can be obtained through the trained time pre-training model.
[0056] On the other hand, for each trajectory, the spatial parameters of the trajectory points can be combined into spatial words. For example, the spatial words are longitude and latitude. Then, the spatial words of each trajectory point are constructed in time series to obtain the spatial sentences corresponding to the trajectory, and the spatial sentences of each trajectory can be used to form a spatial corpus. A spatial pre-training model can be constructed, specifically using a Word2Vec model, and the generated spatial corpus can be used to train the spatial pre-training model. The spatial vector representation of each trajectory point in each trajectory can be obtained through the trained spatial pre-training model.
[0057] After obtaining the time vector representation and space vector representation of each trajectory point, a corresponding space-time trajectory graph can be constructed for each trajectory. The nodes in the space-time trajectory graph are the space vector representation of the trajectory point spliced with the time vector representation, and the edges in the space-time trajectory graph represent the adjacent relationship in space. For example, face space-time trajectory graphs, vehicle space-time trajectory graphs, IMSI space-time trajectory graphs, etc. can be generated.
[0058] S13. Generate training samples based on the spatiotemporal trajectory graph and a variety of trajectory processing tasks, and train the initial GPT model based on the training samples to obtain a trained GPT model.
[0059] Specifically, after obtaining the spatiotemporal trajectory graphs, corresponding positive samples can be generated for each trajectory processing task that needs to be solved according to these spatiotemporal trajectory graphs, and certain negative samples and the generated positive samples are selected as training samples to input the pre-created initial GPT model for training, so as to obtain a trained GPT model (GPT-ST). The loss function in the training process can adopt the cross-entropy loss (Cross-Entropy Loss). Among them, the GPT model can be specifically the GPT model (Generative Pre-trained Transformer) of OpenAI, which uses Transformer as its basic framework and has achieved remarkable success in the field of natural language processing. Its powerful context sequence learning ability has attracted widespread attention in the industry. GPT technology is pre-trained in natural language (Nature Language Processing) through a large amount of unlabeled text data, and shows strong versatility and adaptability in various natural language processing tasks. Its performance in many natural language processing tasks has reached the industry-leading level, which has played an important role in promoting the development of the field of artificial intelligence.
[0060] Optionally, the trajectory processing task includes a trajectory completion task and / or a trajectory prediction task; the training samples are generated based on the spatiotemporal trajectory graph and multiple trajectory processing tasks, including: randomly deleting trajectory points in the first selected spatiotemporal trajectory graph to generate a first control trajectory graph, and forming a sample pair with the first selected spatiotemporal trajectory graph as a positive sample. Specifically, a certain amount can be selected from the generated spatiotemporal trajectory graph as the first selected spatiotemporal trajectory graph, and by deleting trajectory points, the spatial semantics between trajectory points can be learned, so that trajectory completion tasks and trajectory prediction tasks can be processed, etc.
[0061] Optionally, the trajectory processing task includes a trajectory noise removal task; and the generating of training samples based on the spatiotemporal trajectory graph and multiple trajectory processing tasks includes: adding interference trajectory points to the second selected spatiotemporal trajectory graph to generate a second control trajectory graph, and forming a sample pair of the second control trajectory graph and the second selected spatiotemporal trajectory graph as a positive sample. Specifically, a certain amount can be selected from the generated spatiotemporal trajectory graph as the second selected spatiotemporal trajectory graph, and the model's ability to process noise can be enhanced by adding interference trajectory points.
[0062] Optionally, the trajectory processing task includes a trajectory similarity association task; the training samples are generated based on the spatiotemporal trajectory graph and multiple trajectory processing tasks, including: performing spatiotemporal mapping of the trajectory points in the third selected spatiotemporal trajectory graph according to the acquisition range of the acquisition device of other modalities, generating a third comparison trajectory graph, and forming a sample pair with the third comparison trajectory graph and the third selected spatiotemporal trajectory graph as a positive sample. Specifically, a certain amount can be selected from the generated spatiotemporal trajectory graph as the third selected spatiotemporal trajectory graph, and the spatiotemporal trajectory graphs of other modalities can be simulated and generated based on the third selected spatiotemporal trajectory graph. Exemplarily, the selected face spatiotemporal trajectory graph (as the third selected spatiotemporal trajectory graph) can be used to simulate the generation of an IMSI spatiotemporal trajectory graph, and the trajectory points in the face spatiotemporal trajectory graph are spatiotemporally mapped through the acquisition range of the detection device, which can be based on the detection device in space and the original acquisition time of the trajectory points in the face spatiotemporal trajectory graph in time, thereby generating a simulated IMSI spatiotemporal trajectory graph as the third comparison trajectory graph, and forming a sample pair with the selected face spatiotemporal trajectory graph. By simulating and generating spatiotemporal trajectory graphs of other modalities, trajectory information under different modalities can be learned, thereby being able to handle trajectory similarity association tasks.
[0063] Exemplarily, the above three methods can be used simultaneously to generate positive samples, and the unselected spatiotemporal trajectory graphs can be used as negative samples to train the initial GPT model. Furthermore, batch training can be used. During the training process, instead of processing the entire training set at one time (full batch gradient descent), the entire training set (such as all generated spatiotemporal trajectory graphs) can be divided into multiple small blocks (i.e., batches). Each batch contains a fixed number of samples, and the training subset of the corresponding batch is used each time the model parameters are updated iteratively. In each training process, the above three methods can be used to generate positive samples for the corresponding training subset, and other unselected spatiotemporal trajectory graphs in the batch can be used as negative samples to train the initial GPT model.
[0064] S14, obtaining the space-time trajectory data to be processed, and generating a space-time trajectory graph to be processed according to the space-time trajectory data to be processed.
[0065] Specifically, the spatiotemporal trajectory data to be processed may be one or more of the spatiotemporal trajectory data of the above different modalities, or may be spatiotemporal trajectory data of other new modalities. After similar processing, a corresponding spatiotemporal trajectory graph to be processed may be generated according to the spatiotemporal trajectory data to be processed, so as to perform reasoning using the trained GPT model.
[0066] S15. Input the to-be-processed spatiotemporal trajectory graph into the trained GPT model to obtain an inference result.
[0067] Specifically, when reasoning is required, the trained GPT model obtained above can be directly loaded and applied, and the space-time trajectory graph to be processed can be input into the trained GPT model for reasoning to obtain the corresponding reasoning results.
[0068] Optionally, before inputting the spatiotemporal trajectory graph to be processed into the trained GPT model to obtain the inference result, it also includes: using the trained GPT model as a teacher model, and constructing a student model according to the teacher model while keeping the structure consistent and reducing parameters; obtaining local spatiotemporal trajectory data of the target area; based on the training mechanism of the teacher model, training the student model according to the local spatiotemporal trajectory data to obtain a localized trained GPT model, and during the training process, the student model calculates the loss according to the probability distribution generated by the teacher model for the same input.
[0069] Specifically, in the urban spatiotemporal trajectory scenario, for data security, data between different cities cannot be interacted or retrieved, resulting in the inability to directly deploy the model. At the same time, for performance considerations, the trained GPT model is directly used, the model parameters are too large, and direct adaptation to the local area places too high requirements on the on-site server. Therefore, before applying the model, the trained GPT model can be localized first to implement algorithm implementation and model deployment in different cities. Specifically, knowledge distillation can be used to localize the model, the trained GPT model obtained above is used as the teacher model, and a localized student model is created, keeping the structure consistent with the teacher model and reducing the parameters. The teacher model and the student model share the training mechanism, that is, the above training process can be referred to. Then, spatiotemporal information transfer learning can be performed, the student model is trained using the local spatiotemporal trajectory data of the target area obtained, and the loss is calculated according to the probability distribution generated by the teacher model for the same input during the training process. In this way, the student model can not only imitate the real data output, but also simulate the behavior and decision-making process of the teacher model as much as possible, thereby obtaining a localized trained GPT model. When reasoning is needed on the spatiotemporal trajectory graph to be processed, the localized trained GPT model can be loaded and applied, and the spatiotemporal trajectory graph to be processed can be input into the localized trained GPT model for reasoning to obtain the corresponding reasoning results. As above, fast and lightweight localized deployment can be achieved, thus solving the problem of high cost and performance bottleneck of large models while maintaining model accuracy.
[0070] The technical solution provided by the embodiment of the present invention first obtains a variety of spatiotemporal trajectory data of different modes, and generates spatiotemporal trajectory graphs of each mode according to the obtained spatiotemporal trajectory data, then generates training samples based on a variety of trajectory processing tasks according to the generated spatiotemporal trajectory graph, and trains the initial GPT model according to the training samples to obtain a trained GPT model, then obtains the spatiotemporal trajectory data to be processed, and generates a spatiotemporal trajectory graph to be processed according to the spatiotemporal trajectory data to be processed, and finally inputs the spatiotemporal trajectory graph to be processed into the trained GPT model to obtain the required reasoning result. By using the GPT model, it is possible to train the model using unlabeled trajectory data, and then train the GPT model by generating training samples based on a variety of trajectory processing tasks, so that the trained model can solve multi-task problems such as trajectory prediction, trajectory completion, trajectory denoising, trajectory similarity association, etc., thereby improving processing efficiency and reducing labor costs on the basis of ensuring the accuracy of task processing results. It can then be used to improve the urban security system to provide support for social security.
[0071] Embodiment 2
[0072] Figure 2 This is a schematic diagram of the structure of a multimodal spatiotemporal trajectory data processing device provided in the second embodiment of the present invention. The device can be implemented by hardware and / or software, and can generally be integrated into a computer device to execute the multimodal spatiotemporal trajectory data processing method provided in any embodiment of the present invention. Figure 2 As shown, the device comprises:
[0073] A trajectory data acquisition module 21 is used to acquire a variety of spatiotemporal trajectory data of different modalities;
[0074] A trajectory diagram generating module 22, used to generate a spatiotemporal trajectory diagram of each mode according to the spatiotemporal trajectory data;
[0075] A model training module 23, configured to generate training samples based on the spatiotemporal trajectory graph and a plurality of trajectory processing tasks, and train the initial GPT model based on the training samples to obtain a trained GPT model;
[0076] The to-be-processed data acquisition module 24 is used to acquire the to-be-processed spatiotemporal trajectory data and generate a to-be-processed spatiotemporal trajectory graph according to the to-be-processed spatiotemporal trajectory data;
[0077] The model reasoning module 25 is used to input the spatiotemporal trajectory graph to be processed into the trained GPT model to obtain a reasoning result.
[0078] The technical solution provided by the embodiment of the present invention first obtains a variety of spatiotemporal trajectory data of different modes, and generates spatiotemporal trajectory graphs of each mode according to the obtained spatiotemporal trajectory data, then generates training samples based on a variety of trajectory processing tasks according to the generated spatiotemporal trajectory graph, and trains the initial GPT model according to the training samples to obtain a trained GPT model, then obtains the spatiotemporal trajectory data to be processed, and generates a spatiotemporal trajectory graph to be processed according to the spatiotemporal trajectory data to be processed, and finally inputs the spatiotemporal trajectory graph to be processed into the trained GPT model to obtain the required reasoning result. By using the GPT model, it is possible to train the model using unlabeled trajectory data, and then train the GPT model by generating training samples based on a variety of trajectory processing tasks, so that the trained model can solve multi-task problems such as trajectory prediction, trajectory completion, trajectory denoising, trajectory similarity association, etc., thereby improving processing efficiency and reducing labor costs on the basis of ensuring the accuracy of task processing results. It can then be used to improve the urban security system to provide support for social security.
[0079] On the basis of the above technical solution, optionally, the trajectory processing task includes a trajectory completion task and / or a trajectory prediction task;
[0080] The model training module 23 is specifically used for:
[0081] The trajectory points in the first selected spatiotemporal trajectory map are randomly deleted to generate a first control trajectory map, and the first control trajectory map and the first selected spatiotemporal trajectory map form a sample pair as a positive sample.
[0082] On the basis of the above technical solution, optionally, the trajectory processing task includes a trajectory noise removal task;
[0083] The model training module 23 is specifically used for:
[0084] An interference trajectory point is added to the second selected spatiotemporal trajectory map to generate a second control trajectory map, and the second control trajectory map and the second selected spatiotemporal trajectory map form a sample pair as a positive sample.
[0085] On the basis of the above technical solution, optionally, the trajectory processing task includes a trajectory similarity association task;
[0086] The model training module 23 is specifically used for:
[0087] The trajectory points in the third selected spatiotemporal trajectory map are spatiotemporally mapped according to the acquisition range of the acquisition device of other modalities to generate a third comparison trajectory map, and the third comparison trajectory map and the third selected spatiotemporal trajectory map form a sample pair as a positive sample.
[0088] On the basis of the above technical solution, optionally, the trajectory map generating module 22 includes:
[0089] A time corpus generating unit, configured to construct a time word for each trajectory point according to a time parameter in the spatiotemporal trajectory data, and to construct a time sentence for each trajectory according to the time word in a time sequence to generate a time corpus;
[0090] A time vector representation determination unit, used to train the time pre-training model according to the time corpus, and obtain the time vector representation of the trajectory point through the trained time pre-training model;
[0091] A spatial corpus generating unit, configured to construct a spatial word for each trajectory point according to the spatial parameters in the spatiotemporal trajectory data, and to construct a spatial sentence for each trajectory according to the spatial word in a time sequence to generate a spatial corpus;
[0092] A spatial vector representation determination unit, used to train the spatial pre-training model according to the spatial corpus, and obtain the spatial vector representation of the trajectory point through the trained spatial pre-training model;
[0093] The space-time trajectory graph generating unit is used to splice each trajectory according to the time vector representation and the space vector representation to obtain the space-time trajectory graph.
[0094] On the basis of the above technical solution, optionally, the multimodal spatiotemporal trajectory data processing device further includes:
[0095] A student model construction module is used to use the trained GPT model as a teacher model before inputting the to-be-processed spatiotemporal trajectory graph into the trained GPT model to obtain an inference result, and to construct a student model according to the teacher model while maintaining a consistent structure and reducing parameters;
[0096] A local spatiotemporal trajectory data acquisition module is used to acquire local spatiotemporal trajectory data of a target area;
[0097] A localized training module is used to train the student model based on the training mechanism of the teacher model according to the local spatiotemporal trajectory data to obtain a localized trained GPT model. During the training process, the student model calculates the loss based on the probability distribution generated by the teacher model for the same input.
[0098] The multimodal spatiotemporal trajectory data processing device provided in the embodiment of the present invention can execute the multimodal spatiotemporal trajectory data processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0099] It is worth noting that in the above-mentioned embodiment of the multimodal spatiotemporal trajectory data processing device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0100] Embodiment 3
[0101] Figure 3 The schematic diagram of the structure of the computer device provided for the third embodiment of the present invention shows a block diagram of an exemplary computer device suitable for implementing the implementation mode of the present invention. Figure 3 The computer device shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention. Figure 3 As shown, the computer device includes a processor 31, a memory 32, an input device 33 and an output device 34; the number of processors 31 in the computer device can be one or more. Figure 3 Taking a processor 31 as an example, the processor 31, memory 32, input device 33 and output device 34 in the computer device can be connected through a bus or other means. Figure 3 The example of connecting through bus is taken in the following.
[0102] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the multimodal spatiotemporal trajectory data processing method in the embodiment of the present invention (for example, the trajectory data acquisition module 21, the trajectory map generation module 22, the model training module 23, the to-be-processed data acquisition module 24 and the model reasoning module 25 in the multimodal spatiotemporal trajectory data processing device). The processor 31 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory 32, that is, realizes the above-mentioned multimodal spatiotemporal trajectory data processing method.
[0103] The memory 32 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 32 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 32 may further include a memory remotely arranged relative to the processor 31, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0104] The input device 33 may be used to obtain a variety of spatiotemporal trajectory data of different modalities, and to generate key signal inputs related to user settings and function control of the computer device, etc. The output device 34 may include a display screen, which may be used to display inference results to the user, etc.
[0105] Embodiment 4
[0106] Embodiment 4 of the present invention further provides a storage medium containing computer executable instructions, which, when executed by a computer processor, is used to execute a multimodal spatiotemporal trajectory data processing method, the method comprising:
[0107] Obtain multiple spatiotemporal trajectory data of different modalities;
[0108] Generate a spatiotemporal trajectory graph of each mode according to the spatiotemporal trajectory data;
[0109] According to the spatiotemporal trajectory graph, training samples are generated based on a variety of trajectory processing tasks, and an initial GPT model is trained according to the training samples to obtain a trained GPT model;
[0110] Acquire the space-time trajectory data to be processed, and generate the space-time trajectory graph to be processed according to the space-time trajectory data to be processed;
[0111] The space-time trajectory graph to be processed is input into the trained GPT model to obtain an inference result.
[0112] The storage medium may be any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the computer system in which the program is executed, or may be located in a different second computer system, which is connected to the computer system via a network (such as the Internet). The second computer system may provide program instructions to the computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (e.g., in different computer systems connected via a network). The storage medium may store program instructions (e.g., embodied as a computer program) that may be executed by one or more processors.
[0113] Of course, the computer executable instructions of a storage medium including computer executable instructions provided in an embodiment of the present invention are not limited to the operations of the method described above, and can also execute related operations in the multimodal spatiotemporal trajectory data processing method provided in any embodiment of the present invention.
[0114] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0115] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0116] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (FLASH), a hard disk or an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0117] Embodiment 5
[0118] Embodiment 5 of the present invention further provides a computer program product, which includes a computer program (also referred to as code, instruction), which can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it is used to execute the multimodal spatiotemporal trajectory data processing method provided in any of the above embodiments, and has the corresponding beneficial effects of the execution method.
[0119] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A multimodal spatiotemporal trajectory data processing method, It is characterized in that include: Obtain multiple spatiotemporal trajectory data of different modalities; Generate a spatiotemporal trajectory graph of each mode according to the spatiotemporal trajectory data; According to the spatiotemporal trajectory graph, training samples are generated based on a variety of trajectory processing tasks, and an initial GPT model is trained according to the training samples to obtain a trained GPT model; Generating training samples based on the spatiotemporal trajectory graph and multiple trajectory processing tasks includes: generating corresponding positive samples for each trajectory processing task, and selecting negative samples and the positive samples from the spatiotemporal trajectory graph as the training samples; Acquire the space-time trajectory data to be processed, and generate the space-time trajectory graph to be processed according to the space-time trajectory data to be processed; The space-time trajectory graph to be processed is input into the trained GPT model to obtain an inference result.
2. The multimodal spatiotemporal trajectory data processing method according to claim 1, It is characterized in that The trajectory processing task includes a trajectory completion task and / or a trajectory prediction task; Generating training samples based on the spatiotemporal trajectory graph and multiple trajectory processing tasks includes: The trajectory points in the first selected spatiotemporal trajectory map are randomly deleted to generate a first control trajectory map, and the first control trajectory map and the first selected spatiotemporal trajectory map form a sample pair as a positive sample.
3. The multimodal spatiotemporal trajectory data processing method according to claim 1, It is characterized in that The trajectory processing task includes a trajectory noise removal task; Generating training samples based on the spatiotemporal trajectory graph and multiple trajectory processing tasks includes: An interference trajectory point is added to the second selected spatiotemporal trajectory map to generate a second control trajectory map, and the second control trajectory map and the second selected spatiotemporal trajectory map form a sample pair as a positive sample.
4. The multimodal spatiotemporal trajectory data processing method according to claim 1, It is characterized in that The trajectory processing task includes a trajectory similarity association task; Generating training samples based on the spatiotemporal trajectory graph and multiple trajectory processing tasks includes: The trajectory points in the third selected spatiotemporal trajectory map are spatiotemporally mapped according to the acquisition range of the acquisition device of other modalities to generate a third comparison trajectory map, and the third comparison trajectory map and the third selected spatiotemporal trajectory map form a sample pair as a positive sample.
5. The multimodal spatiotemporal trajectory data processing method according to claim 1, It is characterized in that Generating the spatiotemporal trajectory graphs of each mode according to the spatiotemporal trajectory data includes: Constructing a time word for each trajectory point according to the time parameter in the spatiotemporal trajectory data, and constructing a time sentence for each trajectory according to the time word in a time sequence to generate a time corpus; Training the time pre-training model according to the time corpus, and obtaining a time vector representation of the trajectory point through the trained time pre-training model; Constructing a spatial word for each trajectory point according to the spatial parameters in the spatiotemporal trajectory data, and constructing a spatial sentence for each trajectory according to the spatial words in a time sequence to generate a spatial corpus; Training the spatial pre-training model according to the spatial corpus, and obtaining a spatial vector representation of the trajectory point through the trained spatial pre-training model; Each trajectory is spliced according to the time vector representation and the space vector representation to obtain the space-time trajectory graph.
6. The multimodal spatiotemporal trajectory data processing method according to claim 1, It is characterized in that Before inputting the to-be-processed spatiotemporal trajectory graph into the trained GPT model to obtain the inference result, the method further includes: The trained GPT model is used as a teacher model, and a student model is constructed according to the teacher model by maintaining a consistent structure and reducing parameters; Obtain local spatiotemporal trajectory data of the target area; Based on the training mechanism of the teacher model, the student model is trained according to the local spatiotemporal trajectory data to obtain a localized trained GPT model. During the training process, the student model calculates the loss according to the probability distribution generated by the teacher model for the same input.
7. A multimodal spatiotemporal trajectory data processing device, It is characterized in that include: The trajectory data acquisition module is used to obtain various spatiotemporal trajectory data of different modalities; A trajectory diagram generating module, used to generate a spatiotemporal trajectory diagram of each mode according to the spatiotemporal trajectory data; A model training module is used to generate training samples based on the spatiotemporal trajectory graph and multiple trajectory processing tasks, and train the initial GPT model according to the training samples to obtain a trained GPT model; the model training module is specifically used to: generate corresponding positive samples for each trajectory processing task, and select negative samples and the positive samples from the spatiotemporal trajectory graph as the training samples; A to-be-processed data acquisition module, used to acquire to-be-processed spatiotemporal trajectory data and generate a to-be-processed spatiotemporal trajectory graph according to the to-be-processed spatiotemporal trajectory data; The model reasoning module is used to input the space-time trajectory graph to be processed into the trained GPT model to obtain a reasoning result.
8. A computer device, It is characterized in that include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the multimodal spatiotemporal trajectory data processing method as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the multimodal spatiotemporal trajectory data processing method as described in any one of claims 1 to 6 is implemented.
10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the computer program implements the multimodal spatiotemporal trajectory data processing method as described in any one of claims 1 to 6.
