Media data acquisition method and system for constructing space-time knowledge tree based on prompt engineering
By constructing a spatiotemporal knowledge tree based on prompting engineering and using a large language model to acquire social media data, the problems of low efficiency, weak semantics, and poor spatiotemporal correlation in existing technologies are solved, achieving efficient and accurate data capture and spatiotemporal positioning, and adapting to the rapid processing of new events.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MOGANSHAN DIXIN LABORATORY
- Filing Date
- 2026-04-02
- Publication Date
- 2026-05-01
AI Technical Summary
Existing methods for acquiring social media data are inadequate in terms of efficiency, semantic characterization, and spatiotemporal relevance, making it difficult to achieve high-precision dynamic data capture and spatiotemporal structuring with low annotation costs.
We adopt a method of constructing a spatiotemporal knowledge tree based on prompting engineering. By utilizing a large language model and a controllable prompting strategy, we generate knowledge nodes step by step, dynamically expand search terms, and realize intelligent mapping and data collection of events, time and space.
It enables efficient and accurate acquisition of social media data, lowers the professional threshold, improves recall and precision, supports multi-dimensional filtering, and enhances spatiotemporal positioning accuracy and data quality.
Smart Images

Figure CN121960464A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence and information technology, and specifically relates to an intelligent data acquisition method based on large language models and prompting engineering, specifically a media data acquisition method and system based on constructing a spatiotemporal knowledge tree using prompting engineering. Background Technology
[0002] Social media data acquisition is an indispensable technical link in network information processing and big data analysis. Existing methods can be roughly divided into two categories: "keyword-based manual retrieval" and "model-based automatic / semi-automatic crawling".
[0003] Keyword-based manual retrieval methods involve analysts compiling keywords based on experience, calling them one by one from the platform's search bar or open API, and then manually filtering them to obtain the target data. Its advantages are often high accuracy and flexible adjustment of search strategies; its biggest disadvantages are low efficiency, high labor costs, and significant differences in keyword sets built by different personnel, making it difficult to guarantee recall and consistency. When new entities or expressions emerge due to event evolution, the keyword list needs to be manually expanded again, resulting in a lag in response.
[0004] In model-based automatic / semi-automatic crawling methods, current research mainly revolves around two major routes: "shallow statistical models" and "deep pre-trained models": (1) Shallow statistical models: represented by TF-IDF, Bag-of-Words, LDA topic model, SVM, CRF, etc., which achieve text matching or topic filtering through fixed feature engineering. This type of method has low computational overhead, but its ability to express informal language (new words, emojis, spelling variations) unique to social media is limited; it relies on the co-occurrence of keywords or topic words, making it difficult to depict the spatiotemporal continuity and semantic drift of event evolution; value assessment mostly uses static indicators such as forwarding volume and likes, ignoring dynamic dimensions such as authenticity, timeliness, and dissemination influence. When faced with sudden hot topics, it is necessary to re-label training data, and the threshold for domain transfer is high. (2) Deep pre-trained models: represented by large-scale language models such as BERT, GPT-4, and DeepSeek, which have deep semantic understanding and zero-shot reasoning capabilities through self-supervised learning. Currently, directly using LLM for social media semantic parsing, sentiment classification, or event summarization (through fine-tuning or API calls) still faces two major bottlenecks: First, the lack of explicit modeling of the "time-space" dimension makes it difficult to dynamically organize data according to "event-location-time"; second, it relies on a large number of labeled samples for fine-tuning, and repeated training is still required when facing emerging events, failing to fully leverage the plug-and-play advantages of Prompt Engineering.
[0005] In summary, traditional keyword methods are inefficient and inconsistent; shallow statistical models have weak semantic characterization and high transfer thresholds; while existing deep models have strong semantic capabilities, they lack spatiotemporal structuring mechanisms and zero-sample adaptive frameworks. Therefore, existing methods are significantly insufficient in addressing the dynamic, spatiotemporal relevance, and low annotation cost requirements of social media data. There is an urgent need to research a new generation of "spatiotemporal knowledge tree based on cue engineering" data acquisition methods to balance low annotation costs, high semantic accuracy, and strong spatiotemporal evolution capabilities. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a media data acquisition method and system based on prompting engineering to construct a spatiotemporal knowledge tree. It utilizes large model reasoning and controllable prompting strategies to generate knowledge nodes step by step and dynamically expand search terms under zero-sample or minimally labeled conditions, thereby realizing the automatic construction and dynamic expansion of the "event-time-space" knowledge tree. It also drives the crawler to accurately search in multiple dimensions and finally returns a set of social media data with high matching and high information value, achieving accurate capture of high-value data and reliable tracking of evolutionary clues.
[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: On one hand, the present invention discloses a media data acquisition system based on constructing a spatiotemporal knowledge tree using a prompting project, including a prompting project module, a common sense knowledge tree construction module, a spatiotemporal knowledge tree construction module, and a media data acquisition module. Wherein, The system comprises the following modules: a prompting engineering module, which provides prompt word templates to guide a large language model in completing knowledge reasoning tasks; a prompt word template that includes common sense prompt word templates, location-specific prompt word templates, and facility-specific prompt word templates; a common sense knowledge tree construction module, which, based on the input event description information, calls the common sense prompt word templates in the prompting engineering module and constructs a common sense knowledge tree representing the semantic structure of the event through large language model reasoning; a spatiotemporal knowledge tree construction module, which, based on the common sense knowledge tree, calls the location-specific and facility-specific prompt word templates in the prompting engineering module and constructs a spatiotemporal knowledge tree integrating time and spatial coordinate information through large language model reasoning and multi-dimensional geographic information verification; and a media data acquisition module, which, based on the semantic and spatiotemporal information generated by the spatiotemporal knowledge tree, generates multi-dimensional search conditions and drives the data acquisition engine to acquire data from social media platforms.
[0008] Preferably, the prompt word template adopts a four-tuple paradigm of role-task-constraint-output format, wherein the common sense prompt word template is used to construct a common sense knowledge tree, the location refinement prompt word template is used to refine the geographical scope, and the facility refinement prompt word template is used to find specific facility locations.
[0009] More preferably, the construction of the prompt word template includes the following steps: (1) Task requirement confirmation step: Input the specific task description into the large language model, and the large language model decomposes the task; (2) Prompt word adjustment step: Adjust the decomposed task prompt words through symbol prompts, role prompts, retrieval-enhanced reasoning and style prompts, and modify the prompt words in combination with external knowledge base; (3) Prompt strategy selection step: Select the "chain thinking + zero-shot learning + self-consistent prompt" strategy or the "chain thinking + few-shot learning + self-consistent prompt" strategy, optimize the prompt words output in step (2) and input them into the large language model; (4) Result discrimination and solidification step: Discriminate the output result of the large language model. When the output result meets the expectations, solidify the current prompt word as the final task prompt word; when the output result does not meet the expectations, return to the prompt word adjustment step in step (2) to modify and generate new prompt words until the output result of the large language model meets the expectations.
[0010] Preferably, the common sense knowledge tree construction module works by manually pre-setting an initial framework and recursively expanding a large language model. The common sense knowledge tree contains a four-level tree structure of event type nodes, sub-event nodes, entity nodes, and synonym expression nodes.
[0011] The construction of the common sense knowledge tree includes the following steps: A pre-defined framework step: Domain experts define the root node and initial hierarchical structure framework of the common sense knowledge tree based on their experiential knowledge. The framework at least includes first-level classification branches under the root node. A large language model expansion step: Using the pre-defined framework and event description topics as input parameters, an optimized common sense prompt word template is called. The large language model, based on chain-like thinking logic, recursively expands the framework, generating a four-level tree structure of "event type - sub-event - entity - synonym expression" level by level. The common sense prompt word template used in the large language model expansion step is optimized through a few-shot learning strategy combined with self-consistency analysis.
[0012] Preferably, the spatiotemporal knowledge tree construction module includes a geographic scope sub-module, a facility location reasoning sub-module, and a multi-source verification and binding sub-module. Specifically, the geographic scope sub-module uses a location refinement prompt template to convert city-level geographic location information into a street-level list of specific locations; the facility location reasoning sub-module uses a facility refinement prompt template to infer specific locations based on subject, region, facility type, and behavioral information; and the multi-source verification and binding sub-module performs geocoding on the inferred locations, verifies them by comparing them with multiple geographic information data sources, and completes the binding of knowledge nodes, time points, and spatial coordinates into a triplet.
[0013] Preferably, the geographic scope subdivision submodule receives a city-level geographic location description containing event semantic information, and calls a location refinement prompt word template. The city-level geographic location description and event semantic information are input into a large language model. Based on the event semantic features, the large language model infers and filters out multiple street-level specific locations associated with the event from the city-level geographic location, and generates a list of specific locations sorted by association probability. The location refinement prompt word template is obtained through a zero-shot learning strategy combined with self-consistency analysis.
[0014] More preferably, the facility location reasoning submodule receives a list of street-level locations from the geographic scope submodule, as well as multi-dimensional event feature information extracted from the common sense knowledge tree, including subject information, facility type information, and behavioral information. For each street-level location in the location list, it calls a facility refinement prompt word template, and inputs the street-level location and the multi-dimensional event feature information into the large language model. The large language model then infers and generates candidate specific locations within a given range of street-level locations based on the multi-dimensional event feature information. The facility refinement prompt word template is obtained through a few-shot learning strategy combined with self-consistency analysis.
[0015] Preferably, the multi-source verification and binding submodule receives text information of candidate specific locations generated by large language model inference, converts the text information into latitude and longitude coordinates, and queries two or more independent geographic information databases. When the interest point data returned by the database has a name similarity higher than a threshold and a spatial distance less than a preset range, the coordinates are determined to be valid and bound to the spatiotemporal knowledge tree node, thus completing the binding of the node-time-space triple.
[0016] Preferably, the media data acquisition module includes a retrieval condition generator and a distributed acquisition engine. The retrieval condition generator traverses the nodes of the spatiotemporal knowledge tree, extracts and generates a set of semantic keywords, a list of related user accounts, and geofence parameters constructed based on geographic coordinates. The distributed acquisition engine schedules multiple crawler instances to acquire data from social media platform interfaces according to the instructions output by the retrieval condition generator, and applies keyword matching, account filtering, and geofence filtering during the acquisition process.
[0017] On the other hand, this invention discloses a media data acquisition method based on prompting engineering to construct a spatiotemporal knowledge tree, including the following steps: (1) providing prompt word templates, the prompting engineering module provides prompt word templates including common sense prompt word templates, location refinement prompt word templates and facility refinement prompt word templates, the prompt word templates are used to guide the large language model to complete the knowledge reasoning task; (2) constructing a common sense knowledge tree, based on the input event description, calling the common sense prompt word templates, and using the large language model to reason to generate a common sense knowledge tree with a multi-layer semantic structure; (3) constructing a spatiotemporal knowledge tree, based on the common sense knowledge tree, calling the location refinement prompt word templates and facility refinement prompt word templates, using the large language model to reason and combine with geographic information verification, generating a spatiotemporal knowledge tree bound to time and geographic coordinates; (4) collecting social media data, parsing the spatiotemporal knowledge tree, and generating keyword combinations. Multi-dimensional retrieval conditions for account lists and geofences are used to collect data from social media platforms according to the multi-dimensional detection conditions.
[0018] Preferably, when collecting data based on the multi-dimensional search conditions, a triple filtering mechanism is adopted: first, spatial filtering is performed based on geofences; second, publisher filtering is performed based on the account list; and finally, keyword matching degree is calculated for the content, retaining data with a matching degree higher than a preset threshold.
[0019] The beneficial effects of this invention are that it transforms the acquisition of social media data from a "manual needle-in-a-haystack" process to "intelligent and precise capture," resulting in orders-of-magnitude improvements in efficiency, accuracy, and ease of use. It also provides a completely new intelligent analysis paradigm for key areas such as public safety, emergency management, and business decision-making. Specifically, 1. For the first time, intelligent mapping between semantics and spatiotemporal coordinates has been achieved. In traditional technologies, semantic analysis and geographic location are separate and require manual bridging. However, this invention automatically infers the semantics of events into specific spatiotemporal coordinates through prompting engineering and a large language model, achieving an intelligent leap from "knowing what happened" to "knowing when and where it happened." Furthermore, by constructing a spatiotemporal knowledge tree, coordinates are structurally associated with semantic nodes and event information, thus constructing an interpretable spatiotemporal knowledge representation.
[0020] 2. This solution has strong practical value. Existing technologies require opinion analysts, geographic information experts, and data engineers to write reports to track, analyze, and guide trending events. This solution significantly lowers the professional threshold; ordinary staff can input natural language, and the system can automatically complete the entire process. Furthermore, based on zero-sample or few-sample learning through prompting engineering, it quickly adapts to new event types and can effectively handle even sudden, unknown events.
[0021] 3. This solution boasts higher recall and precision, and stronger reliability. Triple filtering effectively reduces information omissions and avoids interference from spam information. Two-level refinement of spatiotemporal positioning reduces positioning errors from the kilometer level to the meter level, significantly improving spatiotemporal positioning accuracy. Multi-source cross-validation increases the coordinate verification confidence rate to over 90%. Furthermore, in the commonsense knowledge tree construction process, a combination of expert-preset frameworks, AI expansion, and manual review ensures both quality and efficiency through human-machine collaboration.
[0022] 4. This solution can be extended to various scenarios. In addition to acquiring social media data, it can also be applied to IoT sensor data analysis, government information disclosure monitoring, business intelligence collection, and emergency management command. Based on the output of structured intelligence, risk assessment, and response suggestions, it can assist in emergency decision-making, resource allocation, and contingency plan activation. Attached Figure Description
[0023] Figure 1 This is a diagram showing the connection structure between the modules; Figure 2 This is a flowchart of media data acquisition; Figure 3 This is an example image of a prompt word template for the project module construction; Figure 4 This is an example diagram of a common knowledge tree; Figure 5 This is an example diagram of a spatiotemporal knowledge tree. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0025] like Figures 1-2As shown, this invention provides a media data acquisition system based on a prompting engineering-constructed spatiotemporal knowledge tree. The system includes a prompting engineering module, a common sense knowledge tree construction module, a spatiotemporal knowledge tree construction module, and a media data acquisition module. After the user inputs an event description, the prompting engineering module provides prompt word templates. These templates guide a large language model to complete a knowledge reasoning task. The prompt word templates include common sense prompt word templates, location-specific prompt word templates, and facility-specific prompt word templates. The common sense knowledge tree construction module, based on the input event description, calls the common sense prompt word templates in the prompting engineering module and constructs a common sense knowledge tree representing the semantic structure of the event through large language model reasoning. The spatiotemporal knowledge tree construction module, based on the common sense knowledge tree, calls the location-specific and facility-specific prompt word templates in the prompting engineering module and constructs a spatiotemporal knowledge tree integrating time and spatial coordinate information through large language model reasoning and multi-dimensional geographic information verification. The media data acquisition module, based on the semantic and spatiotemporal information generated by the spatiotemporal knowledge tree, generates multi-dimensional search conditions and drives a data acquisition engine to acquire data from social media platforms.
[0026] Among them, such as Figure 3 As shown, the prompting engineering module is responsible for providing and managing three types of prompt word templates. All prompt word templates follow the "role-task-constraint-output format" quadruple paradigm to ensure the structured and stable output of the large language model. The prompt word template construction process is as follows: 1. Task requirement confirmation steps: Input the specific task into the large language model and let it decompose into sub-tasks, such as: (1) identify activity types; (2) list typical sub-activities; (3) extract relevant entities; (4) summarize common expression methods.
[0027] 2. Hint Adjustment: Based on the decomposed tasks, hint techniques were applied for optimization. This included adding role settings (you are an urban planning expert), symbol hints (using "###" to separate instructions and content), enhanced search functionality (hint model referencing common activity categories), and a clear output style (JSON format required).
[0028] 3. Tipping Strategy Selection: Select a strategy based on the complexity of the task. For tasks that require rich background knowledge, such as common sense knowledge construction and facility refinement, adopt the "Chain Thinking (CoT) + Few-shot Learning + Self-consistent Tips" strategy. For relatively direct tasks, such as location refinement, the "Chain Thinking (CoT) + Zero-shot Learning + Self-consistent Tips" strategy can be adopted.
[0029] 4. Result Judgment and Consolidation: Input the optimized prompt word into the large language model and evaluate its output. If the output meets expectations (e.g., complete structure and reasonable content), then the prompt word is consolidated into the corresponding template; if it does not meet expectations, return to step 2 for adjustment until satisfactory.
[0030] Taking a detailed location-based prompt template as an example: Role: An assistant familiar with the city's geography; Task: Based on the given theme "Weekend Creative Market", deduce which specific streets or areas in City A are most likely to host it; Constraints: List only the names of streets or areas that are highly relevant to the event topic, and briefly explain why. Sort the outputs by relevance from high to low. Output format: JSON format, containing a list of two fields: "street / area name" and "reason for inference"; Once the expected prompt words are obtained, they are fixed for easy use by subsequent modules.
[0031] The common sense knowledge tree construction module receives event descriptions input by the user and constructs a hierarchical common sense knowledge tree using a large language model. Taking a city marathon as an example... Figure 4 As shown, its construction process is as follows: 1. Pre-defined framework: The root node and first-level branches are pre-defined by domain experts. For example, the root node is "public sports events" and the first-level child nodes (event types) are pre-defined as "racing" and "endurance".
[0032] 2. Large Language Model Expansion: Input the framework and event description "City Marathon Event" from Step 1 together, call the common sense prompt word template, and the large language model recursively expands based on chain thinking: First-level expansion (event type): Under the preset "Endurance" category, confirm that "Marathon" is its child node; Second-level expansion (sub-event): Infer that the marathon includes sub-event nodes such as "Pre-race preparation", "Race in progress", and "Post-race activities"; Third-level expansion (entities): List entities for each sub-event, such as "Race in progress" including entity nodes such as "Participant", "Track", "Aid Station", and "Timer"; Fourth-level expansion (synonyms): Add synonyms or common expressions for key entities, such as "participant" can be replaced with "athlete" or "runner".
[0033] The spatiotemporal knowledge tree construction module is based on a common-sense knowledge tree, incorporating precise geographic location information to form a spatiotemporal knowledge tree. It includes three sub-modules: a geographic scope sub-module, a facility location reasoning sub-module, and a multi-source verification and binding sub-module. Taking the "outdoor music festival held last weekend in District C of City B" as an example, its construction process is detailed below: 1. Geographic scope is further subdivided into sub-modules. Input: City-level location "City B, District C", event semantics "outdoor music festival"; Processing: Use location-refined prompt word templates to guide the large language model in reasoning; Output example: Street / Area: "XX Park and surrounding lawn area", Reason: This area is a common venue for large-scale outdoor cultural events in City A, and has a spacious layout; (1) Street / Area: "Large lawn in XX Botanical Garden", Reason: Beautiful environment, many music events have been held there; (2) Street / Area: "Open-air plaza near XX", reason: a commercial and landscape area suitable for holding public events.
[0034] 2. Facility Location Reasoning Submodule Input: A list of locations obtained from subdividing geographic areas into sub-modules and features extracted from a commonsense knowledge tree; Processing: For each street-level location, a detailed facility cue word template is invoked to guide the large language model to infer the specific location; Output example: Candidate specific locations: "XX Park and surrounding lawn area" and "Large lawn in XX Botanical Garden".
[0035] 3. Multi-source verification and binding submodule, Input: Text information of the candidate specific locations, such as "XX Park and surrounding lawn area"; deal with: (1) Geocoding: Convert it to latitude and longitude coordinates through geocoding service (e.g., 120.123456, 30.234567). (2) Multi-source verification: Simultaneously query two independent geographic information databases, both of which return point of interest information for "XX Park and surrounding lawn area". (3) Judgment and Binding: Calculate the name similarity (higher than the preset threshold, such as 90%) and the spatial distance (less than the preset threshold, such as 100 meters). After verification, bind the valid coordinates with the "Outdoor Music Festival" node and the time information "last weekend" in the common sense knowledge tree to form a triple <node: outdoor music festival, time: last weekend, coordinates: (120.123456, 30.234567)>.
[0036] The media data acquisition module parses the spatiotemporal knowledge tree, generates search conditions, and drives data acquisition. Continuing with the example of "the outdoor music festival held last weekend in District C of City B," its construction process is detailed below: 1. Retrieval Condition Generator: Traverses the nodes of the bound spatiotemporal knowledge tree, extracts and generates a set of semantic keywords from the nodes and their synonyms, such as {"outdoor music festival", "music festival", "live performance", "band"}; generates a list of relevant user accounts based on the event type, which may include local cultural and tourism official accounts, well-known band accounts, event organizer accounts, etc. (the list of relevant user accounts can be generated by a pre-set domain authoritative account library or by reasoning from the large language model based on the event type and entity nodes); generates a polygonal electronic fence (e.g., a circular area with a radius of 500 meters) centered on the bound coordinates.
[0037] 2. Distributed Data Acquisition Engine: Based on the above conditions, a data acquisition task is generated and distributed to multiple crawler instances. These instances acquire data from the target social media platforms. The acquisition process involves three layers of filtering: First, spatial filtering, which only collects posts within geofences or containing tags representing similar geographical locations; second, publisher filtering, which prioritizes content posted by users within the account list; and third, content matching, which calculates the match between the post text and the keyword set, retaining data with a match rate higher than a threshold (e.g., 70%). Finally, a highly relevant set of social media data is output.
[0038] Based on the above system, this invention also discloses a media data acquisition method based on constructing a spatiotemporal knowledge tree using prompting engineering, comprising the following steps: (1) Provide prompt word templates, which are constructed and optimized by the prompt engineering module. Three types of prompt word templates are: common sense, location refinement, and facility refinement.
[0039] (2) Construct a common sense knowledge tree. Based on the input event description and call the common sense prompt word template, use the big language model to reason and generate a common sense knowledge tree with a multi-layer semantic structure.
[0040] (3) Construct a spatiotemporal knowledge tree, call the location refinement prompt word template, refine the city-level location to the street list; call the facility refinement prompt word template, and infer the candidate specific location by combining event characteristics; through multi-dimensional geographic information verification, bind the effective coordinates with knowledge nodes and event information to form a spatiotemporal knowledge tree.
[0041] (4) Collect social media data, parse the spatiotemporal knowledge tree, and generate multi-dimensional search conditions such as keyword combinations, account lists and geofences; drive the distributed collection engine and apply a triple filtering mechanism (space-publisher-content) to collect highly relevant data from social media platforms.
[0042] In practical applications, experiments were conducted using information related to a hot topic event in 2022. The experimental results of the algorithm constructed in this technical solution were compared with those of the Story Forest algorithm and the double-layer nested clustering algorithm. The algorithm ranked first in terms of consistency, continuity, and readability, as shown in Table 1. This effectively demonstrates the effectiveness and feasibility of the technical solution, enabling it to form a comprehensive and in-depth event context and intelligently extract valuable event information, providing a favorable theoretical foundation for relevant departments to track and capture event information.
[0043] Table 1. Comparison of metrics between this technical solution and similar algorithms. Additionally, the technical terms used in this technical solution are explained below: Prompt Engineering: A technique for designing and optimizing natural language instructions (prompt words) to guide large-scale language models (LLMs) to perform specific tasks without retraining the model.
[0044] Large Language Model (LLM): A deep learning model trained on massive amounts of text data, with billions to trillions of parameters, capable of understanding and generating natural language that is close to that of humans.
[0045] Spatio-Temporal Knowledge Tree: A tree-like knowledge representation structure that integrates time dimension and spatial coordinates, organically organizing event semantics, time point, and geographical location into "node-time-space" triples.
[0046] Common Sense Knowledge Tree: A standardized cue word framework that follows a specific format (such as the quadruple paradigm) and includes four elements: role, task, constraint, and output format. It is reusable and parameterizable.
[0047] Chain-of-Thought (CoT): A prompting strategy that requires LLMs to demonstrate a step-by-step reasoning process before giving the final answer, simulating the human thought chain.
[0048] Zero-Shot Learning: The ability of a model to perform a task based solely on a task description without having seen any examples of that task.
[0049] Few-Shot Learning: Providing a model with a small number of task examples (usually 1-5) helps it understand task patterns and generalize to new inputs.
[0050] Self-consistency hints refer to requiring large language models to generate multiple inference paths or answers for the same task, and selecting the result with the highest internal consistency through comparison, in order to improve the reliability of the output.
[0051] Geocoding: A geographic information technology that converts text descriptions such as location names and addresses into latitude and longitude coordinates.
[0052] Multi-Source Verification: This method verifies the accuracy and existence of location coordinates by querying multiple independent geographic information databases and comparing the consistency of the returned results.
[0053] Point of interest (POI): A data object in a geographic information system that represents a specific location and includes attributes such as name, category, and coordinates.
[0054] Geofencing: A virtual boundary defined by geographic coordinates, used to trigger specific actions or filter data within a spatial range.
[0055] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A media data acquisition system based on constructing a spatiotemporal knowledge tree using prompting engineering, characterized in that: This includes a prompting engineering module, a common sense knowledge tree construction module, a spatiotemporal knowledge tree construction module, and a media data acquisition module. The prompting engineering module is used to provide prompt word templates, which are used to guide the large language model to complete knowledge reasoning tasks. The prompt word templates include common sense prompt word templates, location-specific prompt word templates, and facility-specific prompt word templates. The common sense knowledge tree construction module, based on the input event description information, calls common sense prompt word templates and constructs a common sense knowledge tree representing the semantic structure of the event through reasoning by a large language model; The spatiotemporal knowledge tree construction module, based on the common sense knowledge tree, calls the location refinement prompt word template and facility refinement prompt word template, and constructs a spatiotemporal knowledge tree that integrates time information and spatial coordinate information through large language model reasoning and multi-dimensional geographic information verification; The media data acquisition module generates multi-dimensional search conditions based on the semantic and spatiotemporal information generated by the spatiotemporal knowledge tree, driving the data acquisition engine to acquire data from social media platforms.
2. The media data acquisition system based on prompting engineering to construct a spatiotemporal knowledge tree according to claim 1, characterized in that: The prompt word templates adopt a four-tuple paradigm of role-task-constraint-output format, where the common sense prompt word template is used to construct a common sense knowledge tree, the location refinement prompt word template is used to refine the geographical scope, and the facility refinement prompt word template is used to find specific facility locations. The construction of the prompt word template includes the following steps: (1) Task requirement confirmation steps: Input the specific task description into the large language model, and the large language model decomposes the task; (2) Steps for adjusting prompt words: Adjust the decomposed task prompt words by using symbol prompts, role prompts, search-enhanced reasoning and style prompts, and modify the prompt words in conjunction with an external knowledge base; (3) Prompt strategy selection steps: Select the "chain thinking + zero-shot learning + self-consistent prompt" strategy or the "chain thinking + few-shot learning + self-consistent prompt" strategy, optimize the prompt words output in step (2), and input them into the large language model; (4) Result discrimination and solidification steps: Discriminate the output results of the large language model. When the output results meet the expectations, solidify the current prompt word as the final task prompt word. When the output results do not meet the expectations, return to the prompt word adjustment step in step (2) to modify and generate new prompt words until the output results of the large language model meet the expectations.
3. The media data acquisition system based on prompting engineering to construct a spatiotemporal knowledge tree according to claim 2, characterized in that: The common sense knowledge tree construction module works by manually pre-setting an initial framework and recursively expanding a large language model. The common sense knowledge tree contains a four-level tree structure consisting of event type nodes, sub-event nodes, entity nodes, and synonym expression nodes. The construction of the common sense knowledge tree includes the following steps: (1) Artificial framework pre-setting steps: Domain experts define the root node and initial hierarchical structure framework of the common sense knowledge tree based on their experience and knowledge. The artificially pre-set structure framework includes at least the root node and the first-level classification branches under the root node. (2) Large language model expansion steps: The pre-set structural framework and event description topic are used as input parameters. The optimized common sense prompt word template is called. The large language model expands the structural framework recursively based on chain thinking logic, and generates a four-level tree structure of "event type-sub-event-entity-synonymous expression" level by level. Among them, the common sense prompt word templates used in the large language model expansion step are obtained through a few-shot learning strategy combined with self-consistency analysis.
4. A media data acquisition system based on prompting engineering to construct a spatiotemporal knowledge tree according to claim 2, characterized in that: The spatiotemporal knowledge tree construction module includes a geographic scope sub-module, a facility location reasoning sub-module, and a multi-source verification and binding sub-module, wherein... The geographic scope sub-module calls the location refinement prompt word template to convert city-level geographic location information into a street-level list of specific locations. The facility location reasoning submodule calls the facility detailed prompt word template to infer the specific location based on the subject, region, facility type, and behavioral information; The multi-source verification and binding submodule geocodes the inferred locations, verifies them by comparing multiple geographic information data sources, and completes the binding of knowledge nodes, time points, and spatial coordinates into triplets.
5. A media data acquisition system based on prompting engineering to construct a spatiotemporal knowledge tree according to claim 4, characterized in that: The geographic scope subdivision submodule receives a city-level geographic location description containing event semantic information, and calls a location refinement prompt word template. It inputs the city-level geographic location description and event semantic information into a large language model. Based on the event semantic features, the large language model infers and filters out multiple street-level specific locations associated with the event from the city-level geographic locations, and generates a list of specific locations sorted by association probability. The location-detailed prompt word templates used were optimized through a zero-shot learning strategy combined with self-consistency analysis.
6. A media data acquisition system based on prompting engineering to construct a spatiotemporal knowledge tree according to claim 5, characterized in that: The facility location reasoning submodule receives a street-level location list from the geographic scope submodule and multi-dimensional event feature information extracted from a common-sense knowledge tree. This multi-dimensional event feature information includes subject information, facility type information, and behavioral information. For each street-level location in the location list, a detailed facility cue word template is invoked, and the street-level location and multi-dimensional event feature information are input into the large language model. Based on multi-dimensional event feature information, a large language model infers and generates candidate specific locations within a given street-level location range; The detailed facility prompt template was obtained through a few-shot learning strategy combined with self-consistency analysis.
7. A media data acquisition system based on prompting engineering to construct a spatiotemporal knowledge tree according to claim 6, characterized in that: The multi-source verification and binding submodule receives text information of candidate specific locations generated by large language model inference, converts the text information into latitude and longitude coordinates, and queries two or more independent geographic information databases. When the interest point data returned by the database has a name similarity higher than a threshold and a spatial distance less than a preset range, the coordinates are determined to be valid and bound to the spatiotemporal knowledge tree node, thus completing the binding of the node-time-space triple.
8. A media data acquisition system based on prompting engineering to construct a spatiotemporal knowledge tree according to claim 1, characterized in that: The media data acquisition module includes a search condition generator and a distributed acquisition engine, wherein... The retrieval condition generator traverses the nodes of the spatiotemporal knowledge tree to extract and generate a set of semantic keywords, a list of related user accounts, and electronic fence parameters constructed based on geographic coordinates. The distributed data collection engine schedules multiple crawler instances to obtain data from social media platform interfaces based on the instructions output by the search condition generator, and applies keyword matching, account filtering, and geofencing filtering during the collection process.
9. A media data acquisition method using a media data acquisition system based on prompting engineering to construct a spatiotemporal knowledge tree, as described in claim 7 or 8, characterized in that: Includes the following steps: (1) Provide prompt word templates. The prompt engineering module provides prompt word templates including common sense prompt word templates, location detailed prompt word templates and facility detailed prompt word templates. The prompt word templates are used to guide the large language model to complete the knowledge reasoning task. (2) Construct a common sense knowledge tree. Based on the input event description and call the common sense prompt word template, use the big language model to reason and generate a common sense knowledge tree with a multi-layer semantic structure. (3) Construct a spatiotemporal knowledge tree. Based on the common sense knowledge tree, the detailed prompt word template for calling the location and the detailed prompt word template for the facility, use the big language model reasoning combined with geographic information verification to generate a spatiotemporal knowledge tree that binds time and geographic coordinates. (4) Collect social media data, parse the spatiotemporal knowledge tree, generate multi-dimensional search conditions such as keyword combinations, account lists and geofences, and collect data from social media platforms based on the multi-dimensional detection conditions.
10. A media data acquisition method based on prompting engineering to construct a spatiotemporal knowledge tree as described in claim 9, characterized in that: When collecting data based on the multi-dimensional search conditions, a triple filtering mechanism is adopted: first, spatial filtering is performed based on geofences; second, publisher filtering is performed based on the account list; and finally, keyword matching degree is calculated for the content, retaining data with a matching degree higher than a preset threshold.
Citation Information
Patent Citations
Complex problem reasoning method based on dynamic collaboration of large language model and domain knowledge base
CN118798368A
Urban building safety risk knowledge graph construction method
CN119378661A
Space-time knowledge graph establishment method and device, equipment and storage medium
CN121543685A
Flood narrative expression method fusing social media data and geographic scene knowledge
CN121581164A
Prompt learning and knowledge completion-based domain event element extraction method and system
CN121706775A