Detection system for hole in ancient city wall

By designing a detection system for holes in the ancient city wall, using multimodal data acquisition and graph structure abnormal detection, high-precision detection and prediction of holes in the ancient city wall are achieved, and the problem of insufficient detection accuracy and dynamic monitoring capabilities in the existing technology is solved.

CN119622269APending Publication Date: 2025-03-14CENT SOUTH UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411826552.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing technology is difficult to accurately identify and locate the irregular cavity inside the ancient city wall, and it is difficult to meet the needs of refined detection and macroscopic structure analysis at the same time. It is unable to effectively predict the expansion trend of the cavity and lacks dynamic monitoring capabilities.

Method used

A detection system for holes in ancient city walls is designed, including multimodal data acquisition and processing module, abnormality detection module, abnormality identification module and trend prediction module. By collecting strain, temperature, humidity and sound wave data, pre-processing and abnormal detection, the graph structure and diffusion algorithm are used to predict and early warning of the degree of void development.

Benefits of technology

It realizes high-precision detection and prediction of complex hollow forms inside the ancient city wall, improves detection accuracy and reliability, provides dynamic monitoring and early warning capabilities, and supports long-term maintenance and repair of the ancient city wall.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622269A_ABST
    Figure CN119622269A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of ancient city wall health detection, and discloses a detection system for ancient city wall holes, which comprises the following steps: acquiring wall data and corresponding position data in the same time sequence, and preprocessing the wall data to obtain synchronous wall data; performing local anomaly detection on the synchronous wall data by adopting an anomaly detection algorithm to obtain conventional data points and abnormal data points; performing anomaly identification on the abnormal data points based on the constructed anomaly detection model to obtain an abnormal mode; performing gridding on the conventional data points and the abnormal data points on the basis of the position data to obtain a two-dimensional grid chart, initializing the hole development degree of each grid point in the two-dimensional grid chart on the basis of an abnormal mode, performing abnormal diffusion on the two-dimensional grid chart by adopting a diffusion algorithm to obtain a future hole development degree chart, and performing abnormal diffusion on the future hole development degree chart. Based on the future cavity development degree diagram, cavity early warning is achieved; and the prediction accuracy of the system on the hole from the initial formation to the dynamic expansion process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of ancient city wall health detection, and more specifically, to a detection system for ancient city wall cavities. Background Art

[0002] As an important historical and cultural heritage, the ancient city wall carries a variety of historical information. However, it is easy to form internal structural problems such as cavities and cracks due to its long-term exposure to the natural environment and the influence of human activities. These cavities will weaken the overall strength of the city wall and increase the risk of structural damage. Therefore, accurate identification and positioning of the internal cavities of the ancient city wall is an important technical requirement for the protection and restoration of cultural relics. However, the morphology of the cavities in the ancient city wall is often irregular, which may be longitudinal cracks, local collapses or interlayer gaps. This complex morphology makes it difficult for traditional rule models to effectively describe and detect them; cavities may appear in different depth ranges and size ranges, ranging from a few centimeters to several meters. Existing detection methods have limitations in distinguishing cavities of different scales, and it is difficult to meet the needs of refined detection and macroscopic structural analysis at the same time; cavities in the ancient city wall may further expand under the influence of external factors. Existing technologies cannot effectively predict the expansion trend of cavities and it is difficult to timely warn of potential risks. Moreover, most traditional detection technologies are based on static images or single scan data, and it is difficult to provide dynamic monitoring information that changes over time, which is not friendly for the long-term maintenance of the ancient city wall.

[0003] In view of this, the present invention proposes a detection system for ancient city wall cavities to solve the above problems. Summary of the invention

[0004] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solutions: A detection system for ancient city wall cavities, comprising: A detection system for ancient city wall cavities, characterized in that it comprises: a multimodal data acquisition and processing module: collecting wall data and corresponding position data of the same time series, pre-processing the wall data, and obtaining synchronous wall data;

[0005] Anomaly detection module: Use anomaly detection algorithm to perform local anomaly detection on synchronized wall data to obtain regular data points and abnormal data points;

[0006] Anomaly recognition module: Based on the constructed anomaly detection model, abnormal data points are identified to obtain abnormal patterns;

[0007] Trend prediction module: includes grid units and prediction units. The grid units grid the regular data points and abnormal data points based on the location data to obtain a two-dimensional grid map. The cavity development degree of each grid point in the two-dimensional grid map is initialized based on the abnormal pattern. The prediction unit uses a diffusion algorithm to perform abnormal diffusion on the two-dimensional grid map to obtain a future cavity development degree map. Cavity warning is achieved based on the future cavity development degree map.

[0008] Furthermore, the wall data includes strain data, temperature data, humidity data and sound wave data; the position data includes a horizontal coordinate and a vertical coordinate.

[0009] Furthermore, the method of preprocessing the wall data includes:

