AI-based cultural relic protection unit two-line intelligent generation method
By combining multi-source data acquisition and preprocessing with multi-AI model collaboration through MCP interface encapsulation, the problems of poor collaboration among multi-AI models, insufficient data transmission security, and inconvenient maintenance in the two-line delineation of cultural relic protection units have been solved, achieving efficient, safe, and compliant intelligent generation of the two lines.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, the poor collaboration of multiple AI models for the two-line delineation of cultural relics protection units, insufficient data transmission security, inconvenience in model calling and maintenance, and difficulty in standard implementation and result traceability lead to low efficiency of intelligent generation and inconvenience in compliance verification.
A closed-loop system is adopted, which includes multi-source data acquisition and preprocessing, multi-AI model collaboration through MCP interface encapsulation, initial two-line generation, recursive expansion and conflict detection. Through a unified interface specification, it realizes multi-model collaboration compatibility, secure data transmission and convenient maintenance, and improves the standardization and intelligence level of two-line delineation.
It enables efficient collaborative work of multiple AI models, ensures secure data transmission, simplifies model calling and maintenance processes, improves the accuracy and compliance of the two-line delineation, supports unified recording and traceability of local standards, and enhances the intelligence and standardization level of the two-line generation.
Smart Images

Figure CN121639934A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital technology for cultural relic protection and standardization of artificial intelligence interfaces. Specifically, it relates to an AI-based intelligent generation method for the protection scope and construction control zone (hereinafter referred to as "two lines") of cultural relic protection units. It is particularly suitable for scenarios where multiple AI models work together, local standards must be strictly followed, and interface compatibility and data security are required for the delineation of two lines. It can be widely applied to the accurate delineation and digital management of two lines for cultural relic protection units at all levels. Background Technology
[0002] The delineation of the "two lines" (designated boundaries and protected areas) for cultural relics protection units is a core task in balancing cultural relics protection and regional development. It requires the integration of multi-source data, adaptation to various types of cultural relics, and strict adherence to local standards. Existing intelligent generation technologies for these two lines suffer from the following key challenges: 1. Poor collaboration among multiple AI models: Modules such as feature extraction, line segment division, and intersection detection are mostly developed independently, lacking a unified interface specification, resulting in incompatible data transmission formats and chaotic calling logic, leading to low efficiency throughout the entire process; 2. Insufficient data transmission security and standardization: When multi-source heterogeneous data (such as 3D point clouds and property boundaries) is transmitted between models, there is a lack of standardized encapsulation and encryption mechanisms, which can easily lead to problems such as data leakage and format disorder. 3. Inconvenient model calling and maintenance: The calling parameters and return value formats of different AI models are not uniform. When upgrading or hot updating the model, the entire process code needs to be modified synchronously, resulting in high maintenance costs. 4. Difficulty in implementing standards and tracing results: The matching process of local standards and rules and the model call logs lack unified recording standards, making compliance verification and problem tracing inconvenient.
[0003] In existing technologies, such as the "Method for Digitizing the Two-Line Range of Immovable Cultural Relics" disclosed in patent CN116028691B, the technical field mentions artificial intelligence but the level of intelligence is low, and the core range definition and edge extraction rely on manual operation. Therefore, there is an urgent need for an AI-based two-line intelligent generation method that integrates a Model Context Protocol (MCP) interface. This method would achieve multi-model collaborative compatibility, secure data transmission, and convenient maintenance through a unified interface specification, thereby improving the standardization and intelligence level of two-line delineation. Summary of the Invention
[0004] The core technical architecture of this invention is a closed-loop system consisting of "multi-source data acquisition and preprocessing → multi-AI model collaboration with MCP interface encapsulation → initial two-line generation → recursive expansion and conflict detection → dynamic optimization → compliant output". The MCP interface encapsulation runs through the entire process, unifying and standardizing model calls, data transmission and result output. The specific steps are described in detail below.
[0005] Step S1: Multi-source heterogeneous data acquisition and preprocessing.
[0006] Data on the artifact itself, geospatial data, land use data, and rule text data were collected. The artifact data was obtained by combining UAV oblique photogrammetry with a 3D laser scanner to acquire 3D point cloud models with a resolution of ≥0.01m and high-resolution 2D images, ensuring the accurate restoration of the artifact's geometric shape and texture details.
[0007] Furthermore, geospatial data was selected from GIS topographic data with a precision of 1:500 to 1:2000 in the CGCS2000 coordinate system, including core geographic elements such as contour lines, terrain slope, water systems, and roads, laying the foundation for subsequent terrain-fitting of the scope; SHP format vector data of surrounding building property boundaries and basic farmland distribution vector data were also selected, with boundary coordinate accuracy ≤0.1m to ensure the accuracy of land use boundaries.
[0008] Furthermore, the rule text data system collects national cultural relic protection standards, local standards, and cultural relic classification documents, clarifying core rules such as the bottom line for the two-line delineation and the exclusive delineation requirements for different types of cultural relics.
[0009] The above-mentioned heterogeneous data from multiple sources were preprocessed by denoising, coordinate unification, and format standardization to construct the original dataset for AI analysis.
[0010] Step S2: The MCP interface calls the AI model to generate the artifact's body line.
[0011] The MCP interface encapsulation adopts a RESTful API architecture design, supports HTTPS encrypted transmission protocol, and the interface request timeout is set to 60 seconds.
[0012] Furthermore, the original dataset is standardized and encapsulated in JSON format, containing four core fields: "data type (type), coordinate reference (crs), data content (content), and timestamp (timestamp)". Specifically, the 3D point cloud data is transmitted using Base64 encoding, and the 2D image data is compressed and encapsulated in TIFF format to ensure a data transmission efficiency of ≥10MB / s.
[0013] Furthermore, the call parameters include "model identifier (model_id=feat_extract_001), inference precision level (precision_level=high), and timeout threshold (timeout=30s)," supporting both synchronous and asynchronous call modes. Synchronous calls return inference results in real time, suitable for small datasets or scenarios with high real-time requirements; asynchronous calls return a unique task ID, and users can obtain results through a dedicated query interface, with result caching time ≥24 hours.
[0014] Furthermore, the artifact body line results are encapsulated in WKT format, containing fields such as "edge coordinate set (coordinates), accuracy information (accuracy≤0.3m), generation time (generate_time), and model version (model_version)". The interface returns a 200 status code indicating a successful call, 4xx series status codes indicating client parameter errors, and 5xx series status codes indicating server-side model errors, facilitating rapid problem localization.
[0015] Furthermore, the U-Net++ semantic segmentation AI model with attention gates is invoked via the MCP interface, inputting preprocessed multi-source heterogeneous data. This model enhances the extraction of features of the artifact itself through an encoder-decoder structure, effectively suppressing background interference, and outputting a binary segmentation map of the artifact and the background. The Canny edge detection algorithm is used to extract the initial edges of the segmentation map, and morphological closing operations (3×3 structuring elements) are combined to fill the edge gaps. Morphological opening operations are used to remove small burrs, ultimately generating accurate closed polygonal lines of the artifact itself.
[0016] Step S3: The MCP interface calls the AI inference engine to generate the initial two-line range.
[0017] A knowledge base for cultural relic protection rules is constructed. The knowledge base adopts a structured storage method, organizing data according to the mapping relationship of "cultural relic type - terrain features - delineation rules". It embeds the two-line delineation limits stipulated by local standards (the protection scope extends outward by no less than 10m and the construction control zone extends outward by no less than 20m), as well as the exclusive delineation requirements for seven types of cultural relics, such as ancient buildings, ancient cultural sites, and ancient tombs. For example, the rules include "the outward extension distance of the side of the ancient building facing the mountain shall not be less than 1 times the height of the building", "the protection scope of the ancient cultural site shall include the minimum archaeological working surface", and "the protection scope of the ancient tomb shall cover the entire park space of the mausoleum and the surrounding area of the spirit path".
[0018] Furthermore, the AI inference engine calls the API address " / api / mcp / inference / rellic_two_lines", and the request parameters include "cultural relic type (relic_type), terrain feature (terrain_feature), knowledge base version (kb_version=v1.0)". The returned parameters include "initial protection range coordinates (protection_coords), initial construction control zone coordinates (control_coords), and rule matching log (match_log)". The rule matching log records the local standard clause number and confidence level (≥0.8) of the matched local standard clause.
[0019] Furthermore, based on the edge coordinates of the cultural relic's body line, and combined with the matched delineation rules, the coordinate parameters of the protection range and the construction control zone are dynamically calculated. The interface returns "initial protection range coordinates (protection_coords), initial construction control zone coordinates (control_coords), and rule matching log (match_log)" to generate the initial two-line range.
[0020] Step S4: The MCP interface calls the AI adaptive line segment division model.
[0021] The AI adaptive line segmentation model calls the API address " / api / mcp / segment / divide". The input parameters include "body line length (length), curvature distribution data (curvature_data), minimum number of divisions (min_segments=10), maximum number of divisions (max_segments=20)". The return parameters include "total number of line segments (segment_count) and a list of information for each line segment (segments)". The information for each line segment records "starting point coordinates (x1, y1, z1), ending point coordinates (x2, y2, z2), and curvature value (curvature)".
[0022] Furthermore, the AI model adaptively determines the optimal number of segments based on the curvature characteristics of the artifact's body lines. For complex line segments with curvature ≥ 0.8 (such as corners and irregular edges of the artifact), a dense segmentation of 15-20 segments is used to ensure flexibility in expansion; for gentle line segments with curvature < 0.8, a relatively sparse segmentation of 10-15 segments is used to balance segmentation efficiency and expansion accuracy, providing basic data for subsequent recursive expansion.
[0023] Step S5: The MCP interface controls the recursive expansion of the AI decision model.
[0024] The model is pre-set to extend the basic distance by 1 meter each time, with the extension direction extending outward along the normal of each line segment. The normal direction vector is calculated using the coordinates of the start and end points of the line segments to ensure that the extension direction is perpendicular to the line segment and points outward toward the outside of the artifact, thus avoiding deviation in the extension direction.
[0025] Furthermore, the line segment coordinate data and expansion parameters are transmitted to the recursive expansion AI decision model through the extended control interface ( / api / mcp / expand / control). The model synchronously performs expansion operations on all line segments according to the interface instructions, and the interface provides real-time feedback on the expansion status of each line segment (not expanded / expanding / locked).
[0026] Step S6: The MCP interface calls the AI spatial intersection detection module.
[0027] The AI spatial intersection detection module calls the API address " / api / mcp / detect / intersection". The input parameters include "extended segment coordinate list (extended_segments), sensitive boundary data (sensitive_boundaries), and detection accuracy threshold (accuracy_threshold=0.1m)". The return parameters are "intersection status of each segment (intersection_status: true / false), intersection area coordinates (intersection_area, returned only when intersecting), and detection time (detection_time)".
[0028] Furthermore, the cross-segment experiment method in computational geometry is used to determine the intersection of line segments. For each pair of line segments between the expanded line segments and the boundaries of house property rights and basic farmland, the existence of an intersection relationship is determined by calculating the cross product of vectors. The spatial accuracy of the intersection determination is ≤0.1 meters, ensuring the accuracy of conflict detection and providing a decision-making basis for differentiated expansion strategies.
[0029] Step S7: Differentiated extension strategy based on MCP interface feedback.
[0030] The recursive expansion AI decision model receives intersection detection results in real time through the MCP interface and executes differentiated expansion strategies for different line segment states.
[0031] Furthermore, if a line segment intersects with the boundary of a house or basic farmland, the model automatically controls the line segment to retreat 0.5 meters and temporarily lock its current position. The MCP interface records the line segment's locking status and the reason for the retreat. Line segments that do not intersect continue to recursively expand outward along the normal at a base distance of 1 meter each time. The MCP interface updates the coordinate data of the expanded line segments in real time.
[0032] Step S8: Iterative optimization and termination determination.
[0033] In the iterative optimization and termination determination phase, the iterative cycle of "segment division - recursive expansion - intersection detection - differential adjustment" is repeated. The recursive expansion AI decision model verifies the overall parameters of the closed area in real time through the MCP interface. Termination continues until all segment expansions simultaneously meet the three termination conditions of compliance, conflict-free, and reasonableness. Compliance requires that the extension distance of the protected area be no less than 10 meters, the extension distance of the construction control zone be no less than 20 meters, and that it conforms to the specific delineation requirements of the corresponding cultural relic type. Conflict-free requires that all segments of the closed area do not intersect with the boundaries of building property rights or basic farmland. Reasonableness requires that the boundary of the area conforms to the natural features of the terrain and has no logical conflicts. The termination determination result is fed back to the system through the MCP interface.
[0034] Repeat steps S4-S7 to form an iterative loop of "segment division - recursive expansion - intersection detection - differential adjustment". The recursive expansion AI decision model verifies the overall parameters of the closed range in real time through the MCP interface until all the closed ranges formed by the segment expansions simultaneously meet the following three termination conditions: ① Compliance conditions: The outer distance of the protected area shall not be less than 10 meters, the outer distance of the construction control zone shall not be less than 20 meters, and it shall meet the exclusive delineation requirements of the corresponding cultural relic type and fully comply with local standards and regulations; ② No conflict condition: None of the line segments within the enclosed area intersect with the property boundaries of buildings or the boundaries of basic farmland, and there is no conflict of land use; ③ Reasonableness conditions: The boundaries of the scope conform to the natural features of the terrain (such as along contour lines, ridge lines, riverbanks, etc.), and there are no logical conflicts such as boundary intersections, breaks, or overlaps.
[0035] Furthermore, the termination decision is fed back to the system through the MCP interface to ensure that all process parameters are traceable and verifiable.
[0036] Step S9: Optimize the output model by calling the MCP interface.
[0037] The optimized output model calls the API address " / api / mcp / optimize / output". Input parameters include "final range coordinates (final_coords), smoothing factor (smooth_factor=0.8), and output format list (output_formats=[.gdb,.shp,.glb])". Return parameters include "download URL (download_url, valid for 12 hours), checksum, and compliance verification result (compliance_result)". The compliance verification result is generated by calling the standard compliance detection model through the MCP API.
[0038] Furthermore, the model uses a Bezier curve fitting algorithm to smooth and optimize the boundary of the closed area, eliminating the broken line marks caused by the segment division and making the boundary more in line with the natural shape; the AI coordinate calibration model is used to accurately correct the boundary coordinates to ensure that the coordinate error is ≤0.1m.
[0039] Furthermore, the output includes: a coordinate dataset in .gdb format (named as “6-digit administrative division code + name of cultural relic protection unit + vector data”), a vector layer in SHP format, and a 3D visualization model in GLB format (RGB color code of cultural relic body R255 / G0 / B0, protection range R255 / G0 / B255, construction control zone R0 / G0 / B255). The output format conforms to local standards and industry application requirements. Attached Figure Description
[0040] Figure 1 This is an overall flowchart of the AI-based two-line intelligent generation method for cultural relic protection units according to the present invention.
[0041] Figure 2 This is a flowchart of the MCP interface data transmission and model call process of the present invention.
[0042] Figure 3 This is a flowchart of the recursive expansion and conflict detection closed loop of the present invention. Detailed Implementation
[0043] The following describes the specific implementation process of this invention using an ancient building (covering an area of approximately 800m², located against a mountain, surrounded by three houses and one piece of basic farmland) as an example.
[0044] Step 101: Data Acquisition and Preprocessing: Input the 3D point cloud model of ancient buildings, 2D images, GIS terrain data, and data on the distribution of house property boundaries and basic farmland. Collect local standard texts and ancient building classification files. After denoising, coordinate unification, and format standardization, construct the original dataset for AI analysis.
[0045] Step 102: MCP Interface Call to Feature Extraction Model: Upload the original dataset in JSON format via the MCP interface ( / api / mcp / extract / ontology), call the U-Net++ semantic segmentation model with attention gate (model_id=feat_extract_001), and select synchronous call mode. The interface returns status code 200, and the artifact body line results are obtained in WKT format, with an edge extraction accuracy of 0.25m.
[0046] Step 103: MCP Interface Calls Inference Engine: Call the AI inference engine interface ( / api / mcp / inference / rellic_two_lines), inputting parameters "Cultural Relic Classification = Ancient Building, Topographic Features = Mountain Backing, Knowledge Base Version = v1.0". The AI inference engine matches local standard clauses and returns coordinate data for an initial protection range extended 12m outward (meeting the requirement that "the side against the mountain is not less than 1 times the height of the main body") and a construction control zone extended 20m outward, with a rule matching confidence level of 0.92.
[0047] Step 104: MCP interface calls the line segment division model: Call the line segment division interface ( / api / mcp / segment / divide), input the length of the cultural relic body line (120m) and curvature distribution data, the model adaptively divides into 16 continuous line segments, and the interface returns the starting point, ending point coordinates and curvature information of each line segment.
[0048] Step 105: Recursive Expansion and Conflict Detection: The recursive expansion AI decision model is controlled via the expansion control interface ( / api / mcp / expand / control), expanding the line segment outward by 1 meter at a time along the normal direction. After each expansion, the intersection detection interface ( / api / mcp / detect / intersection) is called to determine conflicts. If 5 line segments are found to intersect with the boundaries of houses and basic farmland, the model automatically controls these 5 line segments to retract 0.5 meters and lock them, while the remaining 11 line segments continue to expand.
[0049] Step 106: Iterative optimization and termination judgment: Repeat the “segment division - expansion - detection - adjustment” process 45 times, recursively expand the AI decision model and verify the parameters in real time through the MCP interface. Finally, the closed range meets the termination conditions of “the protection range is expanded by 12m and the construction control zone is expanded by 20m”, “there are no intersecting conflicts”, and “the boundary conforms to the mountain terrain”.
[0050] Step 107: Output Results: Call the optimization output interface ( / api / mcp / optimize / output), input the final range coordinates, smoothing coefficient 0.8, and select the output format as .gdb, .shp, or .glb. The interface returns the result download address (valid for 12 hours), result verification code, and compliance verification result. Download and verify the results to confirm that the two line ranges are accurate, compliant, and conflict-free, and can be directly used for subsequent cultural relic protection and planning management work.
[0051] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0052] While the invention has been described above with reference to various embodiments, it should be understood that many changes and modifications can be made without departing from the scope of the invention. Therefore, the detailed description above is intended to be illustrative rather than restrictive, and it should be understood that the following claims (including all equivalents) are intended to define the spirit and scope of the invention. These embodiments should be understood as illustrative only and not as limiting the scope of protection of the invention. After reading the description of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent changes and modifications also fall within the scope defined by the claims of this invention.
Claims
1. An AI-based two-line intelligent generation method for cultural heritage protection units, characterized by, Comprise the following steps: S1: Collect multi-source heterogeneous data, which includes the three-dimensional point cloud model of cultural relics ontology, high-resolution two-dimensional image, GIS terrain data under CGCS2000 coordinate system, surrounding house property boundary vector data, basic farmland distribution vector data and cultural relics protection rule text data; The multi-source heterogeneous data is preprocessed by denoising, coordinate unification and format standardization to construct an AI analysis original data set; S2: Based on the interface encapsulated by MCP (Model Context Protocol), call the feature extraction and cultural relics ontology recognition AI model, and perform feature extraction and cultural relics ontology recognition on the original data set. The accurate cultural relics ontology line is generated by the edge contour optimization algorithm. The cultural relics ontology line is a closed polygon contour line. The MCP interface encapsulation adopts RESTful API architecture design, supports HTTPS encryption transmission protocol, includes data input protocol, model calling protocol and result output protocol, the data input protocol defines the original data set encapsulated in JSON format, including "data type (type), coordinate reference (crs), data content (content), timestamp (timestamp)" 4 core fields, the model calling protocol supports synchronous calling and asynchronous calling two modes, and the result output protocol defines the cultural relics ontology line result encapsulated in WKT format; S3: Construct cultural relics protection rule knowledge base, which embeds the two-line demarcation bottom limit (protection range expansion not less than 10m, construction control zone expansion not less than 20m) and cultural relics classification demarcation requirements stipulated by local standards; Through the AI reasoning engine calling interface encapsulated by MCP interface, match the cultural relics classification, terrain features and protection rules, take the edge coordinates of the cultural relics ontology line as the reference, dynamically calculate the coordinate parameters of the protection range and the construction control zone, and generate the initial two-line range; S4: Through the AI adaptive line segment division model calling interface encapsulated by MCP interface, input the length and curvature characteristic data of the cultural relics ontology line, automatically divide it into 10-20 continuous line segments, and record the start point, end point three-dimensional coordinate parameters and line segment curvature information of each line segment, wherein the number of line segments with curvature≥0.8 is 15-20, and the number of line segments with curvature<0.8 is 10-15; S5: Construct recursive expansion AI decision model, execute synchronous expansion operation to each line segment through the expansion control interface encapsulated by MCP interface, and the recursive expansion AI decision model presets the basic expansion distance of each time as 1 meter, and the expansion direction is along the normal outward direction of each line segment; S6: Integrate AI space intersection detection module, and through the intersection detection calling interface encapsulated by MCP interface, the line segments after each expansion are intersected with the house property boundary and the basic farmland distribution boundary in real time, and the spatial accuracy of the intersection judgment is less than or equal to 0.1 meters. S7: The recursive expansion AI decision model receives intersection detection results through the MCP interface and performs a differentiated expansion strategy: if a line segment intersects with a house or basic farmland boundary, the line segment automatically retracts 0.5 meters and temporarily locks the current position, and the remaining line segments without intersection continue to expand by 1 meter each time; S8: Repeat steps S4-S7, the recursive expansion AI decision model verifies the overall parameters of the closed range in real time through the MCP interface until all line segments expanded form a closed range that meets the following conditions: ① The protection range bottom limit is not less than 10 meters and the construction control zone bottom limit is not less than 20 meters as required by local standards; ② There is no intersection between any line segment of the closed range and the house or basic farmland boundary; ③ The range boundary is consistent with the terrain features and has no logical conflicts; S9: The optimization output model encapsulated through the MCP interface calls the interface to perform smoothing optimization and coordinate calibration on the final closed range, and outputs two-line range coordinate data sets, vector layers, and three-dimensional visualization models containing protection ranges and construction control zones. The coordinate data set format conforms to the.gdb standard requirements, and the coordinate error is ≤0.1m.
2. The method of claim 1, wherein, The MCP interface encapsulation adopts RESTful API architecture design, supports HTTPS encrypted transmission protocol and model hot update, and includes data input, model calling and result output protocols; data input is encapsulated in JSON format, including "data type, coordinate reference, data content, timestamp" core fields, three-dimensional point cloud data is transmitted using Base64 encoding, and two-dimensional images are compressed in TIFF format.
3. The method of claim 1, wherein, The feature extraction and artifact ontology recognition AI model in step S2 is a U-Net++ semantic segmentation model with attention gate, edge contour optimization uses Canny edge detection, morphological closing operation with 3x3 structure element and opening operation; In step S3, the AI reasoning engine calling interface matches the artifact classification and terrain features, and returns the initial two-line coordinates and rule matching log (confidence ≥0.8); In step S4, the AI adaptive line segment division model divides 10-20 line segments according to the curvature characteristics, 15-20 segments when curvature ≥0.8, and 10-15 segments when curvature <0.
8.
4. The method of claim 1, wherein, In step S6, the AI spatial intersection detection module uses the cross-stand experiment method, and the intersection judgment accuracy is ≤0.1 meter; In step S9, the optimization output model realizes boundary smoothing through Bezier curve fitting, and the coordinate error is ≤0.1m, the output format includes.gdb,.shp,.glb, returns the achievement download address, verification code and compliance verification result.