A visual structure displacement automatic measurement system based on a large language model, a displacement measurement device and method

The automatic visual structural displacement measurement system based on a large language model realizes a complete automated link from image input to displacement output, solves the problem of difficult ROI selection in existing technologies, improves measurement accuracy and robustness, is applicable to different structural types and complex environments, and meets data security requirements.

CN123181538APending Publication Date: 2026-11-27SHENZHEN QIANHAI PUBLIC SAFETY RES INST CO LTD +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611410327.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing visual structural displacement measurement methods have difficulties in automatically, accurately, and robustly selecting suitable target areas for displacement tracking, especially in inaccessible or dangerous areas and when the environment changes. Existing methods cannot effectively distinguish between structural components and interference objects, resulting in distorted measurement results.

Method used

An automatic visual structural displacement measurement system based on a large language model is adopted. The semantic understanding module uses multiple large language models to generate text descriptions of ROIs. Combined with a confidence-weighted majority voting mechanism and semantic standardization, a high-confidence target description is obtained. The target detection module locates the ROI bounding box in the image. The optimal ROI is selected by affine transformation simulation and feature density quantization. Finally, the displacement value is obtained through a displacement tracking algorithm.

Benefits of technology

It achieves full automation of visual displacement measurement, significantly improves the semantic understanding and reliability of ROI selection, achieves measurement accuracy comparable to contact sensors, has the ability to generalize across structural types, meets data security requirements, has adaptive anti-interference capabilities, and lowers the technical application threshold.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181538A_ABST
    Figure CN123181538A_ABST
Patent Text Reader

Abstract

The application provides a visual structure displacement automatic measurement system, a displacement measurement device and a method based on a large language model, and the visual structure displacement automatic measurement system comprises a semantic understanding module: inputting an image frame into two or more language large models, and each language large model independently generating a text description of a candidate ROI; a consensus screening and semantic standardization module: generating a standardized ROI text description list; a target detection module: positioning a specific boundary box of each target to form a potential ROI boundary box set; an optimal ROI acquisition module: selecting an ROI subgraph corresponding to an ROI boundary box with the highest feature density as an optimal ROI; and a displacement tracking module: using a displacement tracking algorithm to obtain a displacement value of a target in the boundary box of the optimal ROI relative to a previous frame image. According to the application, ROI identification, optimization and displacement tracking can be automatically completed by only providing a structure monitoring video, and the technical application threshold is significantly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of displacement monitoring technology, specifically to an automatic measurement system for visual structural displacement based on a large language model, and also to an automatic monitoring system and method for displacement using the aforementioned automatic measurement system for visual structural displacement based on a large language model. Background Technology

[0002] Structural displacement measurement is a core component of structural health monitoring (SHM), directly reflecting the performance and safety status of civil structures under load. Traditional methods rely on contact sensors (such as LVDT displacement sensors and accelerometers), which are cumbersome to install, costly, and difficult to implement on large or in-service structures. Non-contact technologies (such as lasers, radar, and GPS) eliminate physical installation, but are expensive, have limited accuracy, or are sensitive to environmental conditions.

[0003] Over the past decade, with the improvement of high-resolution digital camera performance and the advancement of computer vision algorithms, vision-based structural displacement measurement methods have gained widespread attention. The basic principle of these methods is to fix the camera at a stable position far from the structure and continuously capture a sequence of images containing the target structure at a certain frame rate. Image processing and feature tracking algorithms are then used to extract pixel motion in specific areas of the structure's surface, which is then converted into physical displacement using a scaling factor. Vision-based methods offer a combination of advantages, including non-contact operation, low cost, high spatial resolution, and ease of simultaneous multi-target measurement, thus rapidly becoming a research hotspot in the field of structural monitoring.

[0004] However, visual measurement methods face a fundamental and unresolved technical bottleneck in practical engineering applications: how to automatically, accurately, and robustly select suitable target areas for displacement tracking. Existing visual measurement methods primarily employ three approaches to target area selection: First, using artificially created targets, such as checkerboard patterns, circular reflective markers, or QR code targets. These require pre-installation on the structural surface, making them impractical for inaccessible or hazardous areas like the main cable of a cross-sea bridge, the top of a towering structure, or the interior of a nuclear facility. Second, relying on pre-trained target detection models (such as the YOLO series). However, training such models requires collecting a large number of labeled images for each structural type and target component, resulting in extremely high engineering deployment costs. Furthermore, model performance significantly degrades when the structural appearance changes (e.g., paint refurbishment, corrosion). Third, relying entirely on experienced operators manually selecting ROIs through a human-computer interaction interface. This method is not only inefficient, but the subjective judgment differences among operators directly affect the final measurement accuracy, severely hindering the system's adoption by non-expert users.

[0005] To overcome these bottlenecks, some scholars have attempted to develop automated ROI selection methods. One type of method is based on low-level image feature detection, such as using SURF (Speeded-Up Robust Features) or SIFT (Scale-Invariant Feature Transform) algorithms to extract key feature points from the entire image, and then using cluster analysis to select regions with dense features and consistent motion as ROIs. Another type of method introduces deep learning technology, training convolutional neural networks to automatically detect natural key points. Although these methods can operate under specific conditions, their core logic remains at the level of "pixel-level feature detection," lacking the ability to understand the semantic level of image content—they cannot distinguish whether the detected feature points come from load-bearing components of a structure or from vehicles, pedestrians, or swaying branches that happen to pass through the scene. When the latter two types of dynamic interference objects have rich features, the system is very likely to mistakenly select them as tracking targets, resulting in completely distorted displacement measurement results.

[0006] In summary, existing methods "find" trackable features at the pixel level, rather than "understand" which structural components are suitable for tracking at the semantic level. The system cannot distinguish between structural components and interfering objects, nor can it understand the mechanical consistency of component displacement. Therefore, there is an urgent need for a new system and method that can understand structural images like an expert and automatically identify suitable targets for tracking. Summary of the Invention

[0007] To address the problems in the prior art, this invention provides an automatic visual structural displacement measurement system based on a large language model, and also relates to an automatic displacement monitoring system and method using the aforementioned automatic visual structural displacement measurement system based on a large language model.

[0008] This invention relates to an automatic visual structural displacement measurement system based on a large language model, comprising: Input module: used to input monitoring video and extract the image frames to be measured based on the monitoring video; Semantic understanding module: The image frame is input into two or more large language models. Each large language model performs visual-language reasoning and independently generates text descriptions of candidate ROIs, where ROI is the region of interest. Consensus screening and semantic standardization module: Obtain text descriptions of candidate ROIs generated by various language models, obtain target descriptions with confidence scores exceeding a set threshold based on a confidence-weighted majority voting mechanism, and then perform semantic standardization processing on the target descriptions to generate a standardized list of ROI text descriptions; Target detection module: It feeds a standardized list of ROI text descriptions into the open set target detector, locates the specific bounding boxes of each target in the image frame, and forms a set of potential ROI bounding boxes; The optimal ROI acquisition module: Based on the optimization method of affine transformation simulation and feature density quantization, the ROI sub-image corresponding to the ROI bounding box with the highest feature density is selected as the optimal ROI; Displacement tracking module: Obtains the bounding box of the optimal ROI and uses a displacement tracking algorithm to obtain the displacement value of the target within the bounding box of the optimal ROI relative to the previous frame image; Output module: Used to output displacement information.