[0010] The wall data is standardized by a zero-fraction standardization algorithm to obtain standard wall data, the size of the trend sliding window is preset, and the standard wall data is trend-smoothed based on the trend sliding window to obtain smooth wall data; based on the smoothed wall data, the time series is used as the horizontal axis, and the value of each category of data in the smoothed wall data is used as the vertical axis to construct a smoothed wall curve graph, which includes four types of curves, namely, strain data curve, temperature data curve, humidity data curve and sound wave data curve; based on the smoothed wall curve graph, the first-order derivative formula is used to perform the first-order derivative of each type of curve in the smoothed wall curve graph to obtain the first-order value of each type of curve, and the point with a first-order value of zero is selected as the extreme point, and the second-order derivative formula is used to perform the second-order derivative of the extreme point to obtain each type of curve. The second-order value of the curve, the extreme point with a second-order value greater than or equal to zero is taken as the minimum point, the extreme point with a second-order value less than zero is taken as the maximum point, the maximum point is taken as the upper control point, and the minimum point is taken as the lower control point. The upper control points are smoothly connected by the natural spline interpolation method to obtain the upper curve, and the lower control points are smoothly connected by the natural spline interpolation method to obtain the lower curve. The time series median of each time series is calculated based on the upper and lower curves, and the new time series value is obtained by subtracting the time series median from the value in the initial curve, and the new time series value is used as the coordinate vertical axis to form a new smooth wall curve diagram; repeat until the number of extreme points of each type of curve in the new smooth wall curve diagram is consistent with the number of zero crossing points, and the data of each time series in the smooth wall curve diagram at this time is output as the synchronous wall data.

[0011] Furthermore, the formula for trend smoothing is: Among them, Va′ i represents the smoothed wall data of the i-th wall data, N represents the size of the trend sliding window, Va i Represents the i-th wall data, Va j Represents the j-th wall data within the trend smoothing window.

[0012] Furthermore, the method of performing local anomaly detection on the synchronized wall data includes:

[0013] The numerical features of each type of data in each synchronized wall data are counted. The numerical features include: minimum value, maximum value, mean, variance, standard deviation and range, where the range is the difference between the minimum value and the maximum value. A wall feature matrix is ​​constructed based on the numerical features. Each row in the wall feature matrix represents each data category, and each column represents each feature category in the numerical features. Each wall feature matrix is ​​used as a graph feature node, and the feature similarity between graph feature nodes is used as the edge weight. A connection similarity threshold is preset, and feature similarity less than or equal to the connection similarity is considered as the edge weight. The graph feature nodes similar to the threshold are used as connecting nodes, and the connecting nodes are connected to obtain the wall feature undirected graph; an undirected adjacency matrix is ​​constructed based on the wall feature undirected graph. The number of rows and columns in the undirected adjacency matrix are the number of nodes in the wall feature undirected graph. Each row and column in the undirected adjacency matrix refers to a graph feature node. When the graph feature nodes referred to by an element in the undirected adjacency matrix contain directly connected edges, the value of the element in the undirected adjacency matrix is ​​the weight of the corresponding edge in the wall feature undirected graph. When the graph feature nodes referred to by an element in the undirected adjacency matrix contain directly connected edges, the value of the element in the undirected adjacency matrix is ​​the weight of the corresponding edge in the wall feature undirected graph. When there is no directly connected edge between the graph feature nodes, the value of this element in the undirected adjacency matrix is ​​zero; a node weight matrix is ​​constructed based on the wall feature undirected graph, the node weight matrix is ​​a left diagonal matrix, the number of rows and columns in the node weight matrix are both the number of nodes in the wall feature undirected graph, each row in the node weight matrix refers to a graph feature node, and the value of each element on the left diagonal in the node weight matrix is ​​the sum of the weights of all directly connected edges of the graph feature node corresponding to the row; matrix calculation is performed on the node weight matrix and the undirected adjacency matrix to obtain the wall Las matrix; an eigendecomposition function is constructed based on the wall Las matrix, and the eigendecomposition function is solved to obtain the embedded eigenvector and embedded eigenvalue of each graph feature node, an anomaly score threshold is preset, and an anomaly score is performed on each graph feature node based on the embedded eigenvector and the embedded eigenvalue to obtain the anomaly score of each graph feature node; the synchronized wall data corresponding to the graph feature node with an anomaly score greater than or equal to the anomaly score threshold is marked as an abnormal data point, and the synchronized wall data corresponding to the graph feature node with an anomaly score less than the anomaly score threshold is marked as a regular data point.

[0014] Furthermore, the calculation formula of the feature similarity is:

[0015] Among them, Sim(a,b) represents the feature similarity between the a-th graph feature node and the b-th graph feature node, Hei represents the number of rows in the wall feature matrix, Wid represents the number of columns in the wall feature matrix, and a c,d represents the value of the cth row and dth column in the ath wall feature matrix, b c,drepresents the value of the cth row and dth column in the bth wall feature matrix, and σ represents the similarity width parameter;

