A method for constructing a spatiotemporal semantic graph for a tourism scene
Patent Information
- Application Number
- CN202611181954.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-20
AI Technical Summary
[0006]针对现有技术存在的不足,本发明的目的在于提供一种面向旅游场景的时空语义图谱构建方法,以解决现有旅游时空语义图谱构建中,因旅游实体多粒度嵌套、空间重叠和多源同指而导致旅游实体节点重复生成、同一旅游事件重复连接至多个父子实体或同层实体、事件实体关系边串层及重复物化的问题
1、本发明在图谱节点写入前根据实体名称、别名、空间范围和层级类型生成实体归并候选集合,并对满足实体归并条件的实体生成旅游实体节点,能够降低多来源旅游实体数据中同一实体多名称、多编号和多边界造成的实体节点重复生成;
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph construction technology, specifically to a method for constructing a spatiotemporal semantic graph for tourism scenarios. Background Technology
[0002] With the development of smart tourism, digital management of scenic spots, tourism recommendations, scenic spot navigation, and itinerary analysis technologies, tourism spatiotemporal semantic graphs are used to organize information such as tourists, tourism entities, trajectory stay events, image acquisition events, textual narrative events, route relationships, spatial location relationships, and temporal relationships. Existing methods for constructing tourism spatiotemporal semantic graphs typically extract tourism entities and tourism events from map data, point-of-interest data, tourist trajectory data, photo or video data, user reviews, travelogue texts, and itinerary data. They then connect tourism events to tourism entity nodes based on the inclusion relationship between the event location and the spatial extent of the entity, the distance relationship between the event location and the entity center, or the entity names identified in text or images.
[0003] In real-world tourism scenarios, tourism entities are characterized by multi-granularity nesting, spatial overlap, and multiple sources of reference. A single tourism area may simultaneously contain entities of various granularities, such as scenic spots, districts, sub-attractions, buildings, entrances, viewing platforms, tour routes, historical and cultural axes, and activity areas. For example, the same trajectory stop event may simultaneously fall within a scenic spot, a sub-attraction within that scenic spot, a building within that sub-attraction, and a tour route traversing the area; the same photograph may identify the building name, but the image capture point may be located within the parent scenic spot; the same text may use entity abbreviations, aliases, old names, or platform-defined names.
[0004] If event entity relationship edges are written directly based on spatial inclusion relationships, the same tourism event may be simultaneously connected to parent scenic spots, child attractions, buildings, and route entities, resulting in duplicate materialization of event entity relationship edges. If relationship edges are written directly based on nearest distance or text hit results, events may be connected to overlapping entities or adjacent entities at the same level, resulting in layered event entity relationship edges. If different data sources contain different names, boundaries, and numbers of the same tourism entity, existing methods may also generate multiple tourism entity nodes for the same entity, further amplifying the problem of duplicate writing of event entity relationship edges.
[0005] Therefore, this invention proposes a method for constructing a spatiotemporal semantic graph for tourism scenarios. Summary of the Invention
[0006] To address the shortcomings of existing technologies, the present invention aims to provide a method for constructing a spatiotemporal semantic graph for tourism scenarios. This method solves the problems in existing tourism spatiotemporal semantic graph construction, such as the repeated generation of tourism entity nodes, repeated connection of the same tourism event to multiple parent and child entities or entities at the same level, layered event entity relationship edges, and repeated materialization caused by multi-granularity nesting, spatial overlap, and multiple sources of reference.
[0007] To achieve the above objectives, the present invention provides the following technical solution: A method for constructing a spatiotemporal semantic graph for tourism scenarios includes: Acquire tourism event data and tourism entity data, generate a candidate set for entity merging based on the entity name, alias, spatial range, and hierarchical type of the tourism entity, and generate tourism entity nodes for entities that meet the entity merging conditions; A set of entities that match the event is generated based on the event space carrying range, event semantic tags, and the tourism entity nodes in the tourism event data. Construct an event carrying hierarchy diagram based on the spatial inclusion relationship, hierarchical type relationship and same-level overlap relationship among entities in the event hit entity set; Calculate the suitability of tourism events for each entity in the event carrying hierarchy graph to determine the target carrying entity; when a target carrying entity exists, write the tourism event as a spatiotemporal event node, write a direct event entity relationship edge between the spatiotemporal event node and the target carrying entity node, and write an inheritance propagation relationship edge for the parent entity of the target carrying entity; when no target carrying entity exists, write the tourism event into the carrying pending record. Establish an edge conflict index between relation edges and event-hitting entity sets, event-bearing hierarchy graph, and bearing adaptability. Write nodes, relation edges, and edge conflict indexes into the graph storage structure to obtain a tourism spatiotemporal semantic graph.
[0008] Furthermore, the tourism event data includes at least one of trajectory stay events, image acquisition events, and text description events; the tourism event data includes event identifiers, tourist identifiers, event time, event location, event spatial carrying capacity, event semantic tags, and source evidence records; the tourism entity data includes entity identifiers, entity names, entity aliases, entity categories, entity spatial ranges, entity hierarchical types, parent-child hierarchical records, and data source versions.
[0009] Further, an entity merging candidate set is generated, including: performing name standardization, alias normalization, spatial range standardization, and entity category normalization on tourism entity records from different data sources to obtain name similarity, alias hit strength, spatial overlap strength, center distance proximity, and category compatibility; calculating entity merging confidence; and including tourism entity records whose entity merging confidence reaches the entity merging threshold and which do not have parent-child hierarchy conflicts, homonymous object conflicts, or spatial boundary conflicts into the entity merging candidate set.
[0010] Furthermore, tourism entity nodes are generated for entities that meet the entity merging conditions, including: performing entity identifier merging, specification name determination, alias set merging, entity category determination, spatial range version attachment, and source record saving on the entity merging candidate set to generate tourism entity nodes; for a single tourism entity record that is not included in any entity merging candidate set, a single record tourism entity node is generated; for tourism entity records with similar names but with parent-child hierarchical relationships, entity merging is not performed, and they are retained as candidate entities for subsequent parent-child carrying edges.
[0011] Furthermore, generating an event-hit entity set includes: determining the spatial hit strength based on the event space carrying range of the tourism event and the entity space range of the tourism entity node; determining the semantic hit strength based on the event semantic tag of the tourism event and the entity name, entity alias, and entity category of the tourism entity node; and writing tourism entity nodes whose spatial hit strength reaches the spatial hit threshold, whose semantic hit strength reaches the semantic hit threshold, or whose combined spatial hit strength and semantic hit strength reach the combined hit threshold, into the event-hit entity set corresponding to the tourism event.
[0012] Furthermore, an event-carrying hierarchy graph is constructed, including: in the event-hit entity set, writing parent-child carrying edges between two tourism entity nodes that have a stable containment relationship in spatial range and have different hierarchy types; writing same-level competition edges between two tourism entity nodes that have the same hierarchy type and satisfy at least one condition such as spatial overlap, adjacent entrances, overlapping tour routes, or being hit by the same event semantic tag; retaining entity merging identifiers for tourism entity nodes obtained by merging the same entity merging candidate set; and forming an event-carrying hierarchy graph by parent-child carrying edges, same-level competition edges, and entity merging identifiers.
[0013] Further, determining the target carrying entity includes: calculating the carrying adaptability of each entity in the event carrying hierarchy diagram; for any entity, designating entities with a carrying adaptability reaching the direct carrying threshold as stable carrying candidate entities; performing intra-level competition margin verification on stable carrying candidate entities; when a stable carrying candidate entity has a sub-level entity that satisfies both the direct carrying threshold and the competition separation threshold, prioritizing the determination of the sub-level entity as the target carrying entity; when a target carrying entity cannot be stably determined, writing the corresponding tourism event into the carrying pending record.
[0014] Furthermore, writing the inheritance propagation relationship edge includes: searching for the superior entity along the parent-child bearing edge of the target bearing entity in the event bearing hierarchy graph; writing the inheritance propagation relationship edge between the spatiotemporal event node and the superior entity node; the inheritance propagation relationship edge includes an inheritance identifier, a propagation depth, and an inheritance confidence value; the inheritance propagation relationship edge is used to indicate that the tourism event inherits its affiliation from the target bearing entity to the superior entity.
[0015] Furthermore, the tourism spatiotemporal semantic graph includes tourist nodes, spatiotemporal event nodes, tourism entity nodes, event attribution edges between tourists and spatiotemporal events, entity hierarchy relationship edges between tourism entities, direct event entity relationship edges, inheritance and propagation relationship edges, and edge conflict indexes.
[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. Before writing the map node, the present invention generates a candidate set of entities for merging based on entity name, alias, spatial range and hierarchical type, and generates tourism entity nodes for entities that meet the entity merging conditions, which can reduce the repeated generation of entity nodes caused by multiple names, multiple numbers and multiple boundaries of the same entity in multi-source tourism entity data. 2. This invention does not directly connect tourism events to all spatially matched tourism entities. Instead, it first generates a set of event-matched entities for each tourism event, and then constructs an event-bearing hierarchy graph based on spatial inclusion relationships, hierarchical type relationships, and same-level overlapping relationships. This ensures that parent-child entities, same-level competing entities, and entity merging entities are in a unified local graph structure before the relationship edges are written. 3. This invention determines the target bearer entity by bearing adaptability, same-layer competition margin and child-level bearing priority value. It can write the direct relationship edge of the event into the most suitable entity node and prevent the writing of the relationship edge when the same-layer competition is unclear, thereby reducing the cross-layer connection between adjacent attractions, overlapping lines and parent and child attractions. 4. This invention distinguishes between direct event entity relationship edges and inheritance propagation relationship edges. Direct event entity relationship edges are only written to the target carrying entity; the parent entity of the target carrying entity obtains statistical attribution through inheritance propagation relationship edges with inheritance identifiers and propagation depths, thereby avoiding the same tourism event being repeatedly materialized into multiple direct visit or direct observation relationships at different levels. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating a method for constructing a spatiotemporal semantic graph for tourism scenarios. Figure 2 This is a schematic diagram illustrating the generation of candidate sets for entity merging and the merging of tourism entity nodes provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the tourism spatiotemporal semantic graph structure provided in an embodiment of the present invention. Detailed Implementation
[0018] Example 1 Reference Figure 1 This embodiment provides a method for constructing a spatiotemporal semantic graph for tourism scenarios. This method can be executed by a tourism information server, a scenic area data platform server, a city tourism data platform, a tourism application backend server, or a cloud-based graph construction server.
[0019] This embodiment provides a method for constructing a spatiotemporal semantic graph for tourism scenarios, including the following steps: S1. Obtain tourism event data and tourism entity data.
[0020] Tourism event data includes at least one of the following: trajectory stay events, image capture events, and text narrative events. Trajectory stay events are obtained by aggregating tourist trajectory points, image capture events are generated from photo or video frame data, and text narrative events are extracted from travelogues, reviews, itineraries, or speech-to-text.
[0021] Each tourism event is represented as:
[0022] in, Indicates the first A tourism event Indicates the event identifier, Indicates tourist identification, Indicates the time of the event. Indicates the scope of the event space. Indicates the location of the event. Represents a set of event semantic tags. Indicates the source evidence record, Indicates the event type.
[0023] Event space carrying capacity Determined based on the source of the event. For trajectory-stopping events, It is formed based on the stop trajectory point buffer, the stop point convex hull, or the stop radius range. For image acquisition events, It is formed by the image acquisition point positioning error buffer, the image shooting direction, and the field of view. For textual descriptions of events, if there are parsable location words in the text, then... It can be formed by the candidate spatial range or text association area of the entity corresponding to the location word; if there is only an entity name without location, semantic tags are used to participate in the candidate hit first, and the spatial hit strength can be determined by the default value or the candidate entity association range.
[0024] Tourism entity data comes from map points of interest, scenic area management systems, cultural and tourism directories, open maps, image recognition dictionaries, travelogue entity dictionaries, and the platform's self-built attraction database. Each tourism entity record is represented as follows:
[0025] in, Indicates the first A record of a tourism entity, Indicates the entity record identifier, Indicates the entity name. Represents a set of entity aliases. Indicates the entity category, Indicates the spatial extent of an entity. Indicates the entity hierarchy type. Indicates the parent entity record. Indicates the data source. Indicates the version of the data source.
[0026] Entity hierarchy types include regional scenic areas, area-level attractions, sub-attractions, buildings, entrances, viewpoints, tour routes, and activity areas. The spatial extent of an entity can be a point, line, or surface. For point entities, the server generates a buffer extent based on the entity type and spatial precision; for line entities, a line buffer extent is generated based on the line width or tour corridor width; for surface entities, their boundary extent is used directly.
[0027] S2. Generate a candidate set for entity merging and merge the tourism entity nodes.
[0028] Reference Figure 2 Tourism entities from different data sources may have different names, aliases, boundaries, and numbers. For example, the Palace Museum, the Forbidden City, and the Forbidden City appear as points of interest, scenic area directories, and historical and cultural entities, respectively, in different sources; the same viewpoint may also have different boundaries in map platforms and scenic area systems. If these records are directly written into the graph, multiple parallel tourism entity nodes will be generated, and subsequent event relationship edges will be repeatedly written. Therefore, the server first performs entity merging processing.
[0029] For any two tourism entity records and Calculate the entity merge confidence:
[0030] in, The similarity of entity names is calculated based on standardized names, abbreviations, simplified / traditional character conversion, and word segmentation results. Indicates the hit strength of entity aliases, determined based on the intersection of alias sets, old names, translated names, and platform aliases; The intensity of spatial overlap is determined based on the intersection-to-union ratio, containment ratio, or buffer overlap ratio of the spatial extents of the two entities. This indicates the proximity of the center distances, calculated using an exponential decay based on the distance between the entity's center points. This indicates category compatibility, with a higher value taken when two entities belong to the same category or are in a group of categories that can be merged. This represents the hierarchy conflict penalty, which takes a higher value when two entities are more likely to be in a parent-child hierarchy than to be the same entity.
[0031] In an optional embodiment, the entity name similarity is obtained by weighting the normalized edit distance similarity, pinyin similarity, and word segmentation similarity; the alias hit strength is 1 when there is a complete hit in the alias sets of the two entities, and 0.7 to 0.9 when there is a hit in the abbreviation, old name, or translation name.
[0032] Spatial overlap strength is determined by the following formula:
[0033] The proximity of the centers is determined by the following formula:
[0034] in, , Representing entities respectively ,entity The space center, Indicates the center distance. This represents the distance normalization parameter.
[0035] when The entity merging threshold has been reached, and If the hierarchical conflict threshold is not reached, the entity will be recorded. and Entities are included in the same entity merging candidate set. The entity merging threshold can be between 0.72 and 0.85. If two entities have similar names and their spatial ranges are contained within each other, but their entity hierarchical types are significantly different, such as one being a scenic area and the other a building or entrance, then they are not merged, but are retained as parent-child carrier candidates in the subsequent event carrier hierarchy diagram.
[0036] The entity merge candidate set is represented as:
[0037] Merge candidate sets for each entity Generate a standardized tourism entity node:
[0038] in, Indicates the identification of tourism physical nodes. Indicates the standard name, This represents the set of aliases after merging. Indicates the entity category, Indicates the scope of the standard space. Indicates the entity hierarchy type. Represents the set of source records. Indicates the physical version.
[0039] The specification name is determined according to the priority of authoritative data sources, name completeness, and frequency of use. Multiple source versions are retained for the specification space, and boundary merging can also be performed based on source credibility. To avoid loss of hierarchical relationships due to boundary merging, source boundary versions are retained, and the boundary versions that subsequent relationship edges depend on are recorded in the edge conflict index.
[0040] S3, the set of event-hitting entities that generate tourism events.
[0041] After merging the tourism entity nodes, a set of event-hitting entities is generated for each tourism event.
[0042] Regarding tourism events and tourism physical nodes Calculate spatial hit strength When the event space encompasses a planar area, the spatial hit strength is:
[0043] in, Indicates the scope of the event space. Represents tourism entity nodes Spatial range.
[0044] When the event space encompasses point locations, the space hit strength is:
[0045] in, Indicates the location of the event. Indicates the distance from the event location to the physical space. distance, This indicates the error in the location of the event.
[0046] The server also calculates semantic hit strength. The semantic hit strength is determined by the set of event semantic tags. The semantic tags are obtained by matching the standardized names, alias sets, entity categories, and entity descriptions of tourism entity nodes. For image acquisition events, the event semantic tags come from landmark names obtained from image recognition, target object tags, or manual annotations; for text narrative events, the event semantic tags come from location words, action words, and contextual entities; for trajectory stay events, the event semantic tags come from point of interest categories, ticket verification data, or tour trigger records within the stay area.
[0047] Semantic hit strength is represented as:
[0048] in, Indicates event semantic tags With entity name or alias similarity, This indicates the matching weight between the event type and the entity level type.
[0049] Write tourism entity nodes that meet any of the following conditions into the event hit entity set:
[0050]
[0051]
[0052] in, Indicates the spatial hit threshold. Indicates the semantic hit threshold. Indicates the combined hit threshold. , This represents the combined weights.
[0053] The set of entities that are hit by the event is represented as:
[0054] The set of entities that hit the event is not the final set of relation edges to be written, but rather a candidate input for constructing the event-carrying hierarchy graph later. This preserves candidate information for parent scenic spots, child scenic spots, routes, and competing entities at the same level, but does not directly write them all as relation edges that determine the event entities.
[0055] S4. Construct an event carrying hierarchy diagram.
[0056] The event-hitting entity set of a tourism event may simultaneously include parent scenic areas, child attractions, buildings, entrances, routes, and adjacent areas. To determine the carrying relationships between these entities before writing relational edges, an event carrying hierarchy graph is constructed based on the event-hitting entity set.
[0057] The event hierarchy diagram is represented as follows:
[0058] in, Indicates tourism events The corresponding event carrying hierarchy diagram, Represents the set of entities that the event hits. Represents the set of parent and child edges. Represents the set of competing edges at the same level. This represents the set of entity merge identifiers.
[0059] For two entities in the event-hit entity set and The calculation includes stability:
[0060] in, Representing entities Entity The load includes stability. Representing entities With entity The hierarchical type compatibility coefficient. When The parent-child carrying threshold has been reached, and the entity The hierarchy type is lower than the entity. When dealing with hierarchical types, write entities in the event-carrying hierarchy diagram. Pointing to entity The father and son carry each other on the side.
[0061] For example, if the Meridian Gate's physical space is mostly located within the Palace Museum's physical space, and the Meridian Gate is a building-level entity while the Palace Museum is a scenic area-level entity, then the event carrying hierarchy diagram should include: The parent-child boundary does not indicate that the tourism event is directly associated with the parent scenic area, but only that if the tourism event is directly associated with the Meridian Gate, the superior affiliation to the Palace Museum can be expressed through the inheritance and propagation relationship.
[0062] When there is no stable containment relationship between two entities, but any of the following conditions are met, a competing edge at the same level is written: the spatial ranges of the two entities overlap and the intersection-union ratio reaches the same-level overlap threshold; the entrance ranges of the two entities are adjacent and the event location error may cover both of them simultaneously; both entities are sub-scenic spots of the same level type; both entities are hit by the same event semantic tag; the tour routes to which the two entities belong overlap. The competing edge at the same level is used to subsequently determine whether one of the entities can be stably selected as the target carrying entity.
[0063] The intensity of competition within the same layer is expressed as:
[0064] in, Representing entities With entity The intensity of competition within the same layer, This indicates the competition weight when the two levels are of the same or similar type. When... When the contention threshold is reached, write a contention edge at the same level into the event carrying hierarchy graph.
[0065] S5. Calculate the load-bearing adaptability.
[0066] The event carrying hierarchy diagram is used to calculate the carrying suitability of tourism events for each entity. The carrying suitability is used to evaluate whether an entity is suitable as the direct carrying entity for the tourism event.
[0067] Regarding tourism events and the event hit entity The load-bearing adaptability is determined by the following formula:
[0068] in, Indicates tourism events For entities The load-bearing adaptability, Indicates spatial hit strength. Indicates semantic hit strength. This indicates the granularity adaptation between event granularity and entity level type. Indicates parent-child carrying edge pairs of entities Hierarchical stability support items, This indicates a penalty for competition within the same level. This represents the weighting parameter.
[0069] Granularity adaptation item This is designed to prevent all events from being absorbed into the parent scenic area and to avoid excessive drilling down to child entities when there is insufficient evidence. For image acquisition events or text description events, if the event semantic tag directly matches the name of a sub-scenic spot, building, or viewpoint, the granularity adaptation value of the corresponding child entity is set to a higher value; if the event is only a trajectory stay event and does not contain an entity semantic tag, entities with a higher degree of coverage of the parent area and stay range receive a higher granularity adaptation value; if the event space covers multiple sub-scenic spots, the granularity adaptation value of a single sub-scenic spot is reduced.
[0070] Granularity adaptation is represented as:
[0071] in, This indicates the source adaptation weight between the event type and the entity hierarchy type. It indicates the degree of scale proximity between the scope of the event space and the granularity of the entity space.
[0072] Hierarchical stability support items This is used to reflect whether an entity is in a stable parent-child link in the event-carrying hierarchy diagram. If the entity If there is a stable parent-child edge between it and its parent entity, and there are no multiple conflicting upper-level paths, then Take the higher value; if the entity If the parent relationship is unclear or there is a boundary version conflict, then reduce.
[0073] Same-level competition penalty items Used to reflect entities Uncertainty with competing entities at the same level. First, calculate the unpenalized fit value:
[0074] Recalculate the entity Same-level competition margin:
[0075] in, Indicates the relationship between entities in the event carrying hierarchy diagram. There exists a set of entities with competing edges at the same level. If there are no competing entities at the same level, then... Take the preset maximum margin.
[0076] The penalty for competition within the same level is determined by the following formula:
[0077] in, Indicates the competition separation threshold. When the entity When the advantage is insufficient relative to the competing entities, Increase its size, thereby reducing its likelihood of being the target carrier entity.
[0078] S6. Determine the target carrier entity.
[0079] The target load-bearing entity is determined based on load-bearing adaptability, intra-layer competition margin, and sub-level load-bearing priority.
[0080] First, entities whose bearer adaptability reaches the direct bearer threshold are added to the stable bearer candidate set:
[0081] in, Indicates tourism events A stable set of candidate bearers This indicates the direct carrying threshold.
[0082] Secondly, perform intra-level competition verification on entities in the stable bearer candidate set. When an entity same-level competition margin When the competition separation threshold is reached, the entity Through intra-level contention verification; when the intra-level contention margin does not reach the contention separation threshold, the entity... Instead of being designated as a target entity, it is written into the pending entity record.
[0083] Next, priority is given to sub-level bearers. This applies to stable bearer candidate entities. If it has child entities in the event carrying hierarchy diagram and child entities If both the direct carrying threshold and the competition separation threshold are met, then the child entity is selected first. As the target entity, this process avoids the situation where events are directly written to the parent scenic area and then to the child scenic spots, causing duplication of direct relationship edges between parent and child levels.
[0084] The priority value of the sub-level bearer is determined by the following formula:
[0085] in, Represents child entities Tourism events The priority value of the child bearer, Indicates tourism events Pair of child entities The load-bearing adaptability, Represents child entities parent entity The load includes stability. Represents child entities Relative to the parent entity The difference in hierarchical depth This indicates the priority coefficient of the hierarchy.
[0086] When multiple child entities simultaneously meet the conditions, the entity with the highest child-level carrying priority value is selected as the target carrying entity. If the difference in child-level carrying priority values among multiple child entities is less than the child-level separation threshold, the direct event entity relationship edge is not written, but rather a carrying pending record is written, awaiting more evidence or subsequent entity boundary updates.
[0087] Through the above processing, the target carrying entity is represented as follows:
[0088] in, This represents the set of entities after passing the direct carrying threshold, same-level competition check, and child-level priority check.
[0089] S7. Write the spatiotemporal event node, tourism entity node, and direct event entity relationship edge.
[0090] Tourism events are written as spatiotemporal event nodes. Spatiotemporal event nodes include event identifier, tourist identifier, event type, event time, event space carrying capacity, event semantic tag, source evidence record, and event version.
[0091] Spatiotemporal event nodes are represented as follows:
[0092] Write the target entity as a tourism entity node. If the tourism entity node already exists, it will not be created again; only the source record set or version information of the entity node will be updated.
[0093] When the target carries an entity When it exists, at the spatiotemporal event node With the target carrier entity node Write direct event entity relationship edges between them:
[0094] The deterministic direct edge key of direct event entity relationship edges is generated by the following formula:
[0095] in, Indicates a deterministic direct edge key. Indicates the target entity identifier. Indicates the version of the atlas.
[0096] If no identical deterministic direct edge key exists in the graph storage structure, a direct event entity relationship edge is created. If the identical deterministic direct edge key already exists in the graph storage structure, the relationship edge is not created again; instead, the current event source, image evidence, text evidence, or trajectory evidence are merged into the evidence set of the existing direct event entity relationship edge.
[0097] The edge attributes of direct event entity relationship edges include: bearing adaptability, spatial hit strength, semantic hit strength, same-layer competition margin, target bearing entity level type, event bearing level graph version, entity spatial range version, and source evidence record identifier.
[0098] S8. Write the inheritance propagation relationship edge.
[0099] Direct event entity relationship edges are only written to the target entity. To retain the statistical and query capabilities of parent scenic areas, superior regions, or tour routes, the superior entity of the target entity is found along the parent-child relationship edges in the event carrying hierarchy graph, and written to the inheritance propagation relationship edge.
[0100] If the target carries an entity To the superior entity Parent-child carrying paths exist:
[0101] Then at the spatiotemporal event node With the superior entity node Write the inheritance propagation relationship edge between them:
[0102] In this embodiment, the inheritance propagation relationship edge has an inheritance identifier, propagation depth, and inheritance confidence value. Propagation depth represents the number of parent-child edges traversed when a tourism event propagates from the target entity to its superior entity. The propagation depth from the target entity to its direct superior entity is one; the propagation depth from the target entity through an intermediate superior entity to a higher-level entity is two; and so on. A greater propagation depth indicates a more indirect propagation relationship between the tourism event and that superior entity.
[0103] The inheritance confidence value indicates the degree of credibility in suggesting that a tourism event inherits its affiliation from the target entity to a higher-level entity. The inheritance confidence value is determined based on the tourism event's suitability for the target entity, the stability of each parent-child edge in the parent-child path from the target entity to the higher-level entity, and the propagation depth. Higher suitability and stability of the parent-child path result in a higher inheritance confidence value; conversely, greater propagation depth leads to a lower inheritance confidence value. The inheritance confidence value is determined by the following formula:
[0104] in, Indicates tourism events To the superior entity Inheritance confidence value, Indicates tourism events For the target carrier entity The load-bearing adaptability, This indicates the containment stability between adjacent entities in the path. Indicates the depth of dissemination. This represents the propagation attenuation coefficient.
[0105] Inheritance propagation edges differ from direct event entity edges in relation type, edge key, and edge attributes. Inheritance propagation edges are not used for statistics on direct visits, direct photography, or direct descriptions, but rather for summarizing parent-level scenic spots, calculating regional popularity, and performing inheritance queries. Therefore, the server can achieve queryable and statistically analyze lower-level events from parent entities without repeatedly writing multiple direct relationship edges.
[0106] S9. Create an edge conflict index.
[0107] After writing the direct event entity relationship edges and inheritance propagation relationship edges, an edge conflict index is created. The edge conflict index is used to record why a relationship edge was written, which candidate entities were suppressed, which entity boundaries, aliases, and carrying hierarchical relationships the relationship edge depends on.
[0108] For edges representing direct event entity relationships, the edge conflict index is represented as follows:
[0109] in, Deterministic direct edge key The corresponding edge conflict index item, Indicates the event identifier, Represents the set of entities that the event hits. This represents an event hierarchy diagram. This represents the set of event-to-entity adaptability for each candidate entity. Indicates the entity that carries the target. This represents the set of evidence that supports direct edge writing. This represents the set of suppressed entities and the reasons for suppression. Indicates the entity space range version. Indicates an entity alias version. This indicates the version of the entity hierarchy.
[0110] The reasons for suppression include: insufficient margin for competition within the same layer, being replaced by a more stable child entity, being an entity inherited only from the parent, being replaced by a canonical node after entity merging, insufficient spatial hit, insufficient semantic hit, entity hierarchy conflict, etc.
[0111] For edges in the inheritance propagation relationship, the edge conflict index entry records the target carrying entity, the parent entity, the parent-child carrying path, the propagation depth, the inheritance confidence value, and the inheritance path version.
[0112] The server also creates a reverse index:
[0113]
[0114]
[0115] With the aforementioned reverse index, when entity boundaries, aliases, or hierarchical relationships are updated, the server can quickly locate the affected relationship edges without having to reprocess all travel events.
[0116] S10, Obtain the tourism spatiotemporal semantic graph.
[0117] Reference Figure 3 By writing tourist nodes, spatiotemporal event nodes, tourism entity nodes, entity hierarchy relationship edges, direct event entity relationship edges, inheritance and propagation relationship edges, and edge conflict indexes into the graph storage structure, a tourism spatiotemporal semantic graph is obtained.
[0118] The tourism spatiotemporal semantic graph is represented as follows:
[0119] in:
[0120]
[0121] Represents the set of visitor nodes. Represents a set of spatiotemporal event nodes. Represents the set of tourism entity nodes; The edge representing the event affiliation between tourists and spatiotemporal events. Indicates a direct event entity relationship edge. Indicates the inheritance and propagation relationship. Edges representing hierarchical relationships between tourism entities; Indicates the edge conflict index.
[0122] Direct event entity relationship edges are used to express that a tourism event is directly carried by the target entity. Inheritance and propagation relationship edges are used to express that a tourism event inherits its affiliation from the target entity to a higher-level entity. Entity hierarchy relationship edges are used to express the parent-child hierarchy relationship between tourism entities. Edge conflict indexes are used to support edge write interpretation and subsequent local updates.
[0123] S11, Local update after entity data changes.
[0124] Tourism entity data changes as the scenic area management system, map platform, and cultural tourism catalog are updated. For example, the boundary of a sub-scenic spot may be corrected, an entity may be given a new alias, a tour route may be redefined, or two records that were previously considered the same entity may be split into parent and child entities. Without an edge conflict index, the server would typically need to reprocess a large number of tourism events and tourism entities. The edge conflict index in this embodiment enables partial updates.
[0125] When the entity space extent version is detected When changes occur, based on the reverse index Query the direct event entity relationship edges and inheritance propagation relationship edges affected. For affected events, regenerate the event-hitting entity set, reconstruct the event-bearing hierarchy graph, and recalculate the bearer adaptability, intra-layer contention margin, and child-level bearer priority.
[0126] When the redefined target entity is different from the original target entity, the server marks the original direct event entity relationship edge as invalid or deletes it, and deletes or invalidates the inheritance propagation relationship edge generated based on the original target entity; then, it writes the new direct event entity relationship edge and the new inheritance propagation relationship edge according to the new target entity.
[0127] When the target entity remains unchanged, but the parent-child carrying path, inheritance confidence value, or propagation depth changes, only the inheritance propagation relationship edges and their edge conflict index entries are updated, and the direct event entity relationship edges are not rewritten.
[0128] When the entity alias version changes, it is based on the reverse index. The query depends on the relation edges that depend on the alias version. For events where the semantic hit strength may change, the semantic hit strength and carrier fit are recalculated. If the change in semantic hit strength causes the same-layer competition margin to cross the competition separation threshold, the target carrier entity is re-evaluated; otherwise, only the semantic hit strength and edge conflict index in the edge attributes are updated.
[0129] For example, a tourist in Beijing creates an image capture event near the Meridian Gate. The image recognition result includes the Meridian Gate, and the image capture point is located within the space of the Palace Museum, near the Meridian Gate, and also within the area associated with Beijing's central axis. If existing methods are used to directly write relational edges based on spatial inclusion or textual match, this image capture event may simultaneously connect to the Palace Museum, the Meridian Gate, and Beijing's central axis, resulting in the repeated writing of multiple direct event entity relational edges.
[0130] In this embodiment, the server first performs entity merging on the tourism entity data. For example, the Palace Museum, the Forbidden City, and the Palace Museum are merged into the tourism entity node Palace Museum after being judged by name, alias, spatial overlap, and category compatibility; the Meridian Gate and the Meridian Gate of the Palace Museum in a certain map source are merged into the tourism entity node Meridian Gate.
[0131] Generate a set of event-hitting entities for this image acquisition event:
[0132] An event carrying hierarchy diagram is constructed based on spatial inclusion relationships and hierarchical type relationships. Among them, the parent-child carrying edge from the Meridian Gate to the Palace Museum has a high inclusion stability; the relationship between the Beijing Central Axis and the Palace Museum is one of association and overlap, and it is not considered as a stable parent-child carrying edge for this event.
[0133] Calculate the carrying fit of the image acquisition event for the three entities. Since the image semantic tag directly hits Meridian Gate and the image acquisition location is close to the spatial range of Meridian Gate, Meridian Gate has a high semantic hit strength and granularity fit. Although the Palace Museum has a high spatial hit strength, it is a parent entity with a child entity Meridian Gate that meets the threshold. Although there is related spatial overlap in the Beijing Central Axis, the event semantic tag does not directly hit it, and the carrying fit is lower than the direct carrying threshold.
[0134] Therefore, the target entity is determined to be the Meridian Gate, and the following is written:
[0135] Meanwhile, the father-son carrying path from the Meridian Gate to the Palace Museum is written as follows:
[0136] Among them, the inheritance and propagation relationship edges have inheritance identifiers and propagation depths. Instead of writing the Palace Museum as another directly bearing entity of this event, or writing the Beijing Central Axis as a definite directly related edge, the edge conflict index records the Palace Museum as the inheriting entity, the Beijing Central Axis as a suppressed candidate entity, and the reason for suppression.
[0137] Through the above processing, the same image acquisition event can be accurately connected to the Meridian Gate as the target entity, and can also support statistical queries from the parent Palace Museum, while avoiding the duplication of materialization of multiple direct event entity relationships.
[0138] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for constructing a spatiotemporal semantic graph for tourism scenarios, characterized in that, include: Acquire tourism event data and tourism entity data, generate a candidate set for entity merging based on the entity name, alias, spatial range, and hierarchical type of the tourism entity, and generate tourism entity nodes for entities that meet the entity merging conditions; A set of entities that match the event is generated based on the event space carrying range, event semantic tags, and the tourism entity nodes in the tourism event data. Construct an event carrying hierarchy diagram based on the spatial inclusion relationship, hierarchical type relationship and same-level overlap relationship among entities in the event hit entity set; Calculate the carrying adaptability of tourism events to each entity in the event carrying hierarchy graph to determine the target carrying entity; when a target carrying entity exists, write the tourism event as a spatiotemporal event node, write the direct event entity relationship edge between the spatiotemporal event node and the target carrying entity node, and write the inheritance propagation relationship edge for the parent entity of the target carrying entity. When there is no target entity, the tourism event will be written to the pending record. Establish an edge conflict index between relation edges and event-hitting entity sets, event-bearing hierarchy graph, and bearing adaptability. Write nodes, relation edges, and edge conflict indexes into the graph storage structure to obtain a tourism spatiotemporal semantic graph.
2. The method for constructing a spatiotemporal semantic graph for tourism scenarios according to claim 1, characterized in that, The tourism event data includes at least one of trajectory stay events, image acquisition events, and text description events; the tourism event data includes event identifier, tourist identifier, event time, event location, event spatial carrying capacity, event semantic tag, and source evidence record; the tourism entity data includes entity identifier, entity name, entity alias, entity category, entity spatial range, entity hierarchy type, parent-child hierarchy record, and data source version.
3. The method for constructing a spatiotemporal semantic graph for tourism scenarios according to claim 2, characterized in that, Generate a candidate set for entity merging, including: performing name standardization, alias normalization, spatial range standardization, and entity category normalization on tourism entity records from different data sources to obtain name similarity, alias hit strength, spatial overlap strength, center distance proximity, and category compatibility; calculate entity merging confidence; and include tourism entity records whose entity merging confidence reaches the entity merging threshold and which do not have parent-child hierarchy conflicts, homonymous object conflicts, or spatial boundary conflicts into the candidate set for entity merging.
4. The method for constructing a spatiotemporal semantic graph for tourism scenarios according to claim 3, characterized in that, For entities that meet the entity merging conditions, tourism entity nodes are generated, including: performing entity identifier merging, specification name determination, alias set merging, entity category determination, spatial range version attachment, and source record saving on the entity merging candidate set to generate tourism entity nodes; for a single tourism entity record that is not included in any entity merging candidate set, a single record tourism entity node is generated; for tourism entity records with similar names but with parent-child hierarchical relationships, entity merging is not performed, and they are retained as candidate entities for subsequent parent-child carrying edges.
5. The method for constructing a spatiotemporal semantic graph for tourism scenarios according to claim 1, characterized in that, Generate an event-hit entity set, including: determining the spatial hit strength based on the event space carrying range of the tourism event and the entity space range of the tourism entity node; determining the semantic hit strength based on the event semantic tag of the tourism event and the entity name, entity alias, and entity category of the tourism entity node; and writing tourism entity nodes whose spatial hit strength reaches the spatial hit threshold, whose semantic hit strength reaches the semantic hit threshold, or whose combined spatial hit strength and semantic hit strength reach the combined hit threshold, into the event-hit entity set corresponding to the tourism event.
6. The method for constructing a spatiotemporal semantic graph for tourism scenarios according to claim 1, characterized in that, Constructing an event-carrying hierarchy graph includes: in the event-hit entity set, writing parent-child carrying edges between two tourism entity nodes that have a stable containment relationship in spatial range and have different hierarchy types; writing same-level competition edges between two tourism entity nodes that have the same hierarchy type and satisfy at least one condition such as spatial overlap, adjacent entrances, overlapping tour routes, or being hit by the same event semantic tag; retaining entity merging identifiers for tourism entity nodes obtained by merging the same entity merging candidate set; and forming an event-carrying hierarchy graph by parent-child carrying edges, same-level competition edges, and entity merging identifiers.
7. The method for constructing a spatiotemporal semantic graph for tourism scenarios according to claim 1, characterized in that, Determining the target carrying entity includes: calculating the carrying adaptability of each entity in the event carrying hierarchy diagram; for any entity, designating entities with a carrying adaptability reaching the direct carrying threshold as stable carrying candidate entities; performing intra-level competition margin verification on stable carrying candidate entities; when a stable carrying candidate entity has a sub-level entity that satisfies both the direct carrying threshold and the competition separation threshold, prioritizing the determination of the sub-level entity as the target carrying entity; when a target carrying entity cannot be stably determined, writing the corresponding tourism event into the carrying pending record.
8. The method for constructing a spatiotemporal semantic graph for tourism scenarios according to claim 1, characterized in that, Writing inheritance propagation relationship edges includes: searching for the superior entity along the parent-child bearing edge of the target bearing entity in the event bearing hierarchy graph; writing inheritance propagation relationship edges between the spatiotemporal event node and the superior entity node; the inheritance propagation relationship edge includes inheritance identifier, propagation depth and inheritance confidence value; the inheritance propagation relationship edge is used to indicate that the tourism event inherits its affiliation from the target bearing entity to the superior entity.
9. The method for constructing a spatiotemporal semantic graph for tourism scenarios according to claim 1, characterized in that, The tourism spatiotemporal semantic graph includes tourist nodes, spatiotemporal event nodes, tourism entity nodes, event attribution edges between tourists and spatiotemporal events, entity hierarchy relationship edges between tourism entities, direct event entity relationship edges, inheritance and propagation relationship edges, and edge conflict indexes.