[0009] Furthermore, the semantic understanding module includes three different large model sub-modules: Tongyi Qianwen, Wenxin Yiyan, and Zhipu GLM. These three large model sub-modules run in parallel based on prompt words and output text descriptions of three sets of candidate ROIs respectively.

[0010] Furthermore, the prompts for the large model sub-modules employ a hierarchical, progressive structured prompt format, including: Professional Role Anchoring Layer: Used to activate the civil engineering and computer vision-related professional knowledge learned by the large model sub-modules during the pre-training phase, which can output more professional and accurate text descriptions; Cognitive task decomposition layer: breaks down the task into two sequentially executed subtasks: a global classification and a local description; Priority rule embedding layer: used to embed priority recognition and exclusion rules into prompt words, so that the large model sub-modules focus on key structural components; Output format constraint layer: Used to ensure that each large model submodule outputs results in a predefined structured format.

[0011] Furthermore, in the consensus screening and semantic standardization module, the method for processing target descriptions with confidence scores exceeding a certain threshold, based on a confidence-weighted majority voting mechanism, is as follows: For each large model submodule, extract its confidence score from the text description output. Then, for each candidate target, calculate the sum of its confidence scores across the three large model submodules. If the sum of the confidence scores exceeds a set threshold, it is retained. The semantic standardization processing method is as follows: Equivalent grouping: grouping different expressions referring to the same structural component into the same semantic group; Standardized naming: Generate a standardized name for each semantic group.

[0012] Furthermore, the target detection module adopts the Grounding DINO open set detection model based on the Transformer framework, and its processing method is as follows: A1. Receive the standardized ROI text description list output by the consensus filtering and semantic standardization module; A2. Initial detection is performed using the first confidence threshold to obtain a set of candidate bounding boxes; A3. Determine whether a bounding box contains more than 3 other bounding boxes. If so, mark it as a giant bounding box and exclude it; otherwise, keep it. A4. Sort the remaining bounding boxes in descending order of confidence scores; A5. For each ROI text description, select the bounding box with the highest confidence score as the specific bounding box of each target, forming a set of potential ROI bounding boxes.

[0013] Furthermore, the processing method of the optimal ROI acquisition module is as follows: B1. ROI cropping and adaptive transformation simulation: Cropping the corresponding ROI sub-image from the image frame according to the ROI bounding box, and then performing various image transformations on the ROI sub-image to obtain ROI images with various transformations, simulating real displacement morphological changes. B2. Feature Extraction and Matching: Extract all candidate feature points from the original image frame, and then match each feature point with the three transformed ROI images. B3. Stable Feature Point Filtering: Determine whether each feature point can be successfully matched with all ROI images. If so, it is determined to be a stable feature point; otherwise, the feature point is discarded. B4. Feature density calculation: After obtaining the set of stable feature points for each ROI sub-image, count the total number of stable feature points for each ROI sub-image, and then calculate the feature density for each ROI sub-image. The feature density is the ratio of the number of stable feature points to the pixel area of ​​the ROI sub-image. B5. Optimal ROI Output: Sort by feature density and select the ROI sub-image with the highest feature density as the optimal ROI.

[0014] Further, in step B1, three different image transformations are applied to the ROI sub-image: clockwise rotation by α degrees and application of Gaussian blur, counterclockwise rotation by β degrees and application of Gaussian blur, and clockwise rotation by γ degrees and application of Gaussian blur, where α, β, and γ are adaptive rotation angles, dynamically calculated based on the width w and height h of the ROI sub-image, using the following formula: α = 3° × max(1, 100 / min(w, h)) β = 4°×max(1,100 / min(w,h)) γ = 5°×max(1,100 / min(w,h)) The size of the Gaussian blur kernel is proportional to the size of the ROI subplot.

[0015] Furthermore, the displacement tracking module employs the KLT sparse optical flow algorithm. Before displacement tracking, feature point initialization is performed: within the optimal ROI of the first image frame, initial feature points with strong spatial gradients are extracted using a Harris corner detector, and several feature points with the highest response values ​​are retained for subsequent tracking. The displacement tracking module includes: Frame-by-frame tracking submodule: For effective feature points within the optimal ROI bounding box in the current image frame, the KLT sparse optical flow algorithm is used to search for the best matching position; Outlier feature point removal submodule: Determines and removes outliers based on the bidirectional reprojection error value between the actual displacement and the predicted displacement of the feature point. The displacement synthesis and unit conversion submodule is used to take the median of the displacement vectors of the remaining effective feature points after removing outliers as the overall displacement estimate of the optimal ROI. The resulting pixel-level displacement sequence is then multiplied by a pre-calibrated scaling factor to convert it into a physical displacement value.

[0016] The present invention also provides an automatic displacement measurement device, including a user interaction layer and a system processing layer, wherein the system processing layer is equipped with the aforementioned automatic displacement measurement system based on a large language model. The user interaction layer includes a loading module, a manual intervention module, and a display module. The loading module loads video and outputs it to the input module of the system processing layer. The manual intervention module includes an RIO bounding box adjustment submodule and a tracking parameter adjustment submodule. The output of the RIO bounding box adjustment submodule is connected to the input of the optimal ROI acquisition module. The output of the tracking parameter submodule is connected to the input of the displacement tracking module. The input of the display module is connected to the output of the output module, and is used to display the automatic displacement measurement results.

[0017] The present invention also provides an automatic displacement measurement method, implemented based on the aforementioned displacement measuring device, the automatic displacement measurement method comprising the following steps: Step S1: Obtain the monitoring video loaded by the user, and extract the image frames to be measured based on the monitoring video; Step S2: Input the image frame into two or more language models. Each language model performs visual-language reasoning and independently generates text descriptions of candidate ROIs, where ROI is the region of interest. Step S3: Obtain the text descriptions of candidate ROIs generated by each language large model; based on the confidence weighted majority voting mechanism, obtain the target descriptions with confidence exceeding the set threshold; then perform semantic standardization processing on the target descriptions to generate a standardized list of ROI text descriptions. Step S4, Target Detection: The standardized ROI text description list is fed into the open set target detector to locate the specific bounding boxes of each target in the image frame, forming a set of potential ROI bounding boxes; Step S5: Determine whether the RIO bounding box adjustment information output by the RIO bounding box adjustment submodule has been received. If yes, adjust the potential RIO bounding box and then execute step S6. If no, execute step S6 directly. Step S6: Based on the optimization method of affine transformation simulation and feature density quantization, select the ROI sub-image corresponding to the ROI bounding box with the highest feature density as the optimal ROI; Step S7: Determine whether the tracking parameter adjustment output from the tracking parameter submodule has been received. If yes, adjust the displacement tracking parameter and then execute step S8. If no, execute step S8 directly. Step S8, Displacement Tracking: Obtain the bounding box of the optimal ROI, and use the displacement tracking algorithm to obtain the displacement value of the target within the bounding box of the optimal ROI relative to the previous frame image. Step S9: Output displacement information to the user interaction layer.