[0016] The formula for abnormal scoring is: Among them, Sco e Represents the abnormal score of the e-th graph feature node, NE e represents the neighborhood node set of the e-th graph feature node. The neighborhood node set is the set of other graph feature nodes that have direct edges connected to the graph feature node in the wall feature undirected graph. u e Represents the embedded feature vector of the e-th graph feature node, u f represents the embedded feature vector of the fth graph feature node in the neighborhood node set, β e represents the embedded feature value of the e-th graph feature node, and Cod represents the number of elements in the neighborhood node set.

[0017] Furthermore, the construction method of the anomaly detection model includes:

[0018] Historical wall data and corresponding historical anomaly labels are collected. Based on the historical wall data and the corresponding historical anomaly labels, the historical wall data is used as the input of the anomaly detection model, the predicted wall anomaly category is used as the output of the anomaly detection model, and the actual historical anomaly labels are used as the prediction targets of the anomaly detection model for model training. An anomaly detection model is constructed. The anomaly detection model is a linear regression model, and the recall rate function is used as the target loss function of the anomaly detection model. Minimizing the value of the target loss function is used as the training goal, and an anomaly detection model with the smallest value of the target loss function is obtained.

[0019] Furthermore, the method of gridding the regular data points and the abnormal data points includes:

[0020] Select the data point with the smallest horizontal and vertical coordinates in the position data as the grid origin, initialize the scale of the grid origin to: (x, y), where x represents the horizontal axis value of the grid origin, y represents the vertical axis value of the grid origin, preset the grid span, take the grid origin as the starting point based on the value of the grid span, add one to the horizontal axis value of the grid origin for each increase in the horizontal coordinate of the grid span value, and add one to the vertical axis value of the grid origin for each increase in the vertical coordinate of the grid span value, to obtain the grid scale of the grid point corresponding to each data point, and all grid points form a two-dimensional grid map.

[0021] Furthermore, the method of performing abnormal diffusion on the two-dimensional grid graph includes:

[0022] Initialize the void development degree of the abnormal data point in the two-dimensional grid map based on the abnormal pattern, initialize the void development degree of other grid points to zero, use the eight-neighborhood discretization method to perform diffusion calculation on each grid point in the two-dimensional grid map, and obtain the diffusion intensity of each grid point; when the diffusion intensity of the grid point Core is greater than zero, it means that the Core is a diffused point, and the Core is diffused based on the diffusion intensity of the Core. The formula for diffusion enhancement is: in, Represents the degree of cavity development of the grid point Core at time v+1, represents the degree of cavity development of the grid point Core at time v+1, Des represents the diffusion coefficient, which is used to simulate the rate of cavity diffusion, ρ represents the natural diffusion factor, which is used to simulate the influence of the natural environment on cavity formation, and Δt represents the time step; when the diffusion intensity of the grid point Core is less than zero, it means that the Core is a diffusion source, and the Core is naturally enhanced. The formula for natural enhancement is:

[0023] Furthermore, the formula for performing diffusion calculation is:

[0024] in, Represents the diffusion intensity of the grid point at time v where the horizontal axis value is x and the vertical axis value is y in the two-dimensional grid diagram; It represents the degree of cavity development of the grid point at time v where the horizontal axis value is m and the vertical axis value is n in the two-dimensional grid diagram. Represents the degree of cavity development at the grid point with the horizontal axis value of x and the vertical axis value of y in the two-dimensional grid diagram at time v.

[0025] The technical effects and advantages of the detection system for ancient city wall cavities of the present invention are as follows:

[0026] The present invention utilizes the complementarity of multimodal data to more accurately reflect the physical and environmental conditions inside the wall, easily capture the signal characteristics of different types of wall anomalies, and greatly improve the detection accuracy; by preprocessing the wall data, the long-term change trend and high-frequency noise are eliminated, the short-term abnormal change characteristics are retained, the influence of environmental noise and measurement errors is effectively suppressed, and the reliability of anomaly detection is guaranteed; the graph-based anomaly detection algorithm can accurately identify local abnormal points, especially complex internal wall cavity or crack signals, avoiding the problem that the global model in traditional methods easily ignores local details; through the two-dimensional gridded cavity development degree initialization and the eight-neighborhood diffusion algorithm, the system simulates the dynamic process of cavity diffusion over time, and makes a high-precision prediction of the potential abnormal diffusion range, providing a scientific basis for subsequent early warning. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1A schematic diagram of a detection system for ancient city wall cavities according to the present invention;

[0028] Figure 2 It is a schematic diagram of a detection method for ancient city wall cavities according to the present invention. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] Example 1

[0031] See also Figure 1 As shown, the detection system for ancient city wall cavities described in this embodiment includes: a multimodal data acquisition and processing module: collecting wall data and corresponding position data of the same time series, pre-processing the wall data, and obtaining synchronous wall data;

[0032] Anomaly detection module: Use anomaly detection algorithm to perform local anomaly detection on synchronized wall data to obtain regular data points and abnormal data points;

