A knowledge graph-based trajectory sequence modeling method and device and computing equipment
By constructing a knowledge graph and using deep learning models to perform sequence modeling of target trajectory data, the problems of low accuracy and efficiency in traditional situation trajectory data processing are solved, enabling complex reasoning and intelligence integration analysis based on spatial relationships.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING INST OF ENVIRONMENTAL FEATURES
- Filing Date
- 2023-01-04
- Publication Date
- 2026-04-17
AI Technical Summary
Traditional situational trajectory data processing relies on manual processing, which makes it difficult to guarantee accuracy and efficiency, and cannot effectively support the analysis of target threats, situation and intent. Furthermore, it cannot perform complex logical reasoning based on spatial relationships.
By acquiring target trajectory data, extracting and discretizing the data into a grid, constructing a knowledge graph, and using a deep learning model to perform sequence modeling of the semantic vectors of spatial entities, complex reasoning based on spatial relationships can be achieved.
It enables complex reasoning based on spatial relationships, solves the problem of weak expressive power in the spatiotemporal data modeling process, supports comprehensive intelligence analysis, and avoids errors and inefficiencies in manual processing.
Smart Images

Figure CN116795993B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph technology, and in particular to a trajectory sequence modeling method, apparatus, and computing device based on knowledge graphs. Background Technology
[0002] Traditional situational trajectory data is primarily stored in structured databases and triplet formats, with retrieval as the main processing method. It often relies on rapid data processing and integration in the human mind to form a situational description based on spatial, temporal, and causal relationships. However, relying on manual processing for large amounts of target situational data and unstructured text corpora makes it difficult to guarantee accuracy. Furthermore, due to the diverse sources of the data, it is impossible to fuse them or perform complex logical reasoning based on spatial relationships. Consequently, it is difficult to effectively support comprehensive intelligence analysis such as target threat, situational awareness, and intent analysis, and cannot promptly assist humans in making rapid responses. Summary of the Invention
[0003] This invention provides a trajectory sequence modeling method, apparatus, and computing device based on knowledge graphs. The constructed trajectory sequence model avoids the errors and inefficiencies of manual processing, enables complex reasoning based on spatial relationships, and effectively supports comprehensive intelligence analysis.
[0004] In a first aspect, embodiments of the present invention provide a trajectory sequence modeling method based on a knowledge graph, comprising:
[0005] Obtain the target's trajectory data;
[0006] Knowledge extraction is performed on the trajectory data to obtain geospatial information and spatial trajectory information;
[0007] The spatial region where the target is located is determined based on the geospatial information;
[0008] Discretize the spatial region into a grid to obtain a spatial entity;
[0009] Based on the geospatial information and the spatial trajectory information, a knowledge graph corresponding to the spatial entities is constructed;
[0010] For each of the spatial entities, the following steps are performed: determine the adjacent spatial entities that have a spatial adjacency relationship with the spatial entity, and aggregate the spatial entity and the adjacent spatial entities to obtain the semantic vector corresponding to the spatial entity;
[0011] By using a deep learning model to perform sequence modeling on the semantic vector of each spatial entity of the target, a trajectory sequence model based on a knowledge graph is obtained.
[0012] Optionally, the step of discretizing the spatial region into a spatial entity includes:
[0013] Determine the data precision of the trajectory data;
[0014] Based on the size of the spatial region and the data precision, determine the target granularity for dividing the spatial region;
[0015] The spatial region is discretized and meshed according to the target granularity to obtain the spatial entity.
[0016] Optionally, obtaining the semantic vector corresponding to the spatial entity includes:
[0017] The spatial entity is aggregated with the adjacent spatial entities to obtain an aggregated vector;
[0018] Obtain the attribute values of the spatial entity, and encode the attribute values to obtain an entity attribute encoding vector; wherein, the attribute values include the time, velocity, acceleration, direction, starting point and ending point of the target corresponding to the spatial entity;
[0019] The spatial location of the spatial entity is obtained, and the spatial location is vectorized using a preset granularity to obtain a spatial feature encoding vector; wherein the preset granularity is different from the target granularity.
[0020] The semantic vector is obtained by concatenating the aggregation vector, the entity attribute encoding vector, and the spatial feature encoding vector.
[0021] Optionally, the input of the trajectory sequence model is a semantic vector sequence of the target, and the output is the event intent and / or predicted trajectory of the target; wherein, the semantic vector sequence is a sequence of semantic vectors arranged in order of the movement time of the target's spatial trajectory.
[0022] Optionally, the trajectory sequence model is trained using at least two sets of samples, each set of samples including a sequence of semantic vectors of the target as input within a first historical time period and the target's event intent and / or predicted trajectory within a second historical time period as output; wherein the second historical time period is located after the first historical time period on the timeline.
[0023] Optionally, constructing a knowledge graph corresponding to the spatial entities based on the geospatial information and the spatial trajectory information includes:
[0024] Based on the spatial trajectory information, the relationships between the spatial entities are determined;
[0025] Based on the geospatial information and the spatial trajectory information, the attribute values of each spatial entity are determined; wherein, the attribute values include the time, velocity, acceleration, direction, starting point, and ending point of the target corresponding to the spatial entity;
[0026] The knowledge graph is constructed based on the spatial entities, the relationships, and the attribute values.
[0027] Secondly, embodiments of the present invention also provide a trajectory sequence modeling device based on a knowledge graph, comprising:
[0028] The acquisition module is used to acquire the trajectory data of the target.
[0029] The knowledge determination module is used to extract knowledge from the trajectory data to obtain geospatial information and spatial trajectory information; and to determine the spatial region where the target is located based on the geospatial information.
[0030] The entity determination module is used to discretize the spatial region into a mesh to obtain spatial entities;
[0031] The first construction module is used to construct a knowledge graph corresponding to the spatial entities based on the geospatial information and the spatial trajectory information.
[0032] The processing module is used to perform the following for each spatial entity: determine the adjacent spatial entities that have a spatial adjacency relationship with the spatial entity, and aggregate the spatial entity and the adjacent spatial entities to obtain the semantic vector corresponding to the spatial entity;
[0033] The second construction module is used to perform sequence modeling on the semantic vector of each spatial entity of the target using a deep learning model, so as to obtain a trajectory sequence model based on a knowledge graph.
[0034] Optionally, the entity determination module is further configured to perform the following operations:
[0035] Determine the data precision of the trajectory data;
[0036] Based on the size of the spatial region and the data precision, determine the target granularity for dividing the spatial region;
[0037] The spatial region is discretized and meshed according to the target granularity to obtain the spatial entity.
[0038] Thirdly, embodiments of the present invention also provide a computing device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the trajectory sequence modeling method based on knowledge graphs as described above.
[0039] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program thereon, which, when executed in a computer, causes the computer to execute the trajectory sequence modeling method based on knowledge graphs described above.
[0040] This invention provides a method, apparatus, and computing device for trajectory sequence modeling based on a knowledge graph. The method extracts knowledge from the trajectory data of a target to obtain its geospatial and spatial trajectory information. Based on the target's spatial region, it determines spatial entities to construct a knowledge graph, thus embedding spatiotemporal relationships into the knowledge graph. Then, it represents the spatial entities in the knowledge graph using vectors to obtain semantic vectors. Finally, it uses a deep learning model to perform sequence modeling on the semantic vectors of each spatial entity of the target, resulting in a trajectory sequence model based on the knowledge graph. In this invention, the trajectory sequence model not only solves the problem of weak ability to express distance, orientation, and topological spatial relationships in spatiotemporal data modeling, avoiding errors and inefficiencies associated with manual processing, but also enables complex reasoning based on spatial relationships, effectively supporting comprehensive intelligence analysis. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a flowchart of a trajectory sequence modeling method based on knowledge graphs provided in an embodiment of the present invention;
[0043] Figure 2 This is a schematic diagram of mapping the GIS trajectory of a target ship to a spatial entity according to an embodiment of the present invention;
[0044] Figure 3 This is a hardware architecture diagram of a computing device provided in an embodiment of the present invention;
[0045] Figure 4 This is a structural diagram of a trajectory sequence modeling device based on a knowledge graph, provided in an embodiment of the present invention. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0047] Please refer to Figure 1 This invention provides a trajectory sequence modeling method based on knowledge graphs, the method comprising:
[0048] Step 100: Obtain the target's trajectory data;
[0049] Step 102: Extract knowledge from the trajectory data to obtain geospatial information and spatial trajectory information;
[0050] Step 104: Determine the spatial region where the target is located based on geospatial information, and discretize the spatial region into a grid to obtain the spatial entity;
[0051] Step 106: Construct a knowledge graph of the corresponding spatial entities based on geospatial information and spatial trajectory information;
[0052] Step 108: For each spatial entity, perform the following: determine the adjacent spatial entities that have a spatial adjacency relationship with the spatial entity, and aggregate the spatial entity and the adjacent spatial entities to obtain the semantic vector corresponding to the spatial entity;
[0053] Step 110: Use a deep learning model to perform sequence modeling on the semantic vector of each spatial entity of the target to obtain a trajectory sequence model based on a knowledge graph.
[0054] In this embodiment of the invention, the method extracts knowledge from the trajectory data of a target to obtain its geospatial information and spatial trajectory information. Based on the target's spatial region, it determines spatial entities to construct a knowledge graph, thus embedding spatiotemporal relationships into the knowledge graph. Then, by representing the spatial entities in the knowledge graph as vectors, semantic vectors are obtained. Finally, a deep learning model is used to perform sequence modeling on the semantic vectors of each spatial entity of the target, resulting in a trajectory sequence model based on the knowledge graph. In this invention, the trajectory sequence model not only solves the problem of weak ability to express distance, orientation, and topological spatial relationships in the spatiotemporal data modeling process, avoiding errors and inefficiencies associated with manual processing, but also enables complex reasoning based on spatial relationships, effectively supporting comprehensive intelligence analysis.
[0055] The following description Figure 1 The execution method for each step is shown.
[0056] First, for step 100, the trajectory data of the target is acquired. Specifically, the target trajectory data includes real-time motion trajectory data of different targets and real-time motion trajectory data of the same target monitored by different sensors or detection devices.
[0057] Then, for step 102, knowledge extraction is performed on the trajectory data to obtain geospatial information and spatial trajectory information. Specifically, a knowledge graph framework for the target is constructed at the spatial and trajectory layers, comprehensively considering temporal and spatial characteristics, thereby enhancing the target's ability to express spatial relationships such as distance, orientation, and topology.
[0058] In some preferred embodiments, before knowledge extraction from the trajectory data, the method further includes: completing the trajectory data of the target obtained by at least two detection devices to obtain at least two completed trajectory information; and fusing the at least two completed trajectory information to obtain the full trajectory information of the target.
[0059] In this invention, by performing trajectory completion and multi-source trajectory fusion on the trajectory data of the target, support can be provided for subsequent analysis using the trajectory sequence model, thereby improving the accuracy of event intent classification and trajectory prediction for future moments in the trajectory sequence model.
[0060] In step 104, the spatial region is discretized into a mesh to obtain a spatial entity, including:
[0061] Determine the data precision of the trajectory data;
[0062] The target granularity for dividing the spatial region is determined based on the size of the spatial region and the data accuracy.
[0063] The spatial region is discretized and meshed according to the target granularity to obtain the spatial entity.
[0064] It should be noted that the Earth's surface region needs to be discretized into a grid, and the grid region needs to be abstracted into a spatial entity. The spatial entities are connected by bidirectional directed edges based on physical adjacency relationships, representing the reachability relationships between spatial entity regions.
[0065] In this invention, the target granularity for dividing the spatial region is determined based on the size of the spatial region and the data precision. The spatial region is then discretized and gridded according to the target granularity to obtain spatial entities. This allows for the reasonable allocation and determination of the data corresponding to each spatial entity, ensuring that the amount of data information within each spatial entity is neither redundant nor excessively lacking, which is more conducive to the subsequent construction of knowledge graphs and trajectory sequence models.
[0066] Next, for step 106, based on geospatial information and spatial trajectory information, a knowledge graph of the corresponding spatial entities is constructed, including:
[0067] Determine the relationships between spatial entities based on spatial trajectory information;
[0068] Based on geospatial information and spatial trajectory information, determine the attribute values of each spatial entity; among which, the attribute values include the time, velocity, acceleration, direction, starting point and ending point of the target corresponding to the spatial entity;
[0069] A knowledge graph is constructed based on spatial entities, relationships, and attribute values.
[0070] It should be noted that attribute values also include, but are not limited to, the country of origin and region type (e.g., sea area, airspace, land area) to which the corresponding spatial entity belongs.
[0071] In this invention, a knowledge graph is constructed based on triples of entities, relationships, and attributes. Directed edges are constructed between adjacent spatial entities according to the target's trajectory (i.e., spatial trajectory information), and relevant attributes are added to the directed edges according to the target type. The target's trajectory can be represented by the transition relationships between spatial entities, and the relevant trajectory data is embedded in the knowledge graph through correspondences with spatial entities, serving as a knowledge representation of the trajectory layer. Furthermore, the trajectories of different types of targets can also serve as labels for the relationships between spatial entities.
[0072] Specifically, such as Figure 2 The t1 to t2 shown n A schematic diagram showing the GIS trajectory of the target ship near Strait A within a given time period and its mapping to spatial entities, where t1 = T1, tn = T n The data precision of the GIS trajectory and the size of the A Strait region are determined, the target granularity for dividing the spatial region is determined, and the A Strait is discretized into a grid to obtain n spatial entities. Here, S1 is the spatial entity corresponding to time T1, and S... n For T n The spatial entity corresponding to a given moment.
[0073] For step 108, the semantic vector corresponding to the entity in the space is obtained, including:
[0074] For each spatial entity, execute:
[0075] Identify the adjacent spatial entities that have a spatial adjacency relationship with the spatial entity, and aggregate the spatial entity and the adjacent spatial entities to obtain the aggregate vector;
[0076] Obtain the attribute values of the spatial entity and encode the attribute values to obtain the entity attribute encoding vector; wherein, the attribute values include the time, velocity, acceleration, direction, starting point and ending point of the target when it corresponds to the spatial entity;
[0077] The spatial location of the spatial entity is obtained, and the spatial location is vectorized using a preset granularity to obtain a spatial feature encoding vector; wherein the preset granularity is different from the target granularity.
[0078] The semantic vector is obtained by concatenating the aggregation vector, entity attribute encoding vector, and spatial feature encoding vector.
[0079] In this invention, the semantic vector contains the attribute values of spatial entities and combines the representations of spatial entities at different granularities with the representations of spatial neighbor nodes, thus enriching the feature representation of spatial entities. Specifically, for each spatial entity, its neighboring spatial entities are first aggregated using graph aggregation methods, including average aggregation, max pooling aggregation, average pooling aggregation, GCN aggregation, LSTM aggregation, etc., to obtain an aggregated vector. Then, the attribute values of the spatial entities are grouped, and the features within each group are embedded and then average pooled. The vector representations of each group are combined and encoded into a fixed dimension by an encoder as the node feature output, thus obtaining the entity attribute encoding vector. Next, the spatial entity vector representations at different granularities at the same spatial location are calculated to obtain the spatial feature encoding vector. Finally, the above three types of vectors are concatenated and a feature cross is performed to output a fixed-dimensional vector representation as the representation method of the spatial entity, thus obtaining the semantic vector.
[0080] For step 110, a deep learning model is used to perform sequence modeling on the semantic vector of each spatial entity of the target to obtain a trajectory sequence model based on a knowledge graph.
[0081] The trajectory sequence model takes a sequence of semantic vectors of the target as input and outputs the target's event intent and / or predicted trajectory; the sequence of semantic vectors is a sequence of semantic vectors arranged in order of the target's spatial trajectory movement time.
[0082] In this invention, the trajectory time of each spatial entity on the spatial trajectory is determined according to the movement time of the target's spatial trajectory. The semantic vectors of each spatial entity are arranged according to the trajectory time, that is, all semantic vectors corresponding to the target are arranged in the time order of the movement trajectory. The trajectory of the target on the timeline is preserved to obtain the temporal trajectory of the semantic vectors, which is beneficial for subsequent accurate capture of the target's intent and dynamic changes based on the constructed trajectory sequence model.
[0083] In some preferred embodiments, the trajectory sequence model is trained using at least two sets of samples, each set including a sequence of semantic vectors of the target as input within a first historical time period and the target’s event intent and / or predicted trajectory within a second historical time period as output; wherein the second historical time period is located after the first historical time period on the timeline.
[0084] In some preferred embodiments, the BERT4Rec model is used, based on the user behavior sequence modeling method of bidirectional self-attention and Clozetask. Deep sequence model and Clozetask are introduced in the pre-training process. U = {u1, u2, ..., u|U|} is defined as the target set, V = {v1, v2, ..., v|V|} is the spatial entity set, and Su = [v1(u), ..., vt(u), ..., vnu(u)] is the semantic vector sequence within the historical time period.
[0085] In this invention, the constructed knowledge graph-based trajectory sequence model can predict the probability of adjacent entity transitions of the target at the next moment, that is, predict the trajectory of the target at future moments; at the same time, it can also perform label-based multi-classification training according to specific tasks, that is, determine the event intent of the target.
[0086] like Figure 3 , Figure 4 As shown, this embodiment of the invention provides a trajectory sequence modeling device based on a knowledge graph. The device embodiment can be implemented through software, hardware, or a combination of both. From a hardware perspective, such as... Figure 3 The diagram shown is a hardware architecture diagram of a computing device housing a trajectory sequence modeling device based on a knowledge graph, as provided in an embodiment of the present invention. (Except for...) Figure 3 In addition to the processor, memory, network interface, and non-volatile memory shown, the computing device in the embodiment may also include other hardware, such as a forwarding chip responsible for processing packets. Taking software implementation as an example, such as... Figure 4 As shown, as a logical device, it is formed by the CPU of its computing device reading the corresponding computer program from the non-volatile memory into memory and running it. This embodiment provides a trajectory sequence modeling device based on a knowledge graph, including: an acquisition module 400, a knowledge determination module 402, an entity determination module 404, a first construction module 406, a processing module 408, and a second construction module 410;
[0087] The acquisition module 400 is used to acquire the trajectory data of the target;
[0088] The knowledge determination module 402 is used to extract knowledge from trajectory data to obtain geospatial information and spatial trajectory information; and to determine the spatial region where the target is located based on the geospatial information.
[0089] The entity determination module 404 is used to discretize the spatial region into a mesh to obtain a spatial entity.
[0090] The first construction module 406 is used to construct a knowledge graph of corresponding spatial entities based on geospatial information and spatial trajectory information;
[0091] The processing module 408 is used to perform the following for each spatial entity: determine the adjacent spatial entities that have a spatial adjacency relationship with the spatial entity, and aggregate the spatial entity and the adjacent spatial entities to obtain the semantic vector corresponding to the spatial entity;
[0092] The second building module 410 is used to perform sequence modeling of the semantic vector of each spatial entity of the target using a deep learning model, so as to obtain a trajectory sequence model based on a knowledge graph.
[0093] In some specific implementations, the acquisition module 400 can be used to perform the above step 100, the knowledge determination module 402 can be used to perform the above step 102, the entity determination module 404 can be used to perform the above step 104, the first construction module 406 can be used to perform the above step 106, the processing module 408 can be used to perform the above step 108, and the second construction module 410 can be used to perform the above step 110.
[0094] In some specific embodiments, the entity determination module 404 is further configured to perform the following operations:
[0095] Determine the data precision of the trajectory data;
[0096] Based on the size of the spatial region and the data precision, determine the target granularity for dividing the spatial region;
[0097] The spatial region is discretized and meshed according to the target granularity to obtain the spatial entity.
[0098] In some specific implementations, the first construction module 406 is also used to perform the following operations:
[0099] Based on the spatial trajectory information, the relationships between the spatial entities are determined;
[0100] Based on the geospatial information and the spatial trajectory information, the attribute values of each spatial entity are determined; wherein, the attribute values include the time, velocity, acceleration, direction, starting point, and ending point of the target corresponding to the spatial entity;
[0101] The knowledge graph is constructed based on the spatial entities, the relationships, and the attribute values.
[0102] In some specific implementations, the processing module 408 is also used to perform the following operations:
[0103] The spatial entity is aggregated with the adjacent spatial entities to obtain an aggregated vector;
[0104] Obtain the attribute values of the spatial entity, and encode the attribute values to obtain an entity attribute encoding vector; wherein, the attribute values include the time, velocity, acceleration, direction, starting point and ending point of the target corresponding to the spatial entity;
[0105] The spatial location of the spatial entity is obtained, and the spatial location is vectorized using a preset granularity to obtain a spatial feature encoding vector; wherein the preset granularity is different from the target granularity.
[0106] The semantic vector is obtained by concatenating the aggregation vector, the entity attribute encoding vector, and the spatial feature encoding vector.
[0107] In some specific implementations, the input of the trajectory sequence model is a sequence of semantic vectors of the target, and the output is the event intent and / or predicted trajectory of the target; wherein, the sequence of semantic vectors is a sequence of semantic vectors arranged in order of the movement time of the target's spatial trajectory.
[0108] In some specific implementations, the trajectory sequence model is trained using at least two sets of samples, each set including a sequence of semantic vectors of the target as input within a first historical time period and the target's event intent and / or predicted trajectory within a second historical time period as output; wherein the second historical time period is located after the first historical time period on the timeline.
[0109] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on a knowledge graph-based trajectory sequence modeling device. In other embodiments of the present invention, a knowledge graph-based trajectory sequence modeling device may include more or fewer components than illustrated, or combine some components, split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0110] The information interaction and execution process between the modules in the above-mentioned device are based on the same concept as the method embodiment of the present invention, and the specific details can be found in the description of the method embodiment of the present invention, and will not be repeated here.
[0111] This invention also provides a computing device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements a trajectory sequence modeling method based on a knowledge graph according to any embodiment of this invention.
[0112] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform a trajectory sequence modeling method based on a knowledge graph according to any embodiment of this invention.
[0113] Specifically, a system or apparatus equipped with a storage medium may be provided, on which software program code implementing the functions of any of the embodiments described above is stored, and the computer (or CPU or MPU) of the system or apparatus may read and execute the program code stored in the storage medium.
[0114] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.
[0115] Examples of storage media used to provide program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.
[0116] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0117] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion module connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion module execute some and all of the actual operations, thereby realizing the function of any of the above embodiments.
[0118] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0119] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as ROM, RAM, magnetic disk, or optical disk.
[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A trajectory sequence modeling method based on a knowledge graph, characterized in that, include: Obtain the target's trajectory data; Knowledge extraction is performed on the trajectory data to obtain geospatial information and spatial trajectory information; The spatial region where the target is located is determined based on the geospatial information; Discretize the spatial region into a grid to obtain a spatial entity; Based on the geospatial information and the spatial trajectory information, a knowledge graph corresponding to the spatial entities is constructed; For each of the spatial entities, the following steps are performed: determine the adjacent spatial entities that have a spatial adjacency relationship with the spatial entity, and aggregate the spatial entity and the adjacent spatial entities to obtain the semantic vector corresponding to the spatial entity; A knowledge graph-based trajectory sequence model is obtained by using a deep learning model to perform sequence modeling on the semantic vectors of each spatial entity of the target. The input of the trajectory sequence model is the semantic vector sequence of the target, and the output is the event intent and / or predicted trajectory of the target. The semantic vector sequence is a sequence of semantic vectors arranged in order of the movement time of the target's spatial trajectory. The semantic vector corresponding to the entity in the space is obtained, including: The spatial entity is aggregated with the adjacent spatial entities to obtain an aggregated vector; Obtain the attribute values of the spatial entity, and encode the attribute values to obtain an entity attribute encoding vector; wherein, the attribute values include the time, velocity, acceleration, direction, starting point and ending point of the target corresponding to the spatial entity; The spatial location of the spatial entity is obtained, and the spatial location is vectorized using a preset granularity to obtain a spatial feature encoding vector; wherein the preset granularity is different from the target granularity for dividing the spatial region. The semantic vector is obtained by concatenating the aggregation vector, the entity attribute encoding vector, and the spatial feature encoding vector.
2. The method of claim 1, wherein, The process of discretizing the spatial region into a spatial entity includes: Determine the data precision of the trajectory data; Based on the size of the spatial region and the data precision, determine the target granularity for dividing the spatial region; The spatial region is discretized and meshed according to the target granularity to obtain the spatial entity.
3. The method of claim 1, wherein, The trajectory sequence model is trained using at least two sets of samples. Each set of samples includes a sequence of semantic vectors of the target as input within a first historical time period and the target's event intent and / or predicted trajectory within a second historical time period as output. The second historical time period is located after the first historical time period on the timeline.
4. The method according to any one of claims 1 to 3, characterized in that, The step of constructing a knowledge graph corresponding to the spatial entities based on the geospatial information and the spatial trajectory information includes: Based on the spatial trajectory information, the relationships between the spatial entities are determined; Based on the geospatial information and the spatial trajectory information, the attribute values of each spatial entity are determined; wherein, the attribute values include the time, velocity, acceleration, direction, starting point, and ending point of the target corresponding to the spatial entity; The knowledge graph is constructed based on the spatial entities, the relationships, and the attribute values. 5.A knowledge graph based trajectory sequence modeling apparatus, characterized in that, For implementing the method as described in any one of claims 1 to 4, comprising: The acquisition module is used to acquire the trajectory data of the target. The knowledge determination module is used to extract knowledge from the trajectory data to obtain geospatial information and spatial trajectory information; and to determine the spatial region where the target is located based on the geospatial information. The entity determination module is used to discretize the spatial region into a mesh to obtain spatial entities; The first construction module is used to construct a knowledge graph corresponding to the spatial entities based on the geospatial information and the spatial trajectory information. The processing module is used to perform the following for each spatial entity: determine the adjacent spatial entities that have a spatial adjacency relationship with the spatial entity, and aggregate the spatial entity and the adjacent spatial entities to obtain the semantic vector corresponding to the spatial entity; The second construction module is used to perform sequence modeling on the semantic vector of each spatial entity of the target using a deep learning model, so as to obtain a trajectory sequence model based on a knowledge graph.
6. The apparatus of claim 5, wherein, The entity determination module is also used to perform the following operations: Determine the data precision of the trajectory data; Based on the size of the spatial region and the data precision, determine the target granularity for dividing the spatial region; The spatial region is discretized and meshed according to the target granularity to obtain the spatial entity.
7. A computing device comprising a memory and a processor, wherein the memory stores a computer program, and the processor, when executing the computer program, implements the method as described in any one of claims 1-4.
8. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of any one of claims 1-4.
Citation Information
Patent Citations
Regional traffic jam tracing method based on travel event knowledge graph
CN113763712A
Spatial relationship semantic analysis method based on knowledge graph
CN114564966A