[0018] Compared with the prior art, the beneficial effects of the present invention are: 1. Achieving full automation of visual displacement measurement: This invention is the first to introduce the visual-language understanding capabilities of a large language model into the field of structural displacement measurement, constructing a complete automated link from image input to displacement output. The system requires no manual target installation, no training of detection models for specific structures, and no user expertise in computer vision or structural monitoring. It only requires providing structural monitoring videos to automatically complete ROI identification, selection, and displacement tracking, significantly reducing the technical application threshold. 2. Significantly Improves the Semantic Understanding and Reliability of ROI Selection: Existing automatic ROI selection methods rely on low-level image features and cannot distinguish between structural components and dynamic interference objects. This invention utilizes the visual-linguistic understanding capabilities of large language models, enabling the system to possess expert-level semantic parsing capabilities for structural scenes. It can identify targets with consistent physical displacement, such as load-bearing components and rigid connectors, while explicitly excluding non-structural moving objects such as vehicles and pedestrians. This invention further enhances the stability of selection by employing a consensus mechanism of multiple large language models. 3. Achieving measurement accuracy comparable to contact sensors: Through laboratory calibration experiments, the average absolute error of this invention was 0.958 mm on a three-story building model and 0.159 mm on a bridge model. In full-scale real-bridge verification, the system maintained stable and continuous displacement tracking even under strong dynamic excitations such as train passage. This result proves that the automated ROI selection of this invention does not sacrifice measurement accuracy and achieves a performance level comparable to traditional contact sensors. 4. Possesses cross-structure type generalization ability: The present invention performs robustly under different lighting conditions, background complexity and dynamic excitation levels. Due to the adoption of the open set detection architecture with zero-shot inference, the system does not need to be retrained for new structure types and can be directly generalized to unseen engineering scenarios, which has good prospects for engineering promotion. 5. Using domestically developed large-scale models to meet data security requirements: This invention uses multiple domestically developed large-scale language models. All image data and text descriptions are processed on domestic servers, which fully meets the strict requirements for data security, privacy protection and compliance in the field of critical infrastructure monitoring. The three large-scale language models selected in this invention have a high level of performance in Chinese multimodal evaluation, which provides technical assurance for system performance. 6. Adaptive anti-interference capability: This invention uses adaptive affine transformation parameters to make the feature density assessment more closely match the texture characteristics of targets at different scales. Simultaneously, a tracking loss recovery mechanism based on dual indicators of effective feature point count and average reprojection error automatically reinitializes when a large number of feature points are lost, effectively addressing on-site interference such as sudden changes in illumination and local occlusion, ensuring the continuity of long-term monitoring. Attached Figure Description

[0019] To more clearly illustrate the solutions in this invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 This is a block diagram of the automatic visual structural displacement measurement system based on a large language model according to the present invention. Figure 2 This is a flowchart illustrating the execution method of an embodiment of the automatic visual structural displacement measurement system based on a large language model according to the present invention. Figure 3 This is a flowchart of the optimal ROI acquisition module of the present invention. Figure 4 This is a schematic diagram illustrating the interaction between the user interaction layer and the system processing layer in the automatic displacement measurement device of the present invention. Detailed Implementation

[0021] Unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains; the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings are used to distinguish different objects, not to describe a particular order.

[0022] In this invention, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment to other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this invention can be combined with other embodiments.

[0023] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0024] like Figure 1 As shown, the present invention provides an automatic visual structural displacement measurement system based on a large language model, comprising: Input module: used to input monitoring video and extract the image frames to be measured based on the monitoring video; Semantic understanding module: The image frame is input into two or more large language models. Each large language model performs visual-language reasoning and independently generates text descriptions of candidate ROIs, where ROI is the region of interest. Consensus screening and semantic standardization module: Obtain text descriptions of candidate ROIs generated by various language models, obtain target descriptions with confidence scores exceeding a set threshold based on a confidence-weighted majority voting mechanism, and then perform semantic standardization processing on the target descriptions to generate a standardized list of ROI text descriptions; Target detection module: It feeds a standardized list of ROI text descriptions into the open set target detector, locates the specific bounding boxes of each target in the image frame, and forms a set of potential ROI bounding boxes; The optimal ROI acquisition module: Based on the optimization method of affine transformation simulation and feature density quantization, the ROI sub-image corresponding to the ROI bounding box with the highest feature density is selected as the optimal ROI; Displacement tracking module: Obtains the bounding box of the optimal ROI and uses a displacement tracking algorithm to obtain the displacement value of the target within the bounding box of the optimal ROI relative to the previous frame image; Output module: Used to output displacement information.

[0025] This invention adopts a five-stage pipeline architecture: semantic understanding, consensus filtering and semantic standardization, target detection, optimal ROI acquisition, and displacement tracking. Each module is loosely coupled through standardized data interfaces (structured text, bounding box coordinate arrays, feature point sets, etc.), allowing each module to be upgraded independently without affecting the overall process, thus improving the system's maintainability and the flexibility of technology iteration.

[0026] like Figure 2 As shown, in a preferred embodiment of the present invention, the logical structure of the entire automatic measurement operation in this example is as follows: The user inputs a structural monitoring video, and the system automatically extracts the first frame (or other frames) and processes it. This frame is then processed by the semantic understanding module. This module concurrently schedules three domestic large-scale language models (Tongyi Qianwen, Wenxin Yiyan, and Zhipu GLM) to perform visual-language inference, independently generating text descriptions for three candidate ROIs: Candidate ROI Description Set 1, Candidate ROI Description Set 2, and Candidate ROI Description Set 3. Subsequently, the consensus filtering and semantic standardization module performs a confidence-weighted majority vote on the three description sets, eliminating proposals that only appear in a single model, and performing semantic equivalence grouping and name standardization on the remaining targets. The standardized description list is then sent to the target detection module. This module uses the open-set target detector Grounding DINO to locate the spatial position of each target in the image using a zero-shot method. The optimal ROI acquisition module quantifies the stable feature point density of each candidate ROI and automatically selects the region with the highest density as the optimal tracking target. Finally, the displacement tracking module uses this target as a reference and employs the KLT algorithm to complete sub-pixel-level displacement measurement for all subsequent video frames. When a large number of feature points are lost, the system automatically triggers a tracking and recovery mechanism to ensure continuous monitoring.

[0027] In this invention, the language large-scale model-related processing (i.e., the two stages of semantic understanding and consensus marker selection and semantic standardization) is executed only once in the first frame. Once the optimal ROI is selected, the displacement tracking of all subsequent frames is completed independently by the KLT algorithm, without involving any model API calls. This design strictly limits the time overhead of introducing the language large-scale model to the system initialization stage, ensuring the real-time performance of subsequent continuous monitoring.

[0028] The following provides a detailed description of the processing method of the five-stage pipeline architecture of the present invention, namely "semantic understanding - consensus screening and semantic standardization - target detection - optimal ROI acquisition - displacement tracking".

[0029] Level 1, Semantic Understanding Module Based on Large Language Model: This module is the front-end perception component of the entire system, responsible for converting the original structural images into structured ROI text descriptions. Its core design idea is to leverage the visual semantic reasoning capabilities learned by the language big model in multimodal understanding tasks, enabling the system to identify the structural types in the images, determine the mechanical properties of each component (whether it is load-bearing, whether it is rigidly connected), and select suitable displacement tracking targets accordingly, just like a professional engineer.