[0033] Anomaly recognition module: Based on the constructed anomaly detection model, abnormal data points are identified to obtain abnormal patterns;

[0034] Trend prediction module: Grid the regular data points and abnormal data points based on the location data to obtain a two-dimensional grid map, initialize the cavity development degree of each grid point in the two-dimensional grid map based on the abnormal pattern, use the diffusion algorithm to perform abnormal diffusion on the two-dimensional grid map, obtain the future cavity development degree map, and realize cavity early warning based on the future cavity development degree map;

[0035] Each module is connected by wired and / or wireless means to achieve data transmission between modules;

[0036] Wall data includes strain data, temperature data, humidity data and sound wave data; position data includes horizontal and vertical coordinates; strain data is obtained by placing strain sensors at different parts of the ancient city wall, and the strain sensors monitor the tiny deformation of the wall in real time; temperature data is obtained by installing temperature sensors on the surface or inside the wall, and the temperature sensors can capture the changes in wall temperature in real time without contact; humidity data is obtained by humidity sensors, which are used to detect humidity changes in the wall; sound wave data is obtained by sound wave sensors, which are used to measure the sound wave propagation speed and its changes in the wall;

[0037] It should be noted that the horizontal and vertical coordinates are determined based on the preset coordinate origin. The horizontal coordinate is the horizontal distance of the wall from the coordinate origin, and the vertical coordinate is the vertical distance from the coordinate origin. The coordinate origin can be any point on the surface of the ancient city wall. Taking the circular curved ancient city wall as an example, the horizontal distance of the wall is the length of the arc formed by the point represented by the wall data and the coordinate origin.

[0038] The methods for preprocessing wall data include:

[0039] The wall data is standardized by the zero-score standardization algorithm to obtain standard wall data. The size of the trend sliding window is preset, and the trend of the standard wall data is smoothed based on the trend sliding window. The formula for trend smoothing is: Among them, Va′ i represents the smoothed wall data of the i-th wall data, N represents the size of the trend sliding window, Va i Represents the i-th wall data, Va j represents the jth wall data in the trend smoothing window; trend smoothing of standard wall data can remove the long-term trend in the signal, retain the short-term fluctuation or rapid change characteristics in the signal, highlight the fluctuation of local abnormalities, and effectively suppress the influence of high-frequency noise, which is particularly important for anomaly detection, because problems such as cavities or cracks usually appear as local, rapidly changing signals rather than overall long-term trends;

[0040] Based on the smooth wall data, the time series is used as the horizontal axis of the coordinate, and the value of each category of data in the smooth wall data is used as the vertical axis of the coordinate to construct a smooth wall curve diagram. The smooth wall curve diagram contains four types of curves, namely, strain data curve, temperature data curve, humidity data curve and sound wave data curve; based on the smooth wall curve diagram, the first-order derivative formula is used to perform the first-order derivative of each type of curve in the smooth wall curve diagram to obtain the first-order value of each type of curve, and the point with the first-order value of zero is selected as the extreme point. The second-order derivative formula is used to perform the second-order derivative of the extreme point to obtain the second-order value of each type of curve, and the extreme point with the second-order value greater than or equal to zero is used as the minimum point, and the extreme point with the second-order value less than zero is used as the maximum point. The maximum point is used as the upper control point, and the minimum point is used as the lower control point. The natural spline interpolation method is used to smoothly connect the upper control points to obtain the upper curve, and the natural spline interpolation method is used to smoothly connect the lower control points to obtain the lower curve. Based on the upper curve and The lower bound curve calculates the median of each time series, subtracts the median of the time series from the value in the initial curve to obtain a new time series value, and uses the new time series value as the coordinate vertical axis to form a new smooth wall curve diagram; repeat until the number of extreme points of each type of curve in the new smooth wall curve diagram is consistent with the number of zero crossing points, and the data of each time series in the smooth wall curve diagram at this time is output as the synchronous wall data; the initial curve refers to one of the strain data curve, the temperature data curve, the humidity data curve or the sound wave data curve, for example: when the upper bound curve and the lower bound curve are the upper bound curve and the lower bound curve of the strain data curve, the initial curve refers to the strain data curve; the natural spline interpolation method is a widely used interpolation method, which generates a smooth curve by approximating the relationship between data points with a piecewise cubic polynomial function. The natural spline interpolation method constructs a cubic polynomial function in each data point and its adjacent interval, so that the entire interpolation curve has high smoothness and meets specific boundary conditions.

[0041] Methods for local anomaly detection on synchronized wall data include:

