A Digital Twin Construction Method for Full-Scenario Monitoring Networks of Atmospheric, Water, and Soil
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-18
- Publication Date
- 2026-08-11
AI Technical Summary
[0003]现有数字孪生监测方法存在许多问题,例如,多采用全节点同频采集、全场景同步刷新或单介质独立告警的方式,难以兼顾多源异步数据的时延差异、跨介质传播关联以及边缘侧资源约束,当局部节点出现异常波动时,往往无法基于传播方向、空间距离和历史时延关系对下游节点进行有选择的级联唤醒,容易造成无效提频、渲染开销过大以及误触发累积,尤其在高并发或极端工况下,还可能引起缓冲区拥塞、调度失稳和孪生更新滞后,因而难以满足大气、水质、土壤全场景监测网络的精细化数字孪生构建需求
[0044]1、本发明通过在边缘计算网关对环境介质节点的时序数据进行滑动窗口方差计算,并结合连续多周期超阈值判定生成高频更新事件;该机制有效滤除实际监测环境中由短时干扰或偶发尖峰引起的假性突变,避免系统频繁无意义地进入高频采集状态,提升了边缘侧事件识别的稳定性,降低了网络通信与计算资源占用量;
Smart Images

Figure CN122550801A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of environmental monitoring and digital twin technology, specifically a method for constructing digital twins for monitoring networks covering all scenarios of air, water quality, and soil. Background Technology
[0002] Environmental monitoring systems for multi-media collaborative monitoring of air, water quality, and soil require the coordinated analysis of collected data from different media nodes in scenarios such as chemical industrial parks, watershed management, and soil remediation. This analysis is then used to drive the dynamic updating of digital twin models. Therefore, the key to ensuring the timeliness of monitoring and the consistency of the digital twin is to achieve efficient construction and real-time response of the full-scenario monitoring network under limited computing and communication resources.
[0003] Existing digital twin monitoring methods have many problems. For example, they often adopt the approach of collecting data at the same frequency across all nodes, updating data synchronously across all scenarios, or using independent alarms on a single medium. This makes it difficult to take into account the latency differences of asynchronous data from multiple sources, cross-media propagation correlations, and edge-side resource constraints. When local nodes experience abnormal fluctuations, it is often impossible to selectively cascade and wake up downstream nodes based on propagation direction, spatial distance, and historical latency relationships. This can easily lead to ineffective frequency increases, excessive rendering overhead, and the accumulation of false triggers. Especially under high concurrency or extreme conditions, it may also cause buffer congestion, scheduling instability, and delayed twin updates. Therefore, it is difficult to meet the requirements for the construction of refined digital twins for full-scenario monitoring networks of air, water quality, and soil. Summary of the Invention
[0004] The purpose of this invention is to provide a digital twin construction method for a full-scenario monitoring network of atmospheric, water, and soil quality, and to solve the following technical problems:
[0005] It avoids the waste of computing and communication resources caused by global synchronous updates, and can achieve a balance between high-efficiency response and efficient use of computing resources, making the update behavior of digital twins more consistent with the actual cross-domain propagation patterns.
[0006] The objective of this invention can be achieved through the following technical solutions:
[0007] A method for constructing digital twins for a full-scenario monitoring network of air, water, and soil, wherein the monitoring network is pre-built with a corresponding digital twin model, including:
[0008] Step 1: In the first-in-first-out queue with reduced frequency polling mode, write the first timing data of the first environmental medium node into the circular buffer;
[0009] Step 2: Calculate the sliding window variance of the first time series data to obtain the fluctuation characteristics of the local domain;
[0010] Step 3: When the fluctuation characteristic of this domain is greater than the preset fluctuation threshold, a high-frequency update event is generated; otherwise, the current mode is maintained.
[0011] Step 4: In response to the event, obtain the cross-domain time delay weight matrix between the first environmental medium node and the second and third environmental medium nodes, as well as the environmental vector parameter representing the direction of environmental medium flow, the location coordinates of the preset pollution source, and the location coordinates of each environmental medium node; calculate the spatial distance parameter based on the location coordinates of the preset pollution source and the location coordinates of each environmental medium node, and combine the environmental vector parameter with the dot product of the location vector of the preset pollution source pointing to the second or third environmental medium node and the spatial distance parameter to form a feature vector, perform matrix multiplication with the cross-domain time delay weight matrix, and take the magnitude of the result vector as the cascade triggering coefficient;
[0012] Step 5: When the cascade trigger coefficient is greater than the preset trigger threshold, generate a local rendering instruction and a node wake-up instruction; otherwise, maintain the original acquisition frequency of the second and third environmental media nodes.
[0013] Step 6: Render the digital twin model based on the local rendering instruction, and increase the acquisition frequency of the second or third environmental medium node based on the node wake-up instruction to obtain multi-dimensional data to update the physical attribute field;
[0014] Step 7: Calculate the variance of the time series data of the up-frequency node to obtain the actual fluctuation characteristics. If the variance is lower than the preset baseline threshold, the difference between the preset baseline threshold and the actual fluctuation characteristics is used as an error term. Based on the error term and the preset compensation coefficient, a linear multiplication and addition operation is performed to obtain the weight adjustment amount. The corresponding weight of the cross-domain delay weight matrix is reduced using the weight adjustment amount. Otherwise, it remains unchanged.
[0015] Preferably, in step 1, the first environmental medium node is an atmospheric micro-station node; the second environmental medium node is a water quality buoy node; and the third environmental medium node is a soil probe node. The process of acquiring the first time-series data of the first environmental medium node is as follows:
[0016] The concurrent data streams from the atmospheric micro-station nodes are received through a preset edge computing gateway to form the first time-series data.
[0017] Preferably, the specific processes of steps 2 and 3 are as follows:
[0018] The central processing unit of the preset edge computing gateway performs sliding window variance calculation on the first time-series data in the ring buffer to obtain the local domain fluctuation characteristics;
[0019] Determine whether the number of consecutive preset periods of the fluctuation characteristic in this domain is greater than the fluctuation threshold;
[0020] When the number of consecutive preset periods of the fluctuation characteristic in this domain exceeds the fluctuation threshold, the high-frequency update event is generated;
[0021] When the number of consecutive preset cycles of the fluctuation characteristic of this domain is less than or equal to the fluctuation threshold, the current frequency reduction polling mode based on the first-in-first-out queue is maintained.
[0022] Preferably, in step 4, the construction process of the cross-domain time delay weight matrix is as follows:
[0023] A directed acyclic graph is constructed based on a pre-defined historical database; wherein, the nodes of the directed acyclic graph are data tables, and the edges of the directed acyclic graph are dependencies.
[0024] Extract the time difference between the first characteristic peak of the first time-series data of the first environmental medium node in the historical database and the second characteristic peak of the time-series data of the second environmental medium node or the third environmental medium node;
[0025] The time difference is converted into dynamically updated weight coefficients to generate the cross-domain time delay weight matrix.
[0026] Preferably, in step 4, the process of calculating the cascading trigger coefficient is as follows:
[0027] Determine whether the spatial distance parameter is less than a preset distance threshold;
[0028] Determine whether the dot product result is positive;
[0029] When the spatial distance parameter is less than the distance threshold and the dot product result is positive, the combination of feature vector and matrix multiplication operation is performed, and the magnitude of the operation result vector is extracted as the cascade trigger coefficient.
[0030] When the spatial distance parameter is greater than or equal to the distance threshold, or when the dot product result is negative or zero, the cascade trigger coefficient is assigned a preset zero value.
[0031] Preferably, in step 6, the process of rendering the digital twin model based on the local rendering instruction and increasing the acquisition frequency of the second or third environmental medium node based on the node wake-up instruction is as follows:
[0032] Send an update data packet containing dirty rectangle markers to the preset cloud twin engine, instructing the cloud twin engine to redraw only the local fog particle effect;
[0033] Modify the underlying timer task of the preset edge computing gateway to dynamically change the serial port reading polling interval corresponding to the second or third environmental media node from the preset low-frequency sleep state time to the preset high-frequency state time.
[0034] Preferably, in step 7, the process of calculating the weight adjustment amount based on the error term using the gradient descent algorithm to reduce the corresponding weights of the cross-domain time delay weight matrix is as follows:
[0035] Events where the actual fluctuation characteristics are lower than the baseline threshold are recorded as false wake-up events;
[0036] The Boolean indicator parameter representing the occurrence of the false wake-up event, the error term, and the preset compensation coefficient are multiplied together, and the result of the multiplication is extracted as the weight adjustment amount.
[0037] The corresponding weight in the cross-domain delay weight matrix is reduced based on the weight adjustment amount.
[0038] Preferably, it also includes an abnormal degradation step:
[0039] Obtain the capacity status of the circular buffer;
[0040] Determine the relationship between the capacity status and the preset overflow threshold;
[0041] When the capacity state exceeds the overflow threshold, an extreme concurrency state is triggered; in response to the extreme concurrency state, the generation of the high-frequency update event is stopped, and the system scheduling logic is automatically degraded to the reduced-frequency polling mode based on the first-in-first-out queue.
[0042] When the capacity status is lower than or equal to the overflow threshold, the current system scheduling logic is maintained.
[0043] The beneficial effects of this invention are:
[0044] 1. This invention calculates the variance of time-series data of environmental media nodes using a sliding window at the edge computing gateway and generates high-frequency update events by combining continuous multi-cycle threshold judgment. This mechanism effectively filters out false mutations caused by short-term interference or occasional spikes in the actual monitoring environment, avoids the system from frequently and meaninglessly entering the high-frequency acquisition state, improves the stability of edge-side event recognition, and reduces the network communication and computing resource consumption.
[0045] 2. This invention introduces a cross-domain time delay weight matrix, which combines the dot product of the environment vector and the position vector with the spatial distance parameter to perform pre-screening and feature vector matrix operation; this method transforms the historical time delay of cross-media propagation into dynamic weights, and integrates real-time elements such as current wind direction and water flow direction to eliminate nodes that do not have the possibility of real propagation as early as possible, improve the accuracy of downstream node cascade wake-up, and reduce the computing resource occupation of edge devices.
[0046] 3. This invention achieves precise linkage between the cloud and edge by generating local rendering instructions with dirty rectangle markers and modifying the node wake-up instructions of the underlying timed tasks. On the one hand, it guides the cloud twin engine to only redraw the fog particle effect in the affected area, avoiding redundant computing resource consumption caused by full-scene rendering. On the other hand, it directly and dynamically modifies the polling interval of the underlying serial port of the edge gateway, realizing on-demand allocation and efficient local updates of computing and acquisition resources.
[0047] 4. This invention designs a self-correction mechanism for preventing false wake-ups based on the gradient descent algorithm. When the actual fluctuation characteristics of the downstream node after frequency increase are lower than the baseline threshold, it is determined to be a false wake-up. The loss function is constructed in combination with the error term to calculate the weight adjustment amount, thereby dynamically reducing the associated weight. This mechanism enables the system to get rid of its dependence on static experience, realize the continuous adaptive correction of cross-domain propagation scheduling logic, and significantly reduce the false trigger rate in the long-term operation of the system.
[0048] 5. This invention provides an abnormal degradation mechanism for extreme concurrent operating conditions; by monitoring the capacity status of the ring buffer in real time, it actively stops generating high-frequency events when the capacity exceeds the overflow threshold and degrades to a frequency reduction polling mode based on this; this abnormal rollback mechanism effectively prevents scheduling congestion and equipment crashes caused by extreme data floods, and ensures the data integrity and system availability of the core monitoring link in sudden severe environments. Attached Figure Description
[0049] The invention will now be further described with reference to the accompanying drawings:
[0050] Figure 1 This is a flowchart illustrating the digital twin construction method for a full-scenario monitoring network of atmospheric, water, and soil provided in an embodiment of the present invention. Detailed Implementation
[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] Please see Figure 1 A method for constructing digital twins for a full-scenario monitoring network of air, water, and soil, wherein the monitoring network is pre-built with a corresponding digital twin model, including:
[0053] Step 1: In the first-in-first-out queue with reduced frequency polling mode, write the first timing data of the first environmental medium node into the circular buffer;
[0054] Step 2: Calculate the sliding window variance of the first time series data to obtain the fluctuation characteristics of the local domain;
[0055] Step 3: When the fluctuation characteristic of this domain is greater than the preset fluctuation threshold, a high-frequency update event is generated; otherwise, the current mode is maintained.
[0056] Step 4: In response to the event, obtain the cross-domain time delay weight matrix between the first environmental medium node and the second and third environmental medium nodes, as well as the environmental vector parameter representing the direction of environmental medium flow, the location coordinates of the preset pollution source, and the location coordinates of each environmental medium node; calculate the spatial distance parameter based on the location coordinates of the preset pollution source and the location coordinates of each environmental medium node, and combine the dot product of the environmental vector parameter and the location vector of the preset pollution source pointing to the second or third environmental medium node with the spatial distance parameter to form a feature vector, perform matrix multiplication with the cross-domain time delay weight matrix, and take the magnitude of the result vector as the cascade triggering coefficient;
[0057] Step 5: When the cascade trigger coefficient is greater than the preset trigger threshold, generate a local rendering instruction and a node wake-up instruction; otherwise, maintain the original acquisition frequency of the second and third environmental media nodes.
[0058] Step 6: Render the digital twin model based on the local rendering instruction, and increase the acquisition frequency of the second or third environmental medium node based on the node wake-up instruction to obtain multi-dimensional data to update the physical attribute field;
[0059] Step 7: Calculate the variance of the time series data of the up-frequency node to obtain the actual fluctuation characteristics. If the variance is lower than the preset baseline threshold, the difference between the preset baseline threshold and the actual fluctuation characteristics is used as an error term. Based on the error term and the preset compensation coefficient, a linear multiplication and addition operation is performed to obtain the weight adjustment amount. The corresponding weight of the cross-domain delay weight matrix is reduced using the weight adjustment amount. Otherwise, it remains unchanged.
[0060] This embodiment provides a digital twin construction mechanism for an integrated monitoring network of atmosphere, water quality, and soil. Specifically, taking the environmental monitoring scenario of a sudden volatile organic compound leak accompanied by short-term rainfall in a chemical industrial park along the river as the main line, atmospheric micro-stations, water quality buoys, and soil probes are deployed in the park. The edge computing gateway is responsible for receiving data streams from different media nodes, and the cloud twin engine is responsible for maintaining the three-dimensional twin scene of the park.
[0061] The system does not update all nodes at the same frequency. Instead, it first maintains global inspection in a low-resource-consumption mode, and then decides whether to cascade wake-up and local rendering of relevant nodes based on local events.
[0062] In the initial state, the system enters a global frequency reduction polling mode based on a first-in-first-out queue; at this time, the atmospheric node collects data at the first reference frequency, and the water quality and soil nodes collect data at the second reference frequency, where the first reference frequency is greater than the second reference frequency; after receiving the first time-series data from the first environmental medium node, the edge gateway writes the data into the ring buffer in chronological order.
[0063] The first-in, first-out (FIFO) principle here ensures that older data is dequeued first and the latest data is continuously added, avoiding gateway congestion caused by unlimited cache growth.
[0064] For ease of explanation, assume that the length of the circular buffer is 10 sampling points, and the currently continuously written atmospheric concentration sequence is 12, 13, 13, 12, 14, 30, 35, 32, 31, 33;
[0065] Once the buffer is full, newly entered data will overwrite the earliest position, but the logical reading order is still organized according to time sequence; the edge gateway performs sliding window variance calculation on the first time-series data to obtain the fluctuation characteristics of the local domain;
[0066] For ease of understanding, we can assume the sliding window length is 5. The first 5 values, 12, 13, 13, 12, and 14, form a relatively stable window, with their variance falling within the first numerical range. The last 5 values, 30, 35, 32, 31, and 33, form another window. Although their variance can also be calculated, compared to the previous window, their mean and range of variation fall within the second numerical range, which is larger than the first numerical range, indicating that abnormal fluctuations have occurred.
[0067] In a specific simulation example, it can also be understood as follows: if the data in a certain window is concentrated between 10 and 15, the variance is low; if 14 and 35 appear in a certain window at the same time, the variance increases significantly; in this embodiment, the calculation result is used as the fluctuation characteristic of this domain and compared with the preset fluctuation threshold.
[0068] When the fluctuation characteristics of this domain exceed the preset fluctuation threshold, the system generates a high-frequency update event; otherwise, it maintains the current global frequency reduction polling mode. This high-frequency update event does not mean that all nodes increase their frequency at the same time, but rather serves as a trigger for further judging the risk of cross-domain propagation.
[0069] The high-frequency update event, as a precursor signal that indicates changes in the downstream medium, still needs to be combined with spatiotemporal correlation to further screen the nodes that truly need to be awakened;
[0070] After generating a high-frequency update event, the system calls the cross-domain delay weight matrix; this matrix is used to represent the degree of historical propagation correlation between the first environmental medium node and the second and third environmental medium nodes.
[0071] For ease of explanation, we can assume that the current atmospheric node corresponds to two downstream candidate nodes: a river buoy. Soil probes outside the factory boundary ;
[0072] Historical data suggests that atmospheric anomalies often cause [problems] within 2 hours. Changes may occur after 8 hours. The changes can be reflected in the matrix as different magnitudes of correlation weights; for example, the correspondence can be simplified to [0.8, 0.3].
[0073] At the same time, the system calculates the location vector based on the preset pollution source coordinates and candidate node coordinates, and obtains the spatial distance parameters from the node to the pollution source; then it reads environmental vector parameters, such as wind direction or surface runoff direction.
[0074] Furthermore, the environmental vector and the position vector are multiplied by a dot product to determine whether the propagation direction is consistent. If the dot product is positive, it means that the propagation direction is roughly consistent with the node direction. If it is negative or zero, it means that under the current environmental conditions, the pollutants are unlikely to propagate toward the node.
[0075] To demonstrate the data flow, the pollution source can be positioned at coordinates. Water quality nodes lie in Then the position vector can be simplified to The spatial distance is 5; if the wind direction vector is The dot product is 7, which is positive; if the wind direction vector is... If the dot product is -7, then it is negative.
[0076] The system combines the dot product result with the spatial distance parameter to form a feature vector, for example, a column vector in the form of dot product value and distance value, and then performs matrix multiplication with the cross-domain time delay weight matrix;
[0077] If the submatrix extracted from the cross-domain delay weight matrix of the corresponding propagation chain is constructed into a two-dimensional diagonal matrix with main diagonal elements of 0.8 and 0.3 respectively, and the eigenvectors are preprocessed into column vectors... The result vector obtained after performing matrix multiplication on the two is: ;
[0078] Taking the modulus of the result vector, the arithmetic square root of the sum of squares can be calculated, which is approximately 5.8. This yields the cascading trigger coefficient. If this coefficient exceeds the preset trigger threshold, the wake-up call to the downstream node is deemed effective; otherwise, the original sampling frequency of the downstream node remains unchanged.
[0079] When the cascading trigger coefficient is greater than the preset trigger threshold, the system generates two types of outputs simultaneously: one is a local rendering instruction, which is used to notify the cloud twin engine to only refresh the affected area;
[0080] Secondly, there is the node wake-up command, which is used to temporarily increase the sampling frequency of the selected water quality or soil node; if the cascade trigger coefficient does not reach the threshold, then although atmospheric fluctuations have been detected, no additional computing and communication resources are allocated to the second environmental medium node and the third environmental medium node.
[0081] At the execution level, after receiving local rendering instructions, the cloud twin engine only updates the atmospheric atomization area near the pollution plume, the surface runoff area affected by rainfall, or the local color band of the river, without redrawing the entire 3D scene of the park.
[0082] Simultaneously, based on the node wake-up command, the edge gateway temporarily increases the sampling frequency of the target water quality buoy or soil probe, and after sampling, acquires multidimensional environmental data containing multiple environmental parameters, such as turbidity, conductivity, and dissolved oxygen in the water, or water content, conductivity, and temperature in the soil. These data are then mapped to the physical attribute field of the corresponding virtual entity in the twin model; the physical attribute field is used to characterize the parameter distribution state of the virtual river section or virtual plot at a specified time.
[0083] To prevent frequent false wake-ups, the system continues to perform closed-loop correction after the node frequency is increased; that is, within a preset time window, the variance of the downstream node time series data after the frequency increase is calculated again to obtain the actual fluctuation characteristics; if the actual fluctuation characteristics are lower than the preset baseline threshold, it indicates that the previous judgment was biased and an invalid wake-up occurred.
[0084] At this point, the difference between the baseline threshold and the actual fluctuation characteristics is used as the error term, and the weight of the corresponding edge in the cross-domain time delay weight matrix is reduced by gradient descent.
[0085] For ease of explanation, assuming the original weight of a certain side is 0.8, the current error term is 0.2, and the learning rate is set to 0.1, the update amount can be simplified to 0.02, and the updated weight becomes 0.78. Conversely, if the actual fluctuation characteristics are not lower than the baseline threshold, the original matrix is retained, indicating that the propagation chain still has a strong correlation confidence.
[0086] As a supplement, when an atmospheric fluctuation is very high, but the corresponding downstream nodes are too far apart, the propagation directions are inconsistent, or the magnitude of the matrix multiplication result is still below the threshold, the system will not unconditionally increase the frequency of all nodes due to a single atmospheric change.
[0087] If network jitter after frequency increase causes some downstream data packets to arrive late, the gateway can retain the existing buffered data and perform a recalculation after the time window ends to prevent short-term communication failure from directly changing the association weight.
[0088] If a node remains offline, skip the weight update for that node within this window and only record the data missing flag once to avoid misjudging communication anomalies as missing physical changes.
[0089] During the nighttime inspection phase of the riverside chemical industrial park, atmospheric micro-stations... When the VOCs concentration was detected to rise from 14 to 33 within tens of seconds, the edge gateway completed the sliding window variance calculation within the ring buffer and generated a high-frequency update event after confirming that it was greater than the threshold.
[0090] The system further read the historical propagation matrix and discovered... to river buoy The association weight is greater than to soil probe Furthermore, the current wind direction and rainwater runoff direction are both towards the river channel, therefore the calculation yields... The corresponding cascading trigger coefficient exceeds the threshold, and The threshold was not exceeded;
[0091] Therefore, the cloud-based twin scene only redraws the pollution plume between the chemical tank area and the river, as well as a localized area of the river surface, while the edge gateway only redraws... The sampling interval is increased from the low-frequency state to the high-frequency state;
[0092] If two hours later If there is a significant increase in variance in turbidity and conductivity, then the correlation weights are maintained; if If all parameters remain close to normal, the system will reduce the weight of this propagation chain to reduce false wake-ups under similar weather conditions in the future.
[0093] The purpose of this step is to transform the asynchronous change characteristics of different environmental media into computable scheduling logic and twin update logic through a closed-loop process of local detection, cross-domain screening, local execution, and feedback correction. This achieves a balance between high-efficiency response and efficient utilization of computing resources, and makes the update behavior of digital twins more consistent with the actual cross-domain propagation patterns.
[0094] In a preferred embodiment of the present invention, in step 1, the first environmental medium node is an atmospheric micro-station node; the second environmental medium node is a water quality buoy node; and the third environmental medium node is a soil probe node. The process of obtaining the first time-series data of the first environmental medium node is as follows: receiving the concurrent data stream of the atmospheric micro-station node through a preset edge computing gateway to form the first time-series data.
[0095] This embodiment provides a mechanism for limiting the specific type and data access method of the first environmental medium node; specifically, in the aforementioned riverside chemical industrial park scenario, the first environmental medium node is selected as an atmospheric micro-station node, the second environmental medium node is selected as a water quality buoy node, and the third environmental medium node is selected as a soil probe node. The concurrent data stream of the atmospheric micro-station is uniformly received through the edge computing gateway, thereby forming the first time-series data for subsequent fluctuation identification.
[0096] In actual deployment, atmospheric micro-stations typically have a higher sampling frequency and a wider range of indicators than water quality buoys and soil probes. For example, they can simultaneously output multiple data sources such as PM2.5, PM10, VOCs, wind speed, wind direction, temperature and humidity.
[0097] If these multiple data streams are sent directly to the cloud for integration, a large number of fragmented messages will exist between the front end and the cloud, and the arrival times of different messages will be inconsistent, which will make it difficult to quickly determine whether a sudden change has occurred in the local domain at the edge.
[0098] Therefore, in this embodiment, the atmospheric micro-station is set as the source node for event triggering, and its concurrent data streams are aggregated by the edge computing gateway;
[0099] The concurrent data stream here can be understood as data frames reported by multiple indicator channels almost simultaneously; for example, within a certain second, the atmospheric micro-station reports VOCs=33, PM2.5=81, wind direction=northeast, and wind speed=4.2m / s;
[0100] The edge computing gateway performs unified time alignment on these data frames, integrating data from the same sampling time or adjacent tolerance times into a single record, such as time t1: VOCs 33, PM2.5 81, wind direction northeast, wind speed 4.2; continuous integrated records constitute the first time series data.
[0101] For the sake of clarity and detailed explanation, the three consecutive integrated records can be simplified as follows: the first record is [12, 35, East wind], the second record is [13, 36, East wind], and the third record is [33, 80, Northeast wind].
[0102] In subsequent variance calculations, calculations can be performed on single target indicators such as VOCs, or on a combination of preset indicators.
[0103] Correspondingly, water quality buoys and soil probes are not used as initial high-frequency triggering sources, but rather as candidate nodes for passive wake-up. The reason for this arrangement is that the atmosphere usually shows abnormal signs first, while changes in water and soil have a certain transmission delay. Using atmospheric micro-stations as the first environmental medium node helps to reduce the overall system's response waiting time.
[0104] As a supplement, if the edge computing gateway only receives some indicators from the atmospheric micro-station in a certain sampling period, such as receiving VOCs but not wind direction, the existing indicators can be written into the temporary storage area first, and the missing indicators can be supplemented within the tolerance period.
[0105] If the missing data is not completed within the time limit, the wind direction value of the previous valid period or the preset default mark will be used to complete the record assembly, but the record will be marked as partially missing at the same time. This avoids interrupting the entire time sequence due to a single missing item, and ensures the credibility of the record when determining the propagation direction in the future.
[0106] Near tank area A in the chemical industrial park, the atmospheric micro-station reports multi-indicator data every 30 seconds; the edge computing gateway receives VOCs reports, particulate matter reports and meteorological reports from the micro-station within the same time window, and reassembles them into a unified time series.
[0107] In contrast, water quality buoys on the river. Continue low-frequency sampling, soil probes outside the plant boundary It also remains dormant; only when the aforementioned atmospheric timing is determined to be abnormal, or Only then can the subsequent processes proceed;
[0108] The purpose of this step is to clarify the roles of various nodes in the system, so that the data access link has a stable trigger source and clear downstream candidate objects, thereby enabling the edge side to quickly integrate high-frequency concurrent data and make subsequent event judgments.
[0109] In a preferred embodiment of the present invention, the specific processes of steps 2 and 3 are as follows: using the central processing unit of a preset edge computing gateway to perform sliding window variance calculation on the first time-series data in the circular buffer to obtain the local domain fluctuation characteristics; determining whether the local domain fluctuation characteristics have a continuous preset number of periods greater than the fluctuation threshold;
[0110] When the number of consecutive preset periods of the local domain fluctuation feature is greater than the fluctuation threshold, the high-frequency update event is generated; when the number of consecutive preset periods of the local domain fluctuation feature is less than or equal to the fluctuation threshold, the current frequency reduction polling mode based on the first-in-first-out queue is maintained.
[0111] This embodiment provides a mechanism for steady-state constraint of local fluctuation identification; specifically, in the aforementioned scenario, triggering high-frequency updates based solely on the variance of a single window exceeding the threshold is easily affected by occasional spikes, sampling jitter, or single message anomalies.
[0112] Therefore, this embodiment further specifies that after the central processing unit of the edge computing gateway performs sliding window variance calculation on the first time-series data in the ring buffer, it also needs to determine whether the fluctuation characteristics of the local domain are greater than the fluctuation threshold for multiple consecutive preset periods. Only when the consecutive conditions are met will a high-frequency update event be generated.
[0113] In the simplified example, assume the sliding window length is 5, the fluctuation threshold is set to 20, and the number of consecutive judgment periods is set to 3; the edge gateway CPU sequentially forms windows for the 5 most recent sampling points and calculates the variance to obtain the window result sequence; for example, the variances of the four consecutive windows are 8, 24, 26, and 25, respectively;
[0114] Since the second, third, and fourth windows are all above 20, the system generates a high-frequency update event. If the window result sequence is 8, 24, 18, and 25, then although the second and fourth windows each exceed the threshold, they are interrupted by 18 in the middle, so the continuity is not established. In this case, the global frequency reduction polling mode is still maintained.
[0115] This continuous determination mechanism is used to address the over-triggering defect caused by single-point spikes in the previous layer scheme. In actual monitoring environments, atmospheric microstations may experience one-time abnormal values due to short-term electromagnetic interference, local eddies at wind vents, or transient message duplication. Without increasing the continuity constraint, the system may frequently enter high-frequency states, leading to unnecessary occupation of network and computing resources.
[0116] When implemented at the edge, the central processing unit does not need to save all historical data; it only needs to maintain the most recent sampling points and the most recent window decision results in the circular buffer.
[0117] For example, an additional Boolean queue of length 3 can be maintained, with the window variance being 1 if it is higher than the threshold and 0 otherwise; a high-frequency update event is generated when the queue content is [1, 1, 1]; no event is triggered when the content is [1, 0, 1], [0, 1, 1], etc.; this reduces memory overhead and facilitates real-time execution on industrial gateways.
[0118] As an exception handling mechanism, if data is missing during the sampling period, resulting in insufficient elements in the current window, two processing methods can be adopted: First, skip the window and maintain the previous continuous count unchanged; Second, when the missing proportion is lower than the tolerance threshold, fill it with the most recent valid value and continue the calculation.
[0119] If the missing percentage is too high, the current window will be determined as an invalid window and the continuous count will be automatically reset to zero to prevent incomplete data from causing high-frequency updates; if the window variance is exactly equal to the threshold, it will be handled according to the rule that it will not be triggered if it is below or equal to the threshold, so as to ensure that the triggering boundary is clear.
[0120] Atmospheric micro-stations during the late night hours in the chemical industrial park The continuously reported VOCs values are 14, 15, 14, 16, 35, 36, 34, and 33. The edge gateway CPU calculates the variance using a sliding window of length 5. The variance in the first few windows may gradually increase as 35 and 36 are mixed in at the end.
[0121] If the variance of three consecutive windows exceeds the threshold, it indicates that it is not an occasional spike, but a continuous abnormal release. Only then will the system officially generate a high-frequency update event and enter the subsequent cross-domain propagation judgment. If it is just a single sample value that spikes instantaneously and then recovers quickly, the continuous condition is not met, and the system still maintains the low-overhead inspection state.
[0122] The purpose of this mechanism is to replace single threshold exceedances with continuous threshold exceedances as the event triggering basis, thereby suppressing noise and occasional anomalies and improving the stability of edge-side event recognition.
[0123] In a preferred embodiment of the present invention, in step 4, the process of constructing the cross-domain delay weight matrix is as follows: constructing a directed acyclic graph based on a preset historical database; wherein, the nodes of the directed acyclic graph are data tables, and the edges of the directed acyclic graph are dependencies;
[0124] Extract the time difference between the first characteristic peak of the first time-series data of the first environmental medium node in the historical database and the second characteristic peak of the time-series data of the second environmental medium node or the third environmental medium node; convert the time difference into dynamically updated weight coefficients to generate the cross-domain delay weight matrix.
[0125] This embodiment provides a mechanism for constructing a cross-domain delay weight matrix; specifically, after the aforementioned continuous threshold recognition, if the decision to wake up downstream nodes is still based solely on the current spatial location and environmental direction, it is easy to overlook the fact that there is an inherent propagation delay between different media.
[0126] For example, atmospheric anomalies and river anomalies may be 2 hours apart, and atmospheric anomalies and soil anomalies may be 8 hours apart. Without historical time delay information, the system may make a misjudgment that the two should change synchronously, resulting in premature or late wake-up. Therefore, this embodiment introduces a directed acyclic graph on the historical database and its corresponding cross-domain time delay weight matrix.
[0127] The system constructs a directed acyclic graph based on a historical database; the nodes in the graph are not the sensor hardware itself, but rather their corresponding data tables or logical datasets; for example, an atmospheric data table can be set up. Water quality data table Soil Data Table ;
[0128] The edges in the graph represent data dependencies, meaning that historically, a certain type of upstream change precedes a certain type of downstream change in time, and this sequential relationship is repeatable. Since propagation dependencies should have a temporal order, back edges are not set in the graph structure to avoid forming cycles.
[0129] The system extracts the time difference between characteristic peaks from the historical database; the first characteristic peak can be the local maximum value of atmospheric VOCs concentration, and the second characteristic peak can be the local maximum value of water turbidity or soil electrical conductivity.
[0130] For ease of illustration, let's assume there were three similar events in history: the first time, the atmospheric peak occurred at 10:00, and the water quality peak occurred at 12:00, a time difference of 2 hours;
[0131] The second time, the atmospheric peak occurred at 18:00, and the water quality peak occurred at 20:30, with a time difference of 2.5 hours; the third time, the atmospheric peak occurred at 06:00, and the water quality peak occurred at 08:00, with a time difference of 2 hours.
[0132] but arrive The propagation delay along this edge can be estimated to be approximately 2 to 2.5 hours; for soil probes In other words, if the time differences between the three events are 7 hours, 8 hours, and 9 hours respectively, then it means... arrive The transmission chain is slower;
[0133] After converting these time differences into dynamically updated weight coefficients, the cross-domain delay weight matrix can be obtained. Specifically, the system calculates the standard deviation of the multiple time difference samples extracted above to quantify the dispersion of the propagation link delay.
[0134] A preset exponential decay function is introduced to map the standard deviation to an initial weight between 0 and 1, thereby following the calculation flow rule that the more concentrated the time delay distribution and the smaller the dispersion, the higher the basic weight.
[0135] For example, for arrive Because the three time differences are relatively concentrated, i.e., the standard deviation is small, the base weight after mapping can be set to 0.8; arrive Because the time difference is longer and the dispersion is greater, i.e. the standard deviation is larger, the base weight after mapping can be set to 0.4.
[0136] To accommodate matrix multiplication operations that include two-dimensional features of dot product and spatial distance, the system expands the associated weights of each edge into a two-dimensional diagonal submatrix, with the diagonal elements corresponding to the weights of the directional features and the weights of the distance features, respectively.
[0137] In a simplified example Corresponding downstream nodes The cross-domain delay weight submatrix can be represented as a two-dimensional diagonal matrix with main diagonal elements of 0.8 and 0.3, respectively. correspond The submatrices can be deduced in the same way;
[0138] The submatrices of each edge together constitute the complete cross-domain time delay weight matrix; if another atmospheric node and If there is almost no stable order relationship between them, then the diagonal elements of the corresponding submatrices are all close to 0;
[0139] The directed acyclic graph is introduced here to address the problem that simple statistical tables cannot adequately represent multi-link dependencies; for example, historically, there may have been... It first affects the subsidence zone, and then influences it through surface runoff. Alternatively, it could first deposit in the bare soil area of the factory site, and then have a later impact. ;
[0140] By recording dependency edges using a graph structure, the direction and hierarchy of relationships can be preserved during matrix generation, thereby avoiding confusion of relationships that should not be interpreted in reverse.
[0141] As an anomaly handling mechanism, if the number of historical database samples is too small, for example, if only one suspicious event has occurred, the weight of the edge should not be set to a high value directly. Instead, a conservative initial weight, such as 0.2, should be assigned and the edge should be marked as a low-confidence associated edge.
[0142] If the data table structure changes due to sensor replacement within a certain period of time, the fields of the old and new tables can be mapped first before participating in the peak time difference calculation.
[0143] If the mapping fails, the edge will not be constructed temporarily to prevent the table structure change from being mistaken for a propagation rule; if the extracted time difference is negative, it indicates that the downstream peak is earlier than the upstream peak. In this case, a positive dependency edge will not be established to avoid violating the temporal causal direction.
[0144] In several past post-rain leak incidents at the Yanjiang Chemical Industrial Park, the system detected atmospheric micro-stations in the tank area. The peak VOCs typically occur 2 hours later at the corresponding river buoy. The turbidity peak value corresponds to the soil probe value after 8 hours. The peak conductivity;
[0145] Edge gateways or cloud services use this to create historical databases from point to , The directed edges are used to convert the time difference stability into corresponding matrix weights; when the atmospheric continuous exceedance occurs again the previous night, the system can directly call the matrix without having to analyze the propagation chain from scratch.
[0146] The purpose of this mechanism is to encode historical cross-media propagation delays into a weight matrix that can participate in real-time computation, thereby enabling refined judgment of the timing and priority of downstream node wake-up.
[0147] In a preferred embodiment of the present invention, step 4, the process of calculating the cascading trigger coefficient, is as follows: determining whether the spatial distance parameter is less than a preset distance threshold; determining whether the dot product result is positive;
[0148] When the spatial distance parameter is less than the distance threshold and the dot product result is positive, the combination of feature vector and matrix multiplication operation is performed, and the magnitude of the operation result vector is extracted as the cascade trigger coefficient.
[0149] When the spatial distance parameter is greater than or equal to the distance threshold, or when the dot product result is negative or zero, the cascade trigger coefficient is assigned a preset zero value.
[0150] This embodiment provides a mechanism for pre-screening of cascade triggering coefficients. Specifically, after the cross-domain delay weight matrix is already in place, if matrix operations are performed on all downstream nodes, although some nodes can still be filtered out by the threshold in the end, it will consume additional edge computing resources and will also allow nodes that are obviously unlikely to be affected to enter the candidate range.
[0151] Therefore, this embodiment first introduces a distance threshold and a direction consistency judgment. Only when both conditions are met—that the distance is close enough and the propagation direction is reasonable—will subsequent matrix multiplication and magnitude calculation be performed.
[0152] The system determines whether the spatial distance parameter of the candidate node is less than a preset distance threshold. This distance threshold can be preset according to the size of the monitoring area and the propagation characteristics of the medium. For example, a first distance threshold can be configured for river nodes and a second distance threshold can be configured for soil nodes. The first distance threshold is greater than the second distance threshold. If the spatial distance between the node and the pollution source is greater than the preset distance threshold, it is not suitable to be given priority in the current event, even if there are some historical correlations.
[0153] The system determines whether the dot product of the environmental vector and the location vector is positive; if the dot product is greater than zero, it indicates that the current wind direction or runoff direction is generally towards the node; if the dot product is less than or equal to zero, it indicates that the current environmental conditions do not support the propagation of pollutants to the node.
[0154] Only after these two conditions are met will the system combine the dot product result with the spatial distance parameter into a feature vector, and perform matrix multiplication with the cross-domain time delay weight matrix, extracting the magnitude of the result vector as the cascade triggering coefficient.
[0155] For ease of explanation, assume a distance threshold of 6 and a water quality node. The distance from the pollution source is 5, and the dot product result is 7, which meets the condition; soil nodes If the distance to the pollution source is 9, exceeding the threshold, it will be directly excluded.
[0156] right In other words, if the combined feature vector is a column vector The submatrix extracted from the cross-domain time delay weight matrix is a two-dimensional diagonal matrix with main diagonal elements of 0.8 and 0.3 respectively. The result vector of the matrix multiplication operation is then... The magnitude of the resulting vector is approximately 5.8.
[0157] If the trigger threshold is 5, then Enter the wake-up process; In this case, there is no need to perform matrix operations; the cascade triggering coefficients are directly assigned a value of zero.
[0158] This pre-screening step is used to remedy the deficiency in the previous layer scheme where historical correlations exist but the current scenario does not match; because the matrix formed in the past only indicates that it may propagate under certain conditions, but cannot guarantee that it will propagate at the current moment; by introducing distance and direction constraints, real-time scene elements can be embedded into the judgment process, making the wake-up decision closer to the scene.
[0159] As an exception handling mechanism, if the spatial distance is exactly equal to the threshold, it is directly set to zero according to the rule that it is not triggered if it is greater than or equal to the threshold;
[0160] If the dot product result is exactly zero, it means that the environment vector and the position vector are approximately perpendicular, and the current propagation direction is neither towards nor away from the node. In this case, it is also treated as not triggering.
[0161] If a candidate node lacks location coordinates and cannot be used to calculate distance or dot product, it is marked as a node with missing spatial parameters and will not participate in cascading triggering in the current round. It will be included in the calculation after the coordinate data is completed.
[0162] In the chemical industrial park After a VOCs anomaly occurs in the tank area, the system needs to... , , , Select the wake-up object from the four candidate nodes;
[0163] Located 5 kilometers southeast of the pollution source, and with the current wind and rain confluence direction also facing southeast, the dot product is positive, therefore it continues to participate in matrix operations;
[0164] Although it is also on the river, the distance is 11 kilometers, which exceeds the threshold, so it is directly set to zero; If the distance is relatively close but it is located in the current headwind direction, the dot product is negative, so it is set to zero directly;
[0165] Ultimately only If the cascading trigger coefficient exceeds the trigger threshold, it will be listed as a target for this cascading update.
[0166] The purpose of this mechanism is to eliminate nodes that do not have the potential for real-world propagation as early as possible through low-cost precondition filtering, thereby saving edge computing resources and improving the accuracy of cascading wake-up.
[0167] In a preferred embodiment of the present invention, in step 6, the process of rendering the digital twin model based on the local rendering instruction and increasing the acquisition frequency of the second or third environmental medium node based on the node wake-up instruction is as follows: sending an update data packet containing dirty rectangle markers to the preset cloud twin engine, instructing the cloud twin engine to only redraw the local fog particle effect.
[0168] Modify the underlying timer task of the preset edge computing gateway to dynamically change the serial port reading polling interval corresponding to the second or third environmental media node from the preset low-frequency sleep state time to the preset high-frequency state time.
[0169] This embodiment provides a specific execution mechanism for local rendering and node frequency enhancement. Specifically, if the traditional method of redrawing the entire scene and manually modifying the sampling period is still used after the aforementioned cascading trigger coefficient has exceeded the threshold, two problems will arise: First, the cloud graphics engine will consume redundant computing resources due to the full scene refresh.
[0170] Second, if the frequency increase of edge nodes cannot be automatically implemented at the timed task level, a truly executable closed loop cannot be formed. Therefore, this embodiment further implements local rendering as data packets marked with dirty rectangles and implements node wake-up as modifying the polling interval of the underlying timed task of the edge computing gateway.
[0171] On the rendering side, the system sends an update data packet to the cloud twin engine. The packet contains at least the spatial boundary of the affected area, the corresponding media type, and the intensity of change. The spatial boundary is described as a dirty rectangle. The dirty rectangle can be understood as the smallest enclosing area that needs to be redrawn this time.
[0172] For example, if the pollution plume only covers a narrow strip of land between the tank area and the river, the area can be framed by a rectangle R1 on the planar projection. The cloud twin engine will only refresh the atmospheric atomized particles, rainfall diffusion texture, or local color layer of the river surface within R1, while keeping the other areas unchanged. In this way, the range of geometric updates, particle calculations, and texture resampling in the graphics pipeline is compressed to a local area.
[0173] On the frequency boosting side, after the edge computing gateway receives the node wake-up command generated by the local scheduling module, it directly modifies the underlying timed task. For ease of explanation, assume that the original polling interval of a certain water quality buoy was 86,400 seconds, that is, once a day; when it is woken up, the underlying task configuration is modified to 3,600 seconds, that is, once an hour.
[0174] For more urgent downstream nodes, a higher frequency such as 300 seconds can be configured. The modification here is not a redeployment of the program, but a dynamic replacement of the time parameter corresponding to the target node in the existing scheduling table, which is suitable for rapid execution in industrial sites.
[0175] This execution refinement is used to address the deficiency in the previous layer scheme where decisions have been made but the execution granularity is still too coarse; only by specifying the interval between local redrawing and bottom-level polling to a specific, actionable execution target can the system truly achieve on-demand allocation of cloud computing resources and edge acquisition resources.
[0176] As an anomaly handling mechanism, if the cloud twin engine is temporarily unavailable, the edge gateway can still perform node frequency increase and temporarily store the local rendering data packets in the waiting queue, and resend them after the network is restored, so as to avoid the data acquisition link being affected by the graphics engine connection anomaly.
[0177] If the edge gateway fails to modify the timed task, for example, if the target serial port is occupied or the node driver has not been loaded, the system will keep the original sampling frequency of the node unchanged, and write back a wake-up not executed status, so that the node can be removed during subsequent closed-loop updates, to prevent the failure to detect changes due to the lack of frequency increase from being mistakenly judged as no physical change.
[0178] In a nighttime incident at the chemical industrial park, the system determined that only river buoys were involved. It needs to be awakened, and only the atmospheric plume area above the tank area to the drain outlet and the river surface texture near the river inlet need to be updated.
[0179] Therefore, the edge gateway sends a data packet containing the rectangular marker R1 to the cloud twin engine, and the cloud only redraws the fog particles and local river surface color bands within R1; simultaneously... The polling task in the gateway has been switched from once every 24 hours to once every hour; soil probe Since the triggering conditions were not met this time, it will remain in a low-frequency sleep state.
[0180] The purpose of this mechanism is to transform the upper-layer calculation results into specific executable rendering and scheduling actions, thereby achieving synchronous convergence and efficient local updates of resources at both the cloud and edge.
[0181] In a preferred embodiment of the present invention, step 7, the process of calculating the weight adjustment amount based on the error term using the gradient descent algorithm to reduce the corresponding weight of the cross-domain delay weight matrix, is as follows: recording events where the actual fluctuation characteristics are lower than the baseline threshold as false wake-up events; performing a product operation on the Boolean indicator parameter representing the occurrence of the false wake-up event, the error term, and the preset compensation coefficient, and extracting the result of the product operation as the weight adjustment amount; and reducing the corresponding weight in the cross-domain delay weight matrix based on the weight adjustment amount.
[0182] This embodiment provides a mechanism for self-correction of false wake-ups; specifically, in the aforementioned scheme, although the system can filter candidate nodes based on the historical matrix, distance, and direction, there may still be situations in the environment system where it appears that the propagation should occur, but in reality, no significant changes have taken place.
[0183] If each false wake-up is not fed back into the matrix, the system will retain excessively high correlation weights for a long time, causing the same type of misjudgment to occur repeatedly. Therefore, in this embodiment, the situation where the actual fluctuation characteristics are lower than the baseline threshold is recorded as a false wake-up event, and a target loss function is constructed based on the error term. The weight adjustment amount is calculated through gradient descent to reduce the weight of the corresponding edge.
[0184] After a downstream node is frequency-increased, the system statistically analyzes its actual fluctuation characteristics within a preset time window; if the value is lower than the baseline threshold, a false wake-up record is generated.
[0185] For example, system expectations Significant turbidity fluctuations will occur after frequency increase. Let the baseline threshold be 10. However, the actual calculated variance is only 4. Therefore, the error term can be taken as 10 minus 4, which is 6. The larger the error term, the greater the difference between the actual change and the expectation.
[0186] The system combines the error term with the false wake-up event into a target loss function. Specifically, the false wake-up event is quantified as a Boolean indicator parameter, which takes a value of 1 if a false wake-up occurs and a value of 0 otherwise. The constructed target loss function is a direct proportional function of the indicator parameter and the square of the error term, used to assess the degree to which the actual fluctuation deviates from the expectation.
[0187] The weight adjustment is calculated by taking the partial derivative of the target loss function with respect to the current weights using the gradient descent algorithm. The calculated weight adjustment is numerically equal to the product of the preset learning rate, the indicator parameter, and the error term.
[0188] In the simplified example, assuming the baseline threshold is 10 and the actual calculated variance is 4, the error term is 6; due to a false wake-up, the indicator parameter is 1; if the learning rate is set to 0.05, then according to the above product rule, the weight adjustment is... ;
[0189] If the current weight of an edge is 0.8, after adjusting the weight by that amount, the updated edge weight becomes... ;
[0190] This quantification rule clarifies that only when a false wake-up occurs with an indicator parameter of 1 will the penalty intensity be dynamically determined based on the specific value of the difference between the actual fluctuation and the baseline, i.e., the error term, so that the weight decays to a reasonable range more quickly.
[0191] If the same edge is falsely woken up multiple times in a row, its weight will gradually decrease, making it less likely to trigger cascading wake-ups in similar scenarios in the future.
[0192] This feedback mechanism is used to address the problem of excessive static experience and insufficient real-time correction in the previous layer scheme; especially after seasonal changes, changes in surface conditions or changes in sewage discharge conditions, the historical propagation pattern may deviate; through false wake-up feedback, the system does not rely on frequent manual matrix reset, but allows the weights to be automatically adjusted in a more conservative or realistic direction.
[0193] As an exception handling mechanism, if a node's communication is interrupted throughout the entire window after a frequency increase, the event will not be recorded as a false wake-up, but will be recorded separately as a data acquisition failure event, to avoid mistaking equipment failure as non-existence of propagation.
[0194] If the actual fluctuation characteristics are exactly equal to the baseline threshold, it is considered to have met the minimum effective change requirement and will not trigger a weight reduction. If multiple false wake-ups occur in a short period of time at the same node, a maximum reduction limit can be set for a single cycle, for example, not exceeding 0.1, to prevent excessive weight decay caused by individual abnormal weather.
[0195] River buoys following a nighttime leak in a chemical industrial park The sampling frequency was increased to once per hour, but the variances of turbidity and conductivity were significantly lower than the baseline threshold in three consecutive sampling windows.
[0196] The system therefore marked this event as a false wake-up and... arrive The matrix edge weights are updated by decreasing; a few days later, in another weaker leak event, although... Continuous exceedances still occur, but due to arrive The weight has been reduced, and the system only redraws local areas of the atmosphere, maintaining... The current sampling frequency is used to reduce redundant communication resource usage;
[0197] The purpose of this mechanism is to feed back the execution results from the field to the associated weights, thereby enabling continuous self-correction of the cross-domain propagation model and reducing the false trigger rate during long-term operation.
[0198] In a preferred embodiment of the present invention, an abnormal degradation step is further included: obtaining the capacity status of the circular buffer; determining the relationship between the capacity status and a preset overflow threshold; and determining that an extreme concurrency state is triggered when the capacity status is greater than the overflow threshold.
[0199] In response to the extreme concurrency state, the generation of the high-frequency update event is stopped, and the system scheduling logic is automatically degraded to the reduced-frequency polling mode based on the first-in-first-out queue; when the capacity state is lower than or equal to the overflow threshold, the current system scheduling logic is maintained.
[0200] This embodiment provides an abnormal degradation mechanism for extreme concurrent operating conditions. Specifically, in the aforementioned scheme, the system relies on event-driven scheduling to achieve efficient scheduling. However, in extreme scenarios, such as rainstorms, power outages, sudden changes in surface runoff, and simultaneous occurrence of multiple source alarms, the edge computing gateway receives more data than a preset throughput threshold within a preset time period.
[0201] If we continue to generate high-frequency update events and wake up downstream nodes at this point, it may exhaust the ring buffer, cause congestion of the scheduling thread, and ultimately lead to instability of the entire machine. Therefore, this embodiment monitors the capacity status of the ring buffer and automatically enters the abnormal degradation process when it exceeds the overflow threshold.
[0202] The edge gateway continuously monitors the capacity status of the ring buffer, which can be represented by the number of occupied slots, the percentage occupied, or the equivalent queue length.
[0203] For ease of explanation, assume the total buffer capacity is 1000 records and the overflow threshold is set to 850 records. Under normal circumstances, the occupancy rate remains between 200 and 400. If, during a sudden event, atmospheric micro-stations, water quality buoys, and soil probes simultaneously report at high frequency, and the occupancy rate rapidly rises to 900, it indicates that the system has entered an extreme concurrency state.
[0204] Once the capacity exceeds the overflow threshold, the system immediately stops generating new high-frequency update events. Here, stopping generation means that even if some windows still meet the threshold condition, no new cascading operations and node wake-ups will be triggered. Instead, all scheduling logic will degenerate into a global reduced-frequency polling mode of a first-in-first-out queue.
[0205] At this point, the system prioritizes continuous data acquisition and maintaining the basic operation of the gateway, and stops executing asynchronous cascading scheduling. At this time, old data is processed in a first-in-first-out order, and new data is written and polled at a uniformly reduced frequency to avoid further amplifying the peak of concurrent data.
[0206] This degradation design is used to remedy the defect in the aforementioned scheme that event-driven approaches may amplify system load under extreme traffic; through proactive degradation, the system can switch from pursuing high timeliness to pursuing high survivability, enabling the edge gateway to maintain basic operation under resource-constrained conditions;
[0207] As a supplement, if the capacity status drops back below the threshold, for example from 900 to 700, the system can maintain the current degradation mode until it is consistently below the threshold for several consecutive monitoring cycles, and then restore the normal event-driven logic to avoid frequent switching back and forth near the threshold.
[0208] If the buffer is nearly full and some data types have different importance, timestamps, node numbers and core pollution indicators can be retained first, while secondary extended fields are delayed to further reduce instantaneous write pressure. If the capacity status acquisition module itself is abnormal, the system will enter conservative mode by default, that is, it will not generate high-frequency update events until the status monitoring is restored.
[0209] When the chemical industrial park along the river encountered severe convective weather, multiple atmospheric micro-stations simultaneously reported violent fluctuations. Rainfall also caused river and soil monitoring points to transmit data intensively in a short period of time, and the occupancy rate of the ring buffer of the edge gateway exceeded 85%.
[0210] Based on this, the system determines that it has entered an extreme concurrency state, immediately stops new cascading wake-ups, no longer attempts to calculate downstream trigger coefficients one by one, and uniformly switches back to the global frequency reduction polling mode;
[0211] Although the update time resolution of the twin images decreased at this time, the gateway did not experience a system crash, and the core monitoring link continued to operate. The normal strategy will be gradually restored after the weather stabilizes.
[0212] The purpose of this mechanism is to provide a clear fallback path for event-driven architectures, thereby ensuring system availability and protecting resources under extreme traffic conditions.
[0213] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. A method for constructing digital twins for a full-scenario monitoring network of atmospheric, water, and soil quality, characterized in that: The monitoring network is pre-built with a corresponding digital twin model, including: Step 1: In the first-in-first-out queue with reduced frequency polling mode, write the first timing data of the first environmental medium node into the circular buffer; Step 2: Calculate the sliding window variance of the first time series data to obtain the fluctuation characteristics of the local domain; Step 3: When the fluctuation characteristic of this domain is greater than the preset fluctuation threshold, a high-frequency update event is generated; otherwise, the current mode is maintained. Step 4: In response to the event, obtain the cross-domain time delay weight matrix between the first environmental medium node and the second and third environmental medium nodes, as well as the environmental vector parameter representing the direction of environmental medium flow, the location coordinates of the preset pollution source, and the location coordinates of each environmental medium node; calculate the spatial distance parameter based on the location coordinates of the preset pollution source and the location coordinates of each environmental medium node, and combine the environmental vector parameter with the dot product of the location vector of the preset pollution source pointing to the second or third environmental medium node and the spatial distance parameter to form a feature vector, perform matrix multiplication with the cross-domain time delay weight matrix, and take the magnitude of the result vector as the cascade triggering coefficient; Step 5: When the cascade trigger coefficient is greater than the preset trigger threshold, generate a local rendering instruction and a node wake-up instruction; otherwise, maintain the original acquisition frequency of the second and third environmental media nodes. Step 6: Render the digital twin model based on the local rendering instruction, and increase the acquisition frequency of the second or third environmental medium node based on the node wake-up instruction to obtain multi-dimensional data to update the physical attribute field; Step 7: Calculate the variance of the time series data of the up-frequency node to obtain the actual fluctuation characteristics. If the variance is lower than the preset baseline threshold, the difference between the preset baseline threshold and the actual fluctuation characteristics is used as an error term. Based on the error term and the preset compensation coefficient, a linear multiplication and addition operation is performed to obtain the weight adjustment amount. The corresponding weight of the cross-domain delay weight matrix is reduced using the weight adjustment amount. Otherwise, it remains unchanged.
2. The digital twin construction method for a full-scenario monitoring network of air, water, and soil according to claim 1, characterized in that, In step 1, the first environmental media node is an atmospheric micro-station node; the second environmental media node is a water quality buoy node; and the third environmental media node is a soil probe node. The process of acquiring the first time-series data of the first environmental media node is as follows: The concurrent data streams from the atmospheric micro-station nodes are received through a preset edge computing gateway to form the first time-series data.
3. The digital twin construction method for a full-scenario monitoring network of air, water, and soil according to claim 1, characterized in that, The specific processes of steps 2 and 3 are as follows: The central processing unit of the preset edge computing gateway performs sliding window variance calculation on the first time-series data in the ring buffer to obtain the local domain fluctuation characteristics; Determine whether the number of consecutive preset periods of the fluctuation characteristic in this domain is greater than the fluctuation threshold; When the number of consecutive preset periods of the fluctuation characteristic in this domain exceeds the fluctuation threshold, the high-frequency update event is generated; When the number of consecutive preset cycles of the fluctuation characteristic of this domain is less than or equal to the fluctuation threshold, the current frequency reduction polling mode based on the first-in-first-out queue is maintained.
4. The digital twin construction method for a full-scenario monitoring network of air, water, and soil according to claim 1, characterized in that, In step 4, the construction process of the cross-domain time delay weight matrix is as follows: A directed acyclic graph is constructed based on a pre-defined historical database; wherein, the nodes of the directed acyclic graph are data tables, and the edges of the directed acyclic graph are dependencies. Extract the time difference between the first characteristic peak of the first time-series data of the first environmental medium node in the historical database and the second characteristic peak of the time-series data of the second environmental medium node or the third environmental medium node; The time difference is converted into dynamically updated weight coefficients to generate the cross-domain time delay weight matrix.
5. The digital twin construction method for a full-scenario monitoring network of air, water, and soil according to claim 1, characterized in that, In step 4, the process of calculating the cascading trigger coefficient is as follows: Determine whether the spatial distance parameter is less than a preset distance threshold; Determine whether the dot product result is positive; When the spatial distance parameter is less than the distance threshold and the dot product result is positive, the combination into a feature vector and the matrix multiplication operation are performed, and the magnitude of the operation result vector is extracted as the cascade trigger coefficient. When the spatial distance parameter is greater than or equal to the distance threshold, or when the dot product result is negative or zero, the cascade trigger coefficient is assigned a preset zero value.
6. The digital twin construction method for a full-scenario monitoring network of air, water, and soil according to claim 1, characterized in that, In step 6, the process of rendering the digital twin model based on the local rendering instruction and increasing the acquisition frequency of the second or third environmental medium node based on the node wake-up instruction is as follows: Send an update data packet containing dirty rectangle markers to the preset cloud twin engine, instructing the cloud twin engine to redraw only the local fog particle effect; Modify the underlying timer task of the preset edge computing gateway to dynamically change the serial port reading polling interval corresponding to the second or third environmental media node from the preset low-frequency sleep state time to the preset high-frequency state time.
7. The digital twin construction method for a full-scenario monitoring network of air, water, and soil according to claim 1, characterized in that, In step 7, the process of calculating the weight adjustment amount based on the error term using the gradient descent algorithm to reduce the corresponding weights of the cross-domain time delay weight matrix is as follows: Events where the actual fluctuation characteristics are lower than the baseline threshold are recorded as false wake-up events; The Boolean indicator parameter representing the occurrence of the false wake-up event, the error term, and the preset compensation coefficient are multiplied together, and the result of the multiplication is extracted as the weight adjustment amount. The corresponding weight in the cross-domain delay weight matrix is reduced based on the weight adjustment amount.
8. The digital twin construction method for a full-scenario monitoring network of air, water, and soil according to claim 1, characterized in that, It also includes abnormal degradation steps: Obtain the capacity status of the circular buffer; Determine the relationship between the capacity status and the preset overflow threshold; When the capacity state exceeds the overflow threshold, an extreme concurrency state is determined to be triggered. In response to the extreme concurrency state, the generation of the high-frequency update event is stopped, and the system scheduling logic is automatically degraded to a reduced-frequency polling mode based on a first-in-first-out queue. When the capacity status is lower than or equal to the overflow threshold, the current system scheduling logic is maintained.