[0030] The semantic understanding module in this embodiment includes three different large model sub-modules: Tongyi Qianwen, Wenxin Yiyan, and Zhipu GLM. The three large model sub-modules run in parallel based on prompt words and output text descriptions of three sets of candidate ROIs respectively.

[0031] Of course, the large model sub-modules mentioned in this example can also use domestic language large models on the market such as iFlytek Spark Cognitive Large Model, Pangu, Hunyuan Large Model, 360 Large Model Brain, Kunlun Tiangong, etc.

[0032] To achieve functional mapping from a general large model to a structural monitoring expert, the prompts for the large model sub-modules adopt a hierarchical and progressive structured prompting word approach. Its logical architecture consists of four progressive levels, including: (1) Professional role anchoring layer: used to activate the civil engineering and computer vision related professional knowledge learned by the large model sub-modules in the pre-training stage, which can output more professional and accurate text descriptions.

[0033] For example, the system prompt in this invention begins with the message, "You are a computer vision structural displacement measurement expert with extensive experience in selecting displacement tracking ROIs." This setting aims to activate the relevant knowledge learned by the model during the pre-training phase, thereby improving the accuracy of terminology and professional reasoning capabilities in subsequent outputs.

[0034] (2) Cognitive task decomposition layer: The task is decomposed into two sequentially executed sub-tasks: global classification and local description.

[0035] This embodiment breaks down the complex decision-making task of ROI selection into two sequential sub-tasks: first, identifying the structural types in the image (such as bridges, building frames, towers, etc.), and then describing each structural component in detail. This "global classification - local description" processing sequence simulates the cognitive strategy of human experts when dealing with complex visual tasks, that is, only by clearly understanding the overall category of the structure can the engineering attributes and displacement correlation of each component be accurately determined.

[0036] (3) Priority rule embedding layer: used to embed priority recognition and exclusion rules in prompt words, so that the large model sub-modules focus on key structural components.

[0037] In this embodiment, the prompts explicitly convey a three-tiered selection priority to the model: the highest priority is given to structural components of the load-bearing system (such as main beams, gusset plates, and support rods), because the displacement of these components best characterizes the overall mechanical response of the structure; the second highest priority is given to rigidly connected non-structural components (such as guardrail posts and bolted connections), because they maintain displacement consistency with the main structure; and the next highest priority is given to areas with high texture or high contrast to ensure the feasibility of subsequent feature tracking. Simultaneously, the prompts explicitly instruct the model to exclude dynamic objects, eliminating interference from non-structural motion at the semantic level.

[0038] (4) Output format constraint layer: This layer is used to ensure that each large model sub-module outputs results in a predefined structured format. Preferably, the output results of this invention do not include any explanatory text to ensure that the output results can be automatically parsed by downstream modules without manual intervention.

[0039] This invention simultaneously schedules three domestically developed language models (Tongyi Qianwen series, Wenxin Yiyan series, and Zhipu GLM series) to perform parallel inference on the same input image. The three models were developed by Alibaba, Baidu, and Zhipu AI, respectively, and they differ significantly in terms of training data composition, network architecture design, and alignment fine-tuning strategies.

[0040] This architectural diversity is statistically significant at the system level: if a model tends to misjudge a certain structural component due to training data bias, this bias usually does not appear simultaneously in the other two models. Therefore, the intersection of the outputs of the three models is more reliable in a probabilistic sense. In addition, the additional advantages of using domestically produced models are: (1) more accurate semantic understanding of Chinese engineering terms; (2) meeting the requirements for data sovereignty and compliance in the field of critical infrastructure monitoring; and (3) reaching the international leading level in authoritative Chinese multimodal evaluation.

[0041] The API calls for the three models are independent of each other, enabling true parallel execution in modern computing environments. The total latency perceived from the end-user's perspective is approximately equal to the latency of a single model inference (typically 2 to 5 seconds), rather than three times the latency, an overhead that is acceptable for an operation that is only performed once during system initialization.

[0042] This embodiment takes the first frame of a typical steel truss bridge image as an example. The three models output the following candidate ROI descriptions: Tongyi Qianwen tends to use standard terms in structural engineering (such as "V-shaped diagonal steel support member" and "node connection plate"); Wenxin Yiyan's description focuses on the spatial position and connection relationship of the components (such as "walkway metal guardrail post" and "truss node"); Zhipu GLM takes into account the description of component category and structural position (such as "connection plate at the intersection of diagonal member and lower chord").

[0043] The three sets of outputs used different textual descriptions when referring to the same physical target. This phenomenon not only verifies the semantic consistency across models (all three models identified diagonal rods, node plates, and guardrails), but also illustrates the necessity of subsequent consensus screening and semantic standardization modules.

[0044] Level 2, Consensus Filtering and Semantic Standardization Module: The three sets of ROI descriptions output by the semantic understanding layer differ in their representation of the same physical target. To obtain a standardized list of descriptions with verified reliability and consistent representation, this invention designs a two-stage processing flow of consensus filtering and semantic standardization.

[0045] In this embodiment, the consensus screening adopts a confidence-weighted majority voting mechanism. Specifically, for each ROI description output by each model, its confidence score (the probability value of the logit value returned by the model API after Softmax normalization) is extracted. Then, for each candidate target, the sum of its confidence scores in the three models is calculated. If the total confidence score exceeds a preset threshold (e.g., 1.5, which is equivalent to at least two models supporting it with moderate confidence), it is retained.

[0046] The threshold of 1.5 was selected based on the following considerations: Using ROC curve (Receiver Operational Characteristic) analysis, with manually labeled preferred ROIs as the benchmark, different thresholds (0.5 to 2.5, step size 0.1) were iterated on the validation set, and the threshold corresponding to the maximum Youden index was selected. Experiments showed that the F1-score plateaued (approximately 0.92) when the threshold was in the range of 1.4 to 1.6. The median value of 1.5 was taken as the system default threshold, while allowing users to adjust it within the range of 1.0 to 2.0 according to the actual scenario.

[0047] This weighted strategy, compared to binary counting, better reflects the reliability of the model output while retaining a few high-quality candidates proposed by models with extremely high confidence. Requiring complete agreement from all three models (intersection rule) would be too stringent—even human experts have natural differences in wording when describing the same structure, and forcing perfect agreement would lead to the wrong exclusion of many valid targets. Conversely, allowing retention based on only one model proposal (union rule) would be too lenient, introducing sporadic errors or systematic biases from a single model into subsequent processes. The confidence-weighted scheme achieves a more refined balance between these two approaches.

[0048] In practice, this module is executed by an automated script: it performs lightweight text preprocessing on the three sets of descriptions (such as removing modifiers and synonyms of the same term), then calculates the semantic similarity between each pair of descriptions, and determines descriptions with similarity exceeding a preset threshold as referring to the same target. The semantic similarity calculation uses a Sentence-BERT pre-trained model to generate text embedding vectors, with cosine similarity as the metric and a threshold of 0.75. This threshold is based on calibration results from manually labeled data and can be adjusted according to actual needs. This process does not involve additional large model calls, ensuring computational efficiency.