[0042] The numerical features of each type of data in each synchronized wall data are counted. The numerical features include: minimum value, maximum value, mean, variance, standard deviation and range, where the range is the difference between the minimum value and the maximum value. A wall feature matrix is ​​constructed based on the numerical features. Each row in the wall feature matrix represents each data category, and each column represents each feature category in the numerical features. Each wall feature matrix is ​​used as a graph feature node, and the feature similarity between graph feature nodes is used as the edge weight. The feature similarity calculation formula is: Among them, Sim(a,b) represents the feature similarity between the a-th graph feature node and the b-th graph feature node, Hei represents the number of rows in the wall feature matrix, Wid represents the number of columns in the wall feature matrix, and a c,drepresents the value of the cth row and dth column in the ath wall feature matrix, b c,d Represents the value of the cth row and dth column in the bth wall feature matrix, σ represents the similarity width parameter, which is used to balance the decay rate of feature similarity and highlight the changes in feature similarity between graph feature nodes in different regions; preset a connection similarity threshold, and use the graph feature nodes whose feature similarity is less than or equal to the connection similarity threshold as connection nodes, connect the connection nodes to obtain an undirected graph of wall features; construct an undirected adjacency matrix based on the undirected graph of wall features, the number of rows and columns in the undirected adjacency matrix are the number of nodes in the undirected graph of wall features, each row and column in the undirected adjacency matrix refers to a graph feature node, when the graph feature nodes referred to by an element in the undirected adjacency matrix contain directly connected edges, the value of the element in the undirected adjacency matrix is ​​the weight of the corresponding edge in the undirected graph of wall features, when the undirected adjacency matrix When there is no directly connected edge between the graph feature nodes referred to by a certain element in the undirected adjacency matrix, the value of the element in the undirected adjacency matrix is ​​zero; a node weight matrix is ​​constructed based on the wall feature undirected graph, and the node weight matrix is ​​a left diagonal matrix. The number of rows and columns in the node weight matrix are the number of nodes in the wall feature undirected graph. Each row in the node weight matrix refers to a graph feature node, and the value of each element on the left diagonal in the node weight matrix is ​​the sum of the weights of all directly connected edges of the graph feature node corresponding to the row; matrix calculation is performed on the node weight matrix and the undirected adjacency matrix, and the formula for matrix calculation is: L = DA; where L represents the wall Lass matrix, D represents the node weight matrix, and A represents the undirected adjacency matrix; a characteristic decomposition function is constructed based on the wall Lass matrix, and the formula for the characteristic decomposition function is: L×u k =β k ×u k ; Among them, u k represents the embedded feature vector of the kth graph feature node, β k Represents the embedded eigenvalue of the kth graph feature node, solves the eigendecomposition function to obtain the embedded eigenvector and embedded eigenvalue of each graph feature node, presets the anomaly score threshold, and performs an anomaly score on each graph feature node based on the embedded eigenvector and embedded eigenvalue. The formula for anomaly scoring is: Among them, Sco e Represents the abnormal score of the e-th graph feature node, NE e represents the neighborhood node set of the e-th graph feature node. The neighborhood node set is the set of other graph feature nodes that have direct edges connected to the graph feature node in the wall feature undirected graph. u e Represents the embedded feature vector of the e-th graph feature node, u f represents the embedded feature vector of the fth graph feature node in the neighborhood node set, β erepresents the embedded feature value of the e-th graph feature node, and Cod represents the number of elements in the neighborhood node set; the synchronized wall data corresponding to the graph feature nodes whose anomaly scores are greater than or equal to the anomaly score threshold are marked as abnormal data points, and the synchronized wall data corresponding to the graph feature nodes whose anomaly scores are less than the anomaly score threshold are marked as regular data points;

[0043] Assume that the node set in the wall feature undirected graph is: V = [1, 2, 3, 4], the edge set is: E = {(1, 2), (2, 3), (2, 4), (3, 4)}, and the weight set is: W = {1, 2, 1, 3}, then the undirected adjacency matrix is: The node weight matrix is:

[0044] The anomaly detection model is built in the following ways:

[0045] Collect historical wall data and corresponding historical anomaly labels. Based on the historical wall data and the corresponding historical anomaly labels, use the historical wall data as the input of the anomaly detection model, use the predicted wall anomaly category as the output of the anomaly detection model, and use the actual historical anomaly labels as the prediction target of the anomaly detection model to train the model and build an anomaly detection model. The anomaly detection model is a linear regression model, and the recall rate function is used as the target loss function of the anomaly detection model. Minimizing the value of the target loss function is used as the training goal to obtain an anomaly detection model with the smallest value of the target loss function. Based on the anomaly detection model, perform anomaly identification on abnormal data points to obtain abnormal patterns. Common abnormal patterns of wall voids include single voids, edge collapse, and multiple voids.

[0046] Ways to grid regular and abnormal data points include:

[0047] Select the data point with the smallest horizontal and vertical coordinates in the position data as the grid origin, initialize the scale of the grid origin to: (x, y), where x represents the horizontal axis value of the grid origin, y represents the vertical axis value of the grid origin, preset the grid span, take the grid origin as the starting point based on the value of the grid span, add one to the horizontal axis value of the grid origin for each increase in the horizontal coordinate of the grid span value, and add one to the vertical axis value of the grid origin for each increase in the vertical coordinate of the grid span value, to obtain the grid scale of the grid point corresponding to each data point, and all grid points constitute a two-dimensional grid map; in this embodiment, the preferred value of x is 0, the preferred value of y is 0, and the preferred value of the grid span is 0.1.