[0049] In this embodiment, after consensus screening, the target enters the semantic standardization process. Because the targets retained by consensus screening may have different original descriptions in terms of length and wording—some contain detailed material and location information, while others are merely brief component names. If these differentiated descriptions are directly input into the target detector, even if they refer to the same physical target, the different textual representations may lead to inconsistent detection results.

[0050] To this end, this invention introduces a fourth domestically developed large-scale model to perform the semantic standardization task. The preferred large-scale model is Qwen-Plus, due to its superior simplicity and consistency in the terminology standardization task; the alternative is Zhipu GLM-4, as both have a unified API interface and can be seamlessly switched.

[0051] The large model has two main tasks: first, equivalent grouping—grouping different expressions referring to the same physical component into the same semantic group; second, standardized naming—generating a concise and clear standardized name for each group, prioritizing simple nouns (such as "bolt head," "node plate," and "guardrail post"). This large model is also accessed via API and deployed on a domestic cloud server, requiring no local GPU resources. For deployment scenarios with limited network access, a lightweight local model (such as Qwen-2.5-3B) can be used as an alternative, which, after distillation, can run in real-time on a CPU, meeting the needs of offline environments.

[0052] The design of prioritizing simple nouns in standardized naming stems from considerations of the working characteristics of downstream detectors: Grounding DINO encodes text descriptions into embedding vectors and then performs cross-modal matching with image features. Overly lengthy descriptions may introduce semantic noise, while concise and clear noun phrases often achieve higher matching accuracy.

[0053] Level 3, Target Detection Layer: The standardized ROI text descriptions are input into the open set target detector to locate the specific bounding boxes of each target in the first frame image.

[0054] The object detection module of this invention employs the Grounding DINO open-set object detector, a Transformer-based open-set detection model. Its core design unifies object detection and cross-modal semantic matching within the same representation space. The model comprises three main components: an image encoder (extracting multi-scale feature maps from the image), a text encoder (encoding the input description into semantic embedding vectors), and a cross-modal decoder (achieving interactive fusion of text and image features through an attention mechanism). This model is pre-trained on billions of image-text pairs and exhibits strong zero-shot localization capabilities for descriptions of common engineering components.

[0055] The processing method of the Grounding DINO open set target detector is as follows: A1. Receive the standardized ROI text description list output by the consensus filtering and semantic standardization module; A2. Initial detection is performed using the first confidence threshold to obtain a set of candidate bounding boxes; A3. Determine whether a bounding box contains more than 3 other bounding boxes. If so, mark it as a giant bounding box and exclude it; otherwise, keep it. A4. Sort the remaining bounding boxes in descending order of confidence scores; A5. For each ROI text description, select the bounding box with the highest confidence score as the specific bounding box of each target, forming a set of potential ROI bounding boxes.

[0056] In practice, this invention uses a low confidence threshold of 0.1 for initial detection, aiming to maximize target recall—preferring some false alarms to prevent any real targets from being missed. However, the low threshold setting inevitably leads to multiple bounding box predictions for each text description.

[0057] To address this issue, this invention introduces a scale filtering rule. Empirical observations show that, under low threshold conditions, bounding boxes with extremely large spatial scales (i.e., boxes whose coverage includes more than three other predicted boxes) tend to obtain the highest confidence scores. This phenomenon can be attributed to the fact that large-scale bounding boxes accumulate more image feature responses in cross-modal similarity calculations, thereby boosting the confidence score. However, such large-scale boxes have the lowest sensitivity to structural displacement measurements—bounding boxes covering the entire main beam show extremely small pixel changes at their corner points even if the beam undergoes millimeter-level displacement, making it difficult to support effective feature constraints for KLT trackers.

[0058] Therefore, this invention defines bounding boxes containing three or more other predicted boxes as giant boxes and excludes them all in the post-processing stage. Among the remaining candidate boxes, the one with the highest confidence score is selected as the final detection result corresponding to that standardized description.

[0059] Level 4, Optimal ROI Acquisition Module: After the aforementioned processing, the system has obtained bounding boxes for multiple potential ROIs. The next problem to be solved is: among multiple candidate targets, what criteria should be used to select the most suitable one for displacement tracking? This invention proposes an automatic selection method based on affine transformation simulation and feature density quantization.

[0060] like Figure 3 As shown, the processing method of the optimal ROI acquisition module of this invention is as follows: B1. ROI cropping and adaptive transformation simulation: Cropping the corresponding ROI sub-image from the image frame according to the ROI bounding box, and then performing various image transformations on the ROI sub-image to obtain ROI images with various transformations, simulating real displacement morphological changes. B2. Feature Extraction and Matching: Extract all candidate feature points from the original image frame, and then match each feature point with the three transformed ROI images. B3. Stable Feature Point Filtering: Determine whether each feature point can be successfully matched with all ROI images. If so, it is determined to be a stable feature point; otherwise, the feature point is discarded. B4. Feature density calculation: After obtaining the set of stable feature points for each ROI sub-image, count the total number of stable feature points for each ROI sub-image, and then calculate the feature density for each ROI sub-image. The feature density is the ratio of the number of stable feature points to the pixel area of ​​the ROI sub-image. B5. Optimal ROI Output: Sort by feature density and select the ROI sub-image with the highest feature density as the optimal ROI.

[0061] In the fifth-level displacement tracking module, the performance of the KLT tracking algorithm depends on the number and quality of feature points that can be stably tracked within the ROI. Therefore, the optimal ROI should simultaneously meet three conditions: (1) the region has rich visual texture, and a sufficient number of candidate feature points can be extracted; (2) the feature points maintain matching stability when the structure is displaced and the viewpoint changes; (3) the spatial scale of the region is moderate - if it is too large, it is easy to introduce background noise, and if it is too small, the number of feature points is insufficient.

[0062] Traditional methods typically use the number of corner points or the sum of feature response values ​​within a Region of Interest (ROI) as evaluation metrics. However, this method has a systematic flaw: some feature points respond strongly in static images but disappear when the image undergoes slight rotation or blurring (e.g., specular highlights). These features are considered "unstable" for displacement tracking and should not be included in the evaluation system. The improvement proposed in this invention lies in: simulating and pre-testing the deformation resistance of feature points through affine transformation. Only feature points that can be continuously matched under a set of simulated deformations are considered "stable feature points."

[0063] To determine stable feature points, in step B1 of this embodiment, a Region of Interest (ROI) sub-image is cropped from the first frame image according to the bounding box. Then, three different image transformations are applied to the ROI sub-image: clockwise rotation by α degrees and application of Gaussian blur, counterclockwise rotation by β degrees and application of Gaussian blur, and clockwise rotation by γ degrees and application of Gaussian blur. Here, α, β, and γ are adaptive rotation angles, dynamically calculated based on the width w and height h of the ROI sub-image. The calculation formula is as follows: α = 3° × max(1, 100 / min(w, h)) β = 4°×max(1,100 / min(w,h)) γ = 5°×max(1,100 / min(w,h)) The adaptive rotation angle setting allows smaller ROIs to receive larger rotational perturbations and larger ROIs to receive smaller perturbations, simulating more realistic displacement morphological changes. The Gaussian blur kernel size is proportional to the size of the ROI sub-image to cover motion blur effects at different scales. In this example, the Gaussian blur kernel size σ = max(1, w / 50).

[0064] In step B2, all candidate feature points are extracted from the original ROI, and then each feature point is matched with the three transformed images. The matching adopts a nearest neighbor search strategy based on local descriptors, supplemented by a ratio test where the ratio of the nearest neighbor to the second nearest neighbor distance is less than 0.8, to filter out fuzzy matches.

[0065] In step B3, a feature point is considered a stable feature point if and only if it successfully matches in all three matches. This "triple consistency" criterion ensures that the selected feature point has comprehensive robustness against common in-plane rotations and blur degradation.

[0066] In step B4, after obtaining the set of stable feature points for each ROI, the feature density of the i-th ROI sub-image is defined as the ratio of the number of stable feature points to the pixel area of ​​that ROI. The reason for using density rather than absolute quantity as the evaluation metric is that: even if a large ROI sub-image contains more feature points, its feature density per unit area may be low, indicating sparse texture in the region, which may lead to featureless areas during tracking, affecting overall stability; conversely, ROIs with compact areas but dense features (such as bolt heads) have higher density values, with each unit area contributing trackable information, making them a better choice.

[0067] In step B5, the system calculates the feature density of the bounding box of each potential ROI in sequence and sorts them in descending order. The one ranked first is determined as the optimal ROI, and its bounding box is passed to the displacement tracking module.

[0068] As another embodiment of the present invention, the formula for calculating the adaptive rotation angle in this example can also be set as follows: α = 3° × max(1, 100 / min(w,h)) β = 4° × max(1, 100 / min(w,h)) γ = 5° × max(1, 100 / min(w,h)) Where w and h are the width and height of the ROI bounding box, respectively (in pixels). In this embodiment, upper limit protection is added: α≤15°, β≤20°, γ≤25°. This simulates more realistic displacement motion.

[0069] After the optimal ROI is selected, the system enters the displacement tracking module, which is preferably completed independently by the KLT sparse optical flow algorithm, no longer relying on the large language model. The KLT sparse optical flow algorithm is based on three basic assumptions: (1) brightness constancy - the pixel gray value of the same feature point remains unchanged between adjacent frames; (2) motion continuity - the displacement amplitude between adjacent frames is small, and the change of feature point position is approximately a linear translation in the local neighborhood; (3) spatial consistency - the motion vectors of adjacent pixels in the same local neighborhood are similar. Under the above assumptions, the algorithm can obtain sub-pixel level measurement accuracy by iteratively solving the optimal estimate of inter-frame displacement by minimizing the gray value difference function in the feature point neighborhood window.

[0070] Before displacement tracking, this example first performs feature point initialization: the Harris corner detector is used to extract initial feature points with strong spatial gradients within the optimal ROI of the first image frame. The Harris corner response function is calculated based on the structure tensor matrix of the image, and several feature points with the highest response values ​​are retained for subsequent tracking. In this example, the top 100 feature points are selected.

[0071] The displacement tracking module in this embodiment includes: The frame-by-frame tracking submodule: For valid feature points within the optimal ROI bounding box in the current image frame, the KLT sparse optical flow algorithm is used to search for the best matching position. In this embodiment, the search is performed at multiple scale levels of the image pyramid—first obtaining an initial estimate of the displacement at the low-resolution layer, and then refining it layer by layer to the high-resolution layer. This multi-scale strategy enables the algorithm to handle large inter-frame displacements.

[0072] Outlier feature point removal submodule: Determines outliers and removes them based on the bidirectional reprojection error between the actual displacement and the predicted displacement of the feature point.

[0073] In this embodiment, after each frame of tracking is completed, the system estimates a similarity transformation model (including translation, rotation, and isotropic scaling) to describe the collective motion of all feature points. If the bidirectional reprojection error between the actual displacement of a feature point and the predicted displacement of the similarity transformation model exceeds 4 pixels, the feature point is identified as an outlier and removed to avoid error accumulation.

[0074] The displacement synthesis and unit conversion submodule is used to take the median of the displacement vectors of the remaining effective feature points after removing outliers as the overall displacement estimate of the optimal ROI. The resulting pixel-level displacement sequence is then multiplied by a pre-calibrated scaling factor to convert it into a physical displacement value.

[0075] This example uses the median instead of the mean to further suppress interference from residual outliers. The scaling factor can be obtained in two ways: one is to temporarily place a checkerboard target of known size on the structure and calculate it by the ratio of the pixel spacing of the target corner points to the physical spacing; the other is to use permanent components of known size in the structure (such as the nominal diameter of bolts and the flange width of steel sections) for on-site calibration. Users can choose flexibly according to actual conditions.

[0076] Preferably, the displacement tracking module further includes an automatic recovery submodule for tracking loss, the processing of which is as follows: After each frame of tracking, the number of valid feature points, N_eff, is counted. If N_eff is less than 30% of the initial number of feature points (i.e., more than 70% are lost), a re-initialization process is triggered: the current frame is used as a new "image frame," Harris corner points are re-extracted within the previously selected optimal ROI bounding box, and KLT tracking is restarted. If three consecutive re-initializations fail, the system automatically reverts to the displacement value of the previous frame and issues a warning, prompting the user to check the video quality or whether the ROI is occluded.

[0077] like Figure 4 As shown, to transform the aforementioned five-stage pipeline architecture into a practical tool that non-professional users can operate independently, this invention provides an automatic displacement measurement device, including a user interaction layer and a system processing layer. The system processing layer is equipped with the aforementioned visual structural displacement automatic measurement system based on a large language model. The user interaction layer is presented as a graphical user interface (hereinafter referred to as the interface), which uses "input video—automatic processing—result output" as its basic interaction paradigm. The system is encapsulated in the background system processing layer, allowing users to complete the entire displacement measurement process without needing to understand the technical details.

[0078] In this example, the user interaction layer includes a loading module, a manual intervention module, and a display module. The loading module loads video and outputs it to the input module of the system processing layer. The manual intervention module includes an RIO bounding box adjustment submodule and a tracking parameter adjustment submodule. The output of the RIO bounding box adjustment submodule is connected to the input of the optimal ROI acquisition module, and the output of the tracking parameter submodule is connected to the input of the displacement tracking module. The input of the display module is connected to the output of the output module, and it is used to display the automatic displacement measurement results.

[0079] The present invention also provides an automatic displacement measurement method, implemented based on the aforementioned displacement measuring device, the automatic displacement measurement method comprising the following steps: Step S1: Obtain the monitoring video loaded by the user, and extract the image frames to be measured based on the monitoring video; Step S2: Input the image frame into two or more language models. Each language model performs visual-language reasoning and independently generates text descriptions of candidate ROIs, where ROI is the region of interest. Step S3: Obtain the text descriptions of candidate ROIs generated by each language large model; based on the confidence weighted majority voting mechanism, obtain the target descriptions with confidence exceeding the set threshold; then perform semantic standardization processing on the target descriptions to generate a standardized list of ROI text descriptions. Step S4, Target Detection: The standardized ROI text description list is fed into the open set target detector to locate the specific bounding boxes of each target in the image frame, forming a set of potential ROI bounding boxes; Step S5: Determine whether the RIO bounding box adjustment information output by the RIO bounding box adjustment submodule has been received. If yes, adjust the potential RIO bounding box and then execute step S6. If no, execute step S6 directly. Step S6: Based on the optimization method of affine transformation simulation and feature density quantization, select the ROI sub-image corresponding to the ROI bounding box with the highest feature density as the optimal ROI; Step S7: Determine whether the tracking parameter adjustment output from the tracking parameter submodule has been received. If yes, adjust the displacement tracking parameter and then execute step S8. If no, execute step S8 directly. Step S8, Displacement Tracking: Obtain the bounding box of the optimal ROI, and use the displacement tracking algorithm to obtain the displacement value of the target within the bounding box of the optimal ROI relative to the previous frame image. Step S9: Output displacement information to the user interaction layer.

[0080] When a user manually adjusts the ROI bounding box on the image user interface, the system does not re-execute the entire five-level process. Instead, it recalculates from the optimal ROI acquisition module (level four)—that is, it only calculates the feature density for the new ROI and reorders it with the original candidate ROIs, then directly enters displacement tracking. If the user only adjusts the tracking parameters (such as the number of pyramid layers or the error threshold), only the displacement tracking module is activated, without calling any LLM or detector. This design reduces the response time after manual intervention to the second level, significantly improving interaction efficiency.

[0081] As a preferred embodiment of the present invention, the user interaction layer interface in this example provides the following functional modules: (1) Video input panel - Users load the structure monitoring video to be analyzed through the file dialog box, and the system automatically reads and displays the basic information of the video (number of frames, resolution, duration). (2) Status monitoring panel - displays the current processing stage ("semantic understanding in progress", "target detection in progress", "displacement tracking in progress", etc.) and progress information in real time; (3) Intermediate results display area - The original output descriptions of the three models, the list of potential ROIs after consensus screening, the overlay visualization of the bounding boxes of each ROI on the first frame image, and the feature density ranking of each ROI are displayed in separate areas. (4) Results output area - plots and displays the final displacement-time curve. Users can zoom in to view details and export displacement data to a common format with one click.

[0082] The system processing layer executes the complete five-stage pipeline sequentially in the background, generating displacement time history curves. The processing results of each stage are pushed to the corresponding display area in the user interaction layer in real time.

[0083] It should be noted that the language model processing (semantic understanding and consensus standardization) of this invention is only executed once in the first frame. After that, the system enters a pure visual tracking stage, and the status monitoring panel on the interface will display "Tracking in progress" and update the displacement curve in real time. Users can also manually adjust the selection of the optimal ROI during the tracking process, and the system will re-execute the tracking based on the new ROI. This interactive design balances automation efficiency with the flexibility of manual intervention.

[0084] This interface design makes the invention not only innovative in terms of technical solution, but also has practical engineering value - users only need to complete the "load video" operation, and the rest is completed automatically by the system, truly realizing the "one-click" operation of structural displacement measurement.

[0085] As can be seen from the above, the present invention has the following innovative points: 1. Pioneering a Large-Model-Driven Automatic ROI Recognition Paradigm: This invention is the first to apply the visual-language understanding capabilities of a large language model to the automatic selection of ROIs in structural displacement measurement. Unlike traditional methods based on low-level features and detector schemes relying on annotation training, the model in this invention possesses expert-level semantic parsing capabilities for structural scenes, enabling a paradigm shift from "pixel-level feature detection" to "semantic-level scene understanding."

[0086] 2. Joint Mechanism of Multi-Model Consensus and Semantic Standardization: This invention employs three domestically developed large-scale models for parallel inference, using a confidence-weighted majority voting criterion to select reliable ROIs, effectively suppressing the bias of a single model from the perspective of architectural diversity. Simultaneously, a fourth model is introduced to perform semantic grouping and standardized naming of equivalent descriptions, resolving the issue of inconsistent output representations across multiple models.

[0087] 3. Feature Density Quantization Evaluation Algorithm Based on Affine Transformation Simulation: This invention proposes to simulate image deformation under large structural displacement by applying an adaptive affine transformation (a combination of rotation and blurring, with parameters dynamically adjusted according to the ROI size) to the ROI, and using "triple consistency" matching as the criterion for determining stable feature points. This algorithm effectively filters out features that are truly valuable for displacement tracking, avoiding the shortcomings of traditional methods that include temporary or noisy features in the evaluation system.

[0088] 4. Zero-shot generalization open-set detection architecture: This invention uses an open-set target detector instead of a closed-set scheme, eliminating the need to collect training data for specific structure types and component categories. It can directly detect any specified target based on text descriptions. This architecture endows the system with instant generalization capabilities across structure types, significantly expanding its applicability.

[0089] 5. The preferred approach is a four-layer collaborative technology system: semantic understanding, target detection, optimal ROI acquisition, and displacement tracking. This invention constructs a complete technology chain from semantic reasoning to physical quantity measurement—the large language model answers "which target to choose," the open set detector answers "where is the target," the feature density answers "which target is optimal," and displacement tracking answers "what is the displacement." These four modules are closely connected and progressively advance, forming a functionally complete and logically self-consistent technical closed loop.

[0090] 6. Adaptive Anti-interference and Tracking Recovery Capabilities: This invention significantly improves the system's robustness under complex field conditions such as sudden changes in illumination, partial occlusion, and minor camera vibrations through adaptive affine transformation parameters and an automatic tracking loss recovery mechanism. Even with 50% area occlusion, the system can still re-lock onto the tracking target within 3 frames through the recovery mechanism, achieving a displacement data effectiveness rate of over 95%, providing reliable assurance for real-world monitoring scenarios.

[0091] The specific embodiments described above are preferred embodiments of the present invention and are not intended to limit the specific scope of the present invention. The scope of the present invention includes, but is not limited to, these specific embodiments. All equivalent changes made in accordance with the present invention are within the protection scope of the present invention.

Claims

1. An automatic visual structural displacement measurement system based on a large language model, characterized in that, include: Input module: used to input monitoring video and extract the image frames to be measured based on the monitoring video; Semantic understanding module: The image frame is input into two or more large language models. Each large language model performs visual-language reasoning and independently generates text descriptions of candidate ROIs, where ROI is the region of interest. Consensus screening and semantic standardization module: Obtain text descriptions of candidate ROIs generated by various language models, obtain target descriptions with confidence scores exceeding a set threshold based on a confidence-weighted majority voting mechanism, and then perform semantic standardization processing on the target descriptions to generate a standardized list of ROI text descriptions; Target detection module: It feeds a standardized list of ROI text descriptions into the open set target detector, locates the specific bounding boxes of each target in the image frame, and forms a set of potential ROI bounding boxes; The optimal ROI acquisition module uses an optimization method based on affine transformation simulation and feature density quantization to select the ROI sub-image corresponding to the ROI bounding box with the highest feature density as the optimal ROI. Displacement tracking module: Obtains the bounding box of the optimal ROI and uses a displacement tracking algorithm to obtain the displacement value of the target within the bounding box of the optimal ROI relative to the previous frame image; Output module: Used to output displacement information.

2. The automatic visual structural displacement measurement system based on a large language model according to claim 1, characterized in that: The semantic understanding module includes three different large model sub-modules: Tongyi Qianwen, Wenxin Yiyan, and Zhipu GLM. These three large model sub-modules run in parallel based on prompt words and output text descriptions of three sets of candidate ROIs respectively.

3. The automatic visual structural displacement measurement system based on a large language model according to claim 2, characterized in that: The prompts for the large model sub-modules adopt a hierarchical and progressive structured prompt format, including: Professional Role Anchoring Layer: Used to activate the civil engineering and computer vision-related professional knowledge learned by the large model sub-modules during the pre-training stage, which can output more professional and accurate text descriptions; Cognitive task decomposition layer: breaks down the task into two sequentially executed subtasks: a global classification and a local description; Priority rule embedding layer: used to embed priority recognition and exclusion rules into prompt words, so that the large model sub-modules focus on key structural components; Output format constraint layer: Used to ensure that each large model submodule outputs results in a predefined structured format.

4. The automatic visual structural displacement measurement system based on a large language model according to claim 1, characterized in that: In the consensus screening and semantic standardization module, the method for obtaining target descriptions with confidence scores exceeding a certain threshold based on a confidence-weighted majority voting mechanism is as follows: For each large model submodule, extract its confidence score from the text description output. Then, for each candidate target, calculate the sum of its confidence scores across the three large model submodules. If the sum of the confidence scores exceeds a set threshold, it is retained. The semantic standardization processing method is as follows: Equivalent grouping: grouping different expressions referring to the same structural component into the same semantic group; Standardized naming: Generate a standardized name for each semantic group.

5. The automatic visual structural displacement measurement system based on a large language model according to claim 1, characterized in that: The target detection module adopts the Grounding DINO open set detection model based on the Transformer framework, and its processing method is as follows: A1. Receive the standardized ROI text description list output by the consensus filtering and semantic standardization module; A2. Initial detection is performed using the first confidence threshold to obtain a set of candidate bounding boxes; A3. Determine whether a bounding box contains more than 3 other bounding boxes. If so, mark it as a giant bounding box and exclude it; otherwise, keep it. A4. Sort the remaining bounding boxes in descending order of confidence scores; A5. For each ROI text description, select the bounding box with the highest confidence score as the specific bounding box of each target, forming a set of potential ROI bounding boxes.

6. The automatic visual structural displacement measurement system based on a large language model according to claim 1, characterized in that: The processing method of the optimal ROI acquisition module is as follows: B1. ROI cropping and adaptive transformation simulation: Cropping the corresponding ROI sub-image from the image frame according to the ROI bounding box, and then performing various image transformations on the ROI sub-image to obtain ROI images with various transformations, simulating real displacement morphological changes. B2. Feature Extraction and Matching: Extract all candidate feature points from the original image frame, and then match each feature point with the three transformed ROI images. B3. Stable Feature Point Filtering: Determine whether each feature point can be successfully matched with all ROI images. If so, it is determined to be a stable feature point; otherwise, the feature point is discarded. B4. Feature density calculation: After obtaining the set of stable feature points for each ROI sub-image, count the total number of stable feature points for each ROI sub-image, and then calculate the feature density for each ROI sub-image. The feature density is the ratio of the number of stable feature points to the pixel area of ​​the ROI sub-image. B5. Optimal ROI Output: Sort by feature density and select the ROI sub-image with the highest feature density as the optimal ROI.

7. The automatic visual structural displacement measurement system based on a large language model according to claim 6, characterized in that: In step B1, three different image transformations are applied to the ROI sub-image: clockwise rotation by α degrees and application of Gaussian blur, counterclockwise rotation by β degrees and application of Gaussian blur, and clockwise rotation by γ degrees and application of Gaussian blur. Here, α, β, and γ are adaptive rotation angles, dynamically calculated based on the width w and height h of the ROI sub-image, using the following formula: α = 3° × max(1, 100 / min(w, h)) β = 4°×max(1,100 / min(w,h)) γ = 5°×max(1,100 / min(w,h)) The size of the Gaussian blur kernel is proportional to the size of the ROI subplot.

8. The automatic visual structural displacement measurement system based on a large language model according to claim 6, characterized in that: The displacement tracking module is implemented using the KLT sparse optical flow algorithm. Before displacement tracking, feature point initialization is performed: initial feature points with strong spatial gradients are extracted within the optimal ROI of the first image frame using a Harris corner detector, and several feature points with the highest response values ​​are retained for subsequent tracking. The displacement tracking module includes: Frame-by-frame tracking submodule: For effective feature points within the optimal ROI bounding box in the current image frame, the KLT sparse optical flow algorithm is used to search for the best matching position; Outlier feature point removal submodule: Determines and removes outliers based on the bidirectional reprojection error value between the actual displacement and the predicted displacement of the feature point. The displacement synthesis and unit conversion submodule is used to take the median of the displacement vectors of the remaining effective feature points after removing outliers as the overall displacement estimate of the optimal ROI. The resulting pixel-level displacement sequence is then multiplied by a pre-calibrated scaling factor to convert it into a physical displacement value.

9. An automatic displacement measuring device, comprising a user interaction layer and a system processing layer, characterized in that: The system processing layer includes the automatic visual structural displacement measurement system based on a large language model as described in any one of claims 1-8. The user interaction layer includes a loading module, a manual intervention module, and a display module. The loading module loads video and outputs it to the input module of the system processing layer. The manual intervention module includes an RIO bounding box adjustment submodule and a tracking parameter adjustment submodule. The output of the RIO bounding box adjustment submodule is connected to the input of the optimal ROI acquisition module, and the output of the tracking parameter submodule is connected to the input of the displacement tracking module. The input of the display module is connected to the output of the output module, and is used to display the automatic displacement measurement results.

10. An automatic displacement measurement method, implemented based on the displacement measuring device of claim 9, characterized in that, The automatic displacement measurement method includes the following steps: Step S1: Obtain the monitoring video loaded by the user, and extract the image frames to be measured based on the monitoring video; Step S2: Input the image frame into two or more language models. Each language model performs visual-language reasoning and independently generates text descriptions of candidate ROIs, where ROI is the region of interest. Step S3: Obtain the text descriptions of candidate ROIs generated by each language large model; based on the confidence weighted majority voting mechanism, obtain the target descriptions with confidence exceeding the set threshold; then perform semantic standardization processing on the target descriptions to generate a standardized list of ROI text descriptions. Step S4, Target Detection: The standardized ROI text description list is fed into the open set target detector to locate the specific bounding boxes of each target in the image frame, forming a set of potential ROI bounding boxes; Step S5: Determine whether the RIO bounding box adjustment information output by the RIO bounding box adjustment submodule has been received. If yes, adjust the potential RIO bounding box and then execute step S6. If no, execute step S6 directly. Step S6: Based on the optimization method of affine transformation simulation and feature density quantization, select the ROI sub-image corresponding to the ROI bounding box with the highest feature density as the optimal ROI; Step S7: Determine whether the tracking parameter adjustment output from the tracking parameter submodule has been received. If yes, adjust the displacement tracking parameter and then execute step S8. If no, execute step S8 directly. Step S8, Displacement Tracking: Obtain the bounding box of the optimal ROI, and use the displacement tracking algorithm to obtain the displacement value of the target within the bounding box of the optimal ROI relative to the previous frame image. Step S9: Output displacement information to the user interaction layer.