[0048] Ways to perform anomaly diffusion on a two-dimensional grid map include:

[0049] Initialize the void development degree of the abnormal data point in the two-dimensional grid map based on the abnormal pattern, initialize the void development degree of other grid points to zero, and use the eight-neighborhood discretization method to perform diffusion calculation on each grid point in the two-dimensional grid map. The formula for diffusion calculation is:

[0050] in, Represents the diffusion intensity of the grid point at time v where the horizontal axis value is x and the vertical axis value is y in the two-dimensional grid diagram; It represents the degree of cavity development of the grid point at time v where the horizontal axis value is m and the vertical axis value is n in the two-dimensional grid diagram. It represents the degree of cavity development of the grid point at time v where the horizontal axis value is x and the vertical axis value is y in the two-dimensional grid diagram; when the diffusion intensity of the grid point Core is greater than zero, it means that the Core is a diffused point, and the diffusion of the Core is enhanced based on the diffusion intensity of the Core. The formula for diffusion enhancement is: in, Represents the degree of cavity development of the grid point Core at time v+1, represents the degree of cavity development of the grid point Core at time v+1, Des represents the diffusion coefficient, which is used to simulate the rate of cavity diffusion, ρ represents the natural diffusion factor, which is used to simulate the influence of the natural environment on cavity formation, and Δt represents the time step, that is, the step length of time advancement in each calculation; when the diffusion intensity of the grid point Core is less than zero, it means that the Core is a diffusion source, and the Core is naturally enhanced. The formula for natural enhancement is: The two-dimensional grid map is numerically marked based on the degree of cavity development of the grid points at different moments in the future to obtain a future cavity development map. When the cavity development degree of the grid points in the future cavity development map is greater than or equal to the preset intensity threshold, an abnormal alarm is triggered. Assuming that the abnormal pattern of the abnormal data point is a single cavity, the cavity development degree of the grid point corresponding to the abnormal data point is initialized to 1; if the abnormal pattern of the abnormal data point is edge collapse, the cavity development degree of the grid point corresponding to the abnormal data point is initialized to 1.5; the cavity development degree is defined by experts based on the corrosiveness of the abnormal pattern to the edge.

[0051] This embodiment uses the complementarity of multimodal data to more accurately reflect the physical and environmental conditions inside the wall, easily capture the signal characteristics of different types of wall anomalies, and greatly improve the detection accuracy; by preprocessing the wall data, long-term change trends and high-frequency noise are eliminated, short-term abnormal change characteristics are retained, and the influence of environmental noise and measurement errors is effectively suppressed to ensure the reliability of anomaly detection; the graph-based anomaly detection algorithm can accurately identify local abnormal points, especially complex internal wall cavity or crack signals, avoiding the problem of global models in traditional methods that easily ignore local details; through two-dimensional grid-based cavity development degree initialization and eight-neighborhood diffusion algorithm, the system simulates the dynamic process of cavity diffusion over time, and makes high-precision predictions on the potential abnormal diffusion range, providing a scientific basis for subsequent early warnings.

[0052] Example 2

[0053] See also Figure 2 As shown, the part not described in detail in this embodiment is described in Example 1, and a method for detecting a cavity in an ancient city wall is provided, including:

[0054] S1. Collect wall data and corresponding position data of the same time series, pre-process the wall data, and obtain synchronous wall data;

[0055] S2. Use an anomaly detection algorithm to perform local anomaly detection on the synchronized wall data to obtain regular data points and abnormal data points;

[0056] S3, identify abnormal data points based on the constructed anomaly detection model to obtain abnormal patterns;

[0057] S4. Grid the regular data points and abnormal data points based on the location data to obtain a two-dimensional grid map. Initialize the cavity development degree of each grid point in the two-dimensional grid map based on the abnormal pattern. Use the diffusion algorithm to perform abnormal diffusion on the two-dimensional grid map to obtain a future cavity development degree map. Based on the future cavity development degree map, realize cavity early warning.

[0058] Example 3

[0059] This embodiment discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the operation mode of the above-mentioned method for detecting cavities in ancient city walls is implemented.

[0060] Since the electronic device introduced in this embodiment is an electronic device used to implement a detection method for ancient city wall holes in the embodiment of this application, based on the detection method for ancient city wall holes introduced in the embodiment of this application, the technical personnel of this field can understand the specific implementation of the electronic device of this embodiment and its various variations, so how the electronic device implements the method in the embodiment of this application is not described in detail here. As long as the technical personnel of this field implement the electronic device used in the detection method for ancient city wall holes in the embodiment of this application, it belongs to the scope of protection of this application.

[0061] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.

[0062] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A detection system for ancient city wall cavities, characterized in that: include: Multimodal data acquisition and processing module: collects wall data and corresponding position data of the same time series, pre-processes the wall data, and obtains synchronized wall data; Anomaly detection module: Use anomaly detection algorithm to perform local anomaly detection on synchronized wall data to obtain regular data points and abnormal data points; Anomaly recognition module: Based on the constructed anomaly detection model, abnormal data points are identified to obtain abnormal patterns; Trend prediction module: includes grid units and prediction units. The grid units grid the regular data points and abnormal data points based on the location data to obtain a two-dimensional grid map. The cavity development degree of each grid point in the two-dimensional grid map is initialized based on the abnormal pattern. The prediction unit uses a diffusion algorithm to perform abnormal diffusion on the two-dimensional grid map to obtain a future cavity development degree map. Cavity warning is achieved based on the future cavity development degree map.

2. The detection system for ancient city wall cavities according to claim 1, characterized in that: The wall data includes strain data, temperature data, humidity data and sound wave data; the position data includes abscissa and ordinate.

3. The detection system for ancient city wall cavities according to claim 2, characterized in that: The method of preprocessing the wall data includes: The wall data is standardized by a zero-fraction standardization algorithm to obtain standard wall data, the size of the trend sliding window is preset, and the standard wall data is trend-smoothed based on the trend sliding window to obtain smooth wall data; based on the smoothed wall data, the time series is used as the horizontal axis, and the value of each category of data in the smoothed wall data is used as the vertical axis to construct a smoothed wall curve graph, which includes four types of curves, namely, strain data curve, temperature data curve, humidity data curve and sound wave data curve; based on the smoothed wall curve graph, the first-order derivative formula is used to perform the first-order derivative of each type of curve in the smoothed wall curve graph to obtain the first-order value of each type of curve, and the point with a first-order value of zero is selected as the extreme point, and the second-order derivative formula is used to perform the second-order derivative of the extreme point to obtain each type of curve. The second-order value of the curve, the extreme point with a second-order value greater than or equal to zero is taken as the minimum point, the extreme point with a second-order value less than zero is taken as the maximum point, the maximum point is taken as the upper control point, and the minimum point is taken as the lower control point. The upper control points are smoothly connected by the natural spline interpolation method to obtain the upper curve, and the lower control points are smoothly connected by the natural spline interpolation method to obtain the lower curve. The time series median of each time series is calculated based on the upper and lower curves, and the new time series value is obtained by subtracting the time series median from the value in the initial curve, and the new time series value is used as the coordinate vertical axis to form a new smooth wall curve diagram; repeat until the number of extreme points of each type of curve in the new smooth wall curve diagram is consistent with the number of zero crossing points, and the data of each time series in the smooth wall curve diagram at this time is output as the synchronous wall data.

4. The detection system for ancient city wall cavities according to claim 3 is characterized in that: The formula for trend smoothing is: Among them, Va′ i represents the smoothed wall data of the i-th wall data, N represents the size of the trend sliding window, Va i Represents the i-th wall data, Va j Represents the j-th wall data within the trend smoothing window.

5. The detection system for ancient city wall cavities according to claim 4, characterized in that: The method of performing local anomaly detection on the synchronized wall data includes: The numerical features of each type of data in each synchronized wall data are counted. The numerical features include: minimum value, maximum value, mean, variance, standard deviation and range, where the range is the difference between the minimum value and the maximum value. A wall feature matrix is ​​constructed based on the numerical features. Each row in the wall feature matrix represents each data category, and each column represents each feature category in the numerical features. Each wall feature matrix is ​​used as a graph feature node, and the feature similarity between graph feature nodes is used as the edge weight. A connection similarity threshold is preset, and feature similarity less than or equal to the connection similarity is considered as the edge weight. The graph feature nodes similar to the threshold are used as connecting nodes, and the connecting nodes are connected to obtain the wall feature undirected graph; an undirected adjacency matrix is ​​constructed based on the wall feature undirected graph. The number of rows and columns in the undirected adjacency matrix are the number of nodes in the wall feature undirected graph. Each row and column in the undirected adjacency matrix refers to a graph feature node. When the graph feature nodes referred to by an element in the undirected adjacency matrix contain directly connected edges, the value of the element in the undirected adjacency matrix is ​​the weight of the corresponding edge in the wall feature undirected graph. When the graph feature nodes referred to by an element in the undirected adjacency matrix contain directly connected edges, the value of the element in the undirected adjacency matrix is ​​the weight of the corresponding edge in the wall feature undirected graph. When there is no directly connected edge between the graph feature nodes, the value of this element in the undirected adjacency matrix is ​​zero; a node weight matrix is ​​constructed based on the wall feature undirected graph, the node weight matrix is ​​a left diagonal matrix, the number of rows and columns in the node weight matrix are both the number of nodes in the wall feature undirected graph, each row in the node weight matrix refers to a graph feature node, and the value of each element on the left diagonal in the node weight matrix is ​​the sum of the weights of all directly connected edges of the graph feature node corresponding to the row; matrix calculation is performed on the node weight matrix and the undirected adjacency matrix to obtain the wall Las matrix; an eigendecomposition function is constructed based on the wall Las matrix, and the eigendecomposition function is solved to obtain the embedded eigenvector and embedded eigenvalue of each graph feature node, an anomaly score threshold is preset, and an anomaly score is performed on each graph feature node based on the embedded eigenvector and the embedded eigenvalue to obtain the anomaly score of each graph feature node; the synchronized wall data corresponding to the graph feature node with an anomaly score greater than or equal to the anomaly score threshold is marked as an abnormal data point, and the synchronized wall data corresponding to the graph feature node with an anomaly score less than the anomaly score threshold is marked as a regular data point.

6. The detection system for ancient city wall cavities according to claim 5, characterized in that: The calculation formula of the feature similarity is: Among them, Sim(a,b) represents the feature similarity between the a-th graph feature node and the b-th graph feature node, Hei represents the number of rows in the wall feature matrix, Wid represents the number of columns in the wall feature matrix, and a c,d represents the value of the cth row and dth column in the ath wall feature matrix, b c,d represents the value of the cth row and dth column in the bth wall feature matrix, and σ represents the similarity width parameter; The formula for abnormal scoring is: Among them, Sco e Represents the abnormal score of the e-th graph feature node, NE e represents the neighborhood node set of the e-th graph feature node. The neighborhood node set is the set of other graph feature nodes that have direct edges connected to the graph feature node in the wall feature undirected graph. u e Represents the embedded feature vector of the e-th graph feature node, u f represents the embedded feature vector of the fth graph feature node in the neighborhood node set, β e represents the embedded feature value of the e-th graph feature node, and Cod represents the number of elements in the neighborhood node set.

7. The detection system for ancient city wall cavities according to claim 6, characterized in that: The construction method of the anomaly detection model includes: Historical wall data and corresponding historical anomaly labels are collected. Based on the historical wall data and the corresponding historical anomaly labels, the historical wall data is used as the input of the anomaly detection model, the predicted wall anomaly category is used as the output of the anomaly detection model, and the actual historical anomaly labels are used as the prediction targets of the anomaly detection model for model training. An anomaly detection model is constructed. The anomaly detection model is a linear regression model, and the recall rate function is used as the target loss function of the anomaly detection model. Minimizing the value of the target loss function is used as the training goal, and an anomaly detection model with the smallest value of the target loss function is obtained.

8. The detection system for ancient city wall cavities according to claim 7, characterized in that: The method of gridding the regular data points and the abnormal data points includes: Select the data point with the smallest horizontal and vertical coordinates in the position data as the grid origin, initialize the scale of the grid origin to: (x, y), where x represents the horizontal axis value of the grid origin, y represents the vertical axis value of the grid origin, preset the grid span, and take the grid origin as the starting point based on the value of the grid span. Add one to the horizontal axis value of the grid origin for each increase in the horizontal coordinate of the grid span value, and add one to the vertical axis value of the grid origin for each increase in the vertical coordinate of the grid span value, to obtain the grid scale of the grid point corresponding to each data point, and all grid points form a two-dimensional grid map.

9. The detection system for ancient city wall cavities according to claim 8, characterized in that: The method of performing abnormal diffusion on the two-dimensional grid graph includes: Initialize the void development degree of the abnormal data point in the two-dimensional grid map based on the abnormal pattern, initialize the void development degree of other grid points to zero, use the eight-neighborhood discretization method to perform diffusion calculation on each grid point in the two-dimensional grid map, and obtain the diffusion intensity of each grid point; when the diffusion intensity of the grid point Core is greater than zero, it means that the Core is a diffused point, and the Core is diffused based on the diffusion intensity of the Core. The formula for diffusion enhancement is: in, Represents the degree of cavity development of the grid point Core at time v+1, represents the degree of cavity development of the grid point Core at time v+1, Des represents the diffusion coefficient, which is used to simulate the rate of cavity diffusion, ρ represents the natural diffusion factor, which is used to simulate the influence of the natural environment on cavity formation, and Δt represents the time step; when the diffusion intensity of the grid point Core is less than zero, it means that the Core is a diffusion source, and the Core is naturally enhanced. The formula for natural enhancement is:

10. The detection system for ancient city wall cavities according to claim 9, characterized in that: The formula for diffusion calculation is: in, Represents the diffusion intensity of the grid point at time v where the horizontal axis value is x and the vertical axis value is y in the two-dimensional grid diagram; It represents the degree of cavity development of the grid point at time v where the horizontal axis value is m and the vertical axis value is n in the two-dimensional grid diagram. Represents the degree of cavity development at the grid point with the horizontal axis value of x and the vertical axis value of y in the two-dimensional grid diagram